mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-05 06:10:33 +05:00
Distributed Geom, Smesh. Modifications by Anthony GEAY.
This commit is contained in:
parent
362e7633ec
commit
06221800da
@ -83,6 +83,9 @@ module SMESH
|
|||||||
interface SMESH_Gen : Engines::Component, SALOMEDS::Driver
|
interface SMESH_Gen : Engines::Component, SALOMEDS::Driver
|
||||||
{
|
{
|
||||||
|
|
||||||
|
//GEOM::GEOM_Gen SetGeomEngine( in string containerLoc );
|
||||||
|
void SetGeomEngine( in GEOM::GEOM_Gen geomcompo );
|
||||||
|
|
||||||
FilterManager CreateFilterManager();
|
FilterManager CreateFilterManager();
|
||||||
|
|
||||||
SMESH_Pattern GetPattern();
|
SMESH_Pattern GetPattern();
|
||||||
|
@ -386,7 +386,7 @@ static TopoDS_Shape getShapeByName( const char* theName )
|
|||||||
GEOM::GEOM_Object_var aGeomObj = GEOM::GEOM_Object::_narrow( aList[ 0 ]->GetObject() );
|
GEOM::GEOM_Object_var aGeomObj = GEOM::GEOM_Object::_narrow( aList[ 0 ]->GetObject() );
|
||||||
if ( !aGeomObj->_is_nil() )
|
if ( !aGeomObj->_is_nil() )
|
||||||
{
|
{
|
||||||
GEOM::GEOM_Gen_var aGEOMGen = SMESH_Gen_i::GetGeomEngine();
|
GEOM::GEOM_Gen_ptr aGEOMGen = SMESH_Gen_i::GetGeomEngine();
|
||||||
TopoDS_Shape aLocShape = aSMESHGen->GetShapeReader()->GetShape( aGEOMGen, aGeomObj );
|
TopoDS_Shape aLocShape = aSMESHGen->GetShapeReader()->GetShape( aGEOMGen, aGeomObj );
|
||||||
return aLocShape;
|
return aLocShape;
|
||||||
}
|
}
|
||||||
@ -409,7 +409,7 @@ static TopoDS_Shape getShapeByID( const char* theID )
|
|||||||
|
|
||||||
if ( !aGeomObj->_is_nil() )
|
if ( !aGeomObj->_is_nil() )
|
||||||
{
|
{
|
||||||
GEOM::GEOM_Gen_var aGEOMGen = SMESH_Gen_i::GetGeomEngine();
|
GEOM::GEOM_Gen_ptr aGEOMGen = SMESH_Gen_i::GetGeomEngine();
|
||||||
TopoDS_Shape aLocShape = aSMESHGen->GetShapeReader()->GetShape( aGEOMGen, aGeomObj );
|
TopoDS_Shape aLocShape = aSMESHGen->GetShapeReader()->GetShape( aGEOMGen, aGeomObj );
|
||||||
return aLocShape;
|
return aLocShape;
|
||||||
}
|
}
|
||||||
@ -793,7 +793,7 @@ void BelongToGeom_i::SetGeom( GEOM::GEOM_Object_ptr theGeom )
|
|||||||
if ( theGeom->_is_nil() )
|
if ( theGeom->_is_nil() )
|
||||||
return;
|
return;
|
||||||
SMESH_Gen_i* aSMESHGen = SMESH_Gen_i::GetSMESHGen();
|
SMESH_Gen_i* aSMESHGen = SMESH_Gen_i::GetSMESHGen();
|
||||||
GEOM::GEOM_Gen_var aGEOMGen = SMESH_Gen_i::GetGeomEngine();
|
GEOM::GEOM_Gen_ptr aGEOMGen = SMESH_Gen_i::GetGeomEngine();
|
||||||
TopoDS_Shape aLocShape = aSMESHGen->GetShapeReader()->GetShape( aGEOMGen, theGeom );
|
TopoDS_Shape aLocShape = aSMESHGen->GetShapeReader()->GetShape( aGEOMGen, theGeom );
|
||||||
myBelongToGeomPtr->SetGeom( aLocShape );
|
myBelongToGeomPtr->SetGeom( aLocShape );
|
||||||
TPythonDump()<<this<<".SetGeom("<<theGeom<<")";
|
TPythonDump()<<this<<".SetGeom("<<theGeom<<")";
|
||||||
@ -872,7 +872,7 @@ void BelongToSurface_i::SetSurface( GEOM::GEOM_Object_ptr theGeom, ElementType t
|
|||||||
if ( theGeom->_is_nil() )
|
if ( theGeom->_is_nil() )
|
||||||
return;
|
return;
|
||||||
SMESH_Gen_i* aSMESHGen = SMESH_Gen_i::GetSMESHGen();
|
SMESH_Gen_i* aSMESHGen = SMESH_Gen_i::GetSMESHGen();
|
||||||
GEOM::GEOM_Gen_var aGEOMGen = SMESH_Gen_i::GetGeomEngine();
|
GEOM::GEOM_Gen_ptr aGEOMGen = SMESH_Gen_i::GetGeomEngine();
|
||||||
TopoDS_Shape aLocShape = aSMESHGen->GetShapeReader()->GetShape( aGEOMGen, theGeom );
|
TopoDS_Shape aLocShape = aSMESHGen->GetShapeReader()->GetShape( aGEOMGen, theGeom );
|
||||||
|
|
||||||
if ( aLocShape.ShapeType() == TopAbs_FACE )
|
if ( aLocShape.ShapeType() == TopAbs_FACE )
|
||||||
@ -1037,7 +1037,7 @@ void LyingOnGeom_i::SetGeom( GEOM::GEOM_Object_ptr theGeom )
|
|||||||
if ( theGeom->_is_nil() )
|
if ( theGeom->_is_nil() )
|
||||||
return;
|
return;
|
||||||
SMESH_Gen_i* aSMESHGen = SMESH_Gen_i::GetSMESHGen();
|
SMESH_Gen_i* aSMESHGen = SMESH_Gen_i::GetSMESHGen();
|
||||||
GEOM::GEOM_Gen_var aGEOMGen = SMESH_Gen_i::GetGeomEngine();
|
GEOM::GEOM_Gen_ptr aGEOMGen = SMESH_Gen_i::GetGeomEngine();
|
||||||
TopoDS_Shape aLocShape = aSMESHGen->GetShapeReader()->GetShape( aGEOMGen, theGeom );
|
TopoDS_Shape aLocShape = aSMESHGen->GetShapeReader()->GetShape( aGEOMGen, theGeom );
|
||||||
myLyingOnGeomPtr->SetGeom( aLocShape );
|
myLyingOnGeomPtr->SetGeom( aLocShape );
|
||||||
TPythonDump()<<this<<".SetGeom("<<theGeom<<")";
|
TPythonDump()<<this<<".SetGeom("<<theGeom<<")";
|
||||||
|
@ -126,6 +126,7 @@ static int MYDEBUG = 0;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Static variables definition
|
// Static variables definition
|
||||||
|
GEOM::GEOM_Gen_var SMESH_Gen_i::myGeomGen=GEOM::GEOM_Gen::_nil();
|
||||||
CORBA::ORB_var SMESH_Gen_i::myOrb;
|
CORBA::ORB_var SMESH_Gen_i::myOrb;
|
||||||
PortableServer::POA_var SMESH_Gen_i::myPoa;
|
PortableServer::POA_var SMESH_Gen_i::myPoa;
|
||||||
SALOME_NamingService* SMESH_Gen_i::myNS = NULL;
|
SALOME_NamingService* SMESH_Gen_i::myNS = NULL;
|
||||||
@ -222,10 +223,14 @@ SALOME_LifeCycleCORBA* SMESH_Gen_i::GetLCC() {
|
|||||||
* Get GEOM::GEOM_Gen reference
|
* Get GEOM::GEOM_Gen reference
|
||||||
*/
|
*/
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
GEOM::GEOM_Gen_ptr SMESH_Gen_i::GetGeomEngine() {
|
GEOM::GEOM_Gen_ptr SMESH_Gen_i::GetGeomEngine()
|
||||||
GEOM::GEOM_Gen_var aGeomEngine =
|
{
|
||||||
GEOM::GEOM_Gen::_narrow( GetLCC()->FindOrLoad_Component("FactoryServer","GEOM") );
|
if (CORBA::is_nil(myGeomGen))
|
||||||
return aGeomEngine._retn();
|
{
|
||||||
|
Engines::Component_ptr temp=GetLCC()->FindOrLoad_Component("FactoryServer","GEOM");
|
||||||
|
myGeomGen = GEOM::GEOM_Gen::_narrow(temp);
|
||||||
|
}
|
||||||
|
return myGeomGen;
|
||||||
}
|
}
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
@ -479,6 +484,22 @@ GEOM_Client* SMESH_Gen_i::GetShapeReader()
|
|||||||
return myShapeReader;
|
return myShapeReader;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//=============================================================================
|
||||||
|
/*!
|
||||||
|
* SMESH_Gen_i::SetGeomEngine
|
||||||
|
*
|
||||||
|
* Set GEOM::GEOM_Gen reference
|
||||||
|
*/
|
||||||
|
//=============================================================================
|
||||||
|
//GEOM::GEOM_Gen_ptr SMESH_Gen_i::SetGeomEngine( const char* containerLoc )
|
||||||
|
void SMESH_Gen_i::SetGeomEngine( GEOM::GEOM_Gen_ptr geomcompo )
|
||||||
|
{
|
||||||
|
//Engines::Component_ptr temp=GetLCC()->FindOrLoad_Component(containerLoc,"GEOM");
|
||||||
|
//myGeomGen=GEOM::GEOM_Gen::_narrow(temp);
|
||||||
|
myGeomGen=GEOM::GEOM_Gen::_duplicate(geomcompo);
|
||||||
|
//return myGeomGen;
|
||||||
|
}
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
/*!
|
/*!
|
||||||
* SMESH_Gen_i::SetEmbeddedMode
|
* SMESH_Gen_i::SetEmbeddedMode
|
||||||
@ -1260,7 +1281,7 @@ SMESH_Gen_i::GetGeometryByMeshElement( SMESH::SMESH_Mesh_ptr theMesh,
|
|||||||
GEOM::GEOM_Object_var geom = FindGeometryByMeshElement(theMesh, theElementID);
|
GEOM::GEOM_Object_var geom = FindGeometryByMeshElement(theMesh, theElementID);
|
||||||
if ( !geom->_is_nil() ) {
|
if ( !geom->_is_nil() ) {
|
||||||
GEOM::GEOM_Object_var mainShape = theMesh->GetShapeToMesh();
|
GEOM::GEOM_Object_var mainShape = theMesh->GetShapeToMesh();
|
||||||
GEOM::GEOM_Gen_var geomGen = GetGeomEngine();
|
GEOM::GEOM_Gen_ptr geomGen = GetGeomEngine();
|
||||||
|
|
||||||
// try to find the corresponding SObject
|
// try to find the corresponding SObject
|
||||||
SALOMEDS::SObject_var SObj = ObjectToSObject( myCurrentStudy, geom.in() );
|
SALOMEDS::SObject_var SObj = ObjectToSObject( myCurrentStudy, geom.in() );
|
||||||
@ -1317,7 +1338,7 @@ SMESH_Gen_i::FindGeometryByMeshElement( SMESH::SMESH_Mesh_ptr theMesh,
|
|||||||
THROW_SALOME_CORBA_EXCEPTION( "bad Mesh reference", SALOME::BAD_PARAM );
|
THROW_SALOME_CORBA_EXCEPTION( "bad Mesh reference", SALOME::BAD_PARAM );
|
||||||
|
|
||||||
GEOM::GEOM_Object_var mainShape = theMesh->GetShapeToMesh();
|
GEOM::GEOM_Object_var mainShape = theMesh->GetShapeToMesh();
|
||||||
GEOM::GEOM_Gen_var geomGen = GetGeomEngine();
|
GEOM::GEOM_Gen_ptr geomGen = GetGeomEngine();
|
||||||
|
|
||||||
// get a core mesh DS
|
// get a core mesh DS
|
||||||
SMESH_Mesh_i* meshServant = SMESH::DownCast<SMESH_Mesh_i*>( theMesh );
|
SMESH_Mesh_i* meshServant = SMESH::DownCast<SMESH_Mesh_i*>( theMesh );
|
||||||
|
@ -176,6 +176,8 @@ public:
|
|||||||
// *****************************************
|
// *****************************************
|
||||||
// Interface methods
|
// Interface methods
|
||||||
// *****************************************
|
// *****************************************
|
||||||
|
//GEOM::GEOM_Gen_ptr SetGeomEngine( const char* containerLoc );
|
||||||
|
void SetGeomEngine( GEOM::GEOM_Gen_ptr geomcompo );
|
||||||
|
|
||||||
// Set current study
|
// Set current study
|
||||||
void SetEmbeddedMode( CORBA::Boolean theMode );
|
void SetEmbeddedMode( CORBA::Boolean theMode );
|
||||||
@ -461,7 +463,7 @@ private:
|
|||||||
static void loadGeomData( SALOMEDS::SComponent_ptr theCompRoot );
|
static void loadGeomData( SALOMEDS::SComponent_ptr theCompRoot );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
static GEOM::GEOM_Gen_var myGeomGen;
|
||||||
static CORBA::ORB_var myOrb; // ORB reference
|
static CORBA::ORB_var myOrb; // ORB reference
|
||||||
static PortableServer::POA_var myPoa; // POA reference
|
static PortableServer::POA_var myPoa; // POA reference
|
||||||
static SALOME_NamingService* myNS; // Naming Service
|
static SALOME_NamingService* myNS; // Naming Service
|
||||||
|
@ -225,7 +225,7 @@ TopoDS_Shape SMESH_Gen_i::GeomObjectToShape(GEOM::GEOM_Object_ptr theGeomObject)
|
|||||||
TopoDS_Shape S;
|
TopoDS_Shape S;
|
||||||
if ( !theGeomObject->_is_nil() ) {
|
if ( !theGeomObject->_is_nil() ) {
|
||||||
GEOM_Client* aClient = GetShapeReader();
|
GEOM_Client* aClient = GetShapeReader();
|
||||||
GEOM::GEOM_Gen_var aGeomEngine = GetGeomEngine();
|
GEOM::GEOM_Gen_ptr aGeomEngine = GetGeomEngine();
|
||||||
if ( aClient && !aGeomEngine->_is_nil () )
|
if ( aClient && !aGeomEngine->_is_nil () )
|
||||||
S = aClient->GetShape( aGeomEngine, theGeomObject );
|
S = aClient->GetShape( aGeomEngine, theGeomObject );
|
||||||
}
|
}
|
||||||
|
@ -109,6 +109,7 @@ CLEANFILES = \
|
|||||||
dist_salomescript_DATA= \
|
dist_salomescript_DATA= \
|
||||||
libSMESH_Swig.py \
|
libSMESH_Swig.py \
|
||||||
smesh.py \
|
smesh.py \
|
||||||
|
smeshDC.py \
|
||||||
batchmode_smesh.py \
|
batchmode_smesh.py \
|
||||||
batchmode_mefisto.py \
|
batchmode_mefisto.py \
|
||||||
ex00_all.py \
|
ex00_all.py \
|
||||||
|
File diff suppressed because it is too large
Load Diff
2522
src/SMESH_SWIG/smeshDC.py
Normal file
2522
src/SMESH_SWIG/smeshDC.py
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user