Attempt to extrude the list of wires into a prismatic solid in the provided direction :param outerWire: the outermost wire :param innerWires: a list of inner wires :param vecNormal: a vector along which to extrude the wires :param taper: taper angle, default
(
cls,
outerWire: Wire,
innerWires: list[Wire],
vecNormal: VectorLike,
taper: Real = 0,
)
| 4449 | @mypyclassmethod |
| 4450 | @multimethod |
| 4451 | def extrudeLinear( |
| 4452 | cls, |
| 4453 | outerWire: Wire, |
| 4454 | innerWires: list[Wire], |
| 4455 | vecNormal: VectorLike, |
| 4456 | taper: Real = 0, |
| 4457 | ) -> Solid: |
| 4458 | """ |
| 4459 | Attempt to extrude the list of wires into a prismatic solid in the provided direction |
| 4460 | |
| 4461 | :param outerWire: the outermost wire |
| 4462 | :param innerWires: a list of inner wires |
| 4463 | :param vecNormal: a vector along which to extrude the wires |
| 4464 | :param taper: taper angle, default=0 |
| 4465 | :return: a Solid object |
| 4466 | |
| 4467 | The wires must not intersect |
| 4468 | |
| 4469 | Extruding wires is very non-trivial. Nested wires imply very different geometry, and |
| 4470 | there are many geometries that are invalid. In general, the following conditions must be met: |
| 4471 | |
| 4472 | * all wires must be closed |
| 4473 | * there cannot be any intersecting or self-intersecting wires |
| 4474 | * wires must be listed from outside in |
| 4475 | * more than one levels of nesting is not supported reliably |
| 4476 | |
| 4477 | This method will attempt to sort the wires, but there is much work remaining to make this method |
| 4478 | reliable. |
| 4479 | """ |
| 4480 | |
| 4481 | if taper == 0: |
| 4482 | face = Face.makeFromWires(outerWire, innerWires) |
| 4483 | else: |
| 4484 | face = Face.makeFromWires(outerWire) |
| 4485 | |
| 4486 | return cls.extrudeLinear(face, vecNormal, taper) |
| 4487 | |
| 4488 | @classmethod |
| 4489 | @multimethod |