1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
3 // File: SketchPlugin_Point.h
4 // Created: 07 May 2014
5 // Author: Artem ZHIDKOV
7 #ifndef SketchPlugin_Point_H_
8 #define SketchPlugin_Point_H_
10 #include "SketchPlugin.h"
11 #include <SketchPlugin_Sketch.h>
12 #include "SketchPlugin_SketchEntity.h"
15 /**\class SketchPlugin_Point
17 * \brief Feature for creation of a new point.
19 class SketchPlugin_Point : public SketchPlugin_SketchEntity
22 /// Point feature kind
23 inline static const std::string& ID()
25 static const std::string MY_POINT_ID("SketchPoint");
28 /// Coordinates of the point
29 inline static const std::string& COORD_ID()
31 static const std::string MY_COORD_ID("PointCoordindates");
34 /// Returns the kind of a feature
35 SKETCHPLUGIN_EXPORT virtual const std::string& getKind()
37 static std::string MY_KIND = SketchPlugin_Point::ID();
41 /// Returns true is sketch element is under the rigid constraint
42 SKETCHPLUGIN_EXPORT virtual bool isFixed();
44 /// Creates a new part document if needed
45 SKETCHPLUGIN_EXPORT virtual void execute();
48 /// \param theDeltaX the delta for X coordinate is moved
49 /// \param theDeltaY the delta for Y coordinate is moved
50 SKETCHPLUGIN_EXPORT virtual void move(const double theDeltaX, const double theDeltaY);
52 /// Called on change of any argument-attribute of this object: for external point
53 SKETCHPLUGIN_EXPORT virtual void attributeChanged(const std::string& theID);
55 /// Use plugin manager for features creation
59 /// \brief Initializes attributes of derived class.
60 virtual void initDerivedClassAttributes();