Skip to content

Conversation

@hughcars
Copy link
Contributor

Fixes #115 and introduces selection_tolerance to resolve #114.

@codecov
Copy link

codecov bot commented Nov 25, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@hughcars hughcars marked this pull request as ready for review November 25, 2025 17:30
!isnothing(idx) && return idx
return findmin(norm.(p.p[valid_ind] .- px))[2]
end]
# Pick the closest to p0 satisfying tolerance.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to call cornerindices(p::Vector{<:Point}, p0::Vector{<:Point}; tol) here and then check against or map back to valid indices? I'm nervous about the selection code not being shared.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea. I just attempted it in 611f726 but it's breaking some tests for me locally, don't merge it just yet.

return d < tol ? idx : -1
end
)]
return isempty(valid_ind) ? Int[] : cornerindices(p.p[valid_ind], p0; tol)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the last part be valid_ind[cornerindices(p.p[valid_ind], p0; tol)]?

@hughcars hughcars force-pushed the hughcars/rounded-style-selector-dev branch from 07bd8f9 to fa645d5 Compare November 25, 2025 22:21
@hughcars
Copy link
Contributor Author

Rebased on top of main, reconciling CHANGELOG.

Copy link
Member

@gpeairs gpeairs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@gpeairs gpeairs merged commit d9001ea into main Nov 25, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rounded ClippedPolygon point indexing can be out of bounds Rounded selection behaviour on multiple contours is counter intuitive

2 participants