X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FFeaturesPlugin%2FFeaturesPlugin_ExtrusionCut.cpp;h=d4320c3408d148921ee63afb0032ddabf936cc4f;hb=d5c7ad3c50f89a2ddc2de1866ffb7f09397f3be2;hp=cfd5b5d567fa2d584785b4ed8b19fa60d5b4cfaf;hpb=f9be1b7f715b7c630906cfde5a1c4ed25e1a1e63;p=modules%2Fshaper.git diff --git a/src/FeaturesPlugin/FeaturesPlugin_ExtrusionCut.cpp b/src/FeaturesPlugin/FeaturesPlugin_ExtrusionCut.cpp old mode 100755 new mode 100644 index cfd5b5d56..d4320c340 --- a/src/FeaturesPlugin/FeaturesPlugin_ExtrusionCut.cpp +++ b/src/FeaturesPlugin/FeaturesPlugin_ExtrusionCut.cpp @@ -1,46 +1,33 @@ -// Copyright (C) 2014-20xx CEA/DEN, EDF R&D - -// File: FeaturesPlugin_ExtrusionCut.cpp -// Created: 12 May 2015 -// Author: Dmitry Bobylev - -#include - -#include -#include -#include -#include -#include +// 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 +// + +#include "FeaturesPlugin_ExtrusionCut.h" //================================================================================================= FeaturesPlugin_ExtrusionCut::FeaturesPlugin_ExtrusionCut() { -} - -//================================================================================================= -void FeaturesPlugin_ExtrusionCut::initAttributes() -{ - data()->addAttribute(FeaturesPlugin_ExtrusionCut::SKETCH_OBJECT_ID(), ModelAPI_AttributeReference::typeId()); - - data()->addAttribute(FeaturesPlugin_ExtrusionCut::TO_SIZE_ID(), ModelAPI_AttributeDouble::typeId()); - data()->addAttribute(FeaturesPlugin_ExtrusionCut::FROM_SIZE_ID(), ModelAPI_AttributeDouble::typeId()); - - data()->addAttribute(FeaturesPlugin_ExtrusionCut::AXIS_OBJECT_ID(), ModelAPI_AttributeReference::typeId()); - - data()->addAttribute(FeaturesPlugin_ExtrusionCut::FROM_OBJECT_ID(), ModelAPI_AttributeSelection::typeId()); - data()->addAttribute(FeaturesPlugin_ExtrusionCut::TO_OBJECT_ID(), ModelAPI_AttributeSelection::typeId()); - - ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), FeaturesPlugin_ExtrusionCut::FROM_OBJECT_ID()); - ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), FeaturesPlugin_ExtrusionCut::TO_OBJECT_ID()); - - AttributeSelectionListPtr aSelection = - std::dynamic_pointer_cast(data()->addAttribute( - FeaturesPlugin_ExtrusionCut::LIST_ID(), ModelAPI_AttributeSelectionList::typeId())); - // extrusion works with faces always - aSelection->setSelectionType("SOLID"); + myFeature = this; + myOperationType = BOOL_CUT; } //================================================================================================= void FeaturesPlugin_ExtrusionCut::execute() { + executeCompositeBoolean(); }