Salome HOME
Merge remote-tracking branch 'origin/cgt/devCEA'
[modules/shaper.git] / src / GeomAlgoAPI / GeomAlgoAPI_Scale.h
1 // Copyright (C) 2014-201x CEA/DEN, EDF R&D
2
3 // File:        GeomAlgoAPI_Scale.h
4 // Created:     23 Jan 2017
5 // Author:      Clarisse Genrault (CEA)
6
7 #ifndef GEOMALGOAPI_SCALE_H_
8 #define GEOMALGOAPI_SCALE_H_
9
10 #include <GeomAlgoAPI_MakeShape.h>
11
12 #include <GeomAPI_Pnt.h>
13
14 /// \class GeomAlgoAPI_Scale
15 /// \ingroup DataAlgo
16 /// \brief Creates a copy of the object by performing a scale operation by a factor or
17 ///        by dimensions.
18 class GeomAlgoAPI_Scale : public GeomAlgoAPI_MakeShape
19 {
20 public:
21   /// \brief Creates an object which is obtained from current object by performing
22   ///        a scale operation by a factor.
23   /// \param[in] theSourceShape  the shape to be moved.
24   /// \param[in] theCenterPoint  the center point.
25   /// \param[in] theFactor       the scale factor.
26   GEOMALGOAPI_EXPORT GeomAlgoAPI_Scale(std::shared_ptr<GeomAPI_Shape> theSourceShape,
27                                        std::shared_ptr<GeomAPI_Pnt>   theCenterPoint,
28                                        double                         theScaleFactor);
29
30   /// Checks if data for the scale transform is OK.
31   GEOMALGOAPI_EXPORT bool check();
32
33   /// Execute the scale transform.
34   GEOMALGOAPI_EXPORT void build();
35
36 private:
37   std::shared_ptr<GeomAPI_Shape> mySourceShape; /// Shape to be moved.
38   std::shared_ptr<GeomAPI_Pnt> myCenterPoint; /// Center point.
39   double myScaleFactor; /// Scale factor.
40 };
41
42 #endif // GEOMALGOAPI_SCALE_H_