X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGeomAlgoAPI%2FGeomAlgoAPI_Boolean.h;h=39175ee2e6a1f45de9442bcdd39a6edd65cb5706;hb=f0cec241aae9ca16d86e166f45cb5c4987d2c792;hp=86e6dc9b80d7625354e6218af25289a0a6d2ebea;hpb=77b93142eb8ba33bfb9a42040c2fd8926ffea5c8;p=modules%2Fshaper.git diff --git a/src/GeomAlgoAPI/GeomAlgoAPI_Boolean.h b/src/GeomAlgoAPI/GeomAlgoAPI_Boolean.h index 86e6dc9b8..39175ee2e 100644 --- a/src/GeomAlgoAPI/GeomAlgoAPI_Boolean.h +++ b/src/GeomAlgoAPI/GeomAlgoAPI_Boolean.h @@ -11,82 +11,32 @@ #include #include -#include -#include -#include - -/** \class GeomAlgoAPI_Boolean - * \ingroup DataAlgo - * \brief Allows to perform of boolean operations - */ -class GeomAlgoAPI_Boolean : public GeomAPI_Interface +/// \class GeomAlgoAPI_Boolean +/// \ingroup DataAlgo +/// \brief Allows to perform of boolean operations +class GeomAlgoAPI_Boolean : public GeomAlgoAPI_MakeShape { public: /// Type of booelan operation - enum OperationType{ - BOOL_CUT, ///< Cut objects - BOOL_FUSE, ///< Fuse objects + enum OperationType { + BOOL_CUT, ///< Cut objects + BOOL_FUSE, ///< Fuse objects BOOL_COMMON ///< Take common part of objects }; public: - /** \brief Creates cut boolean operation. - * \param[in] theObjects the main shape. - * \param[in] theTools toole shape for boolean. - * \return a solid or compound of solids as result of operation. - */ - GEOMALGOAPI_EXPORT static std::shared_ptr makeCut(const ListOfShape& theObjects, - const ListOfShape& theTools); - - /** \brief Creates fuse boolean operation. - * \param[in] theObjects the main shape. - * \param[in] theTools second shape. - * \return a solid as result of operation. - */ - GEOMALGOAPI_EXPORT static std::shared_ptr makeFuse(const ListOfShape& theObjects, - const ListOfShape& theTools); - - /** \brief Creates common boolean operation. - * \param[in] theObjects the main shape. - * \param[in] theTools second shape. - * \return a solid as result of operation. - */ - GEOMALGOAPI_EXPORT static std::shared_ptr makeCommon(const ListOfShape& theObjects, - const ListOfShape& theTools); /// Constructor. GEOMALGOAPI_EXPORT GeomAlgoAPI_Boolean(const ListOfShape& theObjects, const ListOfShape& theTools, const OperationType theOperationType); - /// \return true if algorithm succeed. - GEOMALGOAPI_EXPORT const bool isDone() const; - - /// \return true if resulting shape is valid. - GEOMALGOAPI_EXPORT const bool isValid() const; - - /// \return result of the boolean algorithm. - GEOMALGOAPI_EXPORT const std::shared_ptr& shape() const; - - /// \return map of sub-shapes of the result. To be used for History keeping. - GEOMALGOAPI_EXPORT std::shared_ptr mapOfShapes() const; - - /// \return interface for for History processing. - GEOMALGOAPI_EXPORT std::shared_ptr makeShape() const; - private: /// Builds resulting shape. void build(const ListOfShape& theObjects, const ListOfShape& theTools, const OperationType theOperationType); - -private: - /// Fields. - bool myDone; - std::shared_ptr myShape; - std::shared_ptr myMap; - std::shared_ptr myMkShape; }; #endif