Salome HOME
a71c23e1457479e75357db6fdad9f27ce114a066
[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   explicit ConstructionAPI_Plane(const std::shared_ptr<ModelAPI_Feature> & theFeature);
28   /// Constructor with values
29   ConstructionAPI_Plane(const std::shared_ptr<ModelAPI_Feature> & theFeature,
30                         const ModelHighAPI_Selection & theFace,
31                         const ModelHighAPI_Double & theDistance);
32   /// Constructor with values
33   ConstructionAPI_Plane(const std::shared_ptr<ModelAPI_Feature> & theFeature,
34                         const ModelHighAPI_Double & theA,
35                         const ModelHighAPI_Double & theB,
36                         const ModelHighAPI_Double & theC,
37                         const ModelHighAPI_Double & theD);
38   /// Destructor
39   virtual ~ConstructionAPI_Plane();
40
41   INTERFACE_7("Plane",
42               creationMethod, "CreationMethod", String, /** Creation method */,
43               face, "planeFace", Selection, /** Plane face */,
44               distance, "distance", Double, /** Distance */,
45               A, "A", Double, /** Parameter A for general equation */,
46               B, "B", Double, /** Parameter B for general equation */,
47               C, "C", Double, /** Parameter C for general equation */,
48               D, "D", Double, /** Parameter D for general equation */
49   )
50
51   /// Set face and distance
52   void setFaceAndDistance(const ModelHighAPI_Selection & theFace,
53                           const ModelHighAPI_Double & theDistance);
54
55   /// Set GeneralEquation parameters of the feature
56   void setGeneralEquation(const ModelHighAPI_Double & theA,
57                           const ModelHighAPI_Double & theB,
58                           const ModelHighAPI_Double & theC,
59                           const ModelHighAPI_Double & theD);
60 };
61
62 //! Pointer on Plane object
63 typedef std::shared_ptr<ConstructionAPI_Plane> PlanePtr;
64
65 //--------------------------------------------------------------------------------------
66 //--------------------------------------------------------------------------------------
67 #endif /* SRC_CONSTRUCTIONAPI_CONSTRUCTIONAPI_PLANE_H_ */