[Sketcher][planegcs] Fix knot position in non-uniform B-spline
The default factors set in `addConstraintInternalAlignmentKnotPoint` does not work if the knots around a C1 knot are not equally far.
This commit is contained in:
committed by
abdullahtahiriyo
parent
5fee6608ea
commit
68d67ecb87
@@ -1397,9 +1397,9 @@ int System::addConstraintInternalAlignmentKnotPoint(BSpline &b, Point &p, unsign
|
||||
|
||||
// Calculate the factors to be passed to weighted linear combination constraint.
|
||||
// The if condition has a small performance benefit, but that is not why it is here.
|
||||
// One case when numpoles <= 2 is for the last knot of a non-periodic B-spline.
|
||||
// One case when numpoles <= 1 is for the last knot of a non-periodic B-spline.
|
||||
// In this case, the interval `k` passed to `getLinCombFactor` is degenerate, and this is the cleanest way to handle it.
|
||||
if (numpoles > 2)
|
||||
if (numpoles > 1)
|
||||
for (size_t i = 0; i < numpoles; ++i)
|
||||
factors[i] = b.getLinCombFactor(*(b.knots[knotindex]), startpole + b.degree, startpole + i);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user