Skip to content

Commit

Permalink
Only discard point if length is strictly less than tolerance
Browse files Browse the repository at this point in the history
  • Loading branch information
jatoben committed Nov 23, 2024
1 parent 073892f commit 8adfc97
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/flexpath.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ void FlexPath::remove_overlapping_points() {
const double tol_sq = spine.tolerance * spine.tolerance;
Array<Vec2>* 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++)
Expand Down

0 comments on commit 8adfc97

Please sign in to comment.