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();
}
//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 :
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);
TGroups myGroups;
SMESHDS_Script* myScript;
+ bool myIsEmbeddedMode;
// optimize addition of nodes/elements to submeshes by, SetNodeInVolume() etc:
// avoid search of submeshes in maps