From: eap Date: Thu, 10 Feb 2011 13:31:17 +0000 (+0000) Subject: 0021153: [CEA] non regression test fails X-Git-Tag: StartingPortingMED3~62 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=df50de7d46b12a56ff874adbd1152eee1251049b;p=modules%2Fsmesh.git 0021153: [CEA] non regression test fails Fix RemoveNode() and RemoveElement(): erase only elements belonging to this sub-mesh --- diff --git a/src/SMESHDS/SMESHDS_SubMesh.cxx b/src/SMESHDS/SMESHDS_SubMesh.cxx index 257e092e0..78fcd5282 100644 --- a/src/SMESHDS/SMESHDS_SubMesh.cxx +++ b/src/SMESHDS/SMESHDS_SubMesh.cxx @@ -126,8 +126,8 @@ bool SMESHDS_SubMesh::RemoveElement(const SMDS_MeshElement * ME, bool isElemDele //MESSAGE("-----------------> RemoveElement "<< ME->GetID() << " " << isElemDeleted); if (!IsComplexSubmesh()) { - // if (!isElemDeleted) // alive element has valid ID and can be found - // { + if ( ME->getshapeId() != myIndex ) + return false; int idInSubShape = ME->getIdInShape(); //MESSAGE("in "<< myIndex << " RemoveElement " << ME->GetID() << " " << idInSubShape << " " << myUnusedIdElements); SMDS_MeshElement* elem = (SMDS_MeshElement*) (ME); @@ -182,6 +182,8 @@ bool SMESHDS_SubMesh::RemoveNode(const SMDS_MeshNode * N, bool isNodeDeleted) { // if (!isNodeDeleted) // alive node has valid ID and can be found // { + if ( N->getshapeId() != myIndex ) + return false; int idInSubShape = N->getIdInShape(); //int shapeId = N->getshapeId(); //MESSAGE("in "<< myIndex << " RemoveNode " << shapeId << " " << idInSubShape << " " << N->GetID());