Salome HOME
Use full attribute type name in INTERFACE_N
[modules/shaper.git] / src / ConstructionAPI / ConstructionAPI_Plane.h
1 // Name   : ConstructionAPI_Plane.h
2 // Purpose: 
3 //
4 // History:
5 // 27/05/16 - Sergey POKHODENKO - Creation of the file
6
7 #ifndef SRC_CONSTRUCTIONAPI_CONSTRUCTIONAPI_PLANE_H_
8 #define SRC_CONSTRUCTIONAPI_CONSTRUCTIONAPI_PLANE_H_
9
10 //--------------------------------------------------------------------------------------
11 #include "ConstructionAPI.h"
12
13 #include <ConstructionPlugin_Plane.h>
14
15 #include <ModelHighAPI_Interface.h>
16 #include <ModelHighAPI_Macro.h>
17 //--------------------------------------------------------------------------------------
18 class ModelHighAPI_Double;
19 class ModelHighAPI_Selection;
20 //--------------------------------------------------------------------------------------
21 /**\class ConstructionAPI_Plane
22  * \ingroup CPPHighAPI
23  * \brief Interface for Plane feature
24  */
25 class ConstructionAPI_Plane : public ModelHighAPI_Interface
26 {
27 public:
28   /// Constructor without values
29   CONSTRUCTIONAPI_EXPORT
30   explicit ConstructionAPI_Plane(const std::shared_ptr<ModelAPI_Feature> & theFeature);
31   /// Constructor with values
32   CONSTRUCTIONAPI_EXPORT
33   ConstructionAPI_Plane(const std::shared_ptr<ModelAPI_Feature> & theFeature,
34                         const ModelHighAPI_Selection & theFace,
35                         const ModelHighAPI_Double & theDistance);
36   /// Constructor with values
37   CONSTRUCTIONAPI_EXPORT
38   ConstructionAPI_Plane(const std::shared_ptr<ModelAPI_Feature> & theFeature,
39                         const ModelHighAPI_Double & theA,
40                         const ModelHighAPI_Double & theB,
41                         const ModelHighAPI_Double & theC,
42                         const ModelHighAPI_Double & theD);
43   /// Destructor
44   CONSTRUCTIONAPI_EXPORT
45   virtual ~ConstructionAPI_Plane();
46
47   INTERFACE_7(ConstructionPlugin_Plane::ID(),
48               creationMethod, ConstructionPlugin_Plane::METHOD(), ModelAPI_AttributeString, /** Creation method */,
49               face, ConstructionPlugin_Plane::FACE(), ModelAPI_AttributeSelection, /** Plane face */,
50               distance, ConstructionPlugin_Plane::DISTANCE(), ModelAPI_AttributeDouble, /** Distance */,
51               A, ConstructionPlugin_Plane::A(), ModelAPI_AttributeDouble, /** Parameter A for general equation */,
52               B, ConstructionPlugin_Plane::B(), ModelAPI_AttributeDouble, /** Parameter B for general equation */,
53               C, ConstructionPlugin_Plane::C(), ModelAPI_AttributeDouble, /** Parameter C for general equation */,
54               D, ConstructionPlugin_Plane::D(), ModelAPI_AttributeDouble, /** Parameter D for general equation */
55   )
56
57   /// Set face and distance
58   CONSTRUCTIONAPI_EXPORT
59   void setFaceAndDistance(const ModelHighAPI_Selection & theFace,
60                           const ModelHighAPI_Double & theDistance);
61
62   /// Set GeneralEquation parameters of the feature
63   CONSTRUCTIONAPI_EXPORT
64   void setGeneralEquation(const ModelHighAPI_Double & theA,
65                           const ModelHighAPI_Double & theB,
66                           const ModelHighAPI_Double & theC,
67                           const ModelHighAPI_Double & theD);
68 };
69
70 //! Pointer on Plane object
71 typedef std::shared_ptr<ConstructionAPI_Plane> PlanePtr;
72
73 /**\ingroup CPPHighAPI
74  * \brief Create Plane feature
75  */
76 CONSTRUCTIONAPI_EXPORT
77 PlanePtr addPlane(const std::shared_ptr<ModelAPI_Document> & thePart,
78                   const ModelHighAPI_Selection & theFace,
79                   const ModelHighAPI_Double & theDistance);
80
81 /**\ingroup CPPHighAPI
82  * \brief Create Plane feature
83  */
84 CONSTRUCTIONAPI_EXPORT
85 PlanePtr addPlane(const std::shared_ptr<ModelAPI_Document> & thePart,
86                   const ModelHighAPI_Double & theA,
87                   const ModelHighAPI_Double & theB,
88                   const ModelHighAPI_Double & theC,
89                   const ModelHighAPI_Double & theD);
90
91 //--------------------------------------------------------------------------------------
92 //--------------------------------------------------------------------------------------
93 #endif /* SRC_CONSTRUCTIONAPI_CONSTRUCTIONAPI_PLANE_H_ */