]> SALOME platform Git repositories - modules/shaper.git/blob - src/ConstructionAPI/ConstructionAPI_Axis.h
Salome HOME
e9bdb6bfc944125b54adda045da8c2ad0379b2ee
[modules/shaper.git] / src / ConstructionAPI / ConstructionAPI_Axis.h
1 // Copyright (C) 2014-2016 CEA/DEN, EDF R&D
2
3 // Name   : ConstructionAPI_Axis.h
4 // Purpose: 
5 //
6 // History:
7 // 15/06/16 - Sergey POKHODENKO - Creation of the file
8 // 24/06/16 - Clarisse GENRAULT (CEA) - Modification of the file
9
10 #ifndef SRC_CONSTRUCTIONAPI_CONSTRUCTIONAPI_AXIS_H_
11 #define SRC_CONSTRUCTIONAPI_CONSTRUCTIONAPI_AXIS_H_
12
13 #include "ConstructionAPI.h"
14
15 #include <ConstructionPlugin_Axis.h>
16
17 #include <ModelHighAPI_Interface.h>
18 #include <ModelHighAPI_Macro.h>
19
20 class ModelHighAPI_Double;
21 class ModelHighAPI_Selection;
22
23 /// \class ConstructionAPI_Axis
24 /// \ingroup CPPHighAPI
25 /// \brief Interface for Axis feature
26 class ConstructionAPI_Axis: public ModelHighAPI_Interface
27 {
28 public:
29   /// Constructor without values
30   CONSTRUCTIONAPI_EXPORT
31   explicit ConstructionAPI_Axis(const std::shared_ptr<ModelAPI_Feature>& theFeature);
32
33   /// Constructor with values
34   CONSTRUCTIONAPI_EXPORT
35   ConstructionAPI_Axis(const std::shared_ptr<ModelAPI_Feature>& theFeature,
36                        const ModelHighAPI_Selection& theObject1,
37                        const ModelHighAPI_Selection& theObject2);
38
39   /// Constructor with values
40   CONSTRUCTIONAPI_EXPORT
41   ConstructionAPI_Axis(const std::shared_ptr<ModelAPI_Feature>& theFeature,
42                        const ModelHighAPI_Selection& theObject);
43
44   /// Constructor with values
45   CONSTRUCTIONAPI_EXPORT
46   ConstructionAPI_Axis(const std::shared_ptr<ModelAPI_Feature>& theFeature,
47                        const ModelHighAPI_Selection& thePoint,
48                        const ModelHighAPI_Double& theX,
49                        const ModelHighAPI_Double& theY,
50                        const ModelHighAPI_Double& theZ);
51
52   /// Constructor with values
53   CONSTRUCTIONAPI_EXPORT
54   ConstructionAPI_Axis(const std::shared_ptr<ModelAPI_Feature>& theFeature,
55                        const ModelHighAPI_Double& theDX,
56                        const ModelHighAPI_Double& theDY,
57                        const ModelHighAPI_Double& theDZ);
58
59   /// Constructor with values
60   CONSTRUCTIONAPI_EXPORT
61   ConstructionAPI_Axis(const std::shared_ptr<ModelAPI_Feature>& theFeature,
62                        const ModelHighAPI_Selection& thePlane1,
63                        const ModelHighAPI_Double& theOffset1,
64                        const bool theReverseOffset1,
65                        const ModelHighAPI_Selection& thePlane2,
66                        const ModelHighAPI_Double& theOffset2,
67                        const bool theReverseOffset2);
68
69   /// Constructor with values
70   CONSTRUCTIONAPI_EXPORT
71   ConstructionAPI_Axis(const std::shared_ptr<ModelAPI_Feature>& theFeature,
72                        const ModelHighAPI_Selection& thePlane1,
73                        const ModelHighAPI_Selection& thePlane2,
74                        const ModelHighAPI_Double& theOffset2,
75                        const bool theReverseOffset2);
76
77   /// Constructor with values
78   CONSTRUCTIONAPI_EXPORT
79   ConstructionAPI_Axis(const std::shared_ptr<ModelAPI_Feature>& theFeature,
80                        const ModelHighAPI_Selection& thePlane1,
81                        const ModelHighAPI_Double& theOffset1,
82                        const bool theReverseOffset1,
83                        const ModelHighAPI_Selection& thePlane2);
84
85   /// Destructor
86   CONSTRUCTIONAPI_EXPORT
87   virtual ~ConstructionAPI_Axis();
88
89   INTERFACE_21(ConstructionPlugin_Axis::ID(),
90                creationMethod, ConstructionPlugin_Axis::METHOD(), ModelAPI_AttributeString, /** Creation method */,
91                firstPoint, ConstructionPlugin_Axis::POINT_FIRST(), ModelAPI_AttributeSelection, /** First point */,
92                secondPoint, ConstructionPlugin_Axis::POINT_SECOND(), ModelAPI_AttributeSelection, /** Second point */,
93                cylindricalFace, ConstructionPlugin_Axis::CYLINDRICAL_FACE(), ModelAPI_AttributeSelection, /** Cylindrical face */,
94                xDirection, ConstructionPlugin_Axis::X_DIRECTION(), ModelAPI_AttributeDouble, /** X direction */,
95                yDirection, ConstructionPlugin_Axis::Y_DIRECTION(), ModelAPI_AttributeDouble, /** Y direction */,
96                zDirection, ConstructionPlugin_Axis::Z_DIRECTION(), ModelAPI_AttributeDouble, /** Z direction */,
97                xDimension, ConstructionPlugin_Axis::DX(), ModelAPI_AttributeDouble, /** X dimension */,
98                yDimension, ConstructionPlugin_Axis::DY(), ModelAPI_AttributeDouble, /** Y dimension */,
99                zDimension, ConstructionPlugin_Axis::DZ(), ModelAPI_AttributeDouble, /** Z dimension */,
100                line, ConstructionPlugin_Axis::LINE(), ModelAPI_AttributeSelection, /** Line */,
101                plane, ConstructionPlugin_Axis::PLANE(), ModelAPI_AttributeSelection, /** Plane */,
102                point, ConstructionPlugin_Axis::POINT(), ModelAPI_AttributeSelection, /** Point */,
103                plane1, ConstructionPlugin_Axis::PLANE1(), ModelAPI_AttributeSelection, /** Plane 1 */,
104                useOffset1, ConstructionPlugin_Axis::USE_OFFSET1(), ModelAPI_AttributeString, /** Use offset 1 */,
105                offset1, ConstructionPlugin_Axis::OFFSET1(), ModelAPI_AttributeDouble, /** Offset 1 */,
106                reverseOffset1, ConstructionPlugin_Axis::REVERSE_OFFSET1(), ModelAPI_AttributeBoolean, /** Reverse offset 1 */,
107                plane2, ConstructionPlugin_Axis::PLANE2(), ModelAPI_AttributeSelection, /** Plane 2 */,
108                useOffset2, ConstructionPlugin_Axis::USE_OFFSET2(), ModelAPI_AttributeString, /** Use offset 2 */,
109                offset2, ConstructionPlugin_Axis::OFFSET2(), ModelAPI_AttributeDouble, /** Offset 2 */,
110                reverseOffset2, ConstructionPlugin_Axis::REVERSE_OFFSET2(), ModelAPI_AttributeBoolean, /** Reverse offset 2 */)
111
112   /// Set points
113   CONSTRUCTIONAPI_EXPORT
114   void setByPoints(const ModelHighAPI_Selection& thePoint1,
115                    const ModelHighAPI_Selection& thePoint2);
116
117   /// Set cylindrical face
118   CONSTRUCTIONAPI_EXPORT
119   void setByCylindricalFace(const ModelHighAPI_Selection& theCylindricalFace);
120
121   /// Set direction
122   CONSTRUCTIONAPI_EXPORT
123   void setByPointAndDirection(const ModelHighAPI_Selection& thePoint,
124                               const ModelHighAPI_Double& theX,
125                               const ModelHighAPI_Double& theY,
126                               const ModelHighAPI_Double& theZ);
127
128   /// Set dimensions
129   CONSTRUCTIONAPI_EXPORT
130   void setByDimensions(const ModelHighAPI_Double& theDX,
131                        const ModelHighAPI_Double& theDY,
132                        const ModelHighAPI_Double& theDZ);
133
134   /// Set by line
135   CONSTRUCTIONAPI_EXPORT
136   void setByLine(const ModelHighAPI_Selection& theCylindricalFace);
137
138   /// Set by plane and point
139   CONSTRUCTIONAPI_EXPORT
140   void setByPlaneAndPoint(const ModelHighAPI_Selection& thePlane,
141                           const ModelHighAPI_Selection& thePoint);
142
143   /// Set by two planes
144   CONSTRUCTIONAPI_EXPORT
145   void setByTwoPlanes(const ModelHighAPI_Selection& thePlane1,
146                       const ModelHighAPI_Selection& thePlane2);
147
148   /// Set by two planes
149   CONSTRUCTIONAPI_EXPORT
150   void setByTwoPlanes(const ModelHighAPI_Selection& thePlane1,
151                       const ModelHighAPI_Double& theOffset1,
152                       const bool theReverseOffset1,
153                       const ModelHighAPI_Selection& thePlane2,
154                       const ModelHighAPI_Double& theOffset2,
155                       const bool theReverseOffset2);
156
157   /// Set by two planes
158   CONSTRUCTIONAPI_EXPORT
159   void setByTwoPlanes(const ModelHighAPI_Selection& thePlane1,
160                       const ModelHighAPI_Selection& thePlane2,
161                       const ModelHighAPI_Double& theOffset2,
162                       const bool theReverseOffset2);
163
164   /// Set by two planes
165   CONSTRUCTIONAPI_EXPORT
166   void setByTwoPlanes(const ModelHighAPI_Selection& thePlane1,
167                       const ModelHighAPI_Double& theOffset1,
168                       const bool theReverseOffset1,
169                       const ModelHighAPI_Selection& thePlane2);
170
171   /// Dump wrapped feature
172   CONSTRUCTIONAPI_EXPORT
173   virtual void dump(ModelHighAPI_Dumper& theDumper) const;
174 };
175
176 /// Pointer on Axis object
177 typedef std::shared_ptr<ConstructionAPI_Axis> AxisPtr;
178
179 /// \ingroup CPPHighAPI
180 /// \brief Create Axis feature
181 CONSTRUCTIONAPI_EXPORT
182 AxisPtr addAxis(const std::shared_ptr<ModelAPI_Document>& thePart,
183                 const ModelHighAPI_Selection& theObject1,
184                 const ModelHighAPI_Selection& theObject2);
185
186 /// \ingroup CPPHighAPI
187 /// \brief Create Axis feature
188 CONSTRUCTIONAPI_EXPORT
189 AxisPtr addAxis(const std::shared_ptr<ModelAPI_Document>& thePart,
190                 const ModelHighAPI_Selection& theObject);
191
192 /// \ingroup CPPHighAPI
193 /// \brief Create Axis feature
194 CONSTRUCTIONAPI_EXPORT
195 AxisPtr addAxis(const std::shared_ptr<ModelAPI_Document>& thePart,
196                 const ModelHighAPI_Selection& thePoint,
197                 const ModelHighAPI_Double& theX,
198                 const ModelHighAPI_Double& theY,
199                 const ModelHighAPI_Double& theZ);
200
201 /// \ingroup CPPHighAPI
202 /// \brief Create Axis feature
203 CONSTRUCTIONAPI_EXPORT
204 AxisPtr addAxis(const std::shared_ptr<ModelAPI_Document>& thePart,
205                 const ModelHighAPI_Double& theDX,
206                 const ModelHighAPI_Double& theDY,
207                 const ModelHighAPI_Double& theDZ);
208
209 /// \ingroup CPPHighAPI
210 /// \brief Create Axis feature
211 CONSTRUCTIONAPI_EXPORT
212 AxisPtr addAxis(const std::shared_ptr<ModelAPI_Document>& thePart,
213                 const ModelHighAPI_Selection& thePlane1,
214                 const ModelHighAPI_Double& theOffset1,
215                 const bool theReverseOffset1,
216                 const ModelHighAPI_Selection& thePlane2,
217                 const ModelHighAPI_Double& theOffset2,
218                 const bool theReverseOffset2);
219
220 /// \ingroup CPPHighAPI
221 /// \brief Create Axis feature
222 CONSTRUCTIONAPI_EXPORT
223 AxisPtr addAxis(const std::shared_ptr<ModelAPI_Document>& thePart,
224                 const ModelHighAPI_Selection& thePlane1,
225                 const ModelHighAPI_Selection& thePlane2,
226                 const ModelHighAPI_Double& theOffset2,
227                 const bool theReverseOffset2);
228
229 /// \ingroup CPPHighAPI
230 /// \brief Create Axis feature
231 CONSTRUCTIONAPI_EXPORT
232 AxisPtr addAxis(const std::shared_ptr<ModelAPI_Document>& thePart,
233                 const ModelHighAPI_Selection& thePlane1,
234                 const ModelHighAPI_Double& theOffset1,
235                 const bool theReverseOffset1,
236                 const ModelHighAPI_Selection& thePlane2);
237
238 #endif /* SRC_CONSTRUCTIONAPI_CONSTRUCTIONAPI_AXIS_H_ */