]> SALOME platform Git repositories - modules/shaper.git/blob - src/SketchAPI/SketchAPI_Rotation.h
Salome HOME
Merge branch 'master' into cgt/devCEA
[modules/shaper.git] / src / SketchAPI / SketchAPI_Rotation.h
1 // Copyright (C) 2014-2017  CEA/DEN, EDF R&D
2 //
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
7 //
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 //
17 // See http://www.salome-platform.org/ or
18 // email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
19 //
20
21 #ifndef SRC_SKETCHAPI_SKETCHAPI_ROTATION_H_
22 #define SRC_SKETCHAPI_SKETCHAPI_ROTATION_H_
23
24 //--------------------------------------------------------------------------------------
25 #include "SketchAPI.h"
26 #include "SketchAPI_SketchEntity.h"
27
28 #include <list>
29
30 #include <SketchPlugin_MultiRotation.h>
31
32 #include <ModelHighAPI_Interface.h>
33 #include <ModelHighAPI_Macro.h>
34 //--------------------------------------------------------------------------------------
35 class ModelAPI_Object;
36 class ModelHighAPI_Double;
37 class ModelHighAPI_Integer;
38 class ModelHighAPI_RefAttr;
39 //--------------------------------------------------------------------------------------
40 /**\class SketchAPI_Rotation
41  * \ingroup CPPHighAPI
42  * \brief Interface for Rotation feature
43  */
44 class SketchAPI_Rotation : public ModelHighAPI_Interface
45 {
46 public:
47   /// Constructor without values
48   SKETCHAPI_EXPORT
49   explicit SketchAPI_Rotation(const std::shared_ptr<ModelAPI_Feature> & theFeature);
50   /// Constructor with values
51   SKETCHAPI_EXPORT
52   SketchAPI_Rotation(const std::shared_ptr<ModelAPI_Feature> & theFeature,
53                      const std::list<std::shared_ptr<ModelAPI_Object> > & theObjects,
54                      const ModelHighAPI_RefAttr & theCenter,
55                      const ModelHighAPI_Double & theAngle,
56                      const ModelHighAPI_Integer & theNumberOfObjects,
57                      bool theFullValue = false);
58   /// Destructor
59   SKETCHAPI_EXPORT
60   virtual ~SketchAPI_Rotation();
61
62   INTERFACE_7(SketchPlugin_MultiRotation::ID(),
63               rotationList, SketchPlugin_MultiRotation::ROTATION_LIST_ID(),
64               ModelAPI_AttributeRefList, /** Rotation list */,
65               center, SketchPlugin_MultiRotation::CENTER_ID(),
66               ModelAPI_AttributeRefAttr, /** Center */,
67               angle, SketchPlugin_MultiRotation::ANGLE_ID(),
68               ModelAPI_AttributeDouble, /** Angle */,
69               numberOfObjects, SketchPlugin_MultiRotation::NUMBER_OF_OBJECTS_ID(),
70               ModelAPI_AttributeInteger, /** Number of objects */,
71               valueType, SketchPlugin_MultiRotation::ANGLE_TYPE(),
72               ModelAPI_AttributeString, /** Value type */,
73               referenceObjects, SketchPlugin_MultiRotation::ENTITY_A(),
74               ModelAPI_AttributeRefList, /** Reference objects */,
75               rotatedObjects, SketchPlugin_MultiRotation::ENTITY_B(),
76               ModelAPI_AttributeRefList, /** Rotated objects */
77   )
78
79   /// List of rotated objects
80   SKETCHAPI_EXPORT
81   std::list<std::shared_ptr<SketchAPI_SketchEntity> > rotated() const;
82
83   /// Dump wrapped feature
84   virtual void dump(ModelHighAPI_Dumper& theDumper) const;
85 };
86
87 //! Pointer on Rotation object
88 typedef std::shared_ptr<SketchAPI_Rotation> RotationPtr;
89
90 //--------------------------------------------------------------------------------------
91 //--------------------------------------------------------------------------------------
92 #endif /* SRC_SKETCHAPI_SKETCHAPI_ROTATION_H_ */