]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Small fix for Fill.
authordbv <dbv@opencascade.com>
Thu, 30 Aug 2018 13:56:28 +0000 (16:56 +0300)
committerdbv <dbv@opencascade.com>
Thu, 30 Aug 2018 13:56:46 +0000 (16:56 +0300)
src/FeaturesPlugin/CMakeLists.txt
src/FeaturesPlugin/boolean_fill_widget.xml [new file with mode: 0644]
src/FeaturesPlugin/plugin-Features.xml
src/GeomValidators/GeomValidators_NotSelfIntersected.cpp

index 11a8377a2561039dc887955bfe079f0e98360715..1bb74ed46a5657da153e31a244bb341e4421719b 100644 (file)
@@ -110,6 +110,7 @@ SET(XML_RESOURCES
   boolean_widget.xml
   boolean_fuse_widget.xml
   boolean_common_widget.xml
+  boolean_fill_widget.xml
   boolean_smash_widget.xml
   recover_widget.xml
   partition_widget.xml
diff --git a/src/FeaturesPlugin/boolean_fill_widget.xml b/src/FeaturesPlugin/boolean_fill_widget.xml
new file mode 100644 (file)
index 0000000..e584a53
--- /dev/null
@@ -0,0 +1,44 @@
+<!--
+Copyright (C) 2014-2017  CEA/DEN, EDF R&D
+
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+This library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+See http:##www.salome-platform.org/ or
+email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
+-->
+
+<source>
+  <multi_selector id="main_objects"
+    label="Main objects"
+    icon=""
+    tooltip="Select objects"
+    type_choice="vertices edges wires faces shells solids compsolids compounds"
+    use_choice="false"
+    concealment="true">
+    <validator id="PartSet_DifferentObjects"/>
+    <validator id="FeaturesPlugin_ValidatorBooleanSelection"/>
+  </multi_selector>
+  <multi_selector id="tool_objects"
+    label="Tool objects"
+    icon=""
+    tooltip="Select tools"
+    type_choice="vertices edges wires faces shells solids compsolids compounds"
+    use_choice="false"
+    concealment="true" >
+    <validator id="PartSet_DifferentObjects"/>
+    <validator id="FeaturesPlugin_ValidatorBooleanSelection"/>
+  </multi_selector>
+  <validator id="FeaturesPlugin_ValidatorBooleanArguments" parameters="main_objects,tool_objects"/>
+</source>
index bb13f70af3184c6c6cd50cc10e6832e59e40cc3c..3858a8811735c30353c2bfce9506f69d9852ddf3 100644 (file)
@@ -94,7 +94,7 @@ email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com
       <feature id="Fill" title="Fill" tooltip="Perform boolean fill operation with objects"
                icon="icons/Features/bool_fill.png" helpfile="FeaturesPlugin/fillFeature.html"
                auto_preview="false">
-          <source path="boolean_widget.xml"/>
+          <source path="boolean_fill_widget.xml"/>
       </feature>
       <feature id="Union" title="Union" tooltip="Perform union operations with shapes"
                icon="icons/Features/union.png" helpfile="FeaturesPlugin/unionFeature.html">
index e3032b6244fb6436260ddbb6e082ed6ce3a7255f..dc83cd1966bd8bc5c898e1e10d944fe88391b2a8 100644 (file)
@@ -74,17 +74,19 @@ bool GeomValidators_NotSelfIntersected::isValid(const std::shared_ptr<ModelAPI_F
           return false;
         }
 
-        if (aShape->isSelfIntersected()) {
+        if (aShape->isSelfIntersected(4)) {
           theError = "Error: One of selected shapes are self-intersected.";
           return false;
         }
       }
-    }
-    else {
+    } else {
       theError = std::string("Error: validator does not support attribute with type: ")
         + anAttribute->attributeType();
+      return false;
     }
   }
+
+  return true;
 }
 
 bool GeomValidators_NotSelfIntersected::isNotObligatory(std::string /*theFeature*/,