-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve isPointInsidePath() robustness #1130
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The current
isPointInsidePath()
implementation launches an horizontal ray and counts how many times it intersects the path. However it relies oninterHelper()
which has trouble finding intersections lying exactly at path vertex coordinates. This causes the issue reported in #563 that #594 attempted to fix.Here is an example of an obvious failure:
Obviously
interHelper()
needs fixing, but because that is a complex task I suggest instead to add some jitter to the ray destination inisPointInsidePath()
, which is trivial and harmless. Instead of:Use:
The text was updated successfully, but these errors were encountered: