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

Function _get_faces

cadquery/occ_impl/shapes.py:5174–5191  ·  view source on GitHub ↗

Get faces or faces from wires or edges.

(*shapes: Shape)

Source from the content-addressed store, hash-verified

5172
5173
5174def _get_faces(*shapes: Shape) -> Iterable[Face]:
5175 """
5176 Get faces or faces from wires or edges.
5177 """
5178
5179 for s in shapes:
5180 t = s.ShapeType()
5181
5182 if t == "Face":
5183 yield s.face()
5184 elif t == "Edge":
5185 yield face(s)
5186 elif t == "Wire":
5187 yield face(s)
5188 elif t == "Compound":
5189 yield from _get_faces(*s)
5190 else:
5191 raise ValueError(f"Required type(s): Edge, Wire, Face; encountered {t}")
5192
5193
5194def _get_wire_lists(s: Sequence[Shape]) -> list[list[Wire | Vertex]]:

Callers 3

test_utilsFunction · 0.90
prismFunction · 0.85
draftFunction · 0.85

Calls 3

faceFunction · 0.85
ShapeTypeMethod · 0.45
faceMethod · 0.45

Tested by 1

test_utilsFunction · 0.72