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

Method _getFaces

cadquery/cq.py:3652–3670  ·  view source on GitHub ↗

Convert pending wires or sketches to faces for subsequent operation

(self)

Source from the content-addressed store, hash-verified

3650 return newS
3651
3652 def _getFaces(self) -> List[Face]:
3653 """
3654 Convert pending wires or sketches to faces for subsequent operation
3655 """
3656
3657 rv: List[Face] = []
3658
3659 for el in self.objects:
3660 if isinstance(el, Sketch):
3661 rv.extend(f for f in el if isinstance(f, Face))
3662 elif isinstance(el, Face):
3663 rv.append(el)
3664 elif isinstance(el, Compound):
3665 rv.extend(subel for subel in el if isinstance(subel, Face))
3666
3667 if not rv:
3668 rv.extend(wiresToFaces(self.ctx.popPendingWires()))
3669
3670 return rv
3671
3672 def _getFacesVertices(self) -> List[Union[Face, Vertex]]:
3673 """

Callers 5

twistExtrudeMethod · 0.95
cutThruAllMethod · 0.95
_extrudeMethod · 0.95
_revolveMethod · 0.95
_sweepMethod · 0.95

Calls 4

wiresToFacesFunction · 0.85
extendMethod · 0.80
appendMethod · 0.80
popPendingWiresMethod · 0.80

Tested by

no test coverage detected