1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: FeaturesPlugin_ExtrusionCut.h
4 // Created: 12 May 2015
5 // Author: Dmitry Bobylev
7 #ifndef FeaturesPlugin_ExtrusionCut_H_
8 #define FeaturesPlugin_ExtrusionCut_H_
10 #include <FeaturesPlugin.h>
12 #include <ModelAPI_Feature.h>
14 /** \class FeaturesPlugin_ExtrusionCut
17 class FeaturesPlugin_ExtrusionCut : public ModelAPI_Feature
21 inline static const std::string& ID()
23 static const std::string MY_REVOLUTION_ID("ExtrusionCut");
24 return MY_REVOLUTION_ID;
27 /// attribute name of references sketch entities list, it should contain a sketch result or
28 /// a pair a sketch result to sketch face
29 inline static const std::string& LIST_ID()
31 static const std::string MY_GROUP_LIST_ID("main_objects");
32 return MY_GROUP_LIST_ID;
35 /// attribute name of an object to which the extrusion grows
36 inline static const std::string& SKETCH_OBJECT_ID()
38 static const std::string MY_TO_OBJECT_ID("sketch");
39 return MY_TO_OBJECT_ID;
42 /// Attribute name of an object to which the extrusion grows.
43 inline static const std::string& AXIS_OBJECT_ID()
45 static const std::string MY_TO_OBJECT_ID("axis_object");
46 return MY_TO_OBJECT_ID;
49 /// attribute name of extrusion size
50 inline static const std::string& TO_SIZE_ID()
52 static const std::string MY_TO_SIZE_ID("to_size");
56 /// attribute name of extrusion size
57 inline static const std::string& FROM_SIZE_ID()
59 static const std::string MY_FROM_SIZE_ID("from_size");
60 return MY_FROM_SIZE_ID;
63 /// attribute name of an object to which the extrusion grows
64 inline static const std::string& TO_OBJECT_ID()
66 static const std::string MY_TO_OBJECT_ID("to_object");
67 return MY_TO_OBJECT_ID;
70 /// attribute name of tool object
71 inline static const std::string& FROM_OBJECT_ID()
73 static const std::string MY_FROM_OBJECT_ID("from_object");
74 return MY_FROM_OBJECT_ID;
77 /// Returns the kind of a feature
78 FEATURESPLUGIN_EXPORT virtual const std::string& getKind()
80 static std::string MY_KIND = FeaturesPlugin_ExtrusionCut::ID();
84 /// Creates a new part document if needed.
85 FEATURESPLUGIN_EXPORT virtual void execute();
87 /// Request for initialization of data model of the feature: adding all attributes.
88 FEATURESPLUGIN_EXPORT virtual void initAttributes();
90 /// Use plugin manager for features creation.
91 FeaturesPlugin_ExtrusionCut();