-// Copyright (C) 2014-2019 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2023 CEA, EDF
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
#ifndef GEOMALGOAPI_SCALE_H_
#define GEOMALGOAPI_SCALE_H_
-#include <GeomAlgoAPI_MakeShape.h>
+#include <GeomAlgoAPI.h>
+#include <GeomAlgoAPI_Transform.h>
-#include <GeomAPI_Pnt.h>
+class GeomAPI_Pnt;
/// \class GeomAlgoAPI_Scale
/// \ingroup DataAlgo
/// \brief Creates a copy of the object by performing a scale operation by a factor or
/// by dimensions.
-class GeomAlgoAPI_Scale : public GeomAlgoAPI_MakeShape
+class GeomAlgoAPI_Scale : public GeomAlgoAPI_Transform
{
public:
- /// Type of scale operation
- enum MethodType {
- BY_FACTOR, ///< Scale by factor.
- BY_DIMENSIONS, ///< Scale by dimensions.
- };
-
/// \brief Creates an object which is obtained from current object by performing
/// a scale operation by a factor.
/// \param[in] theSourceShape the shape to be moved.
double theScaleFactorY,
double theScaleFactorZ);
- /// Checks if data for the scale transform is OK.
- GEOMALGOAPI_EXPORT bool check();
-
- /// Execute the scale transform.
- GEOMALGOAPI_EXPORT void build();
-
private:
- MethodType myMethodType; /// Type of method used.
- std::shared_ptr<GeomAPI_Shape> mySourceShape; /// Shape to be moved.
- std::shared_ptr<GeomAPI_Pnt> myCenterPoint; /// Center point.
- double myScaleFactor; /// Scale factor.
- double myScaleFactorX; /// Scale factor in X.
- double myScaleFactorY; /// Scale factor in Y.
- double myScaleFactorZ; /// Scale factor in Z.
-
- void buildByFactor();
- void buildByDimensions();
+ void buildByDimensions(std::shared_ptr<GeomAPI_Shape> theSourceShape,
+ std::shared_ptr<GeomAPI_Pnt> theCenterPoint,
+ double theScaleFactorX,
+ double theScaleFactorY,
+ double theScaleFactorZ);
};
#endif // GEOMALGOAPI_SCALE_H_
\ No newline at end of file