- for(TopoDS_Iterator aSubs(aTopoShape); aSubs.More(); aSubs.Next()) {
- if (!aSubs.Value().IsNull()) {
- TopAbs_ShapeEnum aSubType = aSubs.Value().ShapeType();
- if (aSubType == TopAbs_COMPOUND) { // compound of compound(s)
- aShapeType = TopAbs_COMPOUND;
- break;
- }
- if (aShapeType == TopAbs_COMPOUND) {
- aShapeType = aSubType;
- } else if (aShapeType != aSubType) { // compound of shapes of different types
- aShapeType = TopAbs_COMPOUND;
- break;
- }
- }
- }