mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-21 22:20:32 +05:00
regression of SMESH_TEST/Grids/smesh/imps/I4
def AddHypothesis(self, hyp, geom=0): ... + AssureGeomPublished( self, geom, "shape for %s" % hyp.GetName())
This commit is contained in:
parent
c1cdbd912a
commit
4ec1bfaca1
@ -964,15 +964,17 @@ class Mesh:
|
|||||||
if obj is None:
|
if obj is None:
|
||||||
obj = 0
|
obj = 0
|
||||||
if obj != 0:
|
if obj != 0:
|
||||||
|
objHasName = True
|
||||||
if isinstance(obj, geompyDC.GEOM._objref_GEOM_Object):
|
if isinstance(obj, geompyDC.GEOM._objref_GEOM_Object):
|
||||||
self.geom = obj
|
self.geom = obj
|
||||||
# publish geom of mesh (issue 0021122)
|
# publish geom of mesh (issue 0021122)
|
||||||
if not self.geom.GetStudyEntry() and smeshpyD.GetCurrentStudy():
|
if not self.geom.GetStudyEntry() and smeshpyD.GetCurrentStudy():
|
||||||
|
objHasName = False
|
||||||
studyID = smeshpyD.GetCurrentStudy()._get_StudyId()
|
studyID = smeshpyD.GetCurrentStudy()._get_StudyId()
|
||||||
if studyID != geompyD.myStudyId:
|
if studyID != geompyD.myStudyId:
|
||||||
geompyD.init_geom( smeshpyD.GetCurrentStudy())
|
geompyD.init_geom( smeshpyD.GetCurrentStudy())
|
||||||
pass
|
pass
|
||||||
geo_name = "%s_%s"%(self.geom.GetShapeType(), id(self.geom)%100)
|
geo_name = "%s_%s_for_meshing"%(self.geom.GetShapeType(), id(self.geom)%100)
|
||||||
geompyD.addToStudy( self.geom, geo_name )
|
geompyD.addToStudy( self.geom, geo_name )
|
||||||
self.mesh = self.smeshpyD.CreateMesh(self.geom)
|
self.mesh = self.smeshpyD.CreateMesh(self.geom)
|
||||||
|
|
||||||
@ -982,7 +984,7 @@ class Mesh:
|
|||||||
self.mesh = self.smeshpyD.CreateEmptyMesh()
|
self.mesh = self.smeshpyD.CreateEmptyMesh()
|
||||||
if name != 0:
|
if name != 0:
|
||||||
self.smeshpyD.SetName(self.mesh, name)
|
self.smeshpyD.SetName(self.mesh, name)
|
||||||
elif obj != 0:
|
elif obj != 0 and objHasName:
|
||||||
self.smeshpyD.SetName(self.mesh, GetName(obj))
|
self.smeshpyD.SetName(self.mesh, GetName(obj))
|
||||||
|
|
||||||
if not self.geom:
|
if not self.geom:
|
||||||
@ -1312,6 +1314,7 @@ class Mesh:
|
|||||||
if not geom:
|
if not geom:
|
||||||
geom = self.mesh.GetShapeToMesh()
|
geom = self.mesh.GetShapeToMesh()
|
||||||
pass
|
pass
|
||||||
|
AssureGeomPublished( self, geom, "shape for %s" % hyp.GetName())
|
||||||
status = self.mesh.AddHypothesis(geom, hyp)
|
status = self.mesh.AddHypothesis(geom, hyp)
|
||||||
isAlgo = hyp._narrow( SMESH_Algo )
|
isAlgo = hyp._narrow( SMESH_Algo )
|
||||||
hyp_name = GetName( hyp )
|
hyp_name = GetName( hyp )
|
||||||
|
Loading…
Reference in New Issue
Block a user