1 // Name : ConstructionAPI_Plane.h
5 // 27/05/16 - Sergey POKHODENKO - Creation of the file
7 #ifndef SRC_CONSTRUCTIONAPI_CONSTRUCTIONAPI_PLANE_H_
8 #define SRC_CONSTRUCTIONAPI_CONSTRUCTIONAPI_PLANE_H_
10 //--------------------------------------------------------------------------------------
11 #include "ConstructionAPI.h"
13 #include <ModelHighAPI_Interface.h>
14 #include <ModelHighAPI_Macro.h>
15 //--------------------------------------------------------------------------------------
16 class ModelHighAPI_Double;
17 class ModelHighAPI_Selection;
18 //--------------------------------------------------------------------------------------
19 /**\class ConstructionAPI_Plane
21 * \brief Interface for Plane feature
23 class ConstructionAPI_Plane : public ModelHighAPI_Interface
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);
42 CONSTRUCTIONAPI_EXPORT
43 virtual ~ConstructionAPI_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 */
55 /// Set face and distance
56 CONSTRUCTIONAPI_EXPORT
57 void setFaceAndDistance(const ModelHighAPI_Selection & theFace,
58 const ModelHighAPI_Double & theDistance);
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);
68 //! Pointer on Plane object
69 typedef std::shared_ptr<ConstructionAPI_Plane> PlanePtr;
71 /**\ingroup CPPHighAPI
72 * \brief Create Plane feature
74 CONSTRUCTIONAPI_EXPORT
75 PlanePtr addPlane(const std::shared_ptr<ModelAPI_Document> & thePart,
76 const ModelHighAPI_Selection & theFace,
77 const ModelHighAPI_Double & theDistance);
79 /**\ingroup CPPHighAPI
80 * \brief Create Plane feature
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);
89 //--------------------------------------------------------------------------------------
90 //--------------------------------------------------------------------------------------
91 #endif /* SRC_CONSTRUCTIONAPI_CONSTRUCTIONAPI_PLANE_H_ */