Skip to content
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

[C++] Geometric path fails when evaluating on its boundaries. #214

Open
jmirabel opened this issue Nov 9, 2022 · 5 comments
Open

[C++] Geometric path fails when evaluating on its boundaries. #214

jmirabel opened this issue Nov 9, 2022 · 5 comments

Comments

@jmirabel
Copy link
Collaborator

jmirabel commented Nov 9, 2022

Is there a specific reason why the check below is strict (<, >) and not loose (<=, >=) ?

if (pos > m_breakpoints[m_breakpoints.size()-1] || pos < m_breakpoints[0]) {

@hungpham2511
Copy link
Owner

It's because the path is valid if pos == m_breakpoints[0] or pos == m_breakpoints[N - 1].

@hungpham2511
Copy link
Owner

As for the issue you mention in the title, is this due to small numerical errors?

@DianeBury
Copy link

This error happens sometimes during the optimization:

Error: hpp_idl.hpp.Error(msg='Position 0.0125251 is outside of range [ 0, 0.0125251]')

Where the position is equal to one of the bounds of the range. Can this be be due to numerical errors?

@jmirabel
Copy link
Collaborator Author

@DianeBury can you make sure the above message prints the message with full precision ?

It's because the path is valid if pos == m_breakpoints[0] or pos == m_breakpoints[N - 1].

I don't understand that. Do you mean invalid ?
The range would thus be ] a, b [ as the code suggests and not [a, b] as the message suggests ?

@jmirabel
Copy link
Collaborator Author

Ok, I misread the check above. I understand now. It must be a numerical error then.

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

No branches or pull requests

3 participants