Salome HOME
Fix detection of GEOM groups for structural elements
[modules/geom.git] / src / GEOM_PY / structelem / parts.py
index 538724268868689dd83c71af3bd7ad6a14b70d8b..4530b830a2f1a16550d4f8dea3d5d42be749a8da 100644 (file)
@@ -137,7 +137,7 @@ class StructuralElementPart:
         self.name = name
         self.geom = getGeompy(studyId)
         self.baseShapesSet = set()
-        self.isMainShape = groupGeomObj.IsMainShape()
+        self.isMainShape = (groupGeomObj.GetType() != 37) # See geompyDC.ShapeIdToType for type codes
         if not self.isMainShape:
             mainShape = self.geom.GetMainShape(groupGeomObj)
             listIDs = self.geom.GetObjectIDs(groupGeomObj)