SHAPER 9.16.0
SketchAPI_Rotation.h
1// Copyright (C) 2014-2026 CEA, EDF
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 email : webmaster.salome@opencascade.com
18//
19
20#ifndef SRC_SKETCHAPI_SKETCHAPI_ROTATION_H_
21#define SRC_SKETCHAPI_SKETCHAPI_ROTATION_H_
22
23//--------------------------------------------------------------------------------------
24#include "SketchAPI.h"
25#include "SketchAPI_SketchEntity.h"
26
27#include <list>
28
29#include <SketchPlugin_MultiRotation.h>
30
31#include <ModelHighAPI_Interface.h>
32#include <ModelHighAPI_Macro.h>
33//--------------------------------------------------------------------------------------
34class ModelAPI_Object;
38//--------------------------------------------------------------------------------------
44{
45public:
47 SKETCHAPI_EXPORT
48 explicit SketchAPI_Rotation(const std::shared_ptr<ModelAPI_Feature> & theFeature);
50 SKETCHAPI_EXPORT
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);
59 SKETCHAPI_EXPORT
60 virtual ~SketchAPI_Rotation();
61
79 )
80
81
82 SKETCHAPI_EXPORT
83 void setRotationList(const std::list<std::shared_ptr<ModelAPI_Object> >& theObjects);
84
87 SKETCHAPI_EXPORT
88 std::list<std::shared_ptr<SketchAPI_SketchEntity> > rotated() const;
89
91 SKETCHAPI_EXPORT
92 std::list<std::shared_ptr<SketchAPI_SketchEntity> > rotatedList() const;
93
95 virtual void dump(ModelHighAPI_Dumper& theDumper) const;
96};
97
99typedef std::shared_ptr<SketchAPI_Rotation> RotationPtr;
100
101//--------------------------------------------------------------------------------------
102//--------------------------------------------------------------------------------------
103#endif /* SRC_SKETCHAPI_SKETCHAPI_ROTATION_H_ */
Attribute that contains boolean value.
Definition: ModelAPI_AttributeBoolean.h:31
Attribute that contains real value with double precision.
Definition: ModelAPI_AttributeDouble.h:34
API for the attribute that contains integer (int).
Definition: ModelAPI_AttributeInteger.h:34
Attribute that contains reference to an attribute of a feature or reference to a feature (switchable)
Definition: ModelAPI_AttributeRefAttr.h:33
Attribute that contains list of references to features (located in the same document).
Definition: ModelAPI_AttributeRefList.h:33
API for the attribute that contains std (null terminated) string.
Definition: ModelAPI_AttributeString.h:33
Represents any object in the data model and in the object browser.
Definition: ModelAPI_Object.h:45
Class for filling ModelAPI_AttributeDouble.
Definition: ModelHighAPI_Double.h:37
Dump engine for the model.
Definition: ModelHighAPI_Dumper.h:81
Class for filling ModelAPI_AttributeInteger.
Definition: ModelHighAPI_Integer.h:36
Base class for feature interfaces.
Definition: ModelHighAPI_Interface.h:46
Class for filling ModelAPI_AttributeRefAttr.
Definition: ModelHighAPI_RefAttr.h:41
Interface for Rotation feature.
Definition: SketchAPI_Rotation.h:44
virtual std::shared_ptr< ModelAPI_AttributeRefAttr > center() const
Center.
Definition: SketchAPI_Rotation.h:79
virtual std::shared_ptr< ModelAPI_AttributeInteger > numberOfObjects() const
Number of objects.
Definition: SketchAPI_Rotation.h:79
virtual std::shared_ptr< ModelAPI_AttributeRefList > rotatedObjects() const
Rotated objects.
Definition: SketchAPI_Rotation.h:79
virtual std::shared_ptr< ModelAPI_AttributeRefList > referenceObjects() const
Reference objects.
Definition: SketchAPI_Rotation.h:79
std::list< std::shared_ptr< SketchAPI_SketchEntity > > rotatedList() const
List of rotated objects.
Definition: SketchAPI_Rotation.cpp:83
virtual std::shared_ptr< ModelAPI_AttributeDouble > angle() const
Angle.
Definition: SketchAPI_Rotation.h:79
virtual std::shared_ptr< ModelAPI_AttributeRefList > rotationList() const
Rotation list.
Definition: SketchAPI_Rotation.h:79
virtual void dump(ModelHighAPI_Dumper &theDumper) const
Dump wrapped feature.
Definition: SketchAPI_Rotation.cpp:105
virtual std::shared_ptr< ModelAPI_AttributeString > valueType() const
Value type.
Definition: SketchAPI_Rotation.h:79
virtual ~SketchAPI_Rotation()
Destructor.
Definition: SketchAPI_Rotation.cpp:56
virtual std::shared_ptr< ModelAPI_AttributeBoolean > reversed() const
Negative angle.
Definition: SketchAPI_Rotation.h:79
SketchAPI_Rotation(const std::shared_ptr< ModelAPI_Feature > &theFeature)
Constructor without values.
Definition: SketchAPI_Rotation.cpp:28
std::list< std::shared_ptr< SketchAPI_SketchEntity > > rotated() const
List of rotated objects.
Definition: SketchAPI_Rotation.cpp:68
void setRotationList(const std::list< std::shared_ptr< ModelAPI_Object > > &theObjects)
Set list of objects to be rotated.
Definition: SketchAPI_Rotation.cpp:61
Base class for Sketch feature interfaces.
Definition: SketchAPI_SketchEntity.h:38
static const std::string & ENTITY_A()
First entity for the constraint.
Definition: SketchPlugin_Constraint.h:58
static const std::string & ENTITY_B()
Second entity for the constraint.
Definition: SketchPlugin_Constraint.h:64
static const std::string & REVERSED_ID()
Name of the flag to reverse rotation.
Definition: SketchPlugin_MultiRotation.h:90
static const std::string & NUMBER_OF_OBJECTS_ID()
Total number of objects, initial and translated objects.
Definition: SketchPlugin_MultiRotation.h:83
static const std::string & ANGLE_TYPE()
attribute name for first point
Definition: SketchPlugin_MultiRotation.h:69
static const std::string & ROTATION_LIST_ID()
List of objects to be mirrored.
Definition: SketchPlugin_MultiRotation.h:56
static const std::string & ANGLE_ID()
End point of translation.
Definition: SketchPlugin_MultiRotation.h:76
static const std::string & CENTER_ID()
Center of rotation.
Definition: SketchPlugin_MultiRotation.h:63
static const std::string & ID()
Multi-rotation kind.
Definition: SketchPlugin_MultiRotation.h:43