]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/FeaturesPlugin/FeaturesPlugin_BooleanCut.cpp
Salome HOME
added checkbox in UI for optional fuzzy parameter
[modules/shaper.git] / src / FeaturesPlugin / FeaturesPlugin_BooleanCut.cpp
index 50de25d0cecd6ddbb011ec9b4d6bf57e5349f95c..1aaa84a0f924ba0fae12878c3d766ee372f37140 100644 (file)
@@ -20,6 +20,7 @@
 #include "FeaturesPlugin_BooleanCut.h"
 
 #include <ModelAPI_ResultBody.h>
+#include <ModelAPI_AttributeBoolean.h>
 #include <ModelAPI_AttributeDouble.h>
 #include <ModelAPI_AttributeSelectionList.h>
 #include <ModelAPI_Tools.h>
@@ -82,7 +83,9 @@ void FeaturesPlugin_BooleanCut::execute()
 
   // Getting fuzzy parameter.
   // Used as additional tolerance to eliminate tiny results.
-  double aFuzzy = real(FUZZY_PARAM_ID())->value();
+  // Using -1 as fuzzy value in the GeomAlgoAPI means to ignore it during the boolean operation!
+  bool aUseFuzzy = boolean(USE_FUZZY_ID())->value();
+  double aFuzzy = (aUseFuzzy ? real(FUZZY_PARAM_ID())->value() : -1);
 
   // For solids cut each object with all tools.
   bool isOk = true;