Salome HOME
GeomAlgoAPI_Translation now derived from GeomAlgoAPI_MakeShape
[modules/shaper.git] / src / GeomAlgoAPI / GeomAlgoAPI_Translation.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 // File:        GeomAlgoAPI_Translation.h
4 // Created:     8 June 2015
5 // Author:      Dmitry Bobylev
6
7 #ifndef GeomAlgoAPI_Translation_H_
8 #define GeomAlgoAPI_Translation_H_
9
10 #include <GeomAlgoAPI.h>
11 #include <GeomAlgoAPI_MakeShape.h>
12
13 #include <GeomAPI_Ax1.h>
14 #include <GeomAPI_Shape.h>
15
16 /// \class GeomAlgoAPI_Translation
17 /// \ingroup DataAlgo
18 /// \brief Creates a copy of the object by moving it along the axis.
19 class GeomAlgoAPI_Translation : public GeomAlgoAPI_MakeShape
20 {
21 public:
22   /// \brief Creates an object which is obtained from current object by moving it along the axis.
23   /// \param[in] theSourceShape  a shape to be moved.
24   /// \param[in] theAxis         movement axis.
25   /// \param[in] theDistance     movement distance.
26   GEOMALGOAPI_EXPORT GeomAlgoAPI_Translation(std::shared_ptr<GeomAPI_Shape> theSourceShape,
27                                              std::shared_ptr<GeomAPI_Ax1>   theAxis,
28                                              double                         theDistance);
29
30 private:
31   /// Builds resulting shape.
32   void build(std::shared_ptr<GeomAPI_Shape> theSourceShape,
33              std::shared_ptr<GeomAPI_Ax1>   theAxis,
34              double                         theDistance);
35 };
36
37 #endif