From 8adfc97bfe3c6e871586d9e5446df5d11b8ec471 Mon Sep 17 00:00:00 2001 From: jatoben Date: Fri, 22 Nov 2024 17:09:04 -0800 Subject: [PATCH] Only discard point if length is strictly less than tolerance --- src/flexpath.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/flexpath.cpp b/src/flexpath.cpp index 9d79ef51..4693eb61 100644 --- a/src/flexpath.cpp +++ b/src/flexpath.cpp @@ -226,7 +226,7 @@ void FlexPath::remove_overlapping_points() { const double tol_sq = spine.tolerance * spine.tolerance; Array* array = &spine.point_array; for (uint64_t i = 1; i < array->count;) { - if (((*array)[i] - (*array)[i - 1]).length_sq() <= tol_sq) { + if (((*array)[i] - (*array)[i - 1]).length_sq() < tol_sq) { array->remove(i); FlexPathElement* el = elements; for (uint64_t ne = 0; ne < num_elements; ne++, el++)