0025614: Provide API access to the new fuctionalities of Boolean Components
[occt.git] / src / BOPAlgo / BOPAlgo_BOP.cxx
index e05cd20..ec88eab 100644 (file)
@@ -43,6 +43,7 @@
 #include <BOPTools_Set.hxx>
 #include <BOPTools_SetMapHasher.hxx>
 #include <NCollection_DataMap.hxx>
+#include <TopTools_ListIteratorOfListOfShape.hxx>
 
 typedef NCollection_DataMap  
   <BOPTools_Set, 
@@ -129,6 +130,36 @@ void BOPAlgo_BOP::AddTool(const TopoDS_Shape& theShape)
   }
 }
 //=======================================================================
+//function : SetTools
+//purpose  : 
+//=======================================================================
+void BOPAlgo_BOP::SetTools(const TopTools_ListOfShape& theShapes)
+{
+  TopTools_ListIteratorOfListOfShape aIt;
+  //
+  myTools.Clear();
+  aIt.Initialize(theShapes);
+  for (; aIt.More(); aIt.Next()) {
+    const TopoDS_Shape& aS = aIt.Value();
+    AddTool(aS);
+  }
+}
+//=======================================================================
+//function : SetTools
+//purpose  : 
+//=======================================================================
+void BOPAlgo_BOP::SetTools(const BOPCol_ListOfShape& theShapes)
+{
+  BOPCol_ListIteratorOfListOfShape aIt;
+  //
+  myTools.Clear();
+  aIt.Initialize(theShapes);
+  for (; aIt.More(); aIt.Next()) {
+    const TopoDS_Shape& aS = aIt.Value();
+    AddTool(aS);
+  }
+}
+//=======================================================================
 //function : CheckData
 //purpose  : 
 //=======================================================================