1 // Copyright (C) 2017-2019 CEA/DEN, EDF R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 // File: FeaturesAPI_MultiRotation.h
21 // Created: 04 Apr 2017
22 // Author: Clarisse Genrault (CEA)
24 #ifndef FEATURESAPI_MULTIROTATION_H_
25 #define FEATURESAPI_MULTIROTATION_H_
27 #include "FeaturesAPI.h"
29 #include <FeaturesPlugin_MultiRotation.h>
31 #include <ModelHighAPI_Interface.h>
32 #include <ModelHighAPI_Macro.h>
34 class ModelHighAPI_Double;
35 class ModelHighAPI_Dumper;
36 class ModelHighAPI_Integer;
37 class ModelHighAPI_Selection;
39 /// \class FeaturesAPI_MultiRotation
40 /// \ingroup CPPHighAPI
41 /// \brief Interface for Translation feature.
42 class FeaturesAPI_MultiRotation: public ModelHighAPI_Interface
45 /// Constructor without values.
47 explicit FeaturesAPI_MultiRotation(const std::shared_ptr<ModelAPI_Feature>& theFeature);
49 /// Constructor with values.
51 FeaturesAPI_MultiRotation(const std::shared_ptr<ModelAPI_Feature>& theFeature,
52 const std::list<ModelHighAPI_Selection>& theMainObjects,
53 const ModelHighAPI_Selection& theAxis,
54 const ModelHighAPI_Integer& theNumber);
56 /// Constructor with values.
58 FeaturesAPI_MultiRotation(const std::shared_ptr<ModelAPI_Feature>& theFeature,
59 const std::list<ModelHighAPI_Selection>& theMainObjects,
60 const ModelHighAPI_Selection& theAxis,
61 const ModelHighAPI_Double& theStep,
62 const ModelHighAPI_Integer& theNumber);
66 virtual ~FeaturesAPI_MultiRotation();
68 INTERFACE_5(FeaturesPlugin_MultiRotation::ID(),
69 mainObjects, FeaturesPlugin_MultiRotation::OBJECTS_LIST_ID(),
70 ModelAPI_AttributeSelectionList, /** Main objects */,
71 axisAngular, FeaturesPlugin_MultiRotation::AXIS_ANGULAR_ID(),
72 ModelAPI_AttributeSelection, /** Angular direction */,
73 useStepAngular, FeaturesPlugin_MultiRotation::USE_ANGULAR_STEP_ID(),
74 ModelAPI_AttributeString, /** Use step angular */,
75 stepAngular, FeaturesPlugin_MultiRotation::STEP_ANGULAR_ID(),
76 ModelAPI_AttributeDouble, /** Step angular */,
77 nbAngular, FeaturesPlugin_MultiRotation::NB_COPIES_ANGULAR_ID(),
78 ModelAPI_AttributeInteger, /** Number of copies for angular */
83 void setMainObjects(const std::list<ModelHighAPI_Selection>& theMainObjects);
85 /// Modify CreationMethod, axis_angular attribute of the feature.
87 void setAxisAngular(const ModelHighAPI_Selection& theAxis);
89 /// Modify CreationMethod, step_angular attribute of the feature.
91 void setStepAngular(const ModelHighAPI_Double& theStep);
93 /// Modify CreationMethod, nb_angular attribute of the feature.
95 void setNumberAngular(const ModelHighAPI_Integer& theNumber);
97 /// Dump wrapped feature
99 virtual void dump(ModelHighAPI_Dumper& theDumper) const;
102 /// Pointer on Multirotation object.
103 typedef std::shared_ptr<FeaturesAPI_MultiRotation> MultiRotationPtr;
105 /// \ingroup CPPHighAPI
106 /// \brief Create MultiRotation feature.
108 MultiRotationPtr addMultiRotation(const std::shared_ptr<ModelAPI_Document>& thePart,
109 const std::list<ModelHighAPI_Selection>& theMainObjects,
110 const ModelHighAPI_Selection& theAxis,
111 const ModelHighAPI_Integer& theNumber);
113 /// \ingroup CPPHighAPI
114 /// \brief Create MultiRotation feature.
116 MultiRotationPtr addMultiRotation(const std::shared_ptr<ModelAPI_Document>& thePart,
117 const std::list<ModelHighAPI_Selection>& theMainObjects,
118 const ModelHighAPI_Selection& theAxis,
119 const ModelHighAPI_Double& theStep,
120 const ModelHighAPI_Integer& theNumber);
122 #endif // FEATURESAPI_MULTIROTATION_H_