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 /// Point feature kind
14 const std::string SKETCH_POINT_KIND("SketchPoint");
16 /// Coordinates of the point
17 const std::string POINT_ATTR_COORD("PointCoordindates");
19 /**\class SketchPlugin_Point
21 * \brief Feature for creation of a new point.
23 class SketchPlugin_Point: public SketchPlugin_Feature
26 /// Returns the kind of a feature
27 SKETCHPLUGIN_EXPORT virtual const std::string& getKind()
28 {static std::string MY_KIND = SKETCH_POINT_KIND; return MY_KIND;}
30 /// Returns to which group in the document must be added feature
31 SKETCHPLUGIN_EXPORT virtual const std::string& getGroup()
32 {static std::string MY_GROUP = SKETCH_KIND; return MY_GROUP;}
34 /// Creates a new part document if needed
35 SKETCHPLUGIN_EXPORT virtual void execute();
37 /// Request for initialization of data model of the feature: adding all attributes
38 SKETCHPLUGIN_EXPORT virtual void initAttributes();
40 /// Returns the sketch preview
41 SKETCHPLUGIN_EXPORT virtual const boost::shared_ptr<GeomAPI_Shape>& preview();
43 /// Adds sub-feature of the higher level feature (sub-element of the sketch)
44 /// \param theFeature sub-feature
45 SKETCHPLUGIN_EXPORT virtual const void addSub(
46 const FeaturePtr& theFeature) {};
48 /// Use plugin manager for features creation