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

Improve robustness of SignedDistance computation (redux) #783

Closed
kennyweiss opened this issue Feb 5, 2022 · 1 comment · Fixed by #784
Closed

Improve robustness of SignedDistance computation (redux) #783

kennyweiss opened this issue Feb 5, 2022 · 1 comment · Fixed by #784
Assignees
Labels
bug Something isn't working Quest Issues related to Axom's 'quest' component Reviewed

Comments

@kennyweiss
Copy link
Member

kennyweiss commented Feb 5, 2022

We improved the robustness of the computeSign() functionality of quest's SignedDistance query in #706, but found a new set of regressions in regions with sharp angles and poorly shaped triangles (it is not clear if the problem is due to very acute angles or very obtuse angles, but both are present in the regression).

I ran the signed distance query on the following simple mesh comprised of 24 triangles
signed_distance_reproducer_tri_mesh
using the following command line:

> ./examples/quest_signed_distance_interface_ex -f ../data/quest/fin0.stl \
                                                --box-dims 33 33 33       \
                                                --box-min -10 -20 5       \
                                                --box-max 10 0 25

(note: fin0.stl is not yet checked into our data repository)

The computed signed distance has several regions where it computes the wrong sign, e.g. it marks points as "INSIDE" when they should be marked as "OUTSIDE". This is demonstrated in the following visualization of the zero-level isosurface of the computed distance function, which should not have any isosurface components outside the shape:
signed_distance_reproducer_isosurface

@kennyweiss kennyweiss added bug Something isn't working Quest Issues related to Axom's 'quest' component labels Feb 5, 2022
@kennyweiss kennyweiss added this to the Feb 2022 Release milestone Feb 5, 2022
@kennyweiss kennyweiss self-assigned this Feb 5, 2022
@kennyweiss
Copy link
Member Author

The problem was related to two conditions:
(a) An edge with an acute dihedral angle. This creates a larger "region of influence" where the edge is the closest point on the surface to the query point
(b) A large difference in the areas of the two triangle. This effectively weights the normal towards the larger triangle, and creates "pockets" within the "region of influence" that can get the incorrect sign.

It is fixed in #784 by unitizing the normals before adding them, which removes the term associated w/ the triangle areas.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Quest Issues related to Axom's 'quest' component Reviewed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants