From d949da2719406ca69e40679dc01bf201a368a2f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8C=82=E4=B9=8B=E9=92=B3?= Date: Tue, 28 Jul 2026 18:21:01 +0800 Subject: [PATCH] fix(v1.0.1): restore contour loop closing point for better LS fitting The contour extraction previously relied on LS fitting to handle loop closure internally, but removing the closing point caused fitting quality issues. Restore comp.push_back(comp[0]) to ensure closed curves are properly fitted. Related: VDE-021 mesh contour extraction --- src/mesh/mesh_to_curve.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mesh/mesh_to_curve.cpp b/src/mesh/mesh_to_curve.cpp index 2879f77aa..5f6566964 100644 --- a/src/mesh/mesh_to_curve.cpp +++ b/src/mesh/mesh_to_curve.cpp @@ -453,7 +453,8 @@ std::vector mesh_contour_to_curves( cur = next; } if (comp.size() >= 3) { - // Don't add closing duplicate — LS fitting handles closure internally + // Close the loop for fitting + comp.push_back(comp[0]); components.push_back(std::move(comp)); } }