From ae89d65e3eab85783e6e8686dd8e05541674c0d0 Mon Sep 17 00:00:00 2001 From: PavelMikus Date: Fri, 1 Apr 2022 15:57:02 +0200 Subject: [PATCH] added description for the parameter count increase --- src/libslic3r/Geometry/Curves.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libslic3r/Geometry/Curves.hpp b/src/libslic3r/Geometry/Curves.hpp index 58af14797a..e39e7f1002 100644 --- a/src/libslic3r/Geometry/Curves.hpp +++ b/src/libslic3r/Geometry/Curves.hpp @@ -131,7 +131,8 @@ PiecewiseFittedCurve fit_curve( for (size_t index = 0; index < observations.size(); ++index) { data_points.col(index) = observations[index] * sqrt_weights[index]; } - + // parameters count is always increased by one to make the parametric space of the curve symmetric. + // without this fix, the end of the curve is less flexible than the beginning size_t parameters_count = segments_count + 1 + 2 * endpoints_level_of_freedom; //Create weight matrix T for each point and each segment; Eigen::MatrixXf T(observation_points.size(), parameters_count);