This commit is contained in:
Anthony Geay 2021-01-12 17:31:25 +01:00
parent 906eec7529
commit 67e17c78dc
2 changed files with 8 additions and 2 deletions

View File

@ -24,10 +24,10 @@
#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);

View 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: