From: apo Date: Fri, 10 Mar 2006 11:18:05 +0000 (+0000) Subject: To destinguish in what mode (embedded or not) the SMESHDS_Mesh was created X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=408e1a5c832010c4ea2acc16b4894e8c23ae7002;p=modules%2Fsmesh.git To destinguish in what mode (embedded or not) the SMESHDS_Mesh was created --- diff --git a/src/SMESHClient/SMESH_Client.cxx b/src/SMESHClient/SMESH_Client.cxx index 4e95a08b3..f6667a1b2 100644 --- a/src/SMESHClient/SMESH_Client.cxx +++ b/src/SMESHClient/SMESH_Client.cxx @@ -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(theMesh->GetMeshPtr()); - mySMESHDSMesh = aMesh->GetMeshDS(); - mySMDSMesh = mySMESHDSMesh; - }else + if(aMesh->GetMeshDS()->IsEmbeddedMode()){ + mySMESHDSMesh = aMesh->GetMeshDS(); + mySMDSMesh = mySMESHDSMesh; + } + } + if(!mySMDSMesh) mySMDSMesh = new SMDS_Mesh(); } diff --git a/src/SMESHDS/SMESHDS_Mesh.cxx b/src/SMESHDS/SMESHDS_Mesh.cxx index dc048b281..c1d3cc45c 100644 --- a/src/SMESHDS/SMESHDS_Mesh.cxx +++ b/src/SMESHDS/SMESHDS_Mesh.cxx @@ -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 : diff --git a/src/SMESHDS/SMESHDS_Mesh.hxx b/src/SMESHDS/SMESHDS_Mesh.hxx index b5aca3833..61d223ebb 100644 --- a/src/SMESHDS/SMESHDS_Mesh.hxx +++ b/src/SMESHDS/SMESHDS_Mesh.hxx @@ -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