Generate a convex hull from current selection or all objects.
(self: T, mode: Modes = "a", tag: Optional[str] = None)
| 553 | |
| 554 | # modifiers |
| 555 | def hull(self: T, mode: Modes = "a", tag: Optional[str] = None) -> T: |
| 556 | """ |
| 557 | Generate a convex hull from current selection or all objects. |
| 558 | """ |
| 559 | |
| 560 | if self._selection: |
| 561 | rv = find_hull(el for el in self._selection if isinstance(el, Edge)) |
| 562 | elif self._faces: |
| 563 | rv = find_hull(el for el in self._faces.Edges()) |
| 564 | elif self._edges: |
| 565 | rv = find_hull(self._edges) |
| 566 | else: |
| 567 | raise ValueError("No objects available for hull construction") |
| 568 | |
| 569 | self.face(rv, mode=mode, tag=tag, ignore_selection=bool(self._selection)) |
| 570 | |
| 571 | return self |
| 572 | |
| 573 | def offset(self: T, d: Real, mode: Modes = "a", tag: Optional[str] = None) -> T: |
| 574 | """ |