Fill edges/wire possibly obeying constraints.
(s: Shape, constraints: Sequence[Shape | VectorLike] = ())
| 6812 | |
| 6813 | |
| 6814 | def fill(s: Shape, constraints: Sequence[Shape | VectorLike] = ()) -> Shape: |
| 6815 | """ |
| 6816 | Fill edges/wire possibly obeying constraints. |
| 6817 | """ |
| 6818 | |
| 6819 | builder = BRepOffsetAPI_MakeFilling() |
| 6820 | |
| 6821 | for e in _get_edges(s): |
| 6822 | builder.Add(e.wrapped, GeomAbs_C0) |
| 6823 | |
| 6824 | for c in constraints: |
| 6825 | if isinstance(c, Shape): |
| 6826 | for e in _get_edges(c): |
| 6827 | builder.Add(e.wrapped, GeomAbs_C0, False) |
| 6828 | else: |
| 6829 | builder.Add(Vector(c).toPnt()) |
| 6830 | |
| 6831 | builder.Build() |
| 6832 | |
| 6833 | return _compound_or_shape(builder.Shape()) |
| 6834 | |
| 6835 | |
| 6836 | def cap(s: Shape, ctx: Shape, constraints: Sequence[Shape | VectorLike] = ()) -> Shape: |