X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FFeaturesPlugin%2FFeaturesPlugin_MultiTranslation.h;h=be232988027556447327f6ed0991e2bf00ca88dd;hb=d5c7ad3c50f89a2ddc2de1866ffb7f09397f3be2;hp=388f0ce48d787ed51ef547f733af8a04c5d29c73;hpb=87b6a30a3afb8fb32e7e43ade8d9c947d9eb1684;p=modules%2Fshaper.git diff --git a/src/FeaturesPlugin/FeaturesPlugin_MultiTranslation.h b/src/FeaturesPlugin/FeaturesPlugin_MultiTranslation.h index 388f0ce48..be2329880 100644 --- a/src/FeaturesPlugin/FeaturesPlugin_MultiTranslation.h +++ b/src/FeaturesPlugin/FeaturesPlugin_MultiTranslation.h @@ -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 @@ -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 // #ifndef FEATURESPLUGIN_MULTITRANSLATION_H_ @@ -23,10 +22,10 @@ #include -#include - #include +class GeomAPI_Dir; + /** \class FeaturesPlugin_MultiTranslation * \ingroup Plugins * \brief Feature for movement objects along one or two axes an arbitary number of times, @@ -35,10 +34,10 @@ class FeaturesPlugin_MultiTranslation : public ModelAPI_Feature { public: - /// Translation kind. + /// Multi-translation kind. inline static const std::string& ID() { - static const std::string MY_MULTITRANSLATION_ID("MultiTranslation"); + static const std::string MY_MULTITRANSLATION_ID("LinearCopy"); return MY_MULTITRANSLATION_ID; } @@ -105,7 +104,7 @@ class FeaturesPlugin_MultiTranslation : public ModelAPI_Feature return MY_KIND; } - /// Creates a new part document if needed. + /// Performs the algorithm and stores results it in the data structure. FEATURESPLUGIN_EXPORT virtual void execute(); /// Request for initialization of data model of the feature: adding all attributes. @@ -115,15 +114,12 @@ class FeaturesPlugin_MultiTranslation : public ModelAPI_Feature FeaturesPlugin_MultiTranslation(); private: - /// Perform the multi translation in one direction. - void performOneDirection(); - - /// Perform the multi translation in two directions. - void performTwoDirection(); - - void loadNamingDS(std::list > theListOfTranslationAlgo, - std::shared_ptr theResultBody, - std::shared_ptr theBaseShape); + /// Fill axis, number of copies and distance for the given direction. + /// \returns \c false in case of errors. + bool paramsAlongDirection(const int theIndex, + std::shared_ptr& theDir, + double& theDistance, + int& theQuantity); }; #endif // FEATURESPLUGIN_MULTITRANSLATION_H_ \ No newline at end of file