Salome HOME
updated copyright message
[modules/shaper.git] / src / GeomAlgoAPI / GeomAlgoAPI_Partition.cpp
index 14d5f5593a26b299796afb8b9729c66d9616fc2d..6f689cf16c81091784972da80f3d7007b60c5a0a 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2019  CEA/DEN, EDF R&D
+// Copyright (C) 2014-2023  CEA, EDF
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -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;
@@ -196,6 +198,12 @@ void GeomAlgoAPI_Partition::build(const ListOfShape& theObjects,
     }
   }
 
+  // Set parallel processing mode (default is false)
+  Standard_Boolean bRunParallel = Standard_True;
+  anOperation->SetRunParallel(bRunParallel);
+
+  if (theFuzzy > 0) anOperation->SetFuzzyValue(theFuzzy);
+
   // Building and getting result.
   anOperation->Perform();
   if (anOperation->HasErrors())