1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
3 // File: FeaturesAPI_Rotation.h
4 // Created: 07 June 2016
5 // Author: Dmitry Bobylev
7 #ifndef FeaturesAPI_Rotation_H_
8 #define FeaturesAPI_Rotation_H_
10 #include "FeaturesAPI.h"
12 #include <FeaturesPlugin_Rotation.h>
14 #include <ModelHighAPI_Interface.h>
15 #include <ModelHighAPI_Macro.h>
17 class ModelHighAPI_Double;
18 class ModelHighAPI_Dumper;
19 class ModelHighAPI_Selection;
21 /// \class FeaturesAPI_Rotation
22 /// \ingroup CPPHighAPI
23 /// \brief Interface for Rotation feature.
24 class FeaturesAPI_Rotation: public ModelHighAPI_Interface
27 /// Constructor without values.
29 explicit FeaturesAPI_Rotation(const std::shared_ptr<ModelAPI_Feature>& theFeature);
31 /// Constructor with values.
33 FeaturesAPI_Rotation(const std::shared_ptr<ModelAPI_Feature>& theFeature,
34 const std::list<ModelHighAPI_Selection>& theMainObjects,
35 const ModelHighAPI_Selection& theAxisObject,
36 const ModelHighAPI_Double& theAngle);
40 virtual ~FeaturesAPI_Rotation();
42 INTERFACE_3(FeaturesPlugin_Rotation::ID(),
43 mainObjects, FeaturesPlugin_Rotation::OBJECTS_LIST_ID(), ModelAPI_AttributeSelectionList, /** Main objects */,
44 axisObject, FeaturesPlugin_Rotation::AXIS_OBJECT_ID(), ModelAPI_AttributeSelection, /** Axis object */,
45 angle, FeaturesPlugin_Rotation::ANGLE_ID(), ModelAPI_AttributeDouble, /** Angle */)
49 void setMainObjects(const std::list<ModelHighAPI_Selection>& theMainObjects);
53 void setAxisObject(const ModelHighAPI_Selection& theAxisObject);
57 void setAngle(const ModelHighAPI_Double& theAngle);
59 /// Dump wrapped feature
61 virtual void dump(ModelHighAPI_Dumper& theDumper) const;
64 /// Pointer on Rotation object.
65 typedef std::shared_ptr<FeaturesAPI_Rotation> RotationPtr;
67 /// \ingroup CPPHighAPI
68 /// \brief Create Rotation feature.
70 RotationPtr addRotation(const std::shared_ptr<ModelAPI_Document>& thePart,
71 const std::list<ModelHighAPI_Selection>& theMainObjects,
72 const ModelHighAPI_Selection& theAxisObject,
73 const ModelHighAPI_Double& theAngle);
75 #endif // FeaturesAPI_Rotation_H_