1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
3 // File: FeaturesPlugin_Extrusion.h
4 // Created: 30 May 2014
5 // Author: Vitaly SMETANNIKOV
7 #ifndef FeaturesPlugin_Extrusion_H_
8 #define FeaturesPlugin_Extrusion_H_
10 #include "FeaturesPlugin.h"
11 #include <ModelAPI_Feature.h>
12 #include <ModelAPI_ResultBody.h>
13 #include <GeomAlgoAPI_Extrusion.h>
14 #include <GeomAPI_Shape.h>
15 class FeaturesPlugin_Extrusion : public ModelAPI_Feature
19 inline static const std::string& ID()
21 static const std::string MY_EXTRUSION_ID("Extrusion");
22 return MY_EXTRUSION_ID;
24 /// attribute name of referenced face
25 inline static const std::string& FACE_ID()
27 static const std::string MY_FACE_ID("extrusion_face");
30 /// attribute name of extrusion size
31 inline static const std::string& SIZE_ID()
33 static const std::string MY_SIZE_ID("extrusion_size");
36 /// attribute name of reverse direction
37 inline static const std::string& REVERSE_ID()
39 static const std::string MY_REVERSE_ID("extrusion_reverse");
43 /// Returns the kind of a feature
44 FEATURESPLUGIN_EXPORT virtual const std::string& getKind()
46 static std::string MY_KIND = FeaturesPlugin_Extrusion::ID();
50 /// Creates a new part document if needed
51 FEATURESPLUGIN_EXPORT virtual void execute();
53 /// Request for initialization of data model of the feature: adding all attributes
54 FEATURESPLUGIN_EXPORT virtual void initAttributes();
56 /// Use plugin manager for features creation
57 FeaturesPlugin_Extrusion();
59 /// Load Naming data structure of the feature to the document
60 void LoadNamingDS(GeomAlgoAPI_Extrusion& theFeature, std::shared_ptr<ModelAPI_ResultBody> theResultBody,
61 std::shared_ptr<GeomAPI_Shape> theBasis,
62 std::shared_ptr<GeomAPI_Shape> theContext);