X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGeomAlgoAPI%2FGeomAlgoAPI_Scale.h;h=c0fbdc4c40cf16e7c9a6a4777cd233053175684c;hb=77ce6d35ac8d2f0fdaecb4f23e0870bf74e36103;hp=701f9e95beb252edfe2543f148629bdbaeac519a;hpb=7074394f8f08413d885f63be01df6bd5007b868c;p=modules%2Fshaper.git diff --git a/src/GeomAlgoAPI/GeomAlgoAPI_Scale.h b/src/GeomAlgoAPI/GeomAlgoAPI_Scale.h index 701f9e95b..c0fbdc4c4 100644 --- a/src/GeomAlgoAPI/GeomAlgoAPI_Scale.h +++ b/src/GeomAlgoAPI/GeomAlgoAPI_Scale.h @@ -1,4 +1,4 @@ -// Copyright (C) 2014-2017 CEA/DEN, EDF R&D +// Copyright (C) 2014-2024 CEA, EDF // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -12,32 +12,26 @@ // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // -// See http://www.salome-platform.org/ or -// email : webmaster.salome@opencascade.com +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // #ifndef GEOMALGOAPI_SCALE_H_ #define GEOMALGOAPI_SCALE_H_ -#include +#include +#include -#include +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. @@ -60,23 +54,12 @@ public: 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 mySourceShape; /// Shape to be moved. - std::shared_ptr 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 theSourceShape, + std::shared_ptr theCenterPoint, + double theScaleFactorX, + double theScaleFactorY, + double theScaleFactorZ); }; #endif // GEOMALGOAPI_SCALE_H_ \ No newline at end of file