]> SALOME platform Git repositories - modules/shaper.git/blob - src/ConstructionAPI/ConstructionAPI_Plane.h
Salome HOME
1bc510179af689f10b104ff660073d65c44d072d
[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 <ModelHighAPI_Interface.h>
14 #include <ModelHighAPI_Macro.h>
15 //--------------------------------------------------------------------------------------
16 class ModelHighAPI_Double;
17 class ModelHighAPI_Selection;
18 //--------------------------------------------------------------------------------------
19 /**\class ConstructionAPI_Plane
20  * \ingroup CPPHighAPI
21  * \brief Interface for Plane feature
22  */
23 class ConstructionAPI_Plane : public ModelHighAPI_Interface
24 {
25 public:
26   /// Constructor without values
27   CONSTRUCTIONAPI_EXPORT
28   explicit ConstructionAPI_Plane(const std::shared_ptr<ModelAPI_Feature> & theFeature);
29   /// Constructor with values
30   CONSTRUCTIONAPI_EXPORT
31   ConstructionAPI_Plane(const std::shared_ptr<ModelAPI_Feature> & theFeature,
32                         const ModelHighAPI_Selection & theFace,
33                         const ModelHighAPI_Double & theDistance);
34   /// Constructor with values
35   CONSTRUCTIONAPI_EXPORT
36   ConstructionAPI_Plane(const std::shared_ptr<ModelAPI_Feature> & theFeature,
37                         const ModelHighAPI_Double & theA,
38                         const ModelHighAPI_Double & theB,
39                         const ModelHighAPI_Double & theC,
40                         const ModelHighAPI_Double & theD);
41   /// Destructor
42   CONSTRUCTIONAPI_EXPORT
43   virtual ~ConstructionAPI_Plane();
44
45   INTERFACE_7("Plane",
46               creationMethod, "CreationMethod", String, /** Creation method */,
47               face, "planeFace", Selection, /** Plane face */,
48               distance, "distance", Double, /** Distance */,
49               A, "A", Double, /** Parameter A for general equation */,
50               B, "B", Double, /** Parameter B for general equation */,
51               C, "C", Double, /** Parameter C for general equation */,
52               D, "D", Double, /** Parameter D for general equation */
53   )
54
55   /// Set face and distance
56   CONSTRUCTIONAPI_EXPORT
57   void setFaceAndDistance(const ModelHighAPI_Selection & theFace,
58                           const ModelHighAPI_Double & theDistance);
59
60   /// Set GeneralEquation parameters of the feature
61   CONSTRUCTIONAPI_EXPORT
62   void setGeneralEquation(const ModelHighAPI_Double & theA,
63                           const ModelHighAPI_Double & theB,
64                           const ModelHighAPI_Double & theC,
65                           const ModelHighAPI_Double & theD);
66 };
67
68 //! Pointer on Plane object
69 typedef std::shared_ptr<ConstructionAPI_Plane> PlanePtr;
70
71 /**\ingroup CPPHighAPI
72  * \brief Create Plane feature
73  */
74 CONSTRUCTIONAPI_EXPORT
75 PlanePtr addPlane(const std::shared_ptr<ModelAPI_Document> & thePart,
76                   const ModelHighAPI_Selection & theFace,
77                   const ModelHighAPI_Double & theDistance);
78
79 /**\ingroup CPPHighAPI
80  * \brief Create Plane feature
81  */
82 CONSTRUCTIONAPI_EXPORT
83 PlanePtr addPlane(const std::shared_ptr<ModelAPI_Document> & thePart,
84                   const ModelHighAPI_Double & theA,
85                   const ModelHighAPI_Double & theB,
86                   const ModelHighAPI_Double & theC,
87                   const ModelHighAPI_Double & theD);
88
89 //--------------------------------------------------------------------------------------
90 //--------------------------------------------------------------------------------------
91 #endif /* SRC_CONSTRUCTIONAPI_CONSTRUCTIONAPI_PLANE_H_ */