1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: FeaturesPlugin_Rotation.h
4 // Created: 12 May 2015
5 // Author: Dmitry Bobylev
7 #ifndef FeaturesPlugin_Rotation_H_
8 #define FeaturesPlugin_Rotation_H_
10 #include <FeaturesPlugin.h>
12 #include <ModelAPI_Feature.h>
14 /** \class FeaturesPlugin_Rotation
16 * \brief Feature for creation of revolution from the planar face.
17 * Revolution creates the lateral faces based on edges of the base face and
18 * the start and end faces and/or start and end angles.
20 class FeaturesPlugin_Rotation : public ModelAPI_Feature
24 inline static const std::string& ID()
26 static const std::string MY_REVOLUTION_ID("Rotation");
27 return MY_REVOLUTION_ID;
30 /// Attribute name of references sketch entities list, it should contain a sketch result or
31 /// a pair a sketch result to sketch face.
32 inline static const std::string& LIST_ID()
34 static const std::string MY_GROUP_LIST_ID("base");
35 return MY_GROUP_LIST_ID;
38 /// Attribute name of an object to which the extrusion grows.
39 inline static const std::string& AXIS_OBJECT_ID()
41 static const std::string MY_TO_OBJECT_ID("axis_object");
42 return MY_TO_OBJECT_ID;
45 /// Attribute name of revolution angle.
46 inline static const std::string& ANGLE_ID()
48 static const std::string MY_TO_ANGLE_ID("angle");
49 return MY_TO_ANGLE_ID;
52 /// \return the kind of a feature.
53 FEATURESPLUGIN_EXPORT virtual const std::string& getKind()
55 static std::string MY_KIND = FeaturesPlugin_Rotation::ID();
59 /// Creates a new part document if needed.
60 FEATURESPLUGIN_EXPORT virtual void execute();
62 /// Request for initialization of data model of the feature: adding all attributes.
63 FEATURESPLUGIN_EXPORT virtual void initAttributes();
65 /// Use plugin manager for features creation.
66 FeaturesPlugin_Rotation();