Salome HOME
Updated copyright comment
[modules/shaper.git] / src / GeomValidators / GeomValidators_ZeroOffset.cpp
index 411a1a21ef59acb0b5a9dd70aa43e1778fda1887..9dc251b3760e7441d065f179549ce2e5552fa8e0 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2019  CEA/DEN, EDF R&D
+// Copyright (C) 2014-2024  CEA, EDF
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -46,12 +46,13 @@ bool GeomValidators_ZeroOffset::isValid(const std::shared_ptr<ModelAPI_Feature>&
   }
 // 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++;
@@ -136,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++;
@@ -155,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++;