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 #ifndef GeomAlgoAPI_Rotation_H_
8 #define GeomAlgoAPI_Rotation_H_
10 #include <GeomAlgoAPI.h>
11 #include <GeomAlgoAPI_MakeShape.h>
12 #include <GeomAPI_Ax1.h>
13 #include <GeomAPI_DataMapOfShapeShape.h>
14 #include <GeomAPI_Shape.h>
16 /** \class GeomAlgoAPI_Rotation
18 * \brief Creates a copy of the object by rotating it around the axis.
20 class GeomAlgoAPI_Rotation : public GeomAPI_Interface
23 /** \brief Creates an object which is obtained from current object by rotating it around the axis.
24 * \param[in] theSourceShape a shape to be rotated.
25 * \param[in] theAxis rotation axis.
26 * \param[in] theAngle rotation angle(in degree).
27 * \param[in] theSimpleTransform makes just transformation of shape without changing of topology or geometry
29 GEOMALGOAPI_EXPORT GeomAlgoAPI_Rotation(std::shared_ptr<GeomAPI_Shape> theSourceShape,
30 std::shared_ptr<GeomAPI_Ax1> theAxis,
32 bool theSimpleTransform = false);
34 /// \return true if algorithm succeed.
35 GEOMALGOAPI_EXPORT const bool isDone() const
38 /// \return true if resulting shape is valid.
39 GEOMALGOAPI_EXPORT const bool isValid() const;
41 /// \return true if resulting shape has volume.
42 GEOMALGOAPI_EXPORT const bool hasVolume() const;
44 /// \return result of the rotation algorithm.
45 GEOMALGOAPI_EXPORT const std::shared_ptr<GeomAPI_Shape>& shape() const;
47 /// \return map of sub-shapes of the result. To be used for History keeping.
48 GEOMALGOAPI_EXPORT std::shared_ptr<GeomAPI_DataMapOfShapeShape> mapOfShapes() const;
50 /// \return interface for for History processing.
51 GEOMALGOAPI_EXPORT std::shared_ptr<GeomAlgoAPI_MakeShape> makeShape() const;
54 /// Builds resulting shape.
55 void build(std::shared_ptr<GeomAPI_Shape> theSourceShape,
56 std::shared_ptr<GeomAPI_Ax1> theAxis,
58 bool theSimpleTransform);
63 std::shared_ptr<GeomAPI_Shape> myShape;
64 std::shared_ptr<GeomAPI_DataMapOfShapeShape> myMap;
65 std::shared_ptr<GeomAlgoAPI_MakeShape> myMkShape;