-
-
Notifications
You must be signed in to change notification settings - Fork 49
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
[FIX] Coplanarity test - uncertainty issue - see https://github.com/g… #203
Open
xavierjs
wants to merge
6
commits into
gkjohnson:main
Choose a base branch
from
xavierjs:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
29b81f5
[FIX] Coplanarity test - uncertainty issue - see https://github.com/g…
xavierjs 2a5b549
[QUAL] Fix Semicolon lint issues on TriangleSplitter
xavierjs 1863162
[LINT]
xavierjs 7371d72
[FIX] Restore package and package lock
xavierjs dd9350b
[QUAL] Apply @gkjohnson PR reviews
xavierjs 40332a3
[QUAL] Clean, lower epsilons [DOC] Add some comments
xavierjs File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you considered scaling the epsilon up based on the scale of the smallest triangle edge? Jumping straight to
1e-4
if one of the edges is too small is a large jump.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
COPLANAR_EPSILON_MAX is just to avoid too large epsilon values. We don't jump to this value, we just scale COPLANAR_EPSILON but we make sure that it stays below COPLANAR_EPSILON_MAX.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it - I'm understanding now. How did you conclude that 1e-4 is a good max epsilon? It's a very large value and from looking at the code it is still possible to wind up using 1e-4 as an epsilon at most. Do smaller values still cause issues?
It would be nice to have a couple example operation codes that show how this is fixed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my specific case this value was reached sometimes. I did not tried to set a lower values. However when it is reached it means that the computation is somewhat undefined (we want to test if a point or edge belongs to a plane but the plane is defined with a very high uncertainty so the answer is not reliable at all...)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might have been reached but that doesn't mean it's needed for the calculations. As it's currently implemented you are scaling the COPLANAR_EPSILON value which is already set to 1e-10, a fairly large value in itself, which is basically assuming that 1e-10 is the necessary error value at the "center" of the plane where it should actually be a much smaller value since we're not dealing with this lever arm effect. It's difficult to calculate how the error has compounded over calculations but it's possible that the COPLANAR_EPSILON could be set to something like 1e-20 or less, now, and then it could be scaled by the approach added in this PR.
I'd much rather set this to a smaller value and if we continue to have issues we can increase it, I think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the last commit I have lower the EPSILON_MAX to 1e-7, it works with this value