1 // File: FeaturesPlugin_Extrusion.h
2 // Created: 30 May 2014
3 // Author: Vitaly SMETANNIKOV
5 #ifndef FeaturesPlugin_Extrusion_H_
6 #define FeaturesPlugin_Extrusion_H_
8 #include "FeaturesPlugin.h"
9 #include <ModelAPI_Feature.h>
10 #include <ModelAPI_ResultBody.h>
11 #include <GeomAlgoAPI_Extrusion.h>
12 #include <GeomAPI_Shape.h>
13 class FeaturesPlugin_Extrusion : public ModelAPI_Feature
17 inline static const std::string& ID()
19 static const std::string MY_EXTRUSION_ID("Extrusion");
20 return MY_EXTRUSION_ID;
22 /// attribute name of referenced face
23 inline static const std::string& FACE_ID()
25 static const std::string MY_FACE_ID("extrusion_face");
28 /// attribute name of extrusion size
29 inline static const std::string& SIZE_ID()
31 static const std::string MY_SIZE_ID("extrusion_size");
34 /// attribute name of reverse direction
35 inline static const std::string& REVERSE_ID()
37 static const std::string MY_REVERSE_ID("extrusion_reverse");
41 /// Returns the kind of a feature
42 FEATURESPLUGIN_EXPORT virtual const std::string& getKind()
44 static std::string MY_KIND = FeaturesPlugin_Extrusion::ID();
48 /// Creates a new part document if needed
49 FEATURESPLUGIN_EXPORT virtual void execute();
51 /// Request for initialization of data model of the feature: adding all attributes
52 FEATURESPLUGIN_EXPORT virtual void initAttributes();
54 /// Use plugin manager for features creation
55 FeaturesPlugin_Extrusion();
57 /// Load Naming data structure of the feature to the document
58 void LoadNamingDS(GeomAlgoAPI_Extrusion& theFeature, std::shared_ptr<ModelAPI_ResultBody> theResultBody,
59 std::shared_ptr<GeomAPI_Shape> theBasis,
60 std::shared_ptr<GeomAPI_Shape> theContext);