Salome HOME
d2af332986b9a2c43d25bee8ccd1fd9e702a7aef
[modules/shaper.git] / src / ConstructionAPI / ConstructionAPI_Point.h
1 // Name   : ConstructionAPI_Point.h
2 // Purpose: 
3 //
4 // History:
5 // 29/03/16 - Sergey POKHODENKO - Creation of the file
6
7 #ifndef SRC_CONSTRUCTIONAPI_CONSTRUCTIONAPI_POINT_H_
8 #define SRC_CONSTRUCTIONAPI_CONSTRUCTIONAPI_POINT_H_
9
10 //--------------------------------------------------------------------------------------
11 #include "ConstructionAPI.h"
12
13 #include <ConstructionPlugin_Point.h>
14
15 #include <ModelHighAPI_Interface.h>
16 #include <ModelHighAPI_Macro.h>
17 //--------------------------------------------------------------------------------------
18 class ModelAPI_AttributeDouble;
19 class ModelAPI_Document;
20 class ModelHighAPI_Double;
21 //--------------------------------------------------------------------------------------
22 /**\class ConstructionAPI_Point
23  * \ingroup CPPHighAPI
24  * \brief Interface for Point feature
25  */
26 class ConstructionAPI_Point : public ModelHighAPI_Interface
27 {
28 public:
29   /// Constructor without values
30   CONSTRUCTIONAPI_EXPORT
31   explicit ConstructionAPI_Point(const std::shared_ptr<ModelAPI_Feature> & theFeature);
32   /// Constructor with values
33   CONSTRUCTIONAPI_EXPORT
34   ConstructionAPI_Point(const std::shared_ptr<ModelAPI_Feature> & theFeature,
35                         const ModelHighAPI_Double & theX,
36                         const ModelHighAPI_Double & theY,
37                         const ModelHighAPI_Double & theZ);
38   /// Destructor
39   CONSTRUCTIONAPI_EXPORT
40   virtual ~ConstructionAPI_Point();
41
42   INTERFACE_3(ConstructionPlugin_Point::ID(),
43               x, ConstructionPlugin_Point::X(), ModelAPI_AttributeDouble, /** X attribute */,
44               y, ConstructionPlugin_Point::Y(), ModelAPI_AttributeDouble, /** Y attribute */,
45               z, ConstructionPlugin_Point::Z(), ModelAPI_AttributeDouble, /** Z attribute */
46   )
47
48   /// Set point values
49   CONSTRUCTIONAPI_EXPORT
50   void setPoint(const ModelHighAPI_Double & theX,
51                 const ModelHighAPI_Double & theY,
52                 const ModelHighAPI_Double & theZ);
53 };
54
55 //! Pointer on Point object
56 typedef std::shared_ptr<ConstructionAPI_Point> PointPtr;
57
58 /**\ingroup CPPHighAPI
59  * \brief Create Point feature
60  */
61 CONSTRUCTIONAPI_EXPORT
62 PointPtr addPoint(const std::shared_ptr<ModelAPI_Document> & thePart,
63                   const ModelHighAPI_Double & theX,
64                   const ModelHighAPI_Double & theY,
65                   const ModelHighAPI_Double & theZ);
66
67 //--------------------------------------------------------------------------------------
68 //--------------------------------------------------------------------------------------
69 #endif /* SRC_CONSTRUCTIONAPI_CONSTRUCTIONAPI_POINT_H_ */