X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FFeaturesPlugin%2FFeaturesPlugin_MultiRotation.h;h=199e4cd35c6fba8a775c673c423d59bf99bc10b8;hb=71e54dccdd7194a911151c626896ec7dc2942241;hp=32746de99dffb1d7e8e68ffbebc66b5633cfa45e;hpb=7074394f8f08413d885f63be01df6bd5007b868c;p=modules%2Fshaper.git diff --git a/src/FeaturesPlugin/FeaturesPlugin_MultiRotation.h b/src/FeaturesPlugin/FeaturesPlugin_MultiRotation.h index 32746de99..199e4cd35 100644 --- a/src/FeaturesPlugin/FeaturesPlugin_MultiRotation.h +++ b/src/FeaturesPlugin/FeaturesPlugin_MultiRotation.h @@ -1,4 +1,21 @@ -// Copyright (C) 2014-201x CEA/DEN, EDF R&D +// Copyright (C) 2017-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 +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// 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 +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// // File: FeaturesPlugin_MultiRotation.h // Created: 30 Jan 2017 @@ -26,7 +43,7 @@ class FeaturesPlugin_MultiRotation : public ModelAPI_Feature /// Multi-rotation kind. inline static const std::string& ID() { - static const std::string MY_MULTIROTATION_ID("MultiRotation"); + static const std::string MY_MULTIROTATION_ID("AngularCopy"); return MY_MULTIROTATION_ID; } @@ -93,7 +110,7 @@ class FeaturesPlugin_MultiRotation : 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. @@ -103,10 +120,15 @@ class FeaturesPlugin_MultiRotation : public ModelAPI_Feature FeaturesPlugin_MultiRotation(); private: + /// Fill axis, number of copies and angle of the rotation. + /// \returns \c false in case of errors. + bool paramsOfRotation(std::shared_ptr& theAxis, double& theAngle, int& theQuantity); + /// Perform the multi rotation in one direction. void performRotation1D(); - /// Perform the multi totation in two directions. +#ifdef FEATURE_MULTIROTATION_TWO_DIRECTIONS + /// Perform the multi rotation in two directions. void performRotation2D(); void loadNamingDS2(std::list > theListOfTranslationAlgo, @@ -116,10 +138,7 @@ private: void loadNamingDS3(std::list > theListOfRotationAlgo, std::shared_ptr theResultBody, std::shared_ptr theBaseShape, int nb); - - void loadNamingDS(std::list > theListOfRotationAlgo, - std::shared_ptr theResultBody, - std::shared_ptr theBaseShape); +#endif }; -#endif // FEATURESPLUGIN_MULTIROTATION_H_ \ No newline at end of file +#endif // FEATURESPLUGIN_MULTIROTATION_H_