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

Function _get_wire_lists_strict

cadquery/occ_impl/shapes.py:5232–5254  ·  view source on GitHub ↗

Get lists of wires for sweeping.

(s: Sequence[Shape])

Source from the content-addressed store, hash-verified

5230
5231
5232def _get_wire_lists_strict(s: Sequence[Shape]) -> list[list[Wire]]:
5233 """
5234 Get lists of wires for sweeping.
5235 """
5236
5237 wire_lists: list[list[Wire]] = []
5238
5239 ix_last = len(s) - 1
5240
5241 for i, el in enumerate(s):
5242 if i == 0:
5243
5244 wire_lists = [[w] for w in _get_wires(el)]
5245
5246 # if no faces and vertices were detected return an empty list
5247 if not wire_lists:
5248 break
5249
5250 else:
5251 for wire_list, w in zip(wire_lists, _get_wires(el)):
5252 wire_list.append(w)
5253
5254 return wire_lists
5255
5256
5257def _get_face_lists(s: Sequence[Shape]) -> list[list[Face | Vertex]]:

Callers 1

sweepFunction · 0.85

Calls 2

_get_wiresFunction · 0.85
appendMethod · 0.80

Tested by

no test coverage detected