X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMDS%2FSMDS_Mesh.cxx;h=808873c3888f72f5fa17a8d71ce450010f906a62;hp=ffb2926b9016757bfdf694052d5c2c00f21899bf;hb=c80762b0a1cdba101aec4aa2b1cae281331a162e;hpb=a38c378b1cecd956f4cef180842096fadc0c014f diff --git a/src/SMDS/SMDS_Mesh.cxx b/src/SMDS/SMDS_Mesh.cxx index ffb2926b9..808873c38 100644 --- a/src/SMDS/SMDS_Mesh.cxx +++ b/src/SMDS/SMDS_Mesh.cxx @@ -3233,7 +3233,7 @@ void SMDS_Mesh::RemoveElement(const SMDS_MeshElement * elem, if (const SMDS_VtkEdge* vtkElem = dynamic_cast(*it)) myEdgePool->destroy((SMDS_VtkEdge*) vtkElem); else { - ((SMDS_MeshElement*) *it)->init( -1, -1, -1 ); // avoid reuse + ((SMDS_MeshElement*) *it)->init( 0, -1, -1 ); // avoid reuse delete (*it); } break; @@ -3248,7 +3248,7 @@ void SMDS_Mesh::RemoveElement(const SMDS_MeshElement * elem, if (const SMDS_VtkFace* vtkElem = dynamic_cast(*it)) myFacePool->destroy((SMDS_VtkFace*) vtkElem); else { - ((SMDS_MeshElement*) *it)->init( -1, -1, -1 ); // avoid reuse + ((SMDS_MeshElement*) *it)->init( 0, -1, -1 ); // avoid reuse delete (*it); } break; @@ -3263,7 +3263,7 @@ void SMDS_Mesh::RemoveElement(const SMDS_MeshElement * elem, if (const SMDS_VtkVolume* vtkElem = dynamic_cast(*it)) myVolumePool->destroy((SMDS_VtkVolume*) vtkElem); else { - ((SMDS_MeshElement*) *it)->init( -1, -1, -1 ); // avoid reuse + ((SMDS_MeshElement*) *it)->init( 0, -1, -1 ); // avoid reuse delete (*it); } break; @@ -3278,7 +3278,7 @@ void SMDS_Mesh::RemoveElement(const SMDS_MeshElement * elem, if (const SMDS_BallElement* vtkElem = dynamic_cast(*it)) myBallPool->destroy(const_cast( vtkElem )); else { - ((SMDS_MeshElement*) *it)->init( -1, -1, -1 ); // avoid reuse + ((SMDS_MeshElement*) *it)->init( 0, -1, -1 ); // avoid reuse delete (*it); } break; @@ -3340,7 +3340,7 @@ void SMDS_Mesh::RemoveFreeElement(const SMDS_MeshElement * elem) myNodes[elemId] = 0; myInfo.myNbNodes--; ((SMDS_MeshNode*) n)->SetPosition(SMDS_SpacePosition::originSpacePosition()); - ((SMDS_MeshNode*) n)->SMDS_MeshElement::init( -1, -1, -1 ); // avoid reuse + ((SMDS_MeshNode*) n)->SMDS_MeshElement::init( 0, -1, -1 ); // avoid reuse myNodePool->destroy(static_cast(todest)); myNodeIDFactory->ReleaseID(elemId, vtkId); } @@ -3396,7 +3396,7 @@ void SMDS_Mesh::RemoveFreeElement(const SMDS_MeshElement * elem) // --- to do: keep vtkid in a list of reusable cells if ( elem ) - ((SMDS_MeshElement*) elem)->init( -1, -1, -1 ); // avoid reuse + ((SMDS_MeshElement*) elem)->init( 0, -1, -1 ); // avoid reuse } }