Salome HOME
support fuzzy parameter in all boolean operations
[modules/shaper.git] / src / GeomAlgoAPI / GeomAlgoAPI_Partition.cpp
index cfd2c967f065a9e16e221bdb9f0e6d809085d240..fe49e167a2ea42a4d6d744b2ff6eb6b2a8b74d7c 100644 (file)
@@ -127,9 +127,10 @@ static void sortCompound(TopoDS_Shape& theCompound, GEOMAlgo_Splitter* theOperat
 
 //=================================================================================================
 GeomAlgoAPI_Partition::GeomAlgoAPI_Partition(const ListOfShape& theObjects,
-                                             const ListOfShape& theTools)
+                                             const ListOfShape& theTools,
+                                             const double theFuzzy)
 {
-  build(theObjects, theTools);
+  build(theObjects, theTools, theFuzzy);
 }
 
 static void prepareShapes(const TopoDS_Shape&   theShape,
@@ -150,7 +151,8 @@ static void prepareShapes(const TopoDS_Shape&   theShape,
 
 //=================================================================================================
 void GeomAlgoAPI_Partition::build(const ListOfShape& theObjects,
-                                  const ListOfShape& theTools)
+                                  const ListOfShape& theTools,
+                                  const double theFuzzy)
 {
   if (theObjects.empty()) {
     return;
@@ -200,6 +202,8 @@ void GeomAlgoAPI_Partition::build(const ListOfShape& theObjects,
   Standard_Boolean bRunParallel = Standard_True;
   anOperation->SetRunParallel(bRunParallel);
 
+  if (theFuzzy >= 1.e-7) anOperation->SetFuzzyValue(theFuzzy);
+
   // Building and getting result.
   anOperation->Perform();
   if (anOperation->HasErrors())