mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-01-13 02:00:35 +05:00
Fix bug in structural element generation when reference geom object is already a main shape
This commit is contained in:
parent
818bbd4b49
commit
80804773f6
@ -137,11 +137,13 @@ class StructuralElementPart:
|
||||
self.name = name
|
||||
self.geom = getGeompy(studyId)
|
||||
self.baseShapesSet = set()
|
||||
mainShape = self.geom.GetMainShape(groupGeomObj)
|
||||
listIDs = self.geom.GetObjectIDs(groupGeomObj)
|
||||
if mainShape is not None and listIDs is not None:
|
||||
for id in listIDs:
|
||||
self.baseShapesSet.add(SubShapeID(mainShape, id))
|
||||
self.isMainShape = groupGeomObj.IsMainShape()
|
||||
if not self.isMainShape:
|
||||
mainShape = self.geom.GetMainShape(groupGeomObj)
|
||||
listIDs = self.geom.GetObjectIDs(groupGeomObj)
|
||||
if mainShape is not None and listIDs is not None:
|
||||
for id in listIDs:
|
||||
self.baseShapesSet.add(SubShapeID(mainShape, id))
|
||||
self.color = color
|
||||
if self.color is None:
|
||||
self.color = self._groupGeomObj.GetColor()
|
||||
@ -235,6 +237,8 @@ class StructuralElementPart:
|
||||
"""
|
||||
Find and return the base sub-shapes in the structural element part.
|
||||
"""
|
||||
if self.isMainShape:
|
||||
return [self._groupGeomObj]
|
||||
subShapes = []
|
||||
for subShapeID in self.baseShapesSet:
|
||||
subShape = subShapeID.getObj(self.geom)
|
||||
|
Loading…
Reference in New Issue
Block a user