]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #1957: error text when Build face
authordbv <dbv@opencascade.com>
Thu, 29 Dec 2016 09:29:03 +0000 (12:29 +0300)
committerdbv <dbv@opencascade.com>
Thu, 29 Dec 2016 09:29:03 +0000 (12:29 +0300)
Fixed error messages.

src/BuildPlugin/BuildPlugin_Validators.cpp
src/BuildPlugin/BuildPlugin_msg_en.ts

index 87e52020a07f4cdbf09e1a7ea8749a244c58304a..fc93bc7dfd204b0f6486da93f2012aaf0f9c2dcb 100644 (file)
@@ -192,6 +192,11 @@ bool BuildPlugin_ValidatorBaseForFace::isValid(const std::shared_ptr<ModelAPI_Fe
     }
   }
 
+  if(anEdges.empty()) {
+    theError = "Objects not selected.";
+    return false;
+  }
+
   // Check that edges does not have intersections.
   if(anEdges.size() > 1) {
     GeomAlgoAPI_PaveFiller aPaveFiller(anEdges, false);
@@ -215,7 +220,7 @@ bool BuildPlugin_ValidatorBaseForFace::isValid(const std::shared_ptr<ModelAPI_Fe
   // Check that they are planar.
   std::shared_ptr<GeomAPI_Pln> aPln = GeomAlgoAPI_ShapeTools::findPlane(anEdges);
   if(!aPln.get()) {
-    theError = "Selected objects are not planar.";
+    theError = "Selected object(s) should belong to only one plane.";
     return false;
   }
 
@@ -224,7 +229,7 @@ bool BuildPlugin_ValidatorBaseForFace::isValid(const std::shared_ptr<ModelAPI_Fe
   GeomAlgoAPI_SketchBuilder::createFaces(aPln->location(), aPln->xDirection(),
                                          aPln->direction(), anEdges, aFaces);
   if(aFaces.empty()) {
-    theError = "Selected objects does not have closed contours.";
+    theError = "Selected objects do not generate closed contour.";
     return false;
   }
 
index 025babe9398fa53bd37c04bb37e43517654ef94d..6405e316e08350c3d6d5c25640010db5c40ebce6 100644 (file)
       <source>Empty attribute \"%1\".</source>
       <translation>Objects not selected.</translation>
     </message>
-  </context>
-  <context>
-    <name>Face:BuildPlugin_ValidatorBaseForFace</name>
+    <message>
+      <source>Objects not selected.</source>
+      <translation>Objects not selected.</translation>
+    </message>
     <message>
       <source>Error while checking if edges intersects.</source>
       <translation>Error while checking if edges intersects.</translation>
     </message>
-  </context>
-  <context>
-    <name>Face:BuildPlugin_ValidatorBaseForFace</name>
     <message>
       <source>Selected objects have intersections.</source>
       <translation>Selected objects have intersections.</translation>
     </message>
-  </context>
-  <context>
-    <name>Face:BuildPlugin_ValidatorBaseForFace</name>
     <message>
-      <source>Selected objects are not planar.</source>
-      <translation>Selected objects are not planar.</translation>
+      <source>Selected object(s) should belong to only one plane.</source>
+      <translation>Selected object(s) should belong to only one plane.</translation>
     </message>
-  </context>
-  <context>
-    <name>Face:BuildPlugin_ValidatorBaseForFace</name>
     <message>
-      <source>Selected objects does not have closed contours.</source>
-      <translation>Selected objects does not have closed contours.</translation>
+      <source>Selected objects do not generate closed contour.</source>
+      <translation>Selected objects do not generate closed contour.</translation>
     </message>
   </context>
   <context>