Salome HOME
Corrections for the English and the French translations.
[modules/shaper.git] / src / BuildPlugin / BuildPlugin_Validators.cpp
index 3b4c4b950c4d645d2f844163f730110eb815196f..65be3411933356f25d4724b941c2659b693436a4 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2017  CEA/DEN, EDF R&D
+// Copyright (C) 2014-2019  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
 //
 // 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
+// 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>
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 
 #include "BuildPlugin_Validators.h"
@@ -100,7 +99,7 @@ bool BuildPlugin_ValidatorBaseForBuild::isValid(const AttributePtr& theAttribute
       std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(aContext);
     if(aConstruction.get()) {
       if(aConstruction->isInfinite()) {
-        theError = "Inifinte objects not acceptable.";
+        theError = "Infinite objects not acceptable.";
         return false;
       }
 
@@ -247,9 +246,8 @@ bool BuildPlugin_ValidatorBaseForFace::isValid(const std::shared_ptr<ModelAPI_Fe
     }
 
     // Check that selected objects have closed contours.
-    ListOfShape aFaces;
-    GeomAlgoAPI_SketchBuilder::createFaces(aPln->location(), aPln->xDirection(),
-                                           aPln->direction(), anEdges, aFaces);
+    GeomAlgoAPI_SketchBuilder aBuilder(aPln, anEdges);
+    const ListOfShape& aFaces = aBuilder.faces();
     if(aFaces.empty()) {
       theError = "Selected objects do not generate closed contour.";
       return false;
@@ -345,20 +343,24 @@ bool BuildPlugin_ValidatorSubShapesSelection::isValid(const AttributePtr& theAtt
                                                       Events_InfoMessage& theError) const
 {
   if(theArguments.size() != 1) {
+    // LCOV_EXCL_START
     std::string aMsg = "Error: BuildPlugin_ValidatorSubShapesSelection should be used only with "
       "1 parameter(Sketch feature id).";
     Events_InfoMessage("BuildPlugin_Validators", aMsg).send();
     return false;
+    // LCOV_EXCL_STOP
   }
 
   // Get base objects list.
   if(theAttribute->attributeType() != ModelAPI_AttributeSelectionList::typeId()) {
+    // LCOV_EXCL_START
     std::string aMsg =
       "Error: BuildPlugin_ValidatorSubShapesSelection does not support attribute type \""
       "%1\"\n Only \"%2\" supported.";
     Events_InfoMessage("BuildPlugin_Validators", aMsg).
       arg(theAttribute->attributeType()).arg(ModelAPI_AttributeSelectionList::typeId()).send();
     return false;
+    // LCOV_EXCL_STOP
   }
   AttributeSelectionListPtr aSelectionList =
     std::dynamic_pointer_cast<ModelAPI_AttributeSelectionList>(theAttribute);
@@ -446,12 +448,14 @@ bool BuildPlugin_ValidatorFillingSelection::isValid(const AttributePtr& theAttri
 {
   // Get base objects list.
   if (theAttribute->attributeType() != ModelAPI_AttributeSelectionList::typeId()) {
+    // LCOV_EXCL_START
     std::string aMsg =
       "Error: BuildPlugin_ValidatorFillingSelection does not support attribute type \""
       "%1\"\n Only \"%2\" supported.";
     Events_InfoMessage("BuildPlugin_Validators", aMsg).
       arg(theAttribute->attributeType()).arg(ModelAPI_AttributeSelectionList::typeId()).send();
     return false;
+    // LCOV_EXCL_STOP
   }
   AttributeSelectionListPtr aSelectionList =
     std::dynamic_pointer_cast<ModelAPI_AttributeSelectionList>(theAttribute);