1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: GeomAlgoAPI_Rotation.h
4 // Created: 12 May 2015
5 // Author: Dmitry Bobylev
7 // Modified by Clarisse Genrault (CEA) : 03 Mar 2017
9 #ifndef GeomAlgoAPI_Rotation_H_
10 #define GeomAlgoAPI_Rotation_H_
12 #include <GeomAlgoAPI.h>
13 #include <GeomAlgoAPI_MakeShape.h>
15 #include <GeomAPI_Ax1.h>
16 #include <GeomAPI_Shape.h>
18 /// \class GeomAlgoAPI_Rotation
20 /// \brief Creates a copy of the object by rotating it around the axis.
21 class GeomAlgoAPI_Rotation : public GeomAlgoAPI_MakeShape
24 /// Type of rotation operation
26 BY_ANGLE, ///< Rotation by axis and an angle
27 BY_POINTS ///< Rotation by a center and two points
30 /// \brief Creates an object which is obtained from current object by rotating it around the axis
32 /// \param[in] theSourceShape a shape to be rotated.
33 /// \param[in] theAxis rotation axis.
34 /// \param[in] theAngle rotation angle(in degree).
35 GEOMALGOAPI_EXPORT GeomAlgoAPI_Rotation(std::shared_ptr<GeomAPI_Shape> theSourceShape,
36 std::shared_ptr<GeomAPI_Ax1> theAxis,
39 /// \brief Creates an object which is obtained from current object by rotating it around the axis
40 /// withe angle using the center and two points.
41 /// \param[in] theSourceShape a shape to be rotated.
42 /// \param[in] theCenterPoint center point.
43 /// \param[in] theStartPoint start point.
44 /// \param[in] theEndPoint end point.
45 GEOMALGOAPI_EXPORT GeomAlgoAPI_Rotation(std::shared_ptr<GeomAPI_Shape> theSourceShape,
46 std::shared_ptr<GeomAPI_Pnt> theCenterPoint,
47 std::shared_ptr<GeomAPI_Pnt> theStartPoint,
48 std::shared_ptr<GeomAPI_Pnt> theEndPoint);
50 /// Checks if data for the translation execution is OK.
51 GEOMALGOAPI_EXPORT bool check();
53 /// Execute the translation.
54 GEOMALGOAPI_EXPORT void build();
57 MethodType myMethodType; /// Type of method used.
58 std::shared_ptr<GeomAPI_Shape> mySourceShape; /// Shape to be rotated.
59 std::shared_ptr<GeomAPI_Ax1> myAxis; /// Rotation axis.
60 double myAngle; /// Rotation angle.
61 std::shared_ptr<GeomAPI_Pnt> myCenterPoint; /// Rotation center point.
62 std::shared_ptr<GeomAPI_Pnt> myStartPoint; /// Rotation start point.
63 std::shared_ptr<GeomAPI_Pnt> myEndPoint; /// Rotation end point.