1 // Name : ConstructionAPI_Axis.h
5 // 15/06/16 - Sergey POKHODENKO - Creation of the file
7 #ifndef SRC_CONSTRUCTIONAPI_CONSTRUCTIONAPI_AXIS_H_
8 #define SRC_CONSTRUCTIONAPI_CONSTRUCTIONAPI_AXIS_H_
10 //--------------------------------------------------------------------------------------
11 #include "ConstructionAPI.h"
13 #include <ConstructionPlugin_Axis.h>
15 #include <ModelHighAPI_Interface.h>
16 #include <ModelHighAPI_Macro.h>
17 //--------------------------------------------------------------------------------------
18 class ModelHighAPI_Double;
19 class ModelHighAPI_Selection;
20 //--------------------------------------------------------------------------------------
21 /**\class ConstructionAPI_Axis
23 * \brief Interface for Axis feature
25 class ConstructionAPI_Axis : public ModelHighAPI_Interface
28 /// Constructor without values
29 CONSTRUCTIONAPI_EXPORT
30 explicit ConstructionAPI_Axis(const std::shared_ptr<ModelAPI_Feature> & theFeature);
31 /// Constructor with values
32 CONSTRUCTIONAPI_EXPORT
33 ConstructionAPI_Axis(const std::shared_ptr<ModelAPI_Feature> & theFeature,
34 const ModelHighAPI_Selection & thePoint1,
35 const ModelHighAPI_Selection & thePoint2);
36 /// Constructor with values
37 CONSTRUCTIONAPI_EXPORT
38 ConstructionAPI_Axis(const std::shared_ptr<ModelAPI_Feature> & theFeature,
39 const ModelHighAPI_Selection & theCylindricalFace);
40 /// Constructor with values
41 CONSTRUCTIONAPI_EXPORT
42 ConstructionAPI_Axis(const std::shared_ptr<ModelAPI_Feature> & theFeature,
43 const ModelHighAPI_Selection & thePoint,
44 const ModelHighAPI_Double & theX,
45 const ModelHighAPI_Double & theY,
46 const ModelHighAPI_Double & theZ);
48 CONSTRUCTIONAPI_EXPORT
49 virtual ~ConstructionAPI_Axis();
51 INTERFACE_7(ConstructionPlugin_Axis::ID(),
52 creationMethod, ConstructionPlugin_Axis::METHOD(), ModelAPI_AttributeString, /** Creation method */,
53 firstPoint, ConstructionPlugin_Axis::POINT_FIRST(), ModelAPI_AttributeSelection, /** First point */,
54 secondPoint, ConstructionPlugin_Axis::POINT_SECOND(), ModelAPI_AttributeSelection, /** Second point */,
55 cylindricalFace, ConstructionPlugin_Axis::CYLINDRICAL_FACE(), ModelAPI_AttributeSelection, /** Cylindrical face */,
56 xDirection, ConstructionPlugin_Axis::X_DIRECTION(), ModelAPI_AttributeDouble, /** X direction */,
57 yDirection, ConstructionPlugin_Axis::Y_DIRECTION(), ModelAPI_AttributeDouble, /** Y direction */,
58 zDirection, ConstructionPlugin_Axis::Z_DIRECTION(), ModelAPI_AttributeDouble, /** Z direction */
62 CONSTRUCTIONAPI_EXPORT
63 void setPoints(const ModelHighAPI_Selection & thePoint1,
64 const ModelHighAPI_Selection & thePoint2);
66 /// Set cylindrical face
67 CONSTRUCTIONAPI_EXPORT
68 void setCylindricalFace(const ModelHighAPI_Selection & theCylindricalFace);
71 CONSTRUCTIONAPI_EXPORT
72 void setPointAndDirection(const ModelHighAPI_Selection & thePoint,
73 const ModelHighAPI_Double & theX,
74 const ModelHighAPI_Double & theY,
75 const ModelHighAPI_Double & theZ);
78 //! Pointer on Axis object
79 typedef std::shared_ptr<ConstructionAPI_Axis> AxisPtr;
81 /**\ingroup CPPHighAPI
82 * \brief Create Axis feature
84 CONSTRUCTIONAPI_EXPORT
85 AxisPtr addAxis(const std::shared_ptr<ModelAPI_Document> & thePart,
86 const ModelHighAPI_Selection & thePoint1,
87 const ModelHighAPI_Selection & thePoint2);
89 /**\ingroup CPPHighAPI
90 * \brief Create Axis feature
92 CONSTRUCTIONAPI_EXPORT
93 AxisPtr addAxis(const std::shared_ptr<ModelAPI_Document> & thePart,
94 const ModelHighAPI_Selection & theCylindricalFace);
96 /**\ingroup CPPHighAPI
97 * \brief Create Axis feature
99 CONSTRUCTIONAPI_EXPORT
100 AxisPtr addAxis(const std::shared_ptr<ModelAPI_Document> & thePart,
101 const ModelHighAPI_Selection & thePoint,
102 const ModelHighAPI_Double & theX,
103 const ModelHighAPI_Double & theY,
104 const ModelHighAPI_Double & theZ);
106 //--------------------------------------------------------------------------------------
107 //--------------------------------------------------------------------------------------
108 #endif /* SRC_CONSTRUCTIONAPI_CONSTRUCTIONAPI_AXIS_H_ */