#include <TopoDS_Wire.hxx>
#include <gp_Pnt.hxx>
+#include "SALOME_KernelServices.hxx"
#ifdef WIN32
#include <windows.h>
GEOM::GEOM_Gen_var SMESH_Gen_i::GetGeomEngine( bool isShaper )
{
- Engines::EngineComponent_ptr temp =
- GetLCC()->FindOrLoad_Component( isShaper ? "FactoryServer" : "FactoryServer",
- isShaper ? "SHAPERSTUDY" : "GEOM" );
+ CORBA::Object_var temp = KERNEL::RetrieveCompo(isShaper ? "SHAPERSTUDY" : "GEOM");
myGeomGen = GEOM::GEOM_Gen::_narrow( temp );
-
return myGeomGen;
}
#include "SMESH_Gen_i.hxx"
#include "SALOME_Container_i.hxx"
+#include "SALOME_KernelServices.hxx"
+#include "SALOMEDS_Study_i.hxx"
#include <cstring>
CORBA::String_var ior = orb->object_to_string(zeRef);
return std::string(ior.in());
}
+
+std::string GetSessionInstanceInternal()
+{
+ SALOMEDS::Study_var study = KERNEL::getStudyServantSA();
+ CORBA::ORB_ptr orb = KERNEL::getORB();
+ CORBA::String_var ior = orb->object_to_string(study);
+ return std::string(ior.in());
+}
#include <string>
std::string BuildSMESHInstanceInternal(bool checkNS);
+std::string GetSessionInstanceInternal();
{
return BuildSMESHInstanceInternal(checkNS);
}
+
+ std::string GetSessionInstance()
+ {
+ return GetSessionInstanceInternal();
+ }
}
+
+%pythoncode %{
+
+def myStudy():
+ import SALOMEDS
+ import CORBA
+ orb=CORBA.ORB_init([''])
+ return orb.string_to_object(GetSessionInstance())
+
+%}
\ No newline at end of file
self.geompyD=geompyD
self.SetGeomEngine(geompyD)
SMESH._objref_SMESH_Gen.UpdateStudy(self)
- sb = salome.myStudy.NewBuilder()
- sc = salome.myStudy.FindComponent("SMESH")
+ import GeomHelper
+ sb = GeomHelper.myStudy().NewBuilder()
+ sc = GeomHelper.myStudy().FindComponent("SMESH")
if sc:
sb.LoadWith(sc, self)
pass