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);
38 /// Constructor with values.
40 FeaturesAPI_Rotation(const std::shared_ptr<ModelAPI_Feature>& theFeature,
41 const std::list<ModelHighAPI_Selection>& theMainObjects,
42 const ModelHighAPI_Selection& theCenterPoint,
43 const ModelHighAPI_Selection& theStartPoint,
44 const ModelHighAPI_Selection& theEndPoint);
48 virtual ~FeaturesAPI_Rotation();
50 INTERFACE_7(FeaturesPlugin_Rotation::ID(),
51 creationMethod, FeaturesPlugin_Rotation::CREATION_METHOD(),
52 ModelAPI_AttributeString, /** Creation method */,
53 mainObjects, FeaturesPlugin_Rotation::OBJECTS_LIST_ID(),
54 ModelAPI_AttributeSelectionList, /** Main objects */,
55 axisObject, FeaturesPlugin_Rotation::AXIS_OBJECT_ID(),
56 ModelAPI_AttributeSelection, /** Axis object */,
57 angle, FeaturesPlugin_Rotation::ANGLE_ID(),
58 ModelAPI_AttributeDouble, /** Angle */,
59 centerPoint, FeaturesPlugin_Rotation::CENTER_POINT_ID(),
60 ModelAPI_AttributeSelection, /** Center point */,
61 startPoint, FeaturesPlugin_Rotation::START_POINT_ID(),
62 ModelAPI_AttributeSelection, /** Start point */,
63 endPoint, FeaturesPlugin_Rotation::END_POINT_ID(),
64 ModelAPI_AttributeSelection, /** End point */
69 void setMainObjects(const std::list<ModelHighAPI_Selection>& theMainObjects);
73 void setAxisObject(const ModelHighAPI_Selection& theAxisObject);
77 void setAngle(const ModelHighAPI_Double& theAngle);
79 /// Set center point, start point and end point
81 void setPoints(const ModelHighAPI_Selection& theCenterPoint,
82 const ModelHighAPI_Selection& theStartPoint,
83 const ModelHighAPI_Selection& theEndPoint);
85 /// Dump wrapped feature
87 virtual void dump(ModelHighAPI_Dumper& theDumper) const;
90 /// Pointer on Rotation object.
91 typedef std::shared_ptr<FeaturesAPI_Rotation> RotationPtr;
93 /// \ingroup CPPHighAPI
94 /// \brief Create Rotation feature.
96 RotationPtr addRotation(const std::shared_ptr<ModelAPI_Document>& thePart,
97 const std::list<ModelHighAPI_Selection>& theMainObjects,
98 const ModelHighAPI_Selection& theAxisObject,
99 const ModelHighAPI_Double& theAngle);
101 /// \ingroup CPPHighAPI
102 /// \brief Create Rotation feature.
104 RotationPtr addRotation(const std::shared_ptr<ModelAPI_Document>& thePart,
105 const std::list<ModelHighAPI_Selection>& theMainObjects,
106 const ModelHighAPI_Selection& theCenterPoint,
107 const ModelHighAPI_Selection& theStartPoint,
108 const ModelHighAPI_Selection& theEndPoint);
110 #endif // FeaturesAPI_Rotation_H_