Salome HOME
Issue #2577: EDF 2018-2 Fusion of connected faces.
[modules/shaper.git] / src / FeaturesAPI / FeaturesAPI_MultiRotation.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
2
3 // File:        FeaturesAPI_MultiRotation.h
4 // Created:     04 Apr 2017
5 // Author:      Clarisse Genrault (CEA)
6
7 #ifndef FEATURESAPI_MULTIROTATION_H_
8 #define FEATURESAPI_MULTIROTATION_H_
9
10 #include "FeaturesAPI.h"
11
12 #include <FeaturesPlugin_MultiRotation.h>
13
14 #include <ModelHighAPI_Interface.h>
15 #include <ModelHighAPI_Macro.h>
16
17 class ModelHighAPI_Double;
18 class ModelHighAPI_Dumper;
19 class ModelHighAPI_Integer;
20 class ModelHighAPI_Selection;
21
22 /// \class FeaturesAPI_MultiRotation
23 /// \ingroup CPPHighAPI
24 /// \brief Interface for Translation feature.
25 class FeaturesAPI_MultiRotation: public ModelHighAPI_Interface
26 {
27 public:
28   /// Constructor without values.
29   FEATURESAPI_EXPORT
30   explicit FeaturesAPI_MultiRotation(const std::shared_ptr<ModelAPI_Feature>& theFeature);
31
32   /// Constructor with values.
33   FEATURESAPI_EXPORT
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);
38
39   /// Constructor with values.
40   FEATURESAPI_EXPORT
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);
46
47   /// Destructor.
48   FEATURESAPI_EXPORT
49   virtual ~FeaturesAPI_MultiRotation();
50
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 */
62              )
63
64   /// Set main objects.
65   FEATURESAPI_EXPORT
66   void setMainObjects(const std::list<ModelHighAPI_Selection>& theMainObjects);
67
68   /// Modify CreationMethod, axis_angular attribute of the feature.
69   FEATURESAPI_EXPORT
70   void setAxisAngular(const ModelHighAPI_Selection& theAxis);
71
72   /// Modify CreationMethod, step_angular attribute of the feature.
73   FEATURESAPI_EXPORT
74   void setStepAngular(const ModelHighAPI_Double& theStep);
75
76   /// Modify CreationMethod, nb_angular attribute of the feature.
77   FEATURESAPI_EXPORT
78   void setNumberAngular(const ModelHighAPI_Integer& theNumber);
79
80   /// Dump wrapped feature
81   FEATURESAPI_EXPORT
82   virtual void dump(ModelHighAPI_Dumper& theDumper) const;
83 };
84
85 /// Pointer on Multirotation object.
86 typedef std::shared_ptr<FeaturesAPI_MultiRotation> MultiRotationPtr;
87
88 /// \ingroup CPPHighAPI
89 /// \brief Create MultiRotation feature.
90 FEATURESAPI_EXPORT
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);
95
96 /// \ingroup CPPHighAPI
97 /// \brief Create MultiRotation feature.
98 FEATURESAPI_EXPORT
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);
104
105 #endif // FEATURESAPI_MULTIROTATION_H_