Salome HOME
Removed not used function SimpleAISobject
[modules/shaper.git] / src / SketchPlugin / SketchPlugin_Point.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
2
3 // File:    SketchPlugin_Point.h
4 // Created: 07 May 2014
5 // Author:  Artem ZHIDKOV
6
7 #ifndef SketchPlugin_Point_H_
8 #define SketchPlugin_Point_H_
9
10 #include "SketchPlugin.h"
11 #include <SketchPlugin_Sketch.h>
12 #include "SketchPlugin_Feature.h"
13 #include <list>
14
15 /**\class SketchPlugin_Point
16  * \ingroup DataModel
17  * \brief Feature for creation of a new point.
18  */
19 class SketchPlugin_Point : public SketchPlugin_Feature
20 {
21  public:
22   /// Point feature kind
23   inline static const std::string& ID()
24   {
25     static const std::string MY_POINT_ID("SketchPoint");
26     return MY_POINT_ID;
27   }
28   /// Coordinates of the point
29   inline static const std::string& COORD_ID()
30   {
31     static const std::string MY_COORD_ID("PointCoordindates");
32     return MY_COORD_ID;
33   }
34   /// Returns the kind of a feature
35   SKETCHPLUGIN_EXPORT virtual const std::string& getKind()
36   {
37     static std::string MY_KIND = SketchPlugin_Point::ID();
38     return MY_KIND;
39   }
40
41   /// Returns true is sketch element is under the rigid constraint
42   SKETCHPLUGIN_EXPORT virtual bool isFixed();
43
44   /// Creates a new part document if needed
45   SKETCHPLUGIN_EXPORT virtual void execute();
46
47   /// Request for initialization of data model of the feature: adding all attributes
48   SKETCHPLUGIN_EXPORT virtual void initAttributes();
49
50   /// Moves the feature
51   /// \param theDeltaX the delta for X coordinate is moved
52   /// \param theDeltaY the delta for Y coordinate is moved
53   SKETCHPLUGIN_EXPORT virtual void move(const double theDeltaX, const double theDeltaY);
54
55   /// Return the distance between the feature and the point
56   /// \param thePoint the point
57   virtual double distanceToPoint(const std::shared_ptr<GeomAPI_Pnt2d>& thePoint);
58
59   /// Use plugin manager for features creation
60   SketchPlugin_Point();
61 };
62
63 #endif