//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-
// SMESH SMESHClient : tool to update client mesh structure by mesh from server
// File : SMESH_Client.cxx
// Author : Pavel TELKOV
// Module : SMESH
-//
+
#include "SMESH_Client.hxx"
#include "SMESH_Mesh.hxx"
//=======================================================================
//function : AddNodesWithID
//=======================================================================
- inline void AddNodesWithID(SMDS_Mesh* theMesh,
+ inline void AddNodesWithID(SMDS_Mesh* theMesh,
SMESH::log_array_var& theSeq,
CORBA::Long theId)
{
//=======================================================================
//function : Add0DElementsWithID
//=======================================================================
- inline void Add0DElementsWithID(SMDS_Mesh* theMesh,
+ inline void Add0DElementsWithID(SMDS_Mesh* theMesh,
SMESH::log_array_var& theSeq,
CORBA::Long theId)
{
//=======================================================================
//function : AddEdgesWithID
//=======================================================================
- inline void AddEdgesWithID(SMDS_Mesh* theMesh,
+ inline void AddEdgesWithID(SMDS_Mesh* theMesh,
SMESH::log_array_var& theSeq,
CORBA::Long theId)
{
//=======================================================================
//function : AddTriasWithID
//=======================================================================
- inline void AddTriasWithID(SMDS_Mesh* theMesh,
+ inline void AddTriasWithID(SMDS_Mesh* theMesh,
SMESH::log_array_var& theSeq,
CORBA::Long theId)
{
//=======================================================================
//function : AddQuadsWithID
//=======================================================================
- inline void AddQuadsWithID(SMDS_Mesh* theMesh,
+ inline void AddQuadsWithID(SMDS_Mesh* theMesh,
SMESH::log_array_var theSeq,
CORBA::Long theId)
{
//=======================================================================
//function : AddPolygonsWithID
//=======================================================================
- inline void AddPolygonsWithID(SMDS_Mesh* theMesh,
+ inline void AddPolygonsWithID(SMDS_Mesh* theMesh,
SMESH::log_array_var& theSeq,
CORBA::Long theId)
{
//=======================================================================
//function : AddTetrasWithID
//=======================================================================
- inline void AddTetrasWithID(SMDS_Mesh* theMesh,
+ inline void AddTetrasWithID(SMDS_Mesh* theMesh,
SMESH::log_array_var& theSeq,
CORBA::Long theId)
{
//=======================================================================
//function : AddPiramidsWithID
//=======================================================================
- inline void AddPiramidsWithID(SMDS_Mesh* theMesh,
+ inline void AddPiramidsWithID(SMDS_Mesh* theMesh,
SMESH::log_array_var& theSeq,
CORBA::Long theId)
{
//=======================================================================
//function : AddPrismsWithID
//=======================================================================
- inline void AddPrismsWithID(SMDS_Mesh* theMesh,
+ inline void AddPrismsWithID(SMDS_Mesh* theMesh,
SMESH::log_array_var& theSeq,
CORBA::Long theId)
{
//=======================================================================
//function : AddHexasWithID
//=======================================================================
- inline void AddHexasWithID(SMDS_Mesh* theMesh,
+ inline void AddHexasWithID(SMDS_Mesh* theMesh,
SMESH::log_array_var& theSeq,
CORBA::Long theId)
{
//=======================================================================
//function : AddPolyhedronsWithID
//=======================================================================
- inline void AddPolyhedronsWithID (SMDS_Mesh* theMesh,
+ inline void AddPolyhedronsWithID (SMDS_Mesh* theMesh,
SMESH::log_array_var& theSeq,
CORBA::Long theId)
{
//=======================================================================
//function : AddQuadEdgesWithID
//=======================================================================
- inline void AddQuadEdgesWithID(SMDS_Mesh* theMesh,
+ inline void AddQuadEdgesWithID(SMDS_Mesh* theMesh,
SMESH::log_array_var& theSeq,
CORBA::Long theId)
{
//=======================================================================
//function : AddQuadTriasWithID
//=======================================================================
- inline void AddQuadTriasWithID(SMDS_Mesh* theMesh,
+ inline void AddQuadTriasWithID(SMDS_Mesh* theMesh,
SMESH::log_array_var& theSeq,
CORBA::Long theId)
{
//=======================================================================
//function : AddQuadQuadsWithID
//=======================================================================
- inline void AddQuadQuadsWithID(SMDS_Mesh* theMesh,
+ inline void AddQuadQuadsWithID(SMDS_Mesh* theMesh,
SMESH::log_array_var theSeq,
CORBA::Long theId)
{
//=======================================================================
//function : AddQuadTetrasWithID
//=======================================================================
- inline void AddQuadTetrasWithID(SMDS_Mesh* theMesh,
+ inline void AddQuadTetrasWithID(SMDS_Mesh* theMesh,
SMESH::log_array_var& theSeq,
CORBA::Long theId)
{
//=======================================================================
//function : AddQuadPiramidsWithID
//=======================================================================
- inline void AddQuadPiramidsWithID(SMDS_Mesh* theMesh,
+ inline void AddQuadPiramidsWithID(SMDS_Mesh* theMesh,
SMESH::log_array_var& theSeq,
CORBA::Long theId)
{
//=======================================================================
//function : AddQuadPentasWithID
//=======================================================================
- inline void AddQuadPentasWithID(SMDS_Mesh* theMesh,
+ inline void AddQuadPentasWithID(SMDS_Mesh* theMesh,
SMESH::log_array_var& theSeq,
CORBA::Long theId)
{
//=======================================================================
//function : AddQuadHexasWithID
//=======================================================================
- inline void AddQuadHexasWithID(SMDS_Mesh* theMesh,
+ inline void AddQuadHexasWithID(SMDS_Mesh* theMesh,
SMESH::log_array_var& theSeq,
CORBA::Long theId)
{
//=======================================================================
//function : ChangePolyhedronNodes
//=======================================================================
- inline void ChangePolyhedronNodes (SMDS_Mesh* theMesh,
+ inline void ChangePolyhedronNodes (SMDS_Mesh* theMesh,
SMESH::log_array_var& theSeq,
CORBA::Long theId)
{
}
//=======================================================================
-SMESH::SMESH_Gen_var
+SMESH::SMESH_Gen_var
SMESH_Client::GetSMESHGen(CORBA::ORB_ptr theORB,
CORBA::Boolean& theIsEmbeddedMode)
{
static SMESH::SMESH_Gen_var aMeshGen;
- if(CORBA::is_nil(aMeshGen.in())){
+ if(CORBA::is_nil(aMeshGen.in())){
#ifdef WNT
long aClientPID = (long)_getpid();
#else
SALOME_NamingService aNamingService(theORB);
SALOME_LifeCycleCORBA aLifeCycleCORBA(&aNamingService);
- Engines::Component_var aComponent = aLifeCycleCORBA.FindOrLoad_Component("FactoryServer","SMESH");
+ Engines::EngineComponent_var aComponent = aLifeCycleCORBA.FindOrLoad_Component("FactoryServer","SMESH");
aMeshGen = SMESH::SMESH_Gen::_narrow(aComponent);
-
+
std::string aClientHostName = Kernel_Utils::GetHostname();
Engines::Container_var aServerContainer = aMeshGen->GetContainerRef();
CORBA::String_var aServerHostName = aServerContainer->getHostName();
//=======================================================================
// function : Create()
-// purpose :
+// purpose :
//=======================================================================
SMESH_Client::SMESH_Client(CORBA::ORB_ptr theORB,
SMESH::SMESH_Mesh_ptr theMesh):
//=================================================================================
-SMDS_Mesh*
-SMESH_Client::GetMesh() const
+SMDS_Mesh*
+SMESH_Client::GetMesh() const
{
- return mySMDSMesh;
+ return mySMDSMesh;
}
SMESH::SMESH_Mesh_ptr
SMESH_Client::GetMeshServer()
{
- return myMeshServer.in();
+ return myMeshServer.in();
}
{
bool anIsModified = true;
if(mySMESHDSMesh){
- MESSAGE("Update mySMESHDSMesh");
+ MESSAGE("Update mySMESHDSMesh");
SMESHDS_Script* aScript = mySMESHDSMesh->GetScript();
anIsModified = aScript->IsModified();
aScript->SetModified(false);
}else{
- MESSAGE("Update CORBA");
+ MESSAGE("Update CORBA");
SMESH::log_array_var aSeq = myMeshServer->GetLog( theIsClear );
CORBA::Long aLength = aSeq->length();
anIsModified = aLength > 0;
if( MYDEBUG )
MESSAGE( "Update: length of the script is "<<aLength );
-
+
if(!anIsModified)
return false;
for( ; anElemId < aNbElems; anElemId++ )
mySMDSMesh->RemoveNode( FindNode( mySMDSMesh, anIndexes[anElemId] ) );
break;
-
+
case SMESH::REMOVE_ELEMENT:
for( ; anElemId < aNbElems; anElemId++ )
mySMDSMesh->RemoveElement( FindElement( mySMDSMesh, anIndexes[anElemId] ) );
mySMDSMesh->Renumber( anIndexes[i], anIndexes[i+1], anIndexes[i+2] );
}
break;
-
+
default:;
}
}
MESSAGE("Update - mySMDSMesh->NbVolumes() = "<<mySMDSMesh->NbVolumes());
}
} // end of update mesh by log script
-
+
return anIsModified;
}