Salome HOME
Issue #1648: Dump Python in the High Level Parameterized Geometry API
[modules/shaper.git] / src / FeaturesAPI / FeaturesAPI_Revolution.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
2
3 // File:        FeaturesAPI_Revolution.h
4 // Created:     09 June 2016
5 // Author:      Dmitry Bobylev
6
7 #ifndef FeaturesAPI_Revolution_H_
8 #define FeaturesAPI_Revolution_H_
9
10 #include "FeaturesAPI.h"
11
12 #include <FeaturesPlugin_Revolution.h>
13
14 #include <ModelHighAPI_Interface.h>
15 #include <ModelHighAPI_Macro.h>
16
17 class ModelHighAPI_Double;
18 class ModelHighAPI_Selection;
19
20 /// \class FeaturesAPI_Revolution
21 /// \ingroup CPPHighAPI
22 /// \brief Interface for Revolution feature.
23 class FeaturesAPI_Revolution: public ModelHighAPI_Interface
24 {
25 public:
26   /// Constructor without values.
27   FEATURESAPI_EXPORT
28   explicit FeaturesAPI_Revolution(const std::shared_ptr<ModelAPI_Feature>& theFeature);
29
30   /// Constructor with values.
31   FEATURESAPI_EXPORT
32   explicit FeaturesAPI_Revolution(const std::shared_ptr<ModelAPI_Feature>& theFeature,
33                                   const std::list<ModelHighAPI_Selection>& theBaseObjects,
34                                   const ModelHighAPI_Selection& theAxis,
35                                   const ModelHighAPI_Double& theAngle);
36
37   /// Constructor with values.
38   FEATURESAPI_EXPORT
39   explicit FeaturesAPI_Revolution(const std::shared_ptr<ModelAPI_Feature>& theFeature,
40                                   const std::list<ModelHighAPI_Selection>& theBaseObjects,
41                                   const ModelHighAPI_Selection& theAxis,
42                                   const ModelHighAPI_Double& theToAngle,
43                                   const ModelHighAPI_Double& theFromAngle);
44
45   /// Constructor with values.
46   FEATURESAPI_EXPORT
47   explicit FeaturesAPI_Revolution(const std::shared_ptr<ModelAPI_Feature>& theFeature,
48                                   const std::list<ModelHighAPI_Selection>& theBaseObjects,
49                                   const ModelHighAPI_Selection& theAxis,
50                                   const ModelHighAPI_Selection& theToObject,
51                                   const ModelHighAPI_Double& theToOffset,
52                                   const ModelHighAPI_Selection& theFromObject,
53                                   const ModelHighAPI_Double& theFromOffset);
54
55   /// Destructor.
56   FEATURESAPI_EXPORT
57   virtual ~FeaturesAPI_Revolution();
58
59   INTERFACE_10(FeaturesPlugin_Revolution::ID(),
60                baseObjects, FeaturesPlugin_Revolution::BASE_OBJECTS_ID(), ModelAPI_AttributeSelectionList, /** Base objects */,
61                axis, FeaturesPlugin_Revolution::AXIS_OBJECT_ID(), ModelAPI_AttributeSelection, /** Axis */,
62                creationMethod, FeaturesPlugin_Revolution::CREATION_METHOD(), ModelAPI_AttributeString, /** Creation method */,
63                toAngle, FeaturesPlugin_Revolution::TO_ANGLE_ID(), ModelAPI_AttributeDouble, /** To angle */,
64                fromAngle, FeaturesPlugin_Revolution::FROM_ANGLE_ID(), ModelAPI_AttributeDouble, /** From angle */,
65                toObject, FeaturesPlugin_Revolution::TO_OBJECT_ID(), ModelAPI_AttributeSelection, /** To object */,
66                toOffset, FeaturesPlugin_Revolution::TO_OFFSET_ID(), ModelAPI_AttributeDouble, /** To offset */,
67                fromObject, FeaturesPlugin_Revolution::FROM_OBJECT_ID(), ModelAPI_AttributeSelection, /** From object */,
68                fromOffset, FeaturesPlugin_Revolution::FROM_OFFSET_ID(), ModelAPI_AttributeDouble, /** From offset */,
69                sketchLauncher, FeaturesPlugin_Revolution::SKETCH_ID(), ModelAPI_AttributeReference, /** Sketch launcher */)
70
71   /// Modify base attribute of the feature.
72   FEATURESAPI_EXPORT
73   void setBase(const std::list<ModelHighAPI_Selection>& theBaseObjects);
74
75   /// Modify axis_object attribute of the feature.
76   FEATURESAPI_EXPORT
77   void setAxis(const ModelHighAPI_Selection& theAxis);
78
79   /// Modify CreationMethod, to_angle, from_angle attributes of the feature.
80   FEATURESAPI_EXPORT
81   void setAngles(const ModelHighAPI_Double& theToAngle, const ModelHighAPI_Double& theFromAngle);
82
83   /// Modify CreationMethod, to_angle, from_angle attributes of the feature.
84   FEATURESAPI_EXPORT
85   void setAngle(const ModelHighAPI_Double& theAngle);
86
87   /// Modify CreationMethod, to_object, to_offset, from_object, from_offset attributes of the feature.
88   FEATURESAPI_EXPORT
89   void setPlanesAndOffsets(const ModelHighAPI_Selection& theToObject,
90                            const ModelHighAPI_Double& theToOffset,
91                            const ModelHighAPI_Selection& theFromObject,
92                            const ModelHighAPI_Double& theFromOffset);
93
94   /// Dump wrapped feature
95   FEATURESAPI_EXPORT
96   virtual void dump(ModelHighAPI_Dumper& theDumper) const;
97 };
98
99 /// Pointer on Revolution object.
100 typedef std::shared_ptr<FeaturesAPI_Revolution> RevolutionPtr;
101
102 /// \ingroup CPPHighAPI
103 /// \brief Create Revolution feature.
104 FEATURESAPI_EXPORT
105 RevolutionPtr addRevolution(const std::shared_ptr<ModelAPI_Document>& thePart,
106                             const std::list<ModelHighAPI_Selection>& theBaseObjects,
107                             const ModelHighAPI_Selection& theAxis,
108                             const ModelHighAPI_Double& theAngle);
109
110 /// \ingroup CPPHighAPI
111 /// \brief Create Revolution feature.
112 FEATURESAPI_EXPORT
113 RevolutionPtr addRevolution(const std::shared_ptr<ModelAPI_Document>& thePart,
114                             const std::list<ModelHighAPI_Selection>& theBaseObjects,
115                             const ModelHighAPI_Selection& theAxis,
116                             const ModelHighAPI_Double& theToAngle,
117                             const ModelHighAPI_Double& theFromAngle);
118
119 /// \ingroup CPPHighAPI
120 /// \brief Create Revolution feature.
121 FEATURESAPI_EXPORT
122 RevolutionPtr addRevolution(const std::shared_ptr<ModelAPI_Document>& thePart,
123                             const std::list<ModelHighAPI_Selection>& theBaseObjects,
124                             const ModelHighAPI_Selection& theAxis,
125                             const ModelHighAPI_Selection& theToObject,
126                             const ModelHighAPI_Double& theToOffset,
127                             const ModelHighAPI_Selection& theFromObject,
128                             const ModelHighAPI_Double& theFromOffset);
129
130 #endif // FeaturesAPI_Revolution_H_