1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
3 // File: SketchPlugin_Circle.h
4 // Created: 26 May 2014
5 // Author: Artem ZHIDKOV
7 #ifndef SketchPlugin_Circle_H_
8 #define SketchPlugin_Circle_H_
10 #include "SketchPlugin.h"
11 #include <SketchPlugin_SketchEntity.h>
12 #include <SketchPlugin_Sketch.h>
14 /**\class SketchPlugin_Circle
16 * \brief Feature for creation of the new circle in Sketch.
18 class SketchPlugin_Circle: public SketchPlugin_SketchEntity
21 /// Circle feature kind
22 inline static const std::string& ID()
24 static const std::string ID("SketchCircle");
28 /// 2D point - center of the circle
29 inline static const std::string& CENTER_ID()
31 static const std::string ID("circle_center");
35 /// Radius of the circle
36 inline static const std::string& RADIUS_ID()
38 static const std::string ID("circle_radius");
42 /// Returns the kind of a feature
43 SKETCHPLUGIN_EXPORT virtual const std::string& getKind()
45 static std::string MY_KIND = SketchPlugin_Circle::ID();
49 /// Returns true is sketch element is under the rigid constraint
50 SKETCHPLUGIN_EXPORT virtual bool isFixed();
52 /// Called on change of any argument-attribute of this object
53 SKETCHPLUGIN_EXPORT virtual void attributeChanged(const std::string& theID);
55 /// Creates a new part document if needed
56 SKETCHPLUGIN_EXPORT virtual void execute();
59 /// \param theDeltaX the delta for X coordinate is moved
60 /// \param theDeltaY the delta for Y coordinate is moved
61 SKETCHPLUGIN_EXPORT virtual void move(const double theDeltaX, const double theDeltaY);
63 /// Use plugin manager for features creation
64 SketchPlugin_Circle();
67 /// \brief Initializes attributes of derived class.
68 virtual void initDerivedClassAttributes();