Salome HOME
Migration to OpenCASCADE CMake configuration
[modules/geom.git] / src / GEOMAlgo / GEOMAlgo_RemoverWebs.cxx
index 94f14ff859ba73c72c786209e6427c78d4fe54ce..758fe84764c00a4a3e6608a3af00b4a406cb283c 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2014  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
 
 #include <BRepClass3d_SolidClassifier.hxx>
 
-#include <BOPInt_Context.hxx>
+#include <IntTools_Context.hxx>
 
 #include <BOPAlgo_BuilderSolid.hxx>
 
-#include <BOPTools.hxx>
 #include <BOPTools_AlgoTools.hxx>
-#include <BOPCol_MapOfShape.hxx>
+#include <TopTools_MapOfShape.hxx>
 
 //=======================================================================
 //function : 
@@ -102,7 +101,7 @@ void GEOMAlgo_RemoverWebs::Perform()
   if (!myContext.IsNull()) {
     myContext.Nullify();
   }
-  myContext=new BOPInt_Context;
+  myContext=new IntTools_Context;
   //
   BuildSolid();
   //
@@ -119,11 +118,11 @@ void GEOMAlgo_RemoverWebs::BuildSolid()
   TopoDS_Iterator aIt1, aIt2;
   TopoDS_Shape aShape;
   BRep_Builder aBB;
-  BOPCol_MapOfShape aMFence;
-  BOPCol_IndexedMapOfShape aMSI;
-  BOPCol_IndexedDataMapOfShapeListOfShape aMFS;
-  BOPCol_ListOfShape aSFS;
-  BOPCol_ListIteratorOfListOfShape aItLS;
+  TopTools_MapOfShape aMFence;
+  TopTools_IndexedMapOfShape aMSI;
+  TopTools_IndexedDataMapOfShapeListOfShape aMFS;
+  TopTools_ListOfShape aSFS;
+  TopTools_ListIteratorOfListOfShape aItLS;
   BOPAlgo_BuilderSolid aSB;
   //
   //modified by NIZNHY-PKV Thu Jul 11 06:54:51 2013f
@@ -144,7 +143,7 @@ void GEOMAlgo_RemoverWebs::BuildSolid()
   //
   aNbR=aMFence.Extent();
   if (aNbS!=aNbR) {
-    BOPCol_MapIteratorOfMapOfShape aItMS;
+    TopTools_MapIteratorOfMapOfShape aItMS;
     //
     BOPTools_AlgoTools::MakeContainer(TopAbs_COMPOUND, aShape);  
     //
@@ -159,7 +158,7 @@ void GEOMAlgo_RemoverWebs::BuildSolid()
   aNbF2=0;
   //
   // 1. aSFS: Faces 
-  BOPTools::MapShapesAndAncestors(aShape, TopAbs_FACE, TopAbs_SOLID, aMFS);
+  TopExp::MapShapesAndAncestors(aShape, TopAbs_FACE, TopAbs_SOLID, aMFS);
   //
   aNbF=aMFS.Extent();
   for (i=1; i<=aNbF; ++i) {
@@ -175,7 +174,7 @@ void GEOMAlgo_RemoverWebs::BuildSolid()
       aSFS.Append(aFi);
     }
     else {
-      const BOPCol_ListOfShape& aLSx=aMFS(i);
+      const TopTools_ListOfShape& aLSx=aMFS(i);
       aNbSx=aLSx.Extent();
       if (aNbSx==1) {
         aSFS.Append(aFx);
@@ -215,13 +214,13 @@ void GEOMAlgo_RemoverWebs::BuildSolid()
   aSB.SetContext(myContext);
   aSB.SetShapes(aSFS);
   aSB.Perform();
-  iErr=aSB.ErrorStatus();
+  iErr=aSB.HasErrors();
   if (iErr) {
     myErrorStatus=20; // SolidBuilder failed
     return;
   }
   //
-  const BOPCol_ListOfShape& aLSR=aSB.Areas();
+  const TopTools_ListOfShape& aLSR=aSB.Areas();
   // 
   // 4 Add the internals
   if (aNbSI) {
@@ -239,17 +238,15 @@ void GEOMAlgo_RemoverWebs::BuildSolid()
 //function : AddInternalShapes
 //purpose  : 
 //=======================================================================
-void GEOMAlgo_RemoverWebs::AddInternalShapes(const BOPCol_ListOfShape& aLSR,
-                                             const BOPCol_IndexedMapOfShape& aMSI)
+void GEOMAlgo_RemoverWebs::AddInternalShapes(const TopTools_ListOfShape& aLSR,
+                                             const TopTools_IndexedMapOfShape& aMSI)
 {
   Standard_Integer i, aNbSI;
   TopAbs_State aState;  
   TopoDS_Solid aSd;
   BRep_Builder aBB;
-  BOPCol_ListIteratorOfListOfShape aItLS;
-  Handle(BOPInt_Context) aCtx;
-  //
-  aCtx=new BOPInt_Context;
+  TopTools_ListIteratorOfListOfShape aItLS;
+  Handle(IntTools_Context) aCtx=new IntTools_Context;
   //
   aNbSI=aMSI.Extent();
   for (i=1; i<=aNbSI; ++i) {