]> SALOME platform Git repositories - plugins/hexoticplugin.git/commitdiff
Salome HOME
0052232: TC7.3.0: unexpected result in the mesh computation
authoreap <eap@opencascade.com>
Fri, 6 Dec 2013 14:09:39 +0000 (14:09 +0000)
committereap <eap@opencascade.com>
Fri, 6 Dec 2013 14:09:39 +0000 (14:09 +0000)
  Fix removing an imported input mesh

src/HexoticPlugin/HexoticPlugin_Hexotic.cxx

index c6bae59e41f63697bda0da5ce7ddd3cf8eaeace6..1c1bfa00ad766d830adc47870987bd23fea3ff82 100644 (file)
@@ -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 ];