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

Bounding box #120

Closed
rvignolo opened this issue Dec 13, 2020 · 2 comments
Closed

Bounding box #120

rvignolo opened this issue Dec 13, 2020 · 2 comments

Comments

@rvignolo
Copy link

rvignolo commented Dec 13, 2020

Hi @KristofferC

First of all, great package!

I just wanted to ask you if there is a way to get the bounding box of a mesh when or after building a KDTree. This would just mean if it is possible to retrieve or compute the point with the maximum coordinates (xmax, ymax, zmax, etc) and a point with the minimum coordinates (xmin, ymin, zmin, etc).

I am loading unstructured meshes (see this kind of meshes) as KDTrees and it would be great if I could get the bounding box when doing so (or compute it after). However, computing it afterwards would be similar to check all the nodes that I pass to the KDTree constructor and select the maximum or minimum value for each coordinate.

Thanks!

@KristofferC
Copy link
Owner

I guess you could call knn on the tree with six points, each with very large (positive and negative)x, y and z values.

But just looping through the points should be quite fast and probably won't be a bottle neck in a real application.

@rvignolo
Copy link
Author

exactly, it is not a bottle neck. I just wanted to check if this was a feature or something implemented under the hood. Thank you very much!

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

2 participants