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

Fix kdtree extents to better support queries of planar arrangements of points in 3D. #1212

Merged
merged 1 commit into from
Dec 13, 2023

Conversation

BradWhitlock
Copy link
Member

I was running into a weird problem where an element adjacency set produced from generate_faces() was missing certain groups in the adjacency set. I traced this to a problem in the kdtree where the overall bounding box of the points being queried had the same values for one of the dimensions. Later on, this would prevent successful point lookups because the kdtree determined the query point was outside of the dataset.

This change enhances the kdtree logic a little so the bounding box will always have some thickness, even when all of the points it contains are coplanar and contain the same values in x or y or z. I added tests that used to cause this to fail and now they pass with the fix.

Copy link
Member

@cyrush cyrush left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@BradWhitlock BradWhitlock merged commit c8ea7af into develop Dec 13, 2023
22 checks passed
@BradWhitlock BradWhitlock deleted the bugfix/whitlock/kdtree_pointquery_fix branch December 13, 2023 20:38
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