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 <ConstructionPlugin_Plane.h>
15 #include <ModelHighAPI_Interface.h>
16 #include <ModelHighAPI_Macro.h>
17 //--------------------------------------------------------------------------------------
18 class ModelHighAPI_Double;
19 class ModelHighAPI_Selection;
20 //--------------------------------------------------------------------------------------
21 /**\class ConstructionAPI_Plane
23 * \brief Interface for Plane feature
25 class ConstructionAPI_Plane : public ModelHighAPI_Interface
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);
44 CONSTRUCTIONAPI_EXPORT
45 virtual ~ConstructionAPI_Plane();
47 INTERFACE_7(ConstructionPlugin_Plane::ID(),
48 creationMethod, ConstructionPlugin_Plane::CREATION_METHOD(), ModelAPI_AttributeString, /** Creation method */,
49 A, ConstructionPlugin_Plane::A(), ModelAPI_AttributeDouble, /** Parameter A for general equation */,
50 B, ConstructionPlugin_Plane::B(), ModelAPI_AttributeDouble, /** Parameter B for general equation */,
51 C, ConstructionPlugin_Plane::C(), ModelAPI_AttributeDouble, /** Parameter C for general equation */,
52 D, ConstructionPlugin_Plane::D(), ModelAPI_AttributeDouble, /** Parameter D for general equation */,
53 plane, ConstructionPlugin_Plane::PLANE(), ModelAPI_AttributeSelection, /** Plane face */,
54 distance, ConstructionPlugin_Plane::DISTANCE(), ModelAPI_AttributeDouble, /** Distance */
57 /// Set face and distance
58 CONSTRUCTIONAPI_EXPORT
59 void setFaceAndDistance(const ModelHighAPI_Selection& theFace,
60 const ModelHighAPI_Double& theDistance);
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);
70 //! Pointer on Plane object
71 typedef std::shared_ptr<ConstructionAPI_Plane> PlanePtr;
73 /**\ingroup CPPHighAPI
74 * \brief Create Plane feature
76 CONSTRUCTIONAPI_EXPORT
77 PlanePtr addPlane(const std::shared_ptr<ModelAPI_Document> & thePart,
78 const ModelHighAPI_Selection & theFace,
79 const ModelHighAPI_Double & theDistance);
81 /**\ingroup CPPHighAPI
82 * \brief Create Plane feature
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);
91 //--------------------------------------------------------------------------------------
92 //--------------------------------------------------------------------------------------
93 #endif /* SRC_CONSTRUCTIONAPI_CONSTRUCTIONAPI_PLANE_H_ */