#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);
# 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: