Salome HOME
Fixed Placement centering of faces (issue #1714)
[modules/shaper.git] / src / GeomAlgoAPI / GeomAlgoAPI_ShapeBuilder.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 // File:        GeomAlgoAPI_ShapeBuilder.h
4 // Created:     27 April 2016
5 // Author:      Dmitry Bobylev
6
7 #ifndef GeomAlgoAPI_ShapeBuilder_H_
8 #define GeomAlgoAPI_ShapeBuilder_H_
9
10 #include "GeomAlgoAPI.h"
11 #include "GeomAlgoAPI_MakeShapeList.h"
12
13 #include <GeomAPI_Shape.h>
14
15 /// \class GeomAlgoAPI_ShapeBuilder
16 /// \ingroup DataAlgo
17 /// \brief Allows to add or remove subshapes from a shape.
18 class GeomAlgoAPI_ShapeBuilder: public GeomAlgoAPI_MakeShapeList
19 {
20  public:
21    /// \brief Adds theShapeToAdd in theShape.
22    /// \param[in] theShape shape to modify.
23    /// \param[in] theShapeToAdd shape which will be added.
24    GEOMALGOAPI_EXPORT static void add(std::shared_ptr<GeomAPI_Shape> theShape,
25                                       const std::shared_ptr<GeomAPI_Shape> theShapeToAdd);
26
27    /// \brief Removes theShapeToRemove in theShape.
28    /// \param[in] theShape shape to modify.
29    /// \param[in] theShapeToRemove shape which will be removed.
30    GEOMALGOAPI_EXPORT static void remove(std::shared_ptr<GeomAPI_Shape> theShape,
31                                          const std::shared_ptr<GeomAPI_Shape> theShapeToRemove);
32
33    /// Creates empty builder.
34    GEOMALGOAPI_EXPORT GeomAlgoAPI_ShapeBuilder();
35
36    /// \brief Store new shape as result of removing internal shapes from theShape.
37    /// \param[in] theShape base shape.
38    GEOMALGOAPI_EXPORT void removeInternal(const std::shared_ptr<GeomAPI_Shape> theShape);
39
40    /// \brief Store new shape as result of adding theShapesToAdd to theShape as internal shapes.
41    /// \param[in] theShape base shape.
42    /// \param[in] theShapesToAdd shapes which will be added.
43    GEOMALGOAPI_EXPORT void addInternal(const std::shared_ptr<GeomAPI_Shape> theShape,
44                                        const ListOfShape& theShapesToAdd);
45 };
46
47 #endif