fix knot calculation error in _global_bspline_interpolation_end_tangents()
@@ -249,13 +249,13 @@ def _global_bspline_interpolation_end_tangents(
end_tangent: Vector,
degree: int,
t_vector: Sequence[float]) -> Tuple[List[Vector], List[float]]:
- # Algorithm still incorrect!
+
n = len(fit_points) - 1
p = degree
m = n + p + 3
knots = [0.0] * (p + 1)
- knots.extend(sum(t_vector[j: j + p - 1]) / p for j in range(n - p + 2))
+ knots.extend(sum(t_vector[j: j + p]) / p for j in range(n - p + 2))
knots.extend([1.0] * (p + 1))
assert len(knots) == m + 1
