1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: GeomAlgoAPI_MakeShape.h
4 // Created: 17 Oct 2014
5 // Author: Sergey ZARITCHNY
6 #ifndef GeomAlgoAPI_MakeShape_H_
7 #define GeomAlgoAPI_MakeShape_H_
9 #include <GeomAlgoAPI.h>
10 #include <GeomAPI_DataMapOfShapeShape.h>
15 /** \class GeomAlgoAPI_MakeShape
17 * \brief Interface to the root class of all topological shapes constructions
19 class GeomAlgoAPI_MakeShape : public GeomAPI_Interface
24 OCCT_BRepBuilderAPI_MakeShape,
29 /** \brief Constructor by builder and builder type.
30 * \param[in] theBuilder pointer to the builder.
31 * \param[in] theBuilderType builder type.
33 GEOMALGOAPI_EXPORT GeomAlgoAPI_MakeShape(void* theBuilder, const BuilderType theBuilderType = OCCT_BRepBuilderAPI_MakeShape);
35 /// \return status of builder.
36 GEOMALGOAPI_EXPORT bool isDone() const;
38 /// \return a shape built by the shape construction algorithm.
39 GEOMALGOAPI_EXPORT virtual const std::shared_ptr<GeomAPI_Shape> shape() const;
41 /** \return the list of shapes generated from the shape \a theShape.
42 * \param[in] theShape base shape.
43 * \param[out] theHistory generated shapes.
45 GEOMALGOAPI_EXPORT virtual void generated(const std::shared_ptr<GeomAPI_Shape> theShape,
46 ListOfShape& theHistory);
48 /** \return the list of shapes modified from the shape \a theShape.
49 * \param[in] theShape base shape.
50 * \param[out] theHistory modified shapes.
52 GEOMALGOAPI_EXPORT virtual void modified(const std::shared_ptr<GeomAPI_Shape> theShape,
53 ListOfShape& theHistory);
55 /** \return true if theShape was deleted.
56 * \param[in] theShape base shape.
58 GEOMALGOAPI_EXPORT virtual bool isDeleted(const std::shared_ptr<GeomAPI_Shape> theShape);
61 /// \brief Default constructor.
62 GEOMALGOAPI_EXPORT GeomAlgoAPI_MakeShape();
64 /** \brief Sets builder type.
65 * \param[in] theBuilderType new builder type.
67 GEOMALGOAPI_EXPORT void setBuilderType(const BuilderType theBuilderType);
69 /** \brief Sets status of builder.
70 * \param[in] theFlag new status.
72 GEOMALGOAPI_EXPORT void setDone(const bool theFlag);
74 /** \brief Sets result shape.
75 * \param[in] theShape new shape.
77 GEOMALGOAPI_EXPORT void setShape(const std::shared_ptr<GeomAPI_Shape> theShape);
80 GeomAlgoAPI_MakeShape::BuilderType myBuilderType; ///< Type of make shape builder.
81 bool myDone; ///< Builder status.
82 std::shared_ptr<GeomAPI_Shape> myShape; ///< Resulting shape.
83 std::shared_ptr<GeomAPI_DataMapOfShapeShape> myMap; ///< Data map to keep correct orientation of sub-shapes.
86 typedef std::list<std::shared_ptr<GeomAlgoAPI_MakeShape> > ListOfMakeShape;