X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGeomAlgoAPI%2FGeomAlgoAPI_MakeShape.h;h=6fc03c6f8683246ddfdfac6a95786288d024fa66;hb=f0cec241aae9ca16d86e166f45cb5c4987d2c792;hp=b5e40ef2439bc5c0fd97618c01c5ff7d133a671a;hpb=5315361b0c34c6e603474413024db5485c850d80;p=modules%2Fshaper.git diff --git a/src/GeomAlgoAPI/GeomAlgoAPI_MakeShape.h b/src/GeomAlgoAPI/GeomAlgoAPI_MakeShape.h index b5e40ef24..6fc03c6f8 100644 --- a/src/GeomAlgoAPI/GeomAlgoAPI_MakeShape.h +++ b/src/GeomAlgoAPI/GeomAlgoAPI_MakeShape.h @@ -3,6 +3,9 @@ // File: GeomAlgoAPI_MakeShape.h // Created: 17 Oct 2014 // Author: Sergey ZARITCHNY +// +// Modified by Clarisse Genrault (CEA) : 17 Mar 2016 + #ifndef GeomAlgoAPI_MakeShape_H_ #define GeomAlgoAPI_MakeShape_H_ @@ -11,6 +14,8 @@ #include #include +#include +#include /// \class GeomAlgoAPI_MakeShape /// \ingroup DataAlgo @@ -80,6 +85,21 @@ public: /// \param[in] theShape base shape. GEOMALGOAPI_EXPORT virtual bool isDeleted(const std::shared_ptr theShape); + /// \return true if the data were correct. + GEOMALGOAPI_EXPORT virtual bool check() { return true; }; + + /// \return the list of created faces. + GEOMALGOAPI_EXPORT std::map< std::string, std::shared_ptr > getCreatedFaces() {return myCreatedFaces;} + + /// \return the error. + GEOMALGOAPI_EXPORT std::string getError() { return myError; } + + /// \brief Prepare the naming of faces. + GEOMALGOAPI_EXPORT virtual void prepareNamingFaces(); + + /// \brief Check the validity of the produced shape. + GEOMALGOAPI_EXPORT bool checkValid(std::string theMessage); + protected: /// \brief Sets builder type. /// \param[in] theBuilderType new builder type. @@ -93,6 +113,11 @@ protected: /// \param[in] theShape new shape. void setShape(const std::shared_ptr theShape); +protected: + std::shared_ptr myMap; ///< Data map to keep correct orientation of sub-shapes. + std::string myError; /// Error occurred during the execution of an algorithm. + std::map< std::string, std::shared_ptr > myCreatedFaces; /// Map of created faces with their name for naming. + private: /// \brief Initializes internals. void initialize(); @@ -101,7 +126,6 @@ private: GeomAlgoAPI_MakeShape::BuilderType myBuilderType; ///< Type of make shape builder. bool myDone; ///< Builder status. std::shared_ptr myShape; ///< Resulting shape. - std::shared_ptr myMap; ///< Data map to keep correct orientation of sub-shapes. }; typedef std::list > ListOfMakeShape;