Salome HOME
Issue #2811: Update content of Object node on creation moment
[modules/shaper.git] / src / GeomValidators / GeomValidators_NotSelfIntersected.cpp
index e3032b6244fb6436260ddbb6e082ed6ce3a7255f..aa017935d63ced7532dd32c0521f85cc9e0dde35 100644 (file)
@@ -25,7 +25,7 @@
 #include <Events_InfoMessage.h>
 
 #include <ModelAPI_AttributeSelection.h>
-#include <ModelAPI_AttributeSelectionList.h>>
+#include <ModelAPI_AttributeSelectionList.h>
 #include <ModelAPI_Feature.h>
 
 bool GeomValidators_NotSelfIntersected::isValid(const std::shared_ptr<ModelAPI_Feature>& theFeature,
@@ -74,17 +74,19 @@ bool GeomValidators_NotSelfIntersected::isValid(const std::shared_ptr<ModelAPI_F
           return false;
         }
 
-        if (aShape->isSelfIntersected()) {
+        /* optimization 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*/,