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