Salome HOME
Fix valgrind error: Mismatched free() / delete / delete []
[modules/geom.git] / src / GEOMAlgo / GEOMAlgo_SolidSolid.cxx
index 3082261dd82c2ee2d329397245345bf7dc7c3624..069ca0a2da171cd0b28aa1772a93731e36e65432 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2016  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 // License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -37,9 +37,6 @@
 #include <TopTools_ListIteratorOfListOfShape.hxx>
 #include <TopTools_IndexedMapOfShape.hxx>
 
-#include <BooleanOperations_ShapesDataStructure.hxx>
-#include <BOPTools_DSFiller.hxx>
-
 #include <GEOMAlgo_IndexedDataMapOfShapeState.hxx>
 
 //=======================================================================
@@ -86,19 +83,11 @@ void GEOMAlgo_SolidSolid::Perform()
       myErrorStatus=10;
       return;
     }
-    if(!myDSFiller->IsDone()) {
+    if(myDSFiller->HasErrors()) {
       myErrorStatus=11;
       return;
     }
     //
-    Standard_Boolean bIsNewFiller;
-    //
-    bIsNewFiller=myDSFiller->IsNewFiller();
-    if (bIsNewFiller) {
-      Prepare();
-      myDSFiller->SetNewFiller(!bIsNewFiller);
-    }
-    //
     myRank=2;
     BuildResult();
   }
@@ -122,7 +111,7 @@ void GEOMAlgo_SolidSolid::BuildResult()
   GEOMAlgo_IndexedDataMapOfShapeState aMFS;
   //
   // 1. classify the faces
-  GEOMAlgo_ShellSolid::BuildResult();
+  GEOMAlgo_ShellSolid::Perform();
   //
   // 2. fill Shape-State map
   aIt.Initialize(myLSIN);
@@ -140,6 +129,7 @@ void GEOMAlgo_SolidSolid::BuildResult()
     const TopoDS_Shape& aF=aIt.Value();
     aMFS.Add(aF, TopAbs_ON);
   }
+  //
   myLSIN.Clear();
   myLSON.Clear();
   myLSOUT.Clear();