Salome HOME
updated copyright message
[modules/shaper.git] / src / GeomValidators / GeomValidators_ZeroOffset.cpp
index 325bb2718b91384a35ac4663473103511704b1f1..a1e57461adf7b7379477ad9300c4fd19a6b221bc 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2017  CEA/DEN, EDF R&D
+// Copyright (C) 2014-2023  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 <GeomValidators_ZeroOffset.h>
@@ -42,17 +41,18 @@ bool GeomValidators_ZeroOffset::isValid(const std::shared_ptr<ModelAPI_Feature>&
 {
 // LCOV_EXCL_START
   if(theArguments.size() != 9) {
-    theError = "Wrong number of validator arguments in xml(expected 9).";
+    theError = "Wrong number of validator arguments in xml (expected 9).";
     return false;
   }
 // LCOV_EXCL_STOP
 
-  std::list<std::string>::const_iterator anIt = theArguments.begin(), aLast = theArguments.end();
+  std::list<std::string>::const_iterator anIt = theArguments.begin();
 
   std::string aSelectedMethod;
   if(theFeature->string(*anIt)) {
     aSelectedMethod = theFeature->string(*anIt)->value();
   }
+  if (aSelectedMethod == "ThroughAll") return true;
   anIt++;
   std::string aCreationMethod = *anIt;
   anIt++;
@@ -137,8 +137,8 @@ bool GeomValidators_ZeroOffset::isValid(const std::shared_ptr<ModelAPI_Feature>&
       aToShape =  anAttrSel->context()->shape();
     }
     if (aToShape->isCompound()) {
-      GeomAPI_ShapeIterator anIt(aToShape);
-      aToShape = anIt.current();
+      GeomAPI_ShapeIterator aSIt(aToShape);
+      aToShape = aSIt.current();
     }
   }
   anIt++;
@@ -156,8 +156,8 @@ bool GeomValidators_ZeroOffset::isValid(const std::shared_ptr<ModelAPI_Feature>&
       aFromShape = anAttrSel->context()->shape();
     }
     if (aFromShape->isCompound()) {
-      GeomAPI_ShapeIterator anIt(aFromShape);
-      aFromShape = anIt.current();
+      GeomAPI_ShapeIterator aSIt(aFromShape);
+      aFromShape = aSIt.current();
     }
   }
   anIt++;