From df50de7d46b12a56ff874adbd1152eee1251049b Mon Sep 17 00:00:00 2001 From: eap Date: Thu, 10 Feb 2011 13:31:17 +0000 Subject: [PATCH] 0021153: [CEA] non regression test fails Fix RemoveNode() and RemoveElement(): erase only elements belonging to this sub-mesh --- src/SMESHDS/SMESHDS_SubMesh.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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()); -- 2.39.2