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

[SignedDistanceField] not expanded box precision #1046

Merged
merged 3 commits into from
Aug 23, 2024

Conversation

MatPont
Copy link
Contributor

@MatPont MatPont commented Aug 23, 2024

When disabling the expandBox parameter of the signed distance field module it is possible for a triangle to lie on the boundary of the box.
However in practice it can results in the triangle not being detected by a ray due to precision problems.
In the end, this can result in the algorithm being unable to detect the interior and exterior of the surface.

To fix this, this PR shift a little bit the rays that are cast on the boundary by 0.1% of the size of the spacing in the corresponding dimensions (i.e the extent of a dimension divided by its resolution).

@julien-tierny
Copy link
Collaborator

Looks good, thanks!

@julien-tierny julien-tierny merged commit 7953f51 into topology-tool-kit:dev Aug 23, 2024
45 checks passed
@MatPont MatPont deleted the sdf_box_precision branch August 26, 2024 07:39
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