mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-03-23 21:17:56 +05:00
WIP
This commit is contained in:
parent
752cb307d6
commit
7911fd4a18
@ -49,6 +49,7 @@
|
||||
#include <TopoDS_Wire.hxx>
|
||||
#include <gp_Pnt.hxx>
|
||||
|
||||
#include "SALOME_KernelServices.hxx"
|
||||
|
||||
#ifdef WIN32
|
||||
#include <windows.h>
|
||||
@ -282,11 +283,8 @@ SALOME_LifeCycleCORBA* SMESH_Gen_i::GetLCC()
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -21,6 +21,8 @@
|
||||
|
||||
#include "SMESH_Gen_i.hxx"
|
||||
#include "SALOME_Container_i.hxx"
|
||||
#include "SALOME_KernelServices.hxx"
|
||||
#include "SALOMEDS_Study_i.hxx"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
@ -48,3 +50,11 @@ std::string BuildSMESHInstanceInternal(bool checkNS)
|
||||
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());
|
||||
}
|
||||
|
@ -22,3 +22,4 @@
|
||||
#include <string>
|
||||
|
||||
std::string BuildSMESHInstanceInternal(bool checkNS);
|
||||
std::string GetSessionInstanceInternal();
|
||||
|
@ -31,4 +31,19 @@
|
||||
{
|
||||
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())
|
||||
|
||||
%}
|
@ -652,8 +652,9 @@ class smeshBuilder( SMESH._objref_SMESH_Gen, object ):
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user