1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
3 // File: SketchShapePlugin_Feature.h
4 // Created: 25 Nov 2015
5 // Author: Natalia ERMOLAEVA
7 #ifndef SKETCHSHAPEPLUGIN_FEATURE_H_
8 #define SKETCHSHAPEPLUGIN_FEATURE_H_
10 #include "SketchShapePlugin.h"
12 #include <ModelAPI_Feature.h>
14 /**\class SketchShapePlugin_Feature
16 * \brief Feature for extraction shapes from the sketch.
17 * The visualization of this object is a result and
18 * it is calculated if all attributes are initialized.
19 * It is possible to extract simultaneously vertices, edges and faces.
22 class SketchShapePlugin_Feature : public ModelAPI_Feature
25 /// SketchShape feature kind
26 inline static const std::string& ID()
28 static const std::string MY_SKETCH_SHAPE_ID("SketchShape");
29 return MY_SKETCH_SHAPE_ID;
33 inline static const std::string& SKETCH_ID()
35 static const std::string MY_SKETCH_ID("Sketch");
39 /// List of vertices to be extracted
40 inline static const std::string& VERTEX_LIST_ID()
42 static const std::string MY_VERTEX_LIST_ID("VertexList");
43 return MY_VERTEX_LIST_ID;
46 /// State whether the vertices are selectable
47 inline static const std::string& VERTEX_CHOICE_ID()
49 static const std::string MY_VERTEX_CHOICE_ID("VertexChoice");
50 return MY_VERTEX_CHOICE_ID;
53 /// Returns the kind of a feature
54 SKETCHSHAPEPLUGIN_EXPORT virtual const std::string& getKind()
56 static std::string MY_KIND = SketchShapePlugin_Feature::ID();
60 /// Creates an arc-shape
61 SKETCHSHAPEPLUGIN_EXPORT virtual void execute();
63 /// Request for initialization of data model of the feature: adding all attributes
64 SKETCHSHAPEPLUGIN_EXPORT virtual void initAttributes();
66 /// Called on change of any argument-attribute of this object
67 /// \param theID identifier of changed attribute
68 SKETCHSHAPEPLUGIN_EXPORT virtual void attributeChanged(const std::string& theID);
70 /// Use plugin manager for features creation
71 SketchShapePlugin_Feature();