X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGeomValidators%2FGeomValidators_ZeroOffset.cpp;h=294fc500ee58fc2863fa5469afd8823c6519193f;hb=747178d21dce4fb034ff0e84c1280406ab64d566;hp=d6181783f4931cb7a9e647070e3c60d28dd5abfc;hpb=d4b0a5cb916f4eccf4a0bce02e43a54c7a67cb93;p=modules%2Fshaper.git diff --git a/src/GeomValidators/GeomValidators_ZeroOffset.cpp b/src/GeomValidators/GeomValidators_ZeroOffset.cpp index d6181783f..294fc500e 100644 --- a/src/GeomValidators/GeomValidators_ZeroOffset.cpp +++ b/src/GeomValidators/GeomValidators_ZeroOffset.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2014-2017 CEA/DEN, EDF R&D +// Copyright (C) 2014-2020 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 @@ -12,10 +12,9 @@ // // 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // #include @@ -40,23 +39,27 @@ bool GeomValidators_ZeroOffset::isValid(const std::shared_ptr& const std::list& theArguments, Events_InfoMessage& theError) const { +// 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::const_iterator anIt = theArguments.begin(), aLast = theArguments.end(); + std::list::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++; ListOfShape aFacesList; if(theFeature->selection(*anIt)) { +// LCOV_EXCL_START AttributeSelectionPtr aFaceSelection = theFeature->selection(*anIt); ResultConstructionPtr aConstruction = std::dynamic_pointer_cast(aFaceSelection->context()); @@ -70,6 +73,7 @@ bool GeomValidators_ZeroOffset::isValid(const std::shared_ptr& } } } +// LCOV_EXCL_STOP } else if(theFeature->selectionList(*anIt)) { AttributeSelectionListPtr aFacesSelectionList = theFeature->selectionList(*anIt); for(int anIndex = 0; anIndex < aFacesSelectionList->size(); anIndex++) { @@ -133,8 +137,8 @@ bool GeomValidators_ZeroOffset::isValid(const std::shared_ptr& aToShape = anAttrSel->context()->shape(); } if (aToShape->isCompound()) { - GeomAPI_ShapeIterator anIt(aToShape); - aToShape = anIt.current(); + GeomAPI_ShapeIterator aSIt(aToShape); + aToShape = aSIt.current(); } } anIt++; @@ -152,8 +156,8 @@ bool GeomValidators_ZeroOffset::isValid(const std::shared_ptr& aFromShape = anAttrSel->context()->shape(); } if (aFromShape->isCompound()) { - GeomAPI_ShapeIterator anIt(aFromShape); - aFromShape = anIt.current(); + GeomAPI_ShapeIterator aSIt(aFromShape); + aFromShape = aSIt.current(); } } anIt++; @@ -223,6 +227,7 @@ bool GeomValidators_ZeroOffset::isValid(const std::shared_ptr& } //================================================================================================= +// LCOV_EXCL_START bool GeomValidators_ZeroOffset::isNotObligatory(std::string theFeature, std::string theAttribute) { if(theAttribute == "from_object" || theAttribute == "to_object") { @@ -231,3 +236,4 @@ bool GeomValidators_ZeroOffset::isNotObligatory(std::string theFeature, std::str return false; } +// LCOV_EXCL_STOP