X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGeomAlgoAPI%2FGeomAlgoAPI_MakeShape.h;h=ea89fe89ede7807a76f8a2347c5cb96d53015ed8;hb=f5c7bb3100ed321392da42f61c2ab505833ec61a;hp=186b12c67e794bb7e05eec981099fb9d8579db96;hpb=72cb66f9c09b0f8fa224f6f8ab43548658015b49;p=modules%2Fshaper.git diff --git a/src/GeomAlgoAPI/GeomAlgoAPI_MakeShape.h b/src/GeomAlgoAPI/GeomAlgoAPI_MakeShape.h index 186b12c67..ea89fe89e 100644 --- a/src/GeomAlgoAPI/GeomAlgoAPI_MakeShape.h +++ b/src/GeomAlgoAPI/GeomAlgoAPI_MakeShape.h @@ -7,9 +7,11 @@ #define GeomAlgoAPI_MakeShape_H_ #include -#include #include +#include +#include + /**\class GeomAlgoAPI_MakeShape * \ingroup DataAlgo * \brief Interface to the root class of all topological shapes constructions @@ -17,13 +19,18 @@ class GeomAlgoAPI_MakeShape : public GeomAPI_Interface { public: - /// Constructor - GEOMALGOAPI_EXPORT GeomAlgoAPI_MakeShape(); + /// Algo type enum + enum AlgoType { + MakeShape, + BOPAlgoBuilder + }; + +public: /// Constructor by the already stored builder in the interface - GEOMALGOAPI_EXPORT GeomAlgoAPI_MakeShape(void* theBuilder); + GEOMALGOAPI_EXPORT GeomAlgoAPI_MakeShape(void* theBuilder, const AlgoType theAlgoType = MakeShape); /// Returns a shape built by the shape construction algorithm - GEOMALGOAPI_EXPORT const std::shared_ptr shape() const; + GEOMALGOAPI_EXPORT virtual const std::shared_ptr shape() const; /// Returns the list of shapes generated from the shape \a theShape GEOMALGOAPI_EXPORT virtual void generated( @@ -33,14 +40,19 @@ public: GEOMALGOAPI_EXPORT virtual void modified( const std::shared_ptr theShape, ListOfShape& theHistory); - /// Returns whether the shape is an edge + /// Returns whether the shape is deleted GEOMALGOAPI_EXPORT virtual bool isDeleted(const std::shared_ptr theShape); - /// Initializes the algorithm by the builder stored in the interface - GEOMALGOAPI_EXPORT void init(void* theMkShape); - protected: - /// The resulting shape - std::shared_ptr myShape; +protected: + GEOMALGOAPI_EXPORT GeomAlgoAPI_MakeShape(){}; + +protected: + GeomAlgoAPI_MakeShape::AlgoType myAlgoType; ///< Type of make shape algo. + std::shared_ptr myShape; ///< Resulting shape. + std::shared_ptr myWire; ///< Wire for pipe algo. + std::shared_ptr myBaseShape; ///< Base shape of algo. }; +typedef std::list > ListOfMakeShape; + #endif