1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: GeomAlgoAPI_Revolution.h
4 // Created: 12 May 2015
5 // Author: Dmitry Bobylev
7 #ifndef GeomAlgoAPI_Revolution_H_
8 #define GeomAlgoAPI_Revolution_H_
10 #include <GeomAlgoAPI.h>
11 #include <GeomAlgoAPI_MakeSweep.h>
12 #include <GeomAPI_Ax1.h>
14 /// \class GeomAlgoAPI_Revolution
16 /// \brief Allows to create the revolution based on a given face, angles and bounding planes.
17 /// \n Note that only the planar faces are allowed as bounding faces and resulting
18 /// revolution will be bounded by the infinite planes taken from the faces.
19 /// \n If the bounding plane was specified with the angle then this plane will be rotated around
20 /// the axis to the value of the angle.
21 /// \n Note that algorithm return only one solid object. So in case when after cutting with bounding
22 /// planes algorithm got more than one solid it will return the closest to the center of mass of
24 class GeomAlgoAPI_Revolution : public GeomAlgoAPI_MakeSweep
27 /// \brief Creates revolution for the given shape.
28 /// \param[in] theBaseShape face for revolution.
29 /// \param[in] theAxis axis for revolution.
30 /// \param[in] theToAngle to angle.
31 /// \param[in] theFromAngle from angle.
32 GEOMALGOAPI_EXPORT GeomAlgoAPI_Revolution(std::shared_ptr<GeomAPI_Shape> theBaseShape,
33 std::shared_ptr<GeomAPI_Ax1> theAxis,
37 /// \brief Creates revolution for the given shape.
38 /// \param[in] theBaseShape face for revolution.
39 /// \param[in] theAxis axis for revolution.
40 /// \param[in] theToShape to bounding shape. Can be empty. In this case offset will be applied to the basis.
41 /// \param[in] theToAngle to angle.
42 /// \param[in] theFromShape from bounding shape. Can be empty. In this case offset will be applied to the basis.
43 /// \param[in] theFromAngle from angle.
44 GEOMALGOAPI_EXPORT GeomAlgoAPI_Revolution(std::shared_ptr<GeomAPI_Shape> theBaseShape,
45 std::shared_ptr<GeomAPI_Ax1> theAxis,
46 std::shared_ptr<GeomAPI_Shape> theToShape,
48 std::shared_ptr<GeomAPI_Shape> theFromShape,
52 /// Builds resulting shape.
53 void build(const std::shared_ptr<GeomAPI_Shape>& theBaseShape,
54 const std::shared_ptr<GeomAPI_Ax1>& theAxis,
55 const std::shared_ptr<GeomAPI_Shape>& theToShape,
57 const std::shared_ptr<GeomAPI_Shape>& theFromShape,