Fix regression of SMESH_TEST/Grids/smesh/imps6/G0

Reset node data when it is removed
+      ((SMDS_MeshNode*) n)->SMDS_MeshElement::init( -1, -1, -1 ); // avoid reuse
This commit is contained in:
eap 2013-08-15 12:08:51 +00:00
parent 8e84b443fc
commit dac0310307

View File

@ -3370,6 +3370,7 @@ void SMDS_Mesh::RemoveFreeElement(const SMDS_MeshElement * elem)
myNodes[elemId] = 0; myNodes[elemId] = 0;
myInfo.myNbNodes--; myInfo.myNbNodes--;
((SMDS_MeshNode*) n)->SetPosition(SMDS_SpacePosition::originSpacePosition()); ((SMDS_MeshNode*) n)->SetPosition(SMDS_SpacePosition::originSpacePosition());
((SMDS_MeshNode*) n)->SMDS_MeshElement::init( -1, -1, -1 ); // avoid reuse
myNodePool->destroy(static_cast<SMDS_MeshNode*>(todest)); myNodePool->destroy(static_cast<SMDS_MeshNode*>(todest));
myNodeIDFactory->ReleaseID(elemId, vtkId); myNodeIDFactory->ReleaseID(elemId, vtkId);
} }