Closed w8jcik closed 3 weeks ago
I have tried to reproduce the issue, and upon closer examination of your mesh surface, I think your "envelope.ply" seems to create something like a "double surface". The signed distance is negative when a cast ray intersects the mesh an odd number of times (1,3,5...). However, since there are "two surfaces" when the point is inside your mesh the intersections are 2 and not 1.
Calling .cluster_connected_triangles()
on envelope.ply
found two clusters (two meshes).
After removing one of them .calculate_occupancy()
works fine.
Thank you a lot for help and sorry for bothering.
Checklist
main
branch).Describe the issue
My goal is to select points that are inside of a mesh.
I am following Distance Queries tutorial. Using
RaycastingScene
andcompute_occupancy
I am detecting which points are inside of a mesh. All points are reported to be outside of the mesh. Occupancy is always 0 which is (I believe) not correct.Additional observation is that
compute_signed_distance
gives only positive values, while points inside of envelope should give negative numbers.Example code is calling
compute_signed_distance
to filter points that are in arbitrary distance (10.0) from the mesh.Distance generally works, but all points have positive distance, while according to the tutorial points inside the mesh should have negative distance. This might be somehow related to why occupancy is always 0.
Selection of points inside of a mesh is not possible.
Steps to reproduce the bug
Files
envelope.ply
andatoms.pcd
are attached.Error message
There is no crash or warning.
Expected behavior
Distance from a point inside of a mesh should be negative and occupancy should be
1
.Open3D, Python and System information
Additional information
example mesh and point cloud.zip