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 #include <GeomAlgoAPI_Rotation.h>
16 /** \class FeaturesPlugin_Rotation
18 * \brief Feature for rotation objects around the axis.
20 class FeaturesPlugin_Rotation : public ModelAPI_Feature
24 inline static const std::string& ID()
26 static const std::string MY_ROTATION_ID("Rotation");
27 return MY_ROTATION_ID;
30 /// Attribute name of referenced objects.
31 inline static const std::string& OBJECTS_LIST_ID()
33 static const std::string MY_OBJECTS_LIST_ID("main_objects");
34 return MY_OBJECTS_LIST_ID;
37 /// Attribute name of an axis.
38 inline static const std::string& AXIS_OBJECT_ID()
40 static const std::string MY_AXIS_OBJECT_ID("axis_object");
41 return MY_AXIS_OBJECT_ID;
44 /// Attribute name of angle.
45 inline static const std::string& ANGLE_ID()
47 static const std::string MY_ANGLE_ID("angle");
51 /// \return the kind of a feature.
52 FEATURESPLUGIN_EXPORT virtual const std::string& getKind()
54 static std::string MY_KIND = FeaturesPlugin_Rotation::ID();
58 /// Creates a new part document if needed.
59 FEATURESPLUGIN_EXPORT virtual void execute();
61 /// Request for initialization of data model of the feature: adding all attributes.
62 FEATURESPLUGIN_EXPORT virtual void initAttributes();
64 /// Use plugin manager for features creation.
65 FeaturesPlugin_Rotation();
68 void LoadNamingDS(const GeomAlgoAPI_Rotation& theRotaionAlgo,
69 std::shared_ptr<ModelAPI_ResultBody> theResultBody,
70 std::shared_ptr<GeomAPI_Shape> theBaseShape);