Check if s1 is a subshape of s2.
(s1: Shape, s2: Shape)
| 7897 | |
| 7898 | |
| 7899 | def isSubshape(s1: Shape, s2: Shape) -> bool: |
| 7900 | """ |
| 7901 | Check if s1 is a subshape of s2. |
| 7902 | """ |
| 7903 | |
| 7904 | shape_map = TopTools_IndexedDataMapOfShapeListOfShape() |
| 7905 | |
| 7906 | TopExp.MapShapesAndAncestors_s( |
| 7907 | s2.wrapped, shapetype(s1.wrapped), inverse_shape_LUT[s2.ShapeType()], shape_map |
| 7908 | ) |
| 7909 | |
| 7910 | return shape_map.Contains(s1.wrapped) |
| 7911 | |
| 7912 | |
| 7913 | # %% properties |