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 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);
39 virtual ~ConstructionAPI_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 */
51 /// Set face and distance
52 void setFaceAndDistance(const ModelHighAPI_Selection & theFace,
53 const ModelHighAPI_Double & theDistance);
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);
62 //! Pointer on Plane object
63 typedef std::shared_ptr<ConstructionAPI_Plane> PlanePtr;
65 /**\ingroup CPPHighAPI
66 * \brief Create Plane feature
68 PlanePtr addPlane(const std::shared_ptr<ModelAPI_Document> & thePart,
69 const ModelHighAPI_Selection & theFace,
70 const ModelHighAPI_Double & theDistance);
72 /**\ingroup CPPHighAPI
73 * \brief Create Plane feature
75 PlanePtr addPlane(const std::shared_ptr<ModelAPI_Document> & thePart,
76 const ModelHighAPI_Double & theA,
77 const ModelHighAPI_Double & theB,
78 const ModelHighAPI_Double & theC,
79 const ModelHighAPI_Double & theD);
81 //--------------------------------------------------------------------------------------
82 //--------------------------------------------------------------------------------------
83 #endif /* SRC_CONSTRUCTIONAPI_CONSTRUCTIONAPI_PLANE_H_ */