]> SALOME platform Git repositories - modules/shaper.git/blob - src/SketchAPI/SketchAPI_Point.h
Salome HOME
Porting to SALOME_8.2.0 : Debug visualization selection for AIS_Trihedron axes.
[modules/shaper.git] / src / SketchAPI / SketchAPI_Point.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2 // Name   : SketchAPI_Point.h
3 // Purpose:
4 //
5 // History:
6 // 15/06/16 - Sergey POKHODENKO - Creation of the file
7
8 #ifndef SRC_SKETCHAPI_SKETCHAPI_POINT_H_
9 #define SRC_SKETCHAPI_SKETCHAPI_POINT_H_
10
11 //--------------------------------------------------------------------------------------
12 #include "SketchAPI.h"
13
14 #include <GeomDataAPI_Point2D.h>
15
16 #include <SketchPlugin_Point.h>
17
18 #include "SketchAPI_SketchEntity.h"
19 //--------------------------------------------------------------------------------------
20 class ModelHighAPI_Selection;
21 //--------------------------------------------------------------------------------------
22 /**\class SketchAPI_Point
23  * \ingroup CPPHighAPI
24  * \brief Interface for Point feature
25  */
26 class SketchAPI_Point : public SketchAPI_SketchEntity
27 {
28 public:
29   /// Constructor without values
30   SKETCHAPI_EXPORT
31   explicit SketchAPI_Point(const std::shared_ptr<ModelAPI_Feature> & theFeature);
32   /// Constructor with values
33   SKETCHAPI_EXPORT
34   SketchAPI_Point(const std::shared_ptr<ModelAPI_Feature> & theFeature,
35                  double theX, double theY);
36   /// Constructor with values
37   SKETCHAPI_EXPORT
38   SketchAPI_Point(const std::shared_ptr<ModelAPI_Feature> & theFeature,
39                  const std::shared_ptr<GeomAPI_Pnt2d> & thePoint);
40   /// Constructor with values
41   SKETCHAPI_EXPORT
42   SketchAPI_Point(const std::shared_ptr<ModelAPI_Feature> & theFeature,
43                  const ModelHighAPI_Selection & theExternal);
44   /// Constructor with values
45   SKETCHAPI_EXPORT
46   SketchAPI_Point(const std::shared_ptr<ModelAPI_Feature> & theFeature,
47                  const std::string & theExternalName);
48   /// Destructor
49   SKETCHAPI_EXPORT
50   virtual ~SketchAPI_Point();
51
52   INTERFACE_2(SketchPlugin_Point::ID(),
53               coordinates, SketchPlugin_Point::COORD_ID(),
54               GeomDataAPI_Point2D, /** Point coordinates */,
55               external, SketchPlugin_Point::EXTERNAL_ID(),
56               ModelAPI_AttributeSelection, /** External */
57   )
58
59   /// Set by coordinates
60   SKETCHAPI_EXPORT
61   void setCoordinates(double theX, double theY);
62
63   /// Set by points
64   SKETCHAPI_EXPORT
65   void setCoordinates(const std::shared_ptr<GeomAPI_Pnt2d> & thePoint);
66
67   /// Set by external
68   SKETCHAPI_EXPORT
69   void setByExternal(const ModelHighAPI_Selection & theExternal);
70
71   /// Set by external name
72   SKETCHAPI_EXPORT
73   void setByExternalName(const std::string & theExternalName);
74
75   /// Dump wrapped feature
76   SKETCHAPI_EXPORT
77   virtual void dump(ModelHighAPI_Dumper& theDumper) const;
78 };
79
80 //! Pointer on Point object
81 typedef std::shared_ptr<SketchAPI_Point> PointPtr;
82
83 //--------------------------------------------------------------------------------------
84 //--------------------------------------------------------------------------------------
85 #endif /* SRC_SKETCHAPI_SKETCHAPI_POINT_H_ */