8000 throw errors from distance2curve and constrain s by kakearney · Pull Request #1 · jdugge/xy2sn · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

throw errors from distance2curve and constrain s #1

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kakearney
Copy link

Two small tweaks:

  1. Original try/catch around distance2curve blocked error handling except in one expected case, but other errors (usually as a result of unexpected or badly-formatted user input) could block successful calculation in xy2sn and lead to uninformative errors because P, n, and s weren't assigned. I added a rethrow to catch these.

  2. In cases of x/y points very close to the centerline end points, s values returned by distance2curve can be just barely (machine precision-ish) outside the 0-1 range, which leads to an interparc error. I added an explicit constraint to keep these values in range.

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.

2 participants
0