1 // Copyright (C) 2014-2016 CEA/DEN, EDF R&D
3 // Name : ConstructionAPI_Point.h
7 // 29/03/16 - Sergey POKHODENKO - Creation of the file
9 #ifndef SRC_CONSTRUCTIONAPI_CONSTRUCTIONAPI_POINT_H_
10 #define SRC_CONSTRUCTIONAPI_CONSTRUCTIONAPI_POINT_H_
12 #include "ConstructionAPI.h"
14 #include <ConstructionPlugin_Point.h>
16 #include <ModelHighAPI_Interface.h>
17 #include <ModelHighAPI_Macro.h>
19 class ModelAPI_AttributeDouble;
20 class ModelAPI_Document;
21 class ModelHighAPI_Double;
23 /// \class ConstructionAPI_Point
24 /// \ingroup CPPHighAPI
25 /// \brief Interface for Point feature.
26 class ConstructionAPI_Point: public ModelHighAPI_Interface
29 /// Constructor without values.
30 CONSTRUCTIONAPI_EXPORT
31 explicit ConstructionAPI_Point(const std::shared_ptr<ModelAPI_Feature>& theFeature);
33 /// Constructor with values.
34 CONSTRUCTIONAPI_EXPORT
35 ConstructionAPI_Point(const std::shared_ptr<ModelAPI_Feature>& theFeature,
36 const ModelHighAPI_Double& theX,
37 const ModelHighAPI_Double& theY,
38 const ModelHighAPI_Double& theZ);
40 /*/// Constructor with values.
41 CONSTRUCTIONAPI_EXPORT
42 ConstructionAPI_Point(const std::shared_ptr<ModelAPI_Feature>& theFeature,
43 const ModelHighAPI_Selection& theEdge,
44 const ModelHighAPI_Double& theDistanceValue,
45 const bool theDistancePercent = false,
46 const bool theReverse = false);
48 /// Constructor with values.
49 CONSTRUCTIONAPI_EXPORT
50 ConstructionAPI_Point(const std::shared_ptr<ModelAPI_Feature>& theFeature,
51 const ModelHighAPI_Selection& theObject1,
52 const ModelHighAPI_Selection& theObject2);*/
55 CONSTRUCTIONAPI_EXPORT
56 virtual ~ConstructionAPI_Point();
58 INTERFACE_3(ConstructionPlugin_Point::ID(),
59 x, ConstructionPlugin_Point::X(), ModelAPI_AttributeDouble, /** X attribute */,
60 y, ConstructionPlugin_Point::Y(), ModelAPI_AttributeDouble, /** Y attribute */,
61 z, ConstructionPlugin_Point::Z(), ModelAPI_AttributeDouble, /** Z attribute */)
65 CONSTRUCTIONAPI_EXPORT
66 void setByXYZ(const ModelHighAPI_Double & theX,
67 const ModelHighAPI_Double & theY,
68 const ModelHighAPI_Double & theZ);
70 /*/// Set edge and distance on it for point.
71 CONSTRUCTIONAPI_EXPORT
72 void setByDistanceOnEdge(const ModelHighAPI_Selection& theEdge,
73 const ModelHighAPI_Double& theDistanceValue,
74 const bool theDistancePercent = false,
75 const bool theReverse = false);
77 /// Set point and plane for projection.
78 CONSTRUCTIONAPI_EXPORT
79 void setByProjection(const ModelHighAPI_Selection& theVertex,
80 const ModelHighAPI_Selection& theFace);
82 /// Set lines for intersections.
83 CONSTRUCTIONAPI_EXPORT
84 void setByLinesIntersection(const ModelHighAPI_Selection& theEdge1,
85 const ModelHighAPI_Selection& theEdge2);
87 /// Set line and plane for intersections.
88 CONSTRUCTIONAPI_EXPORT
89 void setByLineAndPlaneIntersection(const ModelHighAPI_Selection& theEdge,
90 const ModelHighAPI_Selection& theFace);*/
92 /// Dump wrapped feature
93 CONSTRUCTIONAPI_EXPORT
94 virtual void dump(ModelHighAPI_Dumper& theDumper) const;
97 /// Pointer on Point object.
98 typedef std::shared_ptr<ConstructionAPI_Point> PointPtr;
100 /// \ingroup CPPHighAPI
101 /// \brief Create Point feature
102 CONSTRUCTIONAPI_EXPORT
103 PointPtr addPoint(const std::shared_ptr<ModelAPI_Document> & thePart,
104 const ModelHighAPI_Double & theX,
105 const ModelHighAPI_Double & theY,
106 const ModelHighAPI_Double & theZ);
108 /*/// \ingroup CPPHighAPI
109 /// \brief Create Point feature
110 CONSTRUCTIONAPI_EXPORT
111 PointPtr addPoint(const std::shared_ptr<ModelAPI_Document> & thePart,
112 const ModelHighAPI_Selection& theEdge,
113 const ModelHighAPI_Double& theDistanceValue,
114 const bool theDistancePercent = false,
115 const bool theReverse = false);
117 /// \ingroup CPPHighAPI
118 /// \brief Create Point feature
119 CONSTRUCTIONAPI_EXPORT
120 PointPtr addPoint(const std::shared_ptr<ModelAPI_Document> & thePart,
121 const ModelHighAPI_Selection& theObject1,
122 const ModelHighAPI_Selection& theObject2);*/
124 #endif /* SRC_CONSTRUCTIONAPI_CONSTRUCTIONAPI_POINT_H_ */