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

Function _get_edges

cadquery/occ_impl/shapes.py:5155–5171  ·  view source on GitHub ↗

Get edges or edges from wires.

(*shapes: Shape)

Source from the content-addressed store, hash-verified

5153
5154
5155def _get_edges(*shapes: Shape) -> Iterable[Shape]:
5156 """
5157 Get edges or edges from wires.
5158 """
5159
5160 for s in shapes:
5161 t = s.ShapeType()
5162
5163 if t == "Edge":
5164 yield s
5165 elif t == "Wire":
5166 yield from _get_edges(s.edges())
5167 elif t == "Compound":
5168 for el in s:
5169 yield from _get_edges(el)
5170 else:
5171 raise ValueError(f"Required type(s): Edge, Wire; encountered {t}")
5172
5173
5174def _get_faces(*shapes: Shape) -> Iterable[Face]:

Callers 8

test_utilsFunction · 0.90
edgeOnFunction · 0.85
wireFunction · 0.85
fillFunction · 0.85
capFunction · 0.85
filletFunction · 0.85
chamferFunction · 0.85
projectFunction · 0.85

Calls 2

ShapeTypeMethod · 0.45
edgesMethod · 0.45

Tested by 1

test_utilsFunction · 0.72