MCPcopy Create free account
hub / github.com/CadQuery/cadquery / _entitiesFrom

Method _entitiesFrom

cadquery/occ_impl/shapes.py:884–903  ·  view source on GitHub ↗
(
        self, child_type: Shapes, parent_type: Shapes
    )

Source from the content-addressed store, hash-verified

882 return tcast(Iterable[TopoDS_Shape], shape_set)
883
884 def _entitiesFrom(
885 self, child_type: Shapes, parent_type: Shapes
886 ) -> dict[Shape, list[Shape]]:
887
888 res = TopTools_IndexedDataMapOfShapeListOfShape()
889
890 TopExp.MapShapesAndAncestors_s(
891 self.wrapped,
892 inverse_shape_LUT[child_type],
893 inverse_shape_LUT[parent_type],
894 res,
895 )
896
897 out: dict[Shape, list[Shape]] = {}
898 for i in range(1, res.Extent() + 1):
899 out[Shape.cast(res.FindKey(i))] = [
900 Shape.cast(el) for el in res.FindFromIndex(i)
901 ]
902
903 return out
904
905 def Vertices(self) -> list[Vertex]:
906 """

Callers 2

chamfer2DMethod · 0.80
chamfer2DFunction · 0.80

Calls 1

castMethod · 0.80

Tested by

no test coverage detected