1 // File: SketchPlugin_Arc.h
2 // Created: 26 May 2014
3 // Author: Artem ZHIDKOV
5 #ifndef SketchPlugin_Arc_HeaderFile
6 #define SketchPlugin_Arc_HeaderFile
8 #include "SketchPlugin.h"
9 #include <SketchPlugin_Feature.h>
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");
18 /**\class SketchPlugin_Arc
20 * \brief Feature for creation of the new arc of circle in PartSet.
22 class SketchPlugin_Arc: public SketchPlugin_Feature
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;}
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;}
33 /// Creates a new part document if needed
34 SKETCHPLUGIN_EXPORT virtual void execute();
36 /// Request for initialization of data model of the feature: adding all attributes
37 SKETCHPLUGIN_EXPORT virtual void initAttributes();
39 /// Returns the sketch preview
40 SKETCHPLUGIN_EXPORT virtual const boost::shared_ptr<GeomAPI_Shape>& preview();
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) {};
47 /// Use plugin manager for features creation