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

Function _get_wires

cadquery/occ_impl/shapes.py:5137–5152  ·  view source on GitHub ↗

Get wires or wires from edges.

(s: Shape)

Source from the content-addressed store, hash-verified

5135
5136
5137def _get_wires(s: Shape) -> Iterable[Shape]:
5138 """
5139 Get wires or wires from edges.
5140 """
5141
5142 t = s.ShapeType()
5143
5144 if t == "Wire":
5145 yield s
5146 elif t == "Edge":
5147 yield Wire.assembleEdges((tcast(Edge, s),))
5148 elif t == "Compound":
5149 for el in s:
5150 yield from _get_wires(el)
5151 else:
5152 raise ValueError(f"Required type(s): Edge, Wire; encountered {t}")
5153
5154
5155def _get_edges(*shapes: Shape) -> Iterable[Shape]:

Callers 7

test_utilsFunction · 0.90
_get_wire_listsFunction · 0.85
_get_wire_lists_strictFunction · 0.85
faceFunction · 0.85
offset2DFunction · 0.85
sweepFunction · 0.85
projectFunction · 0.85

Calls 2

assembleEdgesMethod · 0.80
ShapeTypeMethod · 0.45

Tested by 1

test_utilsFunction · 0.72