1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
3 // File: FeaturesAPI_MultiRotation.h
4 // Created: 04 Apr 2017
5 // Author: Clarisse Genrault (CEA)
7 #ifndef FEATURESAPI_MULTIROTATION_H_
8 #define FEATURESAPI_MULTIROTATION_H_
10 #include "FeaturesAPI.h"
12 #include <FeaturesPlugin_MultiRotation.h>
14 #include <ModelHighAPI_Interface.h>
15 #include <ModelHighAPI_Macro.h>
17 class ModelHighAPI_Double;
18 class ModelHighAPI_Dumper;
19 class ModelHighAPI_Integer;
20 class ModelHighAPI_Selection;
22 /// \class FeaturesAPI_MultiRotation
23 /// \ingroup CPPHighAPI
24 /// \brief Interface for Translation feature.
25 class FeaturesAPI_MultiRotation: public ModelHighAPI_Interface
28 /// Constructor without values.
30 explicit FeaturesAPI_MultiRotation(const std::shared_ptr<ModelAPI_Feature>& theFeature);
32 /// Constructor with values.
34 FeaturesAPI_MultiRotation(const std::shared_ptr<ModelAPI_Feature>& theFeature,
35 const std::list<ModelHighAPI_Selection>& theMainObjects,
36 const ModelHighAPI_Selection& theAxis,
37 const ModelHighAPI_Integer& theNumber);
39 /// Constructor with values.
41 FeaturesAPI_MultiRotation(const std::shared_ptr<ModelAPI_Feature>& theFeature,
42 const std::list<ModelHighAPI_Selection>& theMainObjects,
43 const ModelHighAPI_Selection& theAxis,
44 const ModelHighAPI_Double& theStep,
45 const ModelHighAPI_Integer& theNumber);
49 virtual ~FeaturesAPI_MultiRotation();
51 INTERFACE_5(FeaturesPlugin_MultiRotation::ID(),
52 mainObjects, FeaturesPlugin_MultiRotation::OBJECTS_LIST_ID(),
53 ModelAPI_AttributeSelectionList, /** Main objects */,
54 axisAngular, FeaturesPlugin_MultiRotation::AXIS_ANGULAR_ID(),
55 ModelAPI_AttributeSelection, /** Angular direction */,
56 useStepAngular, FeaturesPlugin_MultiRotation::USE_ANGULAR_STEP_ID(),
57 ModelAPI_AttributeString, /** Use step angular */,
58 stepAngular, FeaturesPlugin_MultiRotation::STEP_ANGULAR_ID(),
59 ModelAPI_AttributeDouble, /** Step angular */,
60 nbAngular, FeaturesPlugin_MultiRotation::NB_COPIES_ANGULAR_ID(),
61 ModelAPI_AttributeInteger, /** Number of copies for angular */
66 void setMainObjects(const std::list<ModelHighAPI_Selection>& theMainObjects);
68 /// Modify CreationMethod, axis_angular attribute of the feature.
70 void setAxisAngular(const ModelHighAPI_Selection& theAxis);
72 /// Modify CreationMethod, step_angular attribute of the feature.
74 void setStepAngular(const ModelHighAPI_Double& theStep);
76 /// Modify CreationMethod, nb_angular attribute of the feature.
78 void setNumberAngular(const ModelHighAPI_Integer& theNumber);
80 /// Dump wrapped feature
82 virtual void dump(ModelHighAPI_Dumper& theDumper) const;
85 /// Pointer on Multirotation object.
86 typedef std::shared_ptr<FeaturesAPI_MultiRotation> MultiRotationPtr;
88 /// \ingroup CPPHighAPI
89 /// \brief Create MultiRotation feature.
91 MultiRotationPtr addMultiRotation(const std::shared_ptr<ModelAPI_Document>& thePart,
92 const std::list<ModelHighAPI_Selection>& theMainObjects,
93 const ModelHighAPI_Selection& theAxis,
94 const ModelHighAPI_Integer& theNumber);
96 /// \ingroup CPPHighAPI
97 /// \brief Create MultiRotation feature.
99 MultiRotationPtr addMultiRotation(const std::shared_ptr<ModelAPI_Document>& thePart,
100 const std::list<ModelHighAPI_Selection>& theMainObjects,
101 const ModelHighAPI_Selection& theAxis,
102 const ModelHighAPI_Double& theStep,
103 const ModelHighAPI_Integer& theNumber);
105 #endif // FEATURESAPI_MULTIROTATION_H_