X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGeomAlgoAPI%2FGeomAlgoAPI_Prism.h;h=f286e6970ebcedbfc9f66d9af11289748a1db3ea;hb=e014b807fc2f417db0092b2faf4d89a8ca50eea4;hp=642ff9b305f064acd07f01a3cf67724506a1ca2a;hpb=8030eb14e6863867336c9d09653db64c1c5a4db8;p=modules%2Fshaper.git diff --git a/src/GeomAlgoAPI/GeomAlgoAPI_Prism.h b/src/GeomAlgoAPI/GeomAlgoAPI_Prism.h index 642ff9b30..f286e6970 100644 --- a/src/GeomAlgoAPI/GeomAlgoAPI_Prism.h +++ b/src/GeomAlgoAPI/GeomAlgoAPI_Prism.h @@ -9,81 +9,45 @@ #include #include -#include -#include +#include + #include -/** \class GeomAlgoAPI_Prism - * \ingroup DataAlgo - * \brief Allows to create the prism based on a given face and bounding planes. - * \n Note that only planar faces are allowed as bounding faces and resulting - * extrusion will be bounded by the infinite planes taken from the faces. - */ -class GeomAlgoAPI_Prism : public GeomAPI_Interface +/// \class GeomAlgoAPI_Prism +/// \ingroup DataAlgo +/// \brief Allows to create the prism based on a given face and bounding planes. +/// \n Note that only planar faces are allowed as bounding faces and resulting +/// extrusion will be bounded by the infinite planes taken from the faces. +class GeomAlgoAPI_Prism : public GeomAlgoAPI_MakeSweep { public: - /** \brief Creates extrusion for the given shape along the normal for this shape. - * \param[in] theBasis face or wire to be extruded. - * \param[in] theFromSize offset for "from" plane. - * \param[in] theToSize offset for "to" plane. - */ - GEOMALGOAPI_EXPORT GeomAlgoAPI_Prism(std::shared_ptr theBasis, - double theFromSize, - double theToSize); - - /** \brief Creates extrusion for the given shape along the normal for this shape. - * \param[in] theBasis face or wire to be extruded. - * \param[in] theFromShape bottom bounding shape. Can be empty. In this case offset will be applied to the basis. - * \param[in] theFromSize offset for "from" plane. - * \param[in] theToShape top bounding shape. Can be empty. In this case offset will be applied to the basis. - * \param[in] theToSize offset for "to" plane. - */ - GEOMALGOAPI_EXPORT GeomAlgoAPI_Prism(std::shared_ptr theBasis, - std::shared_ptr theFromShape, - double theFromSize, + /// \brief Creates extrusion for the given shape along the normal for this shape. + /// \param[in] theBaseShape face or wire to be extruded. + /// \param[in] theToSize offset for "to" plane. + /// \param[in] theFromSize offset for "from" plane. + GEOMALGOAPI_EXPORT GeomAlgoAPI_Prism(std::shared_ptr theBaseShape, + double theToSize, + double theFromSize); + + /// \brief Creates extrusion for the given shape along the normal for this shape. + /// \param[in] theBaseShape face or wire to be extruded. + /// \param[in] theToShape top bounding shape. Can be empty. In this case offset will be applied to the basis. + /// \param[in] theToSize offset for "to" plane. + /// \param[in] theFromShape bottom bounding shape. Can be empty. In this case offset will be applied to the basis. + /// \param[in] theFromSize offset for "from" plane. + GEOMALGOAPI_EXPORT GeomAlgoAPI_Prism(std::shared_ptr theBaseShape, std::shared_ptr theToShape, - double theToSize); - - /// \return true if algorithm succeed. - GEOMALGOAPI_EXPORT bool isDone() const; - - /// \return true if resulting shape is valid. - GEOMALGOAPI_EXPORT bool isValid() const; - - /// \return true if resulting shape has volume. - GEOMALGOAPI_EXPORT bool hasVolume() const; - - /// \return result of the Prism algorithm. - GEOMALGOAPI_EXPORT std::shared_ptr shape() const; - - /// \returns the first shape. - GEOMALGOAPI_EXPORT std::shared_ptr firstShape() const; - - /// \return the last shape. - GEOMALGOAPI_EXPORT std::shared_ptr lastShape() 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 History processing. - GEOMALGOAPI_EXPORT std::shared_ptr makeShape() const; + double theToSize, + std::shared_ptr theFromShape, + double theFromSize); private: /// Builds resulting shape. - void build(const std::shared_ptr& theBasis, - const std::shared_ptr& theFromShape, - double theFromSize, + void build(const std::shared_ptr& theBaseShape, const std::shared_ptr& theToShape, - double theToSize); - -private: - /// Fields. - bool myDone; - std::shared_ptr myShape; - std::shared_ptr myFirst; - std::shared_ptr myLast; - std::shared_ptr myMap; - std::shared_ptr myMkShape; + double theToSize, + const std::shared_ptr& theFromShape, + double theFromSize); }; #endif