Salome HOME
added checkbox in UI for optional fuzzy parameter
[modules/shaper.git] / src / FeaturesAPI / FeaturesAPI_BooleanCut.h
index 09f67374329d5e60b55f922315a47d01c742c125..cc44d0957ec14b737a20a0d1fa0b93d4e08b22aa 100644 (file)
@@ -46,17 +46,19 @@ public:
   FeaturesAPI_BooleanCut(const std::shared_ptr<ModelAPI_Feature>& theFeature,
                          const std::list<ModelHighAPI_Selection>& theMainObjects,
                          const std::list<ModelHighAPI_Selection>& theToolObjects,
-                         const ModelHighAPI_Double& theFuzzy = ModelHighAPI_Double(1.e-8));
+                         const ModelHighAPI_Double& theFuzzy = ModelHighAPI_Double(-1));
 
   /// Destructor.
   FEATURESAPI_EXPORT
   virtual ~FeaturesAPI_BooleanCut();
 
-  INTERFACE_3(FeaturesPlugin_BooleanCut::ID(),
+  INTERFACE_4(FeaturesPlugin_BooleanCut::ID(),
               mainObjects, FeaturesPlugin_BooleanCut::OBJECT_LIST_ID(),
               ModelAPI_AttributeSelectionList, /** Main objects */,
               toolObjects, FeaturesPlugin_BooleanCut::TOOL_LIST_ID(),
               ModelAPI_AttributeSelectionList, /** Tool objects*/,
+              useFuzzy, FeaturesPlugin_BooleanCut::USE_FUZZY_ID(),
+              ModelAPI_AttributeBoolean, /** Use Fuzzy parameter*/,
               fuzzyParam, FeaturesPlugin_BooleanCut::FUZZY_PARAM_ID(),
               ModelAPI_AttributeDouble, /** Fuzzy parameter */)
 
@@ -68,6 +70,10 @@ public:
   FEATURESAPI_EXPORT
   void setToolObjects(const std::list<ModelHighAPI_Selection>& theToolObjects);
 
+  /// Set use fuzzy parameter.
+  FEATURESAPI_EXPORT
+  void setUseFuzzy(bool theUseFuzzy);
+
   /// Set fuzzy parameter.
   FEATURESAPI_EXPORT
   void setFuzzyValue(const ModelHighAPI_Double& theFuzzy);
@@ -86,7 +92,7 @@ FEATURESAPI_EXPORT
 BooleanCutPtr addCut(const std::shared_ptr<ModelAPI_Document>& thePart,
                      const std::list<ModelHighAPI_Selection>& theMainObjects,
                      const std::list<ModelHighAPI_Selection>& theToolObjects,
-                     const ModelHighAPI_Double& fuzzyParam = ModelHighAPI_Double(1.e-8),
+                     const ModelHighAPI_Double& fuzzyParam = ModelHighAPI_Double(-1),
                      const bool keepSubResults = false);
 
 #endif // FeaturesAPI_BooleanCut_H_