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

getting intersections for many query points #178

Open
martinResearch opened this issue Jan 8, 2021 · 1 comment
Open

getting intersections for many query points #178

martinResearch opened this issue Jan 8, 2021 · 1 comment

Comments

@martinResearch
Copy link

martinResearch commented Jan 8, 2021

Hi,

Thank you for this very useful library.

I am trying to use the trimeshlibrary to query the nearest pooint on a 3d mesh for a large set of query points and it is quite slow. One major bottleneck is the line here https://github.com/mikedh/trimesh/blob/63e35a5652c9525a6a8070271c2bac8f4d13105b/trimesh/proximity.py#L64
candidates = [list(rtree.intersection(b)) for b in bounds]
which loops in python over the array bounds that is length nb_of_point.

Ideally rtree.intersection would accept a list of boxes, implement the loop in c++ and return the list of list of candidates (similarly to scipy.spatial.KDTree.query_ball_point). Would it be possible to implement instead the loop in C++ in rtree by having rtree supporting arrays of size n x 6 as inputs in the intersectionmethod as mentioned here mikedh/trimesh#1116?
Would the binding method used in rtree allow to do that loop in C++, or would that require using cython for example ?

@martinResearch
Copy link
Author

Noticed this issue is quite similar to #172.

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

1 participant