To destinguish in what mode (embedded or not) the SMESHDS_Mesh was created

This commit is contained in:
apo 2006-03-10 11:18:05 +00:00
parent f172750ec3
commit 408e1a5c83
3 changed files with 16 additions and 3 deletions

View File

@ -375,9 +375,12 @@ SMESH_Client::SMESH_Client(CORBA::ORB_ptr theORB,
MESSAGE("Info: The same process, update mesh by pointer ");
// just set client mesh pointer to server mesh pointer
SMESH_Mesh* aMesh = reinterpret_cast<SMESH_Mesh*>(theMesh->GetMeshPtr());
mySMESHDSMesh = aMesh->GetMeshDS();
mySMDSMesh = mySMESHDSMesh;
}else
if(aMesh->GetMeshDS()->IsEmbeddedMode()){
mySMESHDSMesh = aMesh->GetMeshDS();
mySMDSMesh = mySMESHDSMesh;
}
}
if(!mySMDSMesh)
mySMDSMesh = new SMDS_Mesh();
}

View File

@ -46,11 +46,18 @@ using namespace std;
//purpose :
//=======================================================================
SMESHDS_Mesh::SMESHDS_Mesh(int theMeshID, bool theIsEmbeddedMode):
myIsEmbeddedMode(theIsEmbeddedMode),
myMeshID(theMeshID)
{
myScript = new SMESHDS_Script(theIsEmbeddedMode);
}
//=======================================================================
bool SMESHDS_Mesh::IsEmbeddedMode()
{
return myIsEmbeddedMode;
}
//=======================================================================
//function : ShapeToMesh
//purpose :

View File

@ -79,6 +79,8 @@ class SMESHDS_GroupBase;
class SMESHDS_WNT_EXPORT SMESHDS_Mesh:public SMDS_Mesh{
public:
SMESHDS_Mesh(int theMeshID, bool theIsEmbeddedMode);
bool IsEmbeddedMode();
void ShapeToMesh(const TopoDS_Shape & S);
bool AddHypothesis(const TopoDS_Shape & SS, const SMESHDS_Hypothesis * H);
bool RemoveHypothesis(const TopoDS_Shape & S, const SMESHDS_Hypothesis * H);
@ -499,6 +501,7 @@ private:
TGroups myGroups;
SMESHDS_Script* myScript;
bool myIsEmbeddedMode;
// optimize addition of nodes/elements to submeshes by, SetNodeInVolume() etc:
// avoid search of submeshes in maps