1 // Copyright (C) 2014-2020 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 email : webmaster.salome@opencascade.com
20 #ifndef SRC_SKETCHAPI_SKETCHAPI_ROTATION_H_
21 #define SRC_SKETCHAPI_SKETCHAPI_ROTATION_H_
23 //--------------------------------------------------------------------------------------
24 #include "SketchAPI.h"
25 #include "SketchAPI_SketchEntity.h"
29 #include <SketchPlugin_MultiRotation.h>
31 #include <ModelHighAPI_Interface.h>
32 #include <ModelHighAPI_Macro.h>
33 //--------------------------------------------------------------------------------------
34 class ModelAPI_Object;
35 class ModelHighAPI_Double;
36 class ModelHighAPI_Integer;
37 class ModelHighAPI_RefAttr;
38 //--------------------------------------------------------------------------------------
39 /**\class SketchAPI_Rotation
41 * \brief Interface for Rotation feature
43 class SketchAPI_Rotation : public ModelHighAPI_Interface
46 /// Constructor without values
48 explicit SketchAPI_Rotation(const std::shared_ptr<ModelAPI_Feature> & theFeature);
49 /// Constructor with values
51 SketchAPI_Rotation(const std::shared_ptr<ModelAPI_Feature> & theFeature,
52 const std::list<std::shared_ptr<ModelAPI_Object> > & theObjects,
53 const ModelHighAPI_RefAttr & theCenter,
54 const ModelHighAPI_Double & theAngle,
55 const ModelHighAPI_Integer & theNumberOfObjects,
56 bool theFullValue = false,
57 bool theReversed = false);
60 virtual ~SketchAPI_Rotation();
62 INTERFACE_8(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 reversed, SketchPlugin_MultiRotation::REVERSED_ID(),
70 ModelAPI_AttributeBoolean, /** Negative angle */,
71 numberOfObjects, SketchPlugin_MultiRotation::NUMBER_OF_OBJECTS_ID(),
72 ModelAPI_AttributeInteger, /** Number of objects */,
73 valueType, SketchPlugin_MultiRotation::ANGLE_TYPE(),
74 ModelAPI_AttributeString, /** Value type */,
75 referenceObjects, SketchPlugin_MultiRotation::ENTITY_A(),
76 ModelAPI_AttributeRefList, /** Reference objects */,
77 rotatedObjects, SketchPlugin_MultiRotation::ENTITY_B(),
78 ModelAPI_AttributeRefList, /** Rotated objects */
81 /// Set list of objects to be rotated
83 void setRotationList(const std::list<std::shared_ptr<ModelAPI_Object> >& theObjects);
85 /// List of rotated objects.
86 /// [DEPRECATED]: use rotatedList() instead.
88 std::list<std::shared_ptr<SketchAPI_SketchEntity> > rotated() const;
90 /// List of rotated objects.
92 std::list<std::shared_ptr<SketchAPI_SketchEntity> > rotatedList() const;
94 /// Dump wrapped feature
95 virtual void dump(ModelHighAPI_Dumper& theDumper) const;
98 //! Pointer on Rotation object
99 typedef std::shared_ptr<SketchAPI_Rotation> RotationPtr;
101 //--------------------------------------------------------------------------------------
102 //--------------------------------------------------------------------------------------
103 #endif /* SRC_SKETCHAPI_SKETCHAPI_ROTATION_H_ */