if (!aFilletPoint2D.get())
return false;
- std::set<FeaturePtr> aFilletFeatures =
- SketchPlugin_Tools::findFeaturesCoincidentToPoint(aFilletPoint2D);
+ std::set<AttributePoint2DPtr> aCoincidentPoints =
+ SketchPlugin_Tools::findPointsCoincidentToPoint(aFilletPoint2D);
+ std::set<FeaturePtr> aFilletFeatures;
+ for (std::set<AttributePoint2DPtr>::iterator aCPIt = aCoincidentPoints.begin();
+ aCPIt != aCoincidentPoints.end(); ++aCPIt) {
+ FeaturePtr anOwner = ModelAPI_Feature::feature((*aCPIt)->owner());
+ if (anOwner)
+ aFilletFeatures.insert(anOwner);
+ }
if (aFilletFeatures.size() != 2) {
setError("Error: Selected point does not have two suitable edges for fillet.");
return false;
--- /dev/null
+## Copyright (C) 2018-20xx 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<mailto:webmaster.salome@opencascade.com>
+##
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY"))
+SketchLine_1 = Sketch_1.addLine(14.02956299682377, 22.92420172826143, 50.52730937285911, 55.74918048752026)
+SketchLine_2 = Sketch_1.addLine(37.41590909090908, 14.23181818181818, 32.3113094484989, 39.36625633556781)
+SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchLine_2.endPoint(), SketchLine_1.result())
+SketchLine_3 = Sketch_1.addLine(32.3113094484989, 39.36625633556781, 60.59999999999999, 33.28409090909091)
+SketchConstraintCoincidence_2 = Sketch_1.setCoincident(SketchLine_2.endPoint(), SketchLine_3.startPoint())
+model.do()
+
+SketchFillet_1 = Sketch_1.setFillet(SketchLine_2.endPoint())
+model.do()
+
+assert(Sketch_1.feature().error() == "")
+assert(Sketch_1.solverError().value() == "")
+
+model.end()