-// 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
//
// 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<mailto:webmaster.salome@opencascade.com>
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
#include "SketchPlugin_Fillet.h"
const AttributePtr theAttribute);
SketchPlugin_Fillet::SketchPlugin_Fillet()
-: myFilletCreated(false)
+: myFilletCreated(false), myIsReversed(false)
{
+ myIsNotInversed[0] = myIsNotInversed[1] = true;
}
void SketchPlugin_Fillet::initAttributes()
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;
}
if (anOwner && !anOwner->isExternal())
aFilletFeatures.insert(anOwner);
}
+ // remove auxilary entities from set of coincident features
+ if (aFilletFeatures.size() > 2) {
+ std::set<FeaturePtr>::iterator anIt = aFilletFeatures.begin();
+ while (anIt != aFilletFeatures.end()) {
+ if ((*anIt)->boolean(SketchPlugin_SketchEntity::AUXILIARY_ID())->value()) {
+ std::set<FeaturePtr>::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;