X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGeomAlgoAPI%2FGeomAlgoAPI_Extrusion.h;h=0ac301469147eac039cbb5b2b724a65b3cb3fc15;hb=55c9a4558cec9e3e781a0e0bc66f9d0bf418a611;hp=03d704d5dd6a4fdafe5276f845d0b4b16c5f924b;hpb=d9db5498b576854aae37ddf8c0bb6fceb264712e;p=modules%2Fshaper.git diff --git a/src/GeomAlgoAPI/GeomAlgoAPI_Extrusion.h b/src/GeomAlgoAPI/GeomAlgoAPI_Extrusion.h index 03d704d5d..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,65 +10,64 @@ #include #include #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 */ -class GEOMALGOAPI_EXPORT GeomAlgoAPI_Extrusion +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_Extrusion (boost::shared_ptr theBasis, double theSize); + GEOMALGOAPI_EXPORT GeomAlgoAPI_Extrusion (std::shared_ptr theBasis, double theSize); /// Returns True if algorithm succeed - const bool isDone() const; + GEOMALGOAPI_EXPORT const bool isDone() const; /// Returns True if resulting shape is valid - const bool isValid() const; + GEOMALGOAPI_EXPORT const bool isValid() const; /// Returns True if resulting shape has volume - const bool hasVolume() const; + GEOMALGOAPI_EXPORT const bool hasVolume() const; /// Returns result of the Extrusion algorithm which may be a Solid or a Face - const boost::shared_ptr& shape () const; - - /// Returns list of shapes generated from theShape - const ListOfShape& generated(const boost::shared_ptr theShape); + GEOMALGOAPI_EXPORT const std::shared_ptr& shape () const; /// Returns the first shape - const boost::shared_ptr& firstShape(); + GEOMALGOAPI_EXPORT const std::shared_ptr& firstShape(); /// returns last shape - 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(); - - BRepPrimAPI_MakePrism * myBuilder; - TopoDS_Shape myBasis; + void build(const std::shared_ptr& theBasis); + /// fields double mySize; bool myDone; - TopoDS_Shape myResult; - ListOfShape myHistory; - 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