From 3f91c52b3f2681093a2dcac6c2baa51c7e8afba0 Mon Sep 17 00:00:00 2001 From: Ajinkya Dahale Date: Fri, 11 Nov 2022 01:06:45 +0530 Subject: [PATCH] [Sketcher][planegcs] Fix tangent at knot for C1 knots --- src/Mod/Sketcher/App/planegcs/Constraints.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/Mod/Sketcher/App/planegcs/Constraints.cpp b/src/Mod/Sketcher/App/planegcs/Constraints.cpp index b1c4d8e77e..f0abc1a9b0 100644 --- a/src/Mod/Sketcher/App/planegcs/Constraints.cpp +++ b/src/Mod/Sketcher/App/planegcs/Constraints.cpp @@ -283,12 +283,9 @@ ConstraintSlopeAtBSplineKnot::ConstraintSlopeAtBSplineKnot(BSpline& b, Line& l, factors.resize(numpoles); slopefactors.resize(numpoles); for (size_t i = 0; i < numpoles + 1; ++i) { - // FIXME: `getLinCombFactor` seg-faults for the last knot so this safeguard exists - if (numpoles > 2) { - tempfactors[i] = - b.getLinCombFactor(*(b.knots[knotindex]), startpole + b.degree, startpole + i, b.degree - 1) / - (b.flattenedknots[startpole + b.degree + i] - b.flattenedknots[startpole + i]); - } + tempfactors[i] = + b.getLinCombFactor(*(b.knots[knotindex]), startpole + b.degree, startpole + i, b.degree - 1) / + (b.flattenedknots[startpole + b.degree + i] - b.flattenedknots[startpole + i]); } for (size_t i = 0; i < numpoles; ++i) { factors[i] =