1 // File: SketchPlugin_Sketch.h
2 // Created: 27 Mar 2014
3 // Author: Mikhail PONIKAROV
5 #ifndef SketchPlugin_Sketch_HeaderFile
6 #define SketchPlugin_Sketch_HeaderFile
8 #include "SketchPlugin.h"
9 #include <SketchPlugin_Feature.h>
11 #include <TopoDS_Shape.hxx>
13 /// part reference attribute
14 const std::string PART_ATTR_DOC_REF = "SketchDocument";
16 /**\class SketchPlugin_Sketch
18 * \brief Feature for creation of the new part in PartSet.
20 class SketchPlugin_Sketch: public SketchPlugin_Feature
23 /// Returns the kind of a feature
24 SKETCHPLUGIN_EXPORT virtual const std::string& getKind()
25 {static std::string MY_KIND = "Sketch"; 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 = "Sketchs"; 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 SKETCHPLUGIN_EXPORT virtual std::shared_ptr<ModelAPI_Document> documentToAdd();
39 /// Returns the sketch preview
40 SKETCHPLUGIN_EXPORT virtual const TopoDS_Shape& preview();
42 /// Use plugin manager for features creation
43 SketchPlugin_Sketch();