Salome HOME
13817ca369bbbaf997b14741396e2f68cc16ccb8
[modules/shaper.git] / src / SketchAPI / SketchAPI_Rotation.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2 // Name   : SketchAPI_Rotation.h
3 // Purpose:
4 //
5 // History:
6 // 16/06/16 - Sergey POKHODENKO - Creation of the file
7
8 #ifndef SRC_SKETCHAPI_SKETCHAPI_ROTATION_H_
9 #define SRC_SKETCHAPI_SKETCHAPI_ROTATION_H_
10
11 //--------------------------------------------------------------------------------------
12 #include "SketchAPI.h"
13
14 #include <list>
15
16 #include <SketchPlugin_MultiRotation.h>
17
18 #include <ModelHighAPI_Interface.h>
19 #include <ModelHighAPI_Macro.h>
20 //--------------------------------------------------------------------------------------
21 class ModelAPI_Object;
22 class ModelHighAPI_Double;
23 class ModelHighAPI_Integer;
24 class ModelHighAPI_RefAttr;
25 //--------------------------------------------------------------------------------------
26 /**\class SketchAPI_Rotation
27  * \ingroup CPPHighAPI
28  * \brief Interface for Rotation feature
29  */
30 class SketchAPI_Rotation : public ModelHighAPI_Interface
31 {
32 public:
33   /// Constructor without values
34   SKETCHAPI_EXPORT
35   explicit SketchAPI_Rotation(const std::shared_ptr<ModelAPI_Feature> & theFeature);
36   /// Constructor with values
37   SKETCHAPI_EXPORT
38   SketchAPI_Rotation(const std::shared_ptr<ModelAPI_Feature> & theFeature,
39                      const std::list<std::shared_ptr<ModelAPI_Object> > & theObjects,
40                      const ModelHighAPI_RefAttr & theCenter,
41                      const ModelHighAPI_Double & theAngle,
42                      const ModelHighAPI_Integer & theNumberOfObjects,
43                      bool theFullValue = false);
44   /// Destructor
45   SKETCHAPI_EXPORT
46   virtual ~SketchAPI_Rotation();
47
48   INTERFACE_7(SketchPlugin_MultiRotation::ID(),
49               rotationList, SketchPlugin_MultiRotation::ROTATION_LIST_ID(),
50               ModelAPI_AttributeRefList, /** Rotation list */,
51               center, SketchPlugin_MultiRotation::CENTER_ID(),
52               ModelAPI_AttributeRefAttr, /** Center */,
53               angle, SketchPlugin_MultiRotation::ANGLE_ID(),
54               ModelAPI_AttributeDouble, /** Angle */,
55               numberOfObjects, SketchPlugin_MultiRotation::NUMBER_OF_OBJECTS_ID(),
56               ModelAPI_AttributeInteger, /** Number of objects */,
57               valueType, SketchPlugin_MultiRotation::ANGLE_TYPE(),
58               ModelAPI_AttributeString, /** Value type */,
59               referenceObjects, SketchPlugin_MultiRotation::ENTITY_A(),
60               ModelAPI_AttributeRefList, /** Reference objects */,
61               rotatedObjects, SketchPlugin_MultiRotation::ENTITY_B(),
62               ModelAPI_AttributeRefList, /** Rotated objects */
63   )
64
65   /// List of rotated objects
66   SKETCHAPI_EXPORT
67   std::list<std::shared_ptr<ModelHighAPI_Interface> > rotated() const;
68
69   /// Dump wrapped feature
70   virtual void dump(ModelHighAPI_Dumper& theDumper) const;
71 };
72
73 //! Pointer on Rotation object
74 typedef std::shared_ptr<SketchAPI_Rotation> RotationPtr;
75
76 //--------------------------------------------------------------------------------------
77 //--------------------------------------------------------------------------------------
78 #endif /* SRC_SKETCHAPI_SKETCHAPI_ROTATION_H_ */