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_Sketch.h>
10 #include "SketchPlugin_Feature.h"
13 /// Coordinates of the point
14 const std::string POINT_ATTR_COORD("PointCoordindates");
16 /**\class SketchPlugin_Point
18 * \brief Feature for creation of a new point.
20 class SketchPlugin_Point: public SketchPlugin_Feature
23 /// Returns the kind of a feature
24 SKETCHPLUGIN_EXPORT virtual const std::string& getKind()
25 {static std::string MY_KIND = "SketchPoint"; return MY_KIND;}
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_KIND; return MY_GROUP;}
31 /// Creates a new part document if needed
32 SKETCHPLUGIN_EXPORT virtual void execute();
34 /// Request for initialization of data model of the feature: adding all attributes
35 SKETCHPLUGIN_EXPORT virtual void initAttributes();
37 /// Returns the sketch preview
38 SKETCHPLUGIN_EXPORT virtual const boost::shared_ptr<GeomAPI_Shape>& preview();
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) {};
45 /// Use plugin manager for features creation