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

Function face

cadquery/occ_impl/shapes.py:5984–5999  ·  view source on GitHub ↗

Build face from edges or wires.

(*s: Shape)

Source from the content-addressed store, hash-verified

5982
5983@multidispatch
5984def face(*s: Shape) -> Face:
5985 """
5986 Build face from edges or wires.
5987 """
5988
5989 from OCP.BOPAlgo import BOPAlgo_Tools
5990
5991 ws = Compound.makeCompound(w for el in s for w in _get_wires(el)).wrapped
5992 rv = TopoDS_Compound()
5993
5994 status = BOPAlgo_Tools.WiresToFaces_s(ws, rv)
5995
5996 if not status:
5997 raise ValueError("Face construction failed")
5998
5999 return _get_one(_compound_or_shape(rv), "Face")
6000
6001
6002@multidispatch

Callers 14

test_dxf_shapeFunction · 0.90
test_toVTKFunction · 0.90
_get_facesFunction · 0.85
test_extrude_faceMethod · 0.85
test_loft_faceMethod · 0.85
test_constructorsFunction · 0.85
test_ellipseFunction · 0.85
test_prismFunction · 0.85
test_draftFunction · 0.85
test_offset2DFunction · 0.85
test_sweepFunction · 0.85
test_loftFunction · 0.85

Calls 4

_get_wiresFunction · 0.85
_get_oneFunction · 0.85
_compound_or_shapeFunction · 0.85
makeCompoundMethod · 0.80

Tested by 13

test_dxf_shapeFunction · 0.72
test_toVTKFunction · 0.72
test_extrude_faceMethod · 0.68
test_loft_faceMethod · 0.68
test_constructorsFunction · 0.68
test_ellipseFunction · 0.68
test_prismFunction · 0.68
test_draftFunction · 0.68
test_offset2DFunction · 0.68
test_sweepFunction · 0.68
test_loftFunction · 0.68
test_history_sweepFunction · 0.68