Make a lofted solid, through the set of wires. :param ruled: When set to `True` connects each section linearly and without continuity :param combine: True or "a" to combine the resulting solid with parent solids if found, "cut" or "s" to remove the resulting sol
(
self: T, ruled: bool = False, combine: CombineMode = True, clean: bool = True
)
| 3613 | return self.newObject([s]) |
| 3614 | |
| 3615 | def loft( |
| 3616 | self: T, ruled: bool = False, combine: CombineMode = True, clean: bool = True |
| 3617 | ) -> T: |
| 3618 | """ |
| 3619 | Make a lofted solid, through the set of wires. |
| 3620 | |
| 3621 | :param ruled: When set to `True` connects each section linearly and without continuity |
| 3622 | :param combine: True or "a" to combine the resulting solid with parent solids if found, |
| 3623 | "cut" or "s" to remove the resulting solid from the parent solids if found. |
| 3624 | False to keep the resulting solid separated from the parent solids. |
| 3625 | :param clean: call :meth:`clean` afterwards to have a clean shape |
| 3626 | |
| 3627 | :return: a Workplane object containing the created loft |
| 3628 | |
| 3629 | """ |
| 3630 | |
| 3631 | toLoft: List[Union[Wire, Vertex]] = [] |
| 3632 | |
| 3633 | if self.ctx.pendingWires: |
| 3634 | toLoft.extend(self.ctx.popPendingWires()) |
| 3635 | else: |
| 3636 | toLoft = [ |
| 3637 | el if isinstance(el, Vertex) else el.outerWire() |
| 3638 | for el in self._getFacesVertices() |
| 3639 | ] |
| 3640 | |
| 3641 | if not toLoft: |
| 3642 | raise ValueError("Nothing to loft") |
| 3643 | elif len(toLoft) == 1: |
| 3644 | raise ValueError("More than one wire or face is required") |
| 3645 | |
| 3646 | r: Shape = loft(toLoft, cap=True, ruled=ruled) |
| 3647 | |
| 3648 | newS = self._combineWithBase(r, combine, clean) |
| 3649 | |
| 3650 | return newS |
| 3651 | |
| 3652 | def _getFaces(self) -> List[Face]: |
| 3653 | """ |