X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSketchPlugin%2FSketchPlugin_Fillet.cpp;h=2e55f8c0c2ae6e4b4975098b8a7af3c6bb5005f2;hb=4cb749258f33b7de231da5bb50140407c0599d30;hp=7503f75365558869fed8a96aba7844ff7930cea4;hpb=d42e1923aa76013ab0ac991136c2d0e2a7310f14;p=modules%2Fshaper.git diff --git a/src/SketchPlugin/SketchPlugin_Fillet.cpp b/src/SketchPlugin/SketchPlugin_Fillet.cpp index 7503f7536..2e55f8c0c 100644 --- a/src/SketchPlugin/SketchPlugin_Fillet.cpp +++ b/src/SketchPlugin/SketchPlugin_Fillet.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2014-2017 CEA/DEN, EDF R&D +// 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 @@ -12,10 +12,9 @@ // // 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 +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // -// See http://www.salome-platform.org/ or -// email : webmaster.salome@opencascade.com +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // #include "SketchPlugin_Fillet.h" @@ -194,6 +193,11 @@ AISObjectPtr SketchPlugin_Fillet::getAISObject(AISObjectPtr thePrevious) anAISObject = AISObjectPtr(new GeomAPI_AISObject); } anAISObject->createShape(anArcShape); + bool isAxiliary = false; + AttributeBooleanPtr aAttr = boolean(AUXILIARY_ID()); + if (aAttr.get()) + isAxiliary = aAttr->value(); + SketchPlugin_Tools::customizeFeaturePrs(anAISObject, isAxiliary); return anAISObject; } @@ -219,6 +223,18 @@ bool SketchPlugin_Fillet::calculateFilletParameters() if (anOwner && !anOwner->isExternal()) aFilletFeatures.insert(anOwner); } + // remove auxilary entities from set of coincident features + if (aFilletFeatures.size() > 2) { + std::set::iterator anIt = aFilletFeatures.begin(); + while (anIt != aFilletFeatures.end()) { + if ((*anIt)->boolean(SketchPlugin_SketchEntity::AUXILIARY_ID())->value()) { + std::set::iterator aRemoveIt = anIt++; + aFilletFeatures.erase(aRemoveIt); + } + else + ++anIt; + } + } if (aFilletFeatures.size() != 2) { setError("Error: Selected point does not have two suitable edges for fillet."); return false;