X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGeomAlgoAPI%2FGeomAlgoAPI_Extrusion.h;h=0ac301469147eac039cbb5b2b724a65b3cb3fc15;hb=55c9a4558cec9e3e781a0e0bc66f9d0bf418a611;hp=bebeb35f5cdbb70df4b18946f26dcbfb6ae1137a;hpb=61da4e89d2ec63daa429d304f928482a0e6fa0b7;p=modules%2Fshaper.git diff --git a/src/GeomAlgoAPI/GeomAlgoAPI_Extrusion.h b/src/GeomAlgoAPI/GeomAlgoAPI_Extrusion.h index bebeb35f5..0ac301469 100644 --- a/src/GeomAlgoAPI/GeomAlgoAPI_Extrusion.h +++ b/src/GeomAlgoAPI/GeomAlgoAPI_Extrusion.h @@ -1,3 +1,5 @@ +// Copyright (C) 2014-20xx CEA/DEN, EDF R&D + // File: GeomAlgoAPI_Extrusion.h // Created: 22 October 2014 // Author: Sergey Zaritchny @@ -8,8 +10,10 @@ #include #include #include -#include -#include +#include +#include +#include + /**\class GeomAlgoAPI_Extrusion * \ingroup DataAlgo * \brief Allows to create the prism based on a given face and a direction @@ -20,16 +24,12 @@ class GeomAlgoAPI_Extrusion : public GeomAPI_Interface public: /* \brief Creates extrusion for the given shape along the normal for this shape - * \param[in] theShape face or wire to be extruded + * \param[in] theBasis face or wire to be extruded * \param[in] theSize the length of extrusion (if the value is less than 0, the extrusion in opposite normal) - * \return a solid or a face which is obtained from specified one - - static boost::shared_ptr makeExtrusion(boost::shared_ptr theResult, - boost::shared_ptr theBasis, - boost::shared_ptr theContext, - double theSize); */ + * \return a solid or a face/shell which is obtained from specified one + */ /// Constructor - GEOMALGOAPI_EXPORT GeomAlgoAPI_Extrusion (boost::shared_ptr theBasis, double theSize); + GEOMALGOAPI_EXPORT GeomAlgoAPI_Extrusion (std::shared_ptr theBasis, double theSize); /// Returns True if algorithm succeed GEOMALGOAPI_EXPORT const bool isDone() const; @@ -41,27 +41,33 @@ class GeomAlgoAPI_Extrusion : public GeomAPI_Interface GEOMALGOAPI_EXPORT const bool hasVolume() const; /// Returns result of the Extrusion algorithm which may be a Solid or a Face - GEOMALGOAPI_EXPORT const boost::shared_ptr& shape () const; - - /// Returns list of shapes generated from theShape - GEOMALGOAPI_EXPORT void generated(const boost::shared_ptr theShape, - ListOfShape& theHistory); + GEOMALGOAPI_EXPORT const std::shared_ptr& shape () const; /// Returns the first shape - GEOMALGOAPI_EXPORT const boost::shared_ptr& firstShape(); + GEOMALGOAPI_EXPORT const std::shared_ptr& firstShape(); /// returns last shape - GEOMALGOAPI_EXPORT const boost::shared_ptr& lastShape(); + GEOMALGOAPI_EXPORT const std::shared_ptr& lastShape(); + + /// Returns map of sub-shapes of the result. To be used for History keeping + GEOMALGOAPI_EXPORT void mapOfShapes (GeomAPI_DataMapOfShapeShape& theMap) const; + /// Return interface for for History processing + GEOMALGOAPI_EXPORT GeomAlgoAPI_MakeShape* makeShape () const; + + /// Destructor + GEOMALGOAPI_EXPORT ~GeomAlgoAPI_Extrusion(); private: /// builds resulting shape - void build(const boost::shared_ptr& theBasis); - + void build(const std::shared_ptr& theBasis); + /// fields double mySize; bool myDone; - boost::shared_ptr myShape; - boost::shared_ptr myFirst; - boost::shared_ptr myLast; + std::shared_ptr myShape; + std::shared_ptr myFirst; + std::shared_ptr myLast; + GeomAPI_DataMapOfShapeShape myMap; + GeomAlgoAPI_MakeShape * myMkShape; }; #endif