MCPcopy
hub / github.com/CadQuery/cadquery / fill

Function fill

cadquery/occ_impl/shapes.py:6814–6833  ·  view source on GitHub ↗

Fill edges/wire possibly obeying constraints.

(s: Shape, constraints: Sequence[Shape | VectorLike] = ())

Source from the content-addressed store, hash-verified

6812
6813
6814def 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
6836def cap(s: Shape, ctx: Shape, constraints: Sequence[Shape | VectorLike] = ()) -> Shape:

Callers 3

test_utilsFunction · 0.85
test_fillFunction · 0.85
test_extrudeFunction · 0.85

Calls 4

_get_edgesFunction · 0.85
VectorClass · 0.85
_compound_or_shapeFunction · 0.85
toPntMethod · 0.80

Tested by 3

test_utilsFunction · 0.68
test_fillFunction · 0.68
test_extrudeFunction · 0.68