]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #254: on error of Boolean operations produce error window and this error now...
authormpv <mikhail.ponikarov@opencascade.com>
Mon, 10 Nov 2014 08:50:16 +0000 (11:50 +0300)
committermpv <mikhail.ponikarov@opencascade.com>
Mon, 10 Nov 2014 08:50:16 +0000 (11:50 +0300)
src/FeaturesPlugin/FeaturesPlugin_Boolean.cpp

index e582019b4839f3d18ee494cd9ff39c0f60860873..de5cdbf2204eaf94ad0be7e3a4c87ac07dbcaa36 100644 (file)
@@ -83,6 +83,13 @@ void FeaturesPlugin_Boolean::execute()
     Events_Error::send(aFeatureError, this);
     return;
   }  
+  // if result of Boolean operation is same as was before it means that Boolean operation has no sence
+  // and naming provides no result, so, generate an error in this case
+  if (anObject->isEqual(aFeature->shape())) {
+    std::string aFeatureError = "Boolean feature: operation was not performed";  
+    Events_Error::send(aFeatureError, this);
+    return;
+  }
   //LoadNamingDS
   LoadNamingDS(aFeature, aResultBody, anObject, aTool, aType);