Get edges or edges from wires.
(*shapes: Shape)
| 5153 | |
| 5154 | |
| 5155 | def _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 | |
| 5174 | def _get_faces(*shapes: Shape) -> Iterable[Face]: |