-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Compute "distance from a mesh to point" #2062
Comments
As a workaround, it is possible to sample the mesh with an arbitrarily high number of points: I did this for the exact same use-case (comparison of mesh and point cloud) and the results were pretty good. |
Right, there is no direct method for this purpose in Open3D at the moment. @josephinemonica and @GnnrMrkr would anybody of you be interested in contributing such functionality with our aid? |
I have never contributed to such a big project, but I'd like to try it out! Unfortunately, I'll be very busy until early / mid October. Keep me updated, if this is still an issue then. But feel free to tackle this without me ;) |
@griegler, fyi, the triangle intersection code I'm working on will trivially accommodate this feature: the only difference is that the point checked on the triangle bounds is created via projecting a point to a plane vs intersecting a ray with that plane. |
I tried trimesh's |
I was working on this a few months ago and have code which performs the checks against triangles, but Open3D was in the middle of the push to 0.10 and things kept breaking and then I got pulled away into other things. If there's still interest I don't mind resurrecting that work. The main issue is going to be that having the checks alone isn't going to make for a fast computation. It will require an acceleration structure. I had built a BVH at the time for raytraycing and had started looking to generalize it before getting pulled away. The closest point search on a BVH is a little more complicated than an intersection test but it is still doable. If there's interest and it still fits into the scope of Open3D I'll make some time for it. |
Just to follow up to this post, here is a quick example to help others with this work around:
which results: |
Should have been supported in the latest |
It would be really nice to have computes distance from a mesh to a point (or pointcloud).
The API will look something like in trimesh library
(closest_points, distances, triangle_id) = mesh.nearest.on_surface(points)
Can get some inspiration from PyGEL3D code
Thanks!
The text was updated successfully, but these errors were encountered: