]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
WIP
authorAnthony Geay <anthony.geay@edf.fr>
Tue, 12 Jan 2021 16:31:25 +0000 (17:31 +0100)
committerAnthony Geay <anthony.geay@edf.fr>
Tue, 12 Jan 2021 16:31:25 +0000 (17:31 +0100)
src/SMESH_SWIG/SMeshHelper.cxx
src/SMESH_SWIG/smeshBuilder.py

index 5004b6635630344434ee1e672658c8ec0c2314ac..9ed1d558c59eeb1f84ce36ee26533788252eb95a 100644 (file)
 
 #include <cstring>
 
-CORBA::ORB_var orb;
 
 std::string BuildSMESHInstance()
 {
+    CORBA::ORB_var orb;
     { int argc(0); orb = CORBA::ORB_init(argc,nullptr); }
     CORBA::Object_var obj = orb->resolve_initial_references("RootPOA");
     PortableServer::POA_var poa = PortableServer::POA::_narrow(obj);
index c99e958214e6c0d16b649cb24eeb24c9e4cf9d11..a87ba0cd7c54e4a7166ac40ec09780714ccd6ac7 100644 (file)
@@ -380,7 +380,13 @@ class smeshBuilder( SMESH._objref_SMESH_Gen, object ):
                     # 1. CORBA resolution of server
                     # 2. the __new__ method is called again
                     #print("==== smeshInst = lcc.FindOrLoadComponent ", engine, smeshInst, doLcc)
-                    smeshInst = salome.lcc.FindOrLoadComponent( "FactoryServer", "SMESH" )
+                    #smeshInst = salome.lcc.FindOrLoadComponent( "FactoryServer", "SMESH" )
+                    import SMeshHelper
+                    smesh_ior = SMeshHelper.BuildSMESHInstance()
+                    import SMESH
+                    import CORBA
+                    orb=CORBA.ORB_init([''])
+                    smeshInst = orb.string_to_object(smesh_ior)
             else:
                 # FindOrLoadComponent not called
                 if smeshInst is None: