From 84a8e2819a8b49dc46dd6c6c8192100198a999d7 Mon Sep 17 00:00:00 2001 From: eap Date: Fri, 6 Dec 2013 14:09:39 +0000 Subject: [PATCH] 0052232: TC7.3.0: unexpected result in the mesh computation Fix removing an imported input mesh --- src/HexoticPlugin/HexoticPlugin_Hexotic.cxx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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 ]; -- 2.39.2