mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-12 01:30:34 +05:00
PAL8626: do not publish GEOM object, already present in the study.
This commit is contained in:
parent
f7d300b0be
commit
5ec1fbd250
@ -46,11 +46,16 @@ smesh.SetCurrentStudy(salome.myStudy)
|
|||||||
# Private functions
|
# Private functions
|
||||||
# -----------------
|
# -----------------
|
||||||
|
|
||||||
|
NO_NAME = "NoName"
|
||||||
|
|
||||||
def GetName(obj):
|
def GetName(obj):
|
||||||
ior = salome.orb.object_to_string(obj)
|
ior = salome.orb.object_to_string(obj)
|
||||||
sobj = salome.myStudy.FindObjectIOR(ior)
|
sobj = salome.myStudy.FindObjectIOR(ior)
|
||||||
attr = sobj.FindAttribute("AttributeName")[1]
|
if sobj is None:
|
||||||
return attr.Value()
|
return NO_NAME
|
||||||
|
else:
|
||||||
|
attr = sobj.FindAttribute("AttributeName")[1]
|
||||||
|
return attr.Value()
|
||||||
|
|
||||||
def SetName(obj, name):
|
def SetName(obj, name):
|
||||||
ior = salome.orb.object_to_string(obj)
|
ior = salome.orb.object_to_string(obj)
|
||||||
@ -91,8 +96,10 @@ class Mesh_Algorithm:
|
|||||||
name = GetName(piece)
|
name = GetName(piece)
|
||||||
else:
|
else:
|
||||||
self.geom = geom
|
self.geom = geom
|
||||||
name = geompy.SubShapeName(geom, piece)
|
name = GetName(geom)
|
||||||
geompy.addToStudyInFather(piece, geom, name)
|
if name==NO_NAME:
|
||||||
|
name = geompy.SubShapeName(geom, piece)
|
||||||
|
geompy.addToStudyInFather(piece, geom, name)
|
||||||
self.subm = mesh.mesh.GetSubMesh(geom, hypo)
|
self.subm = mesh.mesh.GetSubMesh(geom, hypo)
|
||||||
|
|
||||||
algo = smesh.CreateHypothesis(hypo, so)
|
algo = smesh.CreateHypothesis(hypo, so)
|
||||||
|
Loading…
Reference in New Issue
Block a user