1 // File: SketchPlugin_Point.h
2 // Created: 07 May 2014
3 // Author: Artem ZHIDKOV
5 #ifndef SketchPlugin_Point_HeaderFile
6 #define SketchPlugin_Point_HeaderFile
8 #include "SketchPlugin.h"
9 #include "SketchPlugin_Feature.h"
12 /// Coordinates of the point
13 const std::string POINT_ATTR_COORD("PointCoordindates");
15 /**\class SketchPlugin_Point
17 * \brief Feature for creation of a new point.
19 class SketchPlugin_Point: public SketchPlugin_Feature
22 /// Returns the kind of a feature
23 SKETCHPLUGIN_EXPORT virtual const std::string& getKind()
24 {static std::string MY_KIND = "SketchPoint"; return MY_KIND;}
26 /// Returns to which group in the document must be added feature
27 SKETCHPLUGIN_EXPORT virtual const std::string& getGroup()
28 {static std::string MY_GROUP = "Sketch"; return MY_GROUP;}
30 /// Creates a new part document if needed
31 SKETCHPLUGIN_EXPORT virtual void execute();
33 /// Request for initialization of data model of the feature: adding all attributes
34 SKETCHPLUGIN_EXPORT virtual void initAttributes();
36 /// Returns the sketch preview
37 SKETCHPLUGIN_EXPORT virtual const boost::shared_ptr<GeomAPI_Shape>& preview();
39 /// Adds sub-feature of the higher level feature (sub-element of the sketch)
40 /// \param theFeature sub-feature
41 SKETCHPLUGIN_EXPORT virtual const void addSub(
42 const boost::shared_ptr<ModelAPI_Feature>& theFeature) {};
44 /// Use plugin manager for features creation