1 // Copyright (C) 2014-2017 CEA/DEN, EDF R&D
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.
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.
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
17 // See http://www.salome-platform.org/ or
18 // email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
21 #ifndef SRC_SKETCHAPI_SKETCHAPI_ROTATION_H_
22 #define SRC_SKETCHAPI_SKETCHAPI_ROTATION_H_
24 //--------------------------------------------------------------------------------------
25 #include "SketchAPI.h"
26 #include "SketchAPI_SketchEntity.h"
30 #include <SketchPlugin_MultiRotation.h>
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
42 * \brief Interface for Rotation feature
44 class SketchAPI_Rotation : public ModelHighAPI_Interface
47 /// Constructor without values
49 explicit SketchAPI_Rotation(const std::shared_ptr<ModelAPI_Feature> & theFeature);
50 /// Constructor with values
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 bool theReversed = false);
61 virtual ~SketchAPI_Rotation();
63 INTERFACE_8(SketchPlugin_MultiRotation::ID(),
64 rotationList, SketchPlugin_MultiRotation::ROTATION_LIST_ID(),
65 ModelAPI_AttributeRefList, /** Rotation list */,
66 center, SketchPlugin_MultiRotation::CENTER_ID(),
67 ModelAPI_AttributeRefAttr, /** Center */,
68 angle, SketchPlugin_MultiRotation::ANGLE_ID(),
69 ModelAPI_AttributeDouble, /** Angle */,
70 reversed, SketchPlugin_MultiRotation::REVERSED_ID(),
71 ModelAPI_AttributeBoolean, /** Negative angle */,
72 numberOfObjects, SketchPlugin_MultiRotation::NUMBER_OF_OBJECTS_ID(),
73 ModelAPI_AttributeInteger, /** Number of objects */,
74 valueType, SketchPlugin_MultiRotation::ANGLE_TYPE(),
75 ModelAPI_AttributeString, /** Value type */,
76 referenceObjects, SketchPlugin_MultiRotation::ENTITY_A(),
77 ModelAPI_AttributeRefList, /** Reference objects */,
78 rotatedObjects, SketchPlugin_MultiRotation::ENTITY_B(),
79 ModelAPI_AttributeRefList, /** Rotated objects */
82 /// List of rotated objects
84 std::list<std::shared_ptr<SketchAPI_SketchEntity> > rotated() const;
86 /// Dump wrapped feature
87 virtual void dump(ModelHighAPI_Dumper& theDumper) const;
90 //! Pointer on Rotation object
91 typedef std::shared_ptr<SketchAPI_Rotation> RotationPtr;
93 //--------------------------------------------------------------------------------------
94 //--------------------------------------------------------------------------------------
95 #endif /* SRC_SKETCHAPI_SKETCHAPI_ROTATION_H_ */