+ return
+
+ ## Private method. Add geom into the study if not yet there
+ def AssureGeomPublished(self, geom, name=''):
+ if not isinstance( geom, geompyDC.GEOM._objref_GEOM_Object ):
+ return
+ if not geom.IsSame( self.mesh.geom ) and not geom.GetStudyEntry():
+ ## set the study
+ studyID = self.mesh.smeshpyD.GetCurrentStudy()._get_StudyId()
+ if studyID != self.mesh.geompyD.myStudyId:
+ self.mesh.geompyD.init_geom( self.mesh.smeshpyD.GetCurrentStudy())
+ ## get a name
+ if not name and geom.GetShapeType() != geompyDC.GEOM.COMPOUND:
+ # for all groups SubShapeName() returns "Compound_-1"
+ name = self.mesh.geompyD.SubShapeName(geom, self.mesh.geom)
+ if not name:
+ name = "%s_%s"%(geom.GetShapeType(), id(geom)%10000)
+ ## publish
+ self.mesh.geompyD.addToStudyInFather( self.mesh.geom, geom, name )
+ return