From: eap Date: Fri, 6 Dec 2013 14:09:39 +0000 (+0000) Subject: 0052232: TC7.3.0: unexpected result in the mesh computation X-Git-Tag: V7_3_0~3 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=84a8e2819a8b49dc46dd6c6c8192100198a999d7;p=plugins%2Fhexoticplugin.git 0052232: TC7.3.0: unexpected result in the mesh computation Fix removing an imported input mesh --- diff --git a/src/HexoticPlugin/HexoticPlugin_Hexotic.cxx b/src/HexoticPlugin/HexoticPlugin_Hexotic.cxx index c6bae59..1c1bfa0 100644 --- a/src/HexoticPlugin/HexoticPlugin_Hexotic.cxx +++ b/src/HexoticPlugin/HexoticPlugin_Hexotic.cxx @@ -687,7 +687,15 @@ static bool readResult(std::string theFile, mapField["Hexahedra"] = 7; tabRef[7] = 8; tabDummy[7] = true; mapField["End"] = 8; tabRef[8] = 0; tabDummy[8] = false; - theHelper->GetMesh()->Clear(); + { + // theMesh->Clear(); -- this does not remove imported mesh + SMDS_ElemIteratorPtr eIt = theMesh->elementsIterator(); + while( eIt->more() ) + theMesh->RemoveFreeElement( eIt->next(), /*sm=*/0 ); + SMDS_NodeIteratorPtr nIt = theMesh->nodesIterator(); + while ( nIt->more() ) + theMesh->RemoveFreeNode( nIt->next(), /*sm=*/0 ); + } int nbVertices = getNbShape(theFile, "Vertices"); HexoticNode = new SMDS_MeshNode*[ nbVertices + 1 ];