Salome HOME
Issue #1343 Fixes for creating extrusion on vertex
[modules/shaper.git] / src / GeomAlgoAPI / GeomAlgoAPI_MakeShapeCustom.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 // File:        GeomAlgoAPI_MakeShapeCustom.h
4 // Created:     4 September 2015
5 // Author:      Dmitry Bobylev
6
7 #ifndef GeomAlgoAPI_MakeShapeCustom_H_
8 #define GeomAlgoAPI_MakeShapeCustom_H_
9
10 #include <GeomAlgoAPI_MakeShape.h>
11
12 #include <GeomAPI_DataMapOfShapeMapOfShapes.h>
13 #include <GeomAPI_DataMapOfShapeShape.h>
14
15 /** \class GeomAlgoAPI_MakeShapeCustom
16  *  \ingroup DataAlgo
17  *  \brief Interface to the root class of all topological shapes constructions
18  */
19 class GeomAlgoAPI_MakeShapeCustom : public GeomAlgoAPI_MakeShape
20 {
21 public:
22   /// Default constructor
23   GEOMALGOAPI_EXPORT GeomAlgoAPI_MakeShapeCustom();
24
25   /// Sets result shape.
26   GEOMALGOAPI_EXPORT void setResult(const std::shared_ptr<GeomAPI_Shape> theShape);
27
28   /// Adds modified shape.
29   GEOMALGOAPI_EXPORT bool addModified(const std::shared_ptr<GeomAPI_Shape> theBase,
30                                       const std::shared_ptr<GeomAPI_Shape> theResult);
31
32   /// Adds generated shape.
33   GEOMALGOAPI_EXPORT bool addGenerated(const std::shared_ptr<GeomAPI_Shape> theBase,
34                                        const std::shared_ptr<GeomAPI_Shape> theResult);
35
36   /// Adds deleted shape.
37   GEOMALGOAPI_EXPORT bool addDeleted(const std::shared_ptr<GeomAPI_Shape> theShape);
38
39   /// \return the list of shapes generated from the shape theShape
40   GEOMALGOAPI_EXPORT void generated(const std::shared_ptr<GeomAPI_Shape> theShape,
41                                             ListOfShape& theHistory);
42
43   /// \return the list of shapes modified from the shape theShape
44   GEOMALGOAPI_EXPORT void modified(const std::shared_ptr<GeomAPI_Shape> theShape,
45                                            ListOfShape& theHistory);
46
47   /// \return whether the shape is deleted
48   GEOMALGOAPI_EXPORT bool isDeleted(const std::shared_ptr<GeomAPI_Shape> theShape);
49
50 private:
51   GeomAPI_DataMapOfShapeMapOfShapes myGenerated;
52   GeomAPI_DataMapOfShapeMapOfShapes myModified;
53   GeomAPI_DataMapOfShapeShape       myDeleted;
54 };
55
56 #endif