From: eap Date: Thu, 3 Feb 2011 15:07:31 +0000 (+0000) Subject: 0021122: EDF 1735 SMESH: Bug when saving in .hdf X-Git-Tag: StartingPortingMED3~80 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=6beb289c1a3eb9cbf1ad744d528cc5c5938a794d;p=modules%2Fsmesh.git 0021122: EDF 1735 SMESH: Bug when saving in .hdf when creating Mesh on geometry, add to study the not published geometry --- diff --git a/src/SMESH_SWIG/smeshDC.py b/src/SMESH_SWIG/smeshDC.py index 03598d6a2..288851cc6 100644 --- a/src/SMESH_SWIG/smeshDC.py +++ b/src/SMESH_SWIG/smeshDC.py @@ -1081,7 +1081,16 @@ class Mesh: if obj != 0: if isinstance(obj, geompyDC.GEOM._objref_GEOM_Object): self.geom = obj + # publish geom of mesh (issue 0021122) + if not self.geom.GetStudyEntry(): + studyID = smeshpyD.GetCurrentStudy()._get_StudyId() + if studyID != geompyD.myStudyId: + geompyD.init_geom( smeshpyD.GetCurrentStudy()) + pass + name = "%s_%s"%(self.geom.GetShapeType(), id(self.geom)%100) + geompyD.addToStudy( self.geom, name ) self.mesh = self.smeshpyD.CreateMesh(self.geom) + elif isinstance(obj, SMESH._objref_SMESH_Mesh): self.SetMesh(obj) else: