mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-03-25 22:37:55 +05:00
WIP
This commit is contained in:
parent
752cb307d6
commit
7911fd4a18
@ -49,6 +49,7 @@
|
|||||||
#include <TopoDS_Wire.hxx>
|
#include <TopoDS_Wire.hxx>
|
||||||
#include <gp_Pnt.hxx>
|
#include <gp_Pnt.hxx>
|
||||||
|
|
||||||
|
#include "SALOME_KernelServices.hxx"
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
@ -282,11 +283,8 @@ SALOME_LifeCycleCORBA* SMESH_Gen_i::GetLCC()
|
|||||||
|
|
||||||
GEOM::GEOM_Gen_var SMESH_Gen_i::GetGeomEngine( bool isShaper )
|
GEOM::GEOM_Gen_var SMESH_Gen_i::GetGeomEngine( bool isShaper )
|
||||||
{
|
{
|
||||||
Engines::EngineComponent_ptr temp =
|
CORBA::Object_var temp = KERNEL::RetrieveCompo(isShaper ? "SHAPERSTUDY" : "GEOM");
|
||||||
GetLCC()->FindOrLoad_Component( isShaper ? "FactoryServer" : "FactoryServer",
|
|
||||||
isShaper ? "SHAPERSTUDY" : "GEOM" );
|
|
||||||
myGeomGen = GEOM::GEOM_Gen::_narrow( temp );
|
myGeomGen = GEOM::GEOM_Gen::_narrow( temp );
|
||||||
|
|
||||||
return myGeomGen;
|
return myGeomGen;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,6 +21,8 @@
|
|||||||
|
|
||||||
#include "SMESH_Gen_i.hxx"
|
#include "SMESH_Gen_i.hxx"
|
||||||
#include "SALOME_Container_i.hxx"
|
#include "SALOME_Container_i.hxx"
|
||||||
|
#include "SALOME_KernelServices.hxx"
|
||||||
|
#include "SALOMEDS_Study_i.hxx"
|
||||||
|
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|
||||||
@ -48,3 +50,11 @@ std::string BuildSMESHInstanceInternal(bool checkNS)
|
|||||||
CORBA::String_var ior = orb->object_to_string(zeRef);
|
CORBA::String_var ior = orb->object_to_string(zeRef);
|
||||||
return std::string(ior.in());
|
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>
|
#include <string>
|
||||||
|
|
||||||
std::string BuildSMESHInstanceInternal(bool checkNS);
|
std::string BuildSMESHInstanceInternal(bool checkNS);
|
||||||
|
std::string GetSessionInstanceInternal();
|
||||||
|
@ -31,4 +31,19 @@
|
|||||||
{
|
{
|
||||||
return BuildSMESHInstanceInternal(checkNS);
|
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.geompyD=geompyD
|
||||||
self.SetGeomEngine(geompyD)
|
self.SetGeomEngine(geompyD)
|
||||||
SMESH._objref_SMESH_Gen.UpdateStudy(self)
|
SMESH._objref_SMESH_Gen.UpdateStudy(self)
|
||||||
sb = salome.myStudy.NewBuilder()
|
import GeomHelper
|
||||||
sc = salome.myStudy.FindComponent("SMESH")
|
sb = GeomHelper.myStudy().NewBuilder()
|
||||||
|
sc = GeomHelper.myStudy().FindComponent("SMESH")
|
||||||
if sc:
|
if sc:
|
||||||
sb.LoadWith(sc, self)
|
sb.LoadWith(sc, self)
|
||||||
pass
|
pass
|
||||||
|
Loading…
x
Reference in New Issue
Block a user