]> SALOME platform Git repositories - modules/shaper.git/blob - src/ConstructionAPI/ConstructionAPI_Point.h
Salome HOME
Issue #2052: Modification of parameters don't work (sketch, extrusion)
[modules/shaper.git] / src / ConstructionAPI / ConstructionAPI_Point.h
1 // Copyright (C) 2014-2016 CEA/DEN, EDF R&D
2
3 // Name   : ConstructionAPI_Point.h
4 // Purpose:
5 //
6 // History:
7 // 29/03/16 - Sergey POKHODENKO - Creation of the file
8
9 #ifndef SRC_CONSTRUCTIONAPI_CONSTRUCTIONAPI_POINT_H_
10 #define SRC_CONSTRUCTIONAPI_CONSTRUCTIONAPI_POINT_H_
11
12 #include "ConstructionAPI.h"
13
14 #include <ConstructionPlugin_Point.h>
15
16 #include <ModelHighAPI_Interface.h>
17 #include <ModelHighAPI_Macro.h>
18
19 class ModelAPI_AttributeDouble;
20 class ModelAPI_Document;
21 class ModelHighAPI_Double;
22
23 /// \class ConstructionAPI_Point
24 /// \ingroup CPPHighAPI
25 /// \brief Interface for Point feature.
26 class ConstructionAPI_Point: public ModelHighAPI_Interface
27 {
28 public:
29   /// Constructor without values.
30   CONSTRUCTIONAPI_EXPORT
31   explicit ConstructionAPI_Point(const std::shared_ptr<ModelAPI_Feature>& theFeature);
32
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);
39
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);
47
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);*/
53
54   /// Destructor.
55   CONSTRUCTIONAPI_EXPORT
56   virtual ~ConstructionAPI_Point();
57
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 */)
62
63
64   /// Set point values.
65   CONSTRUCTIONAPI_EXPORT
66   void setByXYZ(const ModelHighAPI_Double & theX,
67                 const ModelHighAPI_Double & theY,
68                 const ModelHighAPI_Double & theZ);
69
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);
76
77   /// Set point and plane for projection.
78   CONSTRUCTIONAPI_EXPORT
79   void setByProjection(const ModelHighAPI_Selection& theVertex,
80                        const ModelHighAPI_Selection& theFace);
81
82   /// Set lines for intersections.
83   CONSTRUCTIONAPI_EXPORT
84   void setByLinesIntersection(const ModelHighAPI_Selection& theEdge1,
85                               const ModelHighAPI_Selection& theEdge2);
86
87   /// Set line and plane for intersections.
88   CONSTRUCTIONAPI_EXPORT
89   void setByLineAndPlaneIntersection(const ModelHighAPI_Selection& theEdge,
90                                      const ModelHighAPI_Selection& theFace);*/
91
92   /// Dump wrapped feature
93   CONSTRUCTIONAPI_EXPORT
94   virtual void dump(ModelHighAPI_Dumper& theDumper) const;
95 };
96
97 /// Pointer on Point object.
98 typedef std::shared_ptr<ConstructionAPI_Point> PointPtr;
99
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);
107
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);
116
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);*/
123
124 #endif /* SRC_CONSTRUCTIONAPI_CONSTRUCTIONAPI_POINT_H_ */