1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: GeomAlgoAPI_ShapeBuilder.h
4 // Created: 27 April 2016
5 // Author: Dmitry Bobylev
7 #ifndef GeomAlgoAPI_ShapeBuilder_H_
8 #define GeomAlgoAPI_ShapeBuilder_H_
10 #include "GeomAlgoAPI.h"
11 #include "GeomAlgoAPI_MakeShapeList.h"
13 #include <GeomAPI_Shape.h>
15 /// \class GeomAlgoAPI_ShapeBuilder
17 /// \brief Allows to add or remove subshapes from a shape.
18 class GeomAlgoAPI_ShapeBuilder: public GeomAlgoAPI_MakeShapeList
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);
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);
33 /// Creates empty builder.
34 GEOMALGOAPI_EXPORT GeomAlgoAPI_ShapeBuilder();
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);
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);