| 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 | """ |