X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FFeaturesAPI%2FFeaturesAPI_Boolean.h;h=7b1b25e31bdadd2749cc4679ba81b0e4d27d6417;hb=e675b9eb8df755fff9763560ddf36d5bfeb6fe35;hp=bcbd40f2581cb430f3c55e3d22c7acf54faf5a1b;hpb=61b52539f8a46dddf55715e3c294e7247fecee3c;p=modules%2Fshaper.git diff --git a/src/FeaturesAPI/FeaturesAPI_Boolean.h b/src/FeaturesAPI/FeaturesAPI_Boolean.h index bcbd40f25..7b1b25e31 100644 --- a/src/FeaturesAPI/FeaturesAPI_Boolean.h +++ b/src/FeaturesAPI/FeaturesAPI_Boolean.h @@ -1,8 +1,22 @@ -// Copyright (C) 2014-20xx CEA/DEN, EDF R&D --> - -// File: FeaturesAPI_Boolean.h -// Created: 07 June 2016 -// Author: Dmitry Bobylev +// Copyright (C) 2014-2017 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or +// email : webmaster.salome@opencascade.com +// #ifndef FeaturesAPI_Boolean_H_ #define FeaturesAPI_Boolean_H_ @@ -20,16 +34,16 @@ class ModelHighAPI_Selection; /// \class FeaturesAPI_Boolean /// \ingroup CPPHighAPI /// \brief Interface for Boolean feature. -class FeaturesAPI_Boolean : public ModelHighAPI_Interface +class FeaturesAPI_Boolean: public ModelHighAPI_Interface { public: /// Constructor without values. FEATURESAPI_EXPORT - explicit FeaturesAPI_Boolean(const std::shared_ptr & theFeature); + explicit FeaturesAPI_Boolean(const std::shared_ptr& theFeature); /// Constructor with values. FEATURESAPI_EXPORT - FeaturesAPI_Boolean(const std::shared_ptr & theFeature, + FeaturesAPI_Boolean(const std::shared_ptr& theFeature, const ModelHighAPI_Integer& theBoolType, const std::list& theMainObjects, const std::list& theToolObjects); @@ -39,9 +53,12 @@ public: virtual ~FeaturesAPI_Boolean(); INTERFACE_3(FeaturesPlugin_Boolean::ID(), - boolType, FeaturesPlugin_Boolean::TYPE_ID(), ModelAPI_AttributeInteger, /** Operation type */, - mainObjects, FeaturesPlugin_Boolean::OBJECT_LIST_ID(), ModelAPI_AttributeSelectionList, /** Main objects */, - toolObjects, FeaturesPlugin_Boolean::TOOL_LIST_ID(), ModelAPI_AttributeSelectionList, /** Tool objects*/) + boolType, FeaturesPlugin_Boolean::TYPE_ID(), + ModelAPI_AttributeInteger, /** Operation type */, + mainObjects, FeaturesPlugin_Boolean::OBJECT_LIST_ID(), + ModelAPI_AttributeSelectionList, /** Main objects */, + toolObjects, FeaturesPlugin_Boolean::TOOL_LIST_ID(), + ModelAPI_AttributeSelectionList, /** Tool objects*/) /// Set operation type. FEATURESAPI_EXPORT @@ -54,6 +71,10 @@ public: /// Set tool objects. FEATURESAPI_EXPORT void setToolObjects(const std::list& theToolObjects); + + /// Dump wrapped feature + FEATURESAPI_EXPORT + virtual void dump(ModelHighAPI_Dumper& theDumper) const; }; /// Pointer on Boolean object. @@ -62,28 +83,42 @@ typedef std::shared_ptr BooleanPtr; /// \ingroup CPPHighAPI /// \brief Create Boolean Cut feature. FEATURESAPI_EXPORT -BooleanPtr addCut(const std::shared_ptr & thePart, +BooleanPtr addCut(const std::shared_ptr& thePart, const std::list& theMainObjects, const std::list& theToolObjects); /// \ingroup CPPHighAPI /// \brief Create Boolean Fuse feature. FEATURESAPI_EXPORT -BooleanPtr addFuse(const std::shared_ptr & thePart, +BooleanPtr addFuse(const std::shared_ptr& thePart, const std::list& theObjects); /// \ingroup CPPHighAPI /// \brief Create Boolean Fuse feature. FEATURESAPI_EXPORT -BooleanPtr addFuse(const std::shared_ptr & thePart, +BooleanPtr addFuse(const std::shared_ptr& thePart, const std::list& theMainObjects, const std::list& theToolObjects); /// \ingroup CPPHighAPI /// \brief Create Boolean Common feature. FEATURESAPI_EXPORT -BooleanPtr addCommon(const std::shared_ptr & thePart, +BooleanPtr addCommon(const std::shared_ptr& thePart, const std::list& theMainObjects, const std::list& theToolObjects); +/// \ingroup CPPHighAPI +/// \brief Create Boolean Smash feature. +FEATURESAPI_EXPORT +BooleanPtr addSmash(const std::shared_ptr& thePart, + const std::list& theMainObjects, + const std::list& theToolObjects); + +/// \ingroup CPPHighAPI +/// \brief Create Boolean Fill feature. +FEATURESAPI_EXPORT +BooleanPtr addFill(const std::shared_ptr& thePart, + const std::list& theMainObjects, + const std::list& theToolObjects); + #endif // FeaturesAPI_Boolean_H_