X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FFeaturesPlugin%2FFeaturesPlugin_Partition.h;h=aee69380b230c82534e5913aac6f9fc85e18e463;hb=ea593bc59e7e9461f6c4e2afd3f24d621edb1011;hp=ea50c6e0ae44318100dca849355e367b83f1205b;hpb=3f1a42a51c7de1911c75453ff7134593d7d2c6b1;p=modules%2Fshaper.git diff --git a/src/FeaturesPlugin/FeaturesPlugin_Partition.h b/src/FeaturesPlugin/FeaturesPlugin_Partition.h old mode 100755 new mode 100644 index ea50c6e0a..aee69380b --- a/src/FeaturesPlugin/FeaturesPlugin_Partition.h +++ b/src/FeaturesPlugin/FeaturesPlugin_Partition.h @@ -1,13 +1,26 @@ -// Copyright (C) 2014-20xx CEA/DEN, EDF R&D --> - -// File: FeaturesPlugin_Partition.h -// Created: 31 Jul 2015 -// Author: Natalia ERMOLAEVA +// Copyright (C) 2014-2019 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 FeaturesPlugin_Partition_H_ #define FeaturesPlugin_Partition_H_ -#include "FeaturesPlugin.h" +#include "FeaturesPlugin_VersionedBoolean.h" #include #include @@ -16,7 +29,7 @@ /// \ingroup Plugins /// \brief Feature for applying of Partition operations on Shapes. Partition makes conjunctional /// faces of solids as shared. The result of partitions is a compsolid. -class FeaturesPlugin_Partition : public ModelAPI_Feature +class FeaturesPlugin_Partition : public FeaturesPlugin_VersionedBoolean { public: /// Feature kind. @@ -51,10 +64,20 @@ public: private: /// Stores result of generation. - void storeResult(const ListOfShape& theObjects, + void storeResult(ListOfShape& theObjects, + ListOfShape& thePlanes, const GeomShapePtr theResultShape, const std::shared_ptr theMakeShape, const int theIndex = 0); + + /// Cut all of unused subs of compsolids by the full compsolid of the first selected object, + /// and vice versa, cut all objects of Partition by not used subs of the first selected object. + /// Store results of operation to the separated lists of shapes. + bool cutSubs(ObjectHierarchy& theHierarchy, + ListOfShape& theUsed, + ListOfShape& theNotUsed, + std::shared_ptr& theMakeShapeList, + std::string& theError); }; #endif