X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGeomAlgoAPI%2FGeomAlgoAPI_Translation.h;h=8f27aaa6f6ce073ec9b80efda19b7c5388cffab6;hb=f0cec241aae9ca16d86e166f45cb5c4987d2c792;hp=95f9c55f7801e1a1767c4753fc828d9000bc55fb;hpb=fbfcc4fd956a374c8d380c2da280c61eaa57bcfd;p=modules%2Fshaper.git diff --git a/src/GeomAlgoAPI/GeomAlgoAPI_Translation.h b/src/GeomAlgoAPI/GeomAlgoAPI_Translation.h index 95f9c55f7..8f27aaa6f 100644 --- a/src/GeomAlgoAPI/GeomAlgoAPI_Translation.h +++ b/src/GeomAlgoAPI/GeomAlgoAPI_Translation.h @@ -9,65 +9,29 @@ #include #include + #include -#include #include -#include -/** \class GeomAlgoAPI_Translation - * \ingroup DataAlgo - * \brief Creates a copy of the object by moving it along the axis. - */ -class GeomAlgoAPI_Translation : public GeomAPI_Interface +/// \class GeomAlgoAPI_Translation +/// \ingroup DataAlgo +/// \brief Creates a copy of the object by moving it along the axis. +class GeomAlgoAPI_Translation : public GeomAlgoAPI_MakeShape { public: - /** \brief Creates an object which is obtained from current object by moving it along the axis. - * \param[in] theSourceShape a shape to be moved. - * \param[in] theAxis movement axis. - * \param[in] theDistance movement distance. - * \param[in] theSimpleTransform makes just transformation of shape without changing of topology or geometry - */ + /// \brief Creates an object which is obtained from current object by moving it along the axis. + /// \param[in] theSourceShape a shape to be moved. + /// \param[in] theAxis movement axis. + /// \param[in] theDistance movement distance. GEOMALGOAPI_EXPORT GeomAlgoAPI_Translation(std::shared_ptr theSourceShape, - std::shared_ptr theAxis, - double theDistance, - bool theSimpleTransform = false); - - /// \return true if algorithm succeed. - GEOMALGOAPI_EXPORT const bool isDone() const - { return myDone; } - - /// \return true if resulting shape is valid. - GEOMALGOAPI_EXPORT const bool isValid() const; - - /// \return true if resulting shape has volume. - GEOMALGOAPI_EXPORT const bool hasVolume() const; - - /// \return result of the movement algorithm. - GEOMALGOAPI_EXPORT const std::shared_ptr& shape() const; - - /// \return map of sub-shapes of the result. To be used for History keeping. - GEOMALGOAPI_EXPORT std::shared_ptr mapOfShapes() const; - - /// \return interface for for History processing. - GEOMALGOAPI_EXPORT std::shared_ptr makeShape() const; - - /// Returns the simple transformation - GEOMALGOAPI_EXPORT std::shared_ptr transformation() const; + std::shared_ptr theAxis, + double theDistance); private: /// Builds resulting shape. void build(std::shared_ptr theSourceShape, std::shared_ptr theAxis, - double theDistance, - bool theSimpleTransform); - -private: - /// Fields. - bool myDone; - std::shared_ptr myShape; - std::shared_ptr myMap; - std::shared_ptr myMkShape; - std::shared_ptr myTrsf; ///< transformation of the shape in case theSimpleTransform + double theDistance); }; #endif