mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-03-25 22:37:55 +05:00
Like before
This commit is contained in:
parent
498e1712b4
commit
9db9db05b9
@ -361,11 +361,9 @@ class smeshBuilder( SMESH._objref_SMESH_Gen, object ):
|
|||||||
Hex_5Tet, Hex_6Tet, Hex_24Tet, Hex_2Prisms, Hex_4Prisms = 1, 2, 3, 1, 2
|
Hex_5Tet, Hex_6Tet, Hex_24Tet, Hex_2Prisms, Hex_4Prisms = 1, 2, 3, 1, 2
|
||||||
|
|
||||||
def __new__(cls, *args):
|
def __new__(cls, *args):
|
||||||
#import pdb
|
|
||||||
global engine
|
global engine
|
||||||
global smeshInst
|
global smeshInst
|
||||||
global doLcc
|
global doLcc
|
||||||
#pdb.set_trace()
|
|
||||||
#print("==== __new__", engine, smeshInst, doLcc)
|
#print("==== __new__", engine, smeshInst, doLcc)
|
||||||
|
|
||||||
if smeshInst is None:
|
if smeshInst is None:
|
||||||
@ -382,14 +380,7 @@ class smeshBuilder( SMESH._objref_SMESH_Gen, object ):
|
|||||||
# 1. CORBA resolution of server
|
# 1. CORBA resolution of server
|
||||||
# 2. the __new__ method is called again
|
# 2. the __new__ method is called again
|
||||||
#print("==== smeshInst = lcc.FindOrLoadComponent ", engine, smeshInst, doLcc)
|
#print("==== smeshInst = lcc.FindOrLoadComponent ", engine, smeshInst, doLcc)
|
||||||
#salome.lcc.FindOrLoadComponent( "FactoryServer", "SMESH" )
|
smeshInst = salome.lcc.FindOrLoadComponent( "FactoryServer", "SMESH" )
|
||||||
import SMeshHelper
|
|
||||||
checkNS = False
|
|
||||||
smesh_ior = SMeshHelper.BuildSMESHInstance(checkNS)
|
|
||||||
import SMESH
|
|
||||||
import CORBA
|
|
||||||
orb=CORBA.ORB_init([''])
|
|
||||||
smeshInst = orb.string_to_object(smesh_ior)
|
|
||||||
else:
|
else:
|
||||||
# FindOrLoadComponent not called
|
# FindOrLoadComponent not called
|
||||||
if smeshInst is None:
|
if smeshInst is None:
|
||||||
@ -620,9 +611,7 @@ class smeshBuilder( SMESH._objref_SMESH_Gen, object ):
|
|||||||
obj = obj.GetMesh()
|
obj = obj.GetMesh()
|
||||||
elif isinstance( obj, Mesh_Algorithm ):
|
elif isinstance( obj, Mesh_Algorithm ):
|
||||||
obj = obj.GetAlgorithm()
|
obj = obj.GetAlgorithm()
|
||||||
import CORBA
|
ior = salome.orb.object_to_string(obj)
|
||||||
orb=CORBA.ORB_init([''])
|
|
||||||
ior = orb.object_to_string(obj)
|
|
||||||
SMESH._objref_SMESH_Gen.SetName(self, ior, name)
|
SMESH._objref_SMESH_Gen.SetName(self, ior, name)
|
||||||
|
|
||||||
def SetEmbeddedMode( self,theMode ):
|
def SetEmbeddedMode( self,theMode ):
|
||||||
@ -654,9 +643,8 @@ class smeshBuilder( SMESH._objref_SMESH_Gen, object ):
|
|||||||
self.geompyD=geompyD
|
self.geompyD=geompyD
|
||||||
self.SetGeomEngine(geompyD)
|
self.SetGeomEngine(geompyD)
|
||||||
SMESH._objref_SMESH_Gen.UpdateStudy(self)
|
SMESH._objref_SMESH_Gen.UpdateStudy(self)
|
||||||
import GeomHelper
|
sb = salome.myStudy.NewBuilder()
|
||||||
sb = GeomHelper.myStudy().NewBuilder()
|
sc = salome.myStudy.FindComponent("SMESH")
|
||||||
sc = GeomHelper.myStudy().FindComponent("SMESH")
|
|
||||||
if sc:
|
if sc:
|
||||||
sb.LoadWith(sc, self)
|
sb.LoadWith(sc, self)
|
||||||
pass
|
pass
|
||||||
|
Loading…
x
Reference in New Issue
Block a user