Salome HOME
Fix compilation error on Windows
[modules/shaper.git] / src / FeaturesAPI / FeaturesAPI_Rotation.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
2
3 // File:        FeaturesAPI_Rotation.h
4 // Created:     07 June 2016
5 // Author:      Dmitry Bobylev
6
7 #ifndef FeaturesAPI_Rotation_H_
8 #define FeaturesAPI_Rotation_H_
9
10 #include "FeaturesAPI.h"
11
12 #include <FeaturesPlugin_Rotation.h>
13
14 #include <ModelHighAPI_Interface.h>
15 #include <ModelHighAPI_Macro.h>
16
17 class ModelHighAPI_Double;
18 class ModelHighAPI_Dumper;
19 class ModelHighAPI_Selection;
20
21 /// \class FeaturesAPI_Rotation
22 /// \ingroup CPPHighAPI
23 /// \brief Interface for Rotation feature.
24 class FeaturesAPI_Rotation: public ModelHighAPI_Interface
25 {
26 public:
27   /// Constructor without values.
28   FEATURESAPI_EXPORT
29   explicit FeaturesAPI_Rotation(const std::shared_ptr<ModelAPI_Feature>& theFeature);
30
31   /// Constructor with values.
32   FEATURESAPI_EXPORT
33   FeaturesAPI_Rotation(const std::shared_ptr<ModelAPI_Feature>& theFeature,
34                        const std::list<ModelHighAPI_Selection>& theMainObjects,
35                        const ModelHighAPI_Selection& theAxisObject,
36                        const ModelHighAPI_Double& theAngle);
37
38   /// Constructor with values.
39   FEATURESAPI_EXPORT
40   FeaturesAPI_Rotation(const std::shared_ptr<ModelAPI_Feature>& theFeature,
41                        const std::list<ModelHighAPI_Selection>& theMainObjects,
42                        const ModelHighAPI_Selection& theCenterPoint,
43                        const ModelHighAPI_Selection& theStartPoint,
44                        const ModelHighAPI_Selection& theEndPoint);
45
46   /// Destructor.
47   FEATURESAPI_EXPORT
48   virtual ~FeaturesAPI_Rotation();
49
50   INTERFACE_7(FeaturesPlugin_Rotation::ID(),
51               creationMethod, FeaturesPlugin_Rotation::CREATION_METHOD(),
52               ModelAPI_AttributeString, /** Creation method */,
53               mainObjects, FeaturesPlugin_Rotation::OBJECTS_LIST_ID(),
54               ModelAPI_AttributeSelectionList, /** Main objects */,
55               axisObject, FeaturesPlugin_Rotation::AXIS_OBJECT_ID(),
56               ModelAPI_AttributeSelection, /** Axis object */,
57               angle, FeaturesPlugin_Rotation::ANGLE_ID(),
58               ModelAPI_AttributeDouble, /** Angle */,
59               centerPoint, FeaturesPlugin_Rotation::CENTER_POINT_ID(),
60               ModelAPI_AttributeSelection, /** Center point */,
61               startPoint, FeaturesPlugin_Rotation::START_POINT_ID(),
62               ModelAPI_AttributeSelection, /** Start point */,
63               endPoint, FeaturesPlugin_Rotation::END_POINT_ID(),
64               ModelAPI_AttributeSelection, /** End point */
65              )
66
67   /// Set main objects.
68   FEATURESAPI_EXPORT
69   void setMainObjects(const std::list<ModelHighAPI_Selection>& theMainObjects);
70
71   /// Set axis object.
72   FEATURESAPI_EXPORT
73   void setAxisObject(const ModelHighAPI_Selection& theAxisObject);
74
75   /// Set angle.
76   FEATURESAPI_EXPORT
77   void setAngle(const ModelHighAPI_Double& theAngle);
78
79   /// Set center point, start point and end point
80   FEATURESAPI_EXPORT
81   void setPoints(const ModelHighAPI_Selection& theCenterPoint,
82                  const ModelHighAPI_Selection& theStartPoint,
83                  const ModelHighAPI_Selection& theEndPoint);
84
85   /// Dump wrapped feature
86   FEATURESAPI_EXPORT
87   virtual void dump(ModelHighAPI_Dumper& theDumper) const;
88 };
89
90 /// Pointer on Rotation object.
91 typedef std::shared_ptr<FeaturesAPI_Rotation> RotationPtr;
92
93 /// \ingroup CPPHighAPI
94 /// \brief Create Rotation feature.
95 FEATURESAPI_EXPORT
96 RotationPtr addRotation(const std::shared_ptr<ModelAPI_Document>& thePart,
97                         const std::list<ModelHighAPI_Selection>& theMainObjects,
98                         const ModelHighAPI_Selection& theAxisObject,
99                         const ModelHighAPI_Double& theAngle);
100
101 /// \ingroup CPPHighAPI
102 /// \brief Create Rotation feature.
103 FEATURESAPI_EXPORT
104 RotationPtr addRotation(const std::shared_ptr<ModelAPI_Document>& thePart,
105                         const std::list<ModelHighAPI_Selection>& theMainObjects,
106                         const ModelHighAPI_Selection& theCenterPoint,
107                         const ModelHighAPI_Selection& theStartPoint,
108                         const ModelHighAPI_Selection& theEndPoint);
109
110 #endif // FeaturesAPI_Rotation_H_