Salome HOME
Merge branch 'SketchSolver'
[modules/shaper.git] / src / SketchPlugin / SketchPlugin_Circle.h
1 // File:        SketchPlugin_Circle.h
2 // Created:     26 May 2014
3 // Author:      Artem ZHIDKOV
4
5 #ifndef SketchPlugin_Circle_HeaderFile
6 #define SketchPlugin_Circle_HeaderFile
7
8 #include "SketchPlugin.h"
9 #include <SketchPlugin_Feature.h>
10
11 /// 2D point - center of the circle
12 const std::string CIRCLE_ATTR_CENTER("CircleCenter");
13 /// Radius of the circle
14 const std::string CIRCLE_ATTR_RADIUS("CircleRadius");
15
16 /**\class SketchPlugin_Circle
17  * \ingroup DataModel
18  * \brief Feature for creation of the new circle in PartSet.
19  */
20 class SketchPlugin_Circle: public SketchPlugin_Feature
21 {
22 public:
23   /// Returns the kind of a feature
24   SKETCHPLUGIN_EXPORT virtual const std::string& getKind() 
25   {static std::string MY_KIND = "SketchCircle"; return MY_KIND;}
26
27   /// Returns to which group in the document must be added feature
28   SKETCHPLUGIN_EXPORT virtual const std::string& getGroup() 
29   {static std::string MY_GROUP = "Sketch"; return MY_GROUP;}
30
31   /// Creates a new part document if needed
32   SKETCHPLUGIN_EXPORT virtual void execute();
33
34   /// Request for initialization of data model of the feature: adding all attributes
35   SKETCHPLUGIN_EXPORT virtual void initAttributes();
36
37   /// Returns the sketch preview
38   SKETCHPLUGIN_EXPORT virtual const boost::shared_ptr<GeomAPI_Shape>& preview();
39
40   /// Adds sub-feature of the higher level feature (sub-element of the sketch)
41   /// \param theFeature sub-feature
42   SKETCHPLUGIN_EXPORT virtual const void addSub(
43     const boost::shared_ptr<ModelAPI_Feature>& theFeature) {};
44
45   /// Use plugin manager for features creation
46   SketchPlugin_Circle();
47 };
48
49 #endif