How to get only first intersection using RayCasting List_Intersections() method #6735
-
Hello all! I am attempting to get the first intersection of my set of rays with a surface mesh that many rays pass through multiple times. In essence, I just want the intersections I would be able to see with my eyes. The 't_hit' parameter returned in the dictionary when calling scene.list_intersections(rays) tells the distance the ray travels to the intersection with the surface mesh. I would like to be able to filter only the intersections with the smallest 't_hit' for each ray I am casting. Is there a method to filter these intersections (using embree or open3d) that does not require a for loop? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The cast_rays method is open3d's way of getting only the first intersection with a surface. The following two documentation sources show how to use the cast_rays method in O3D:
Hope my struggles can help someone down the line somewhere. If anyone has any questions feel free to comment on this post and I will try to reply with help. |
Beta Was this translation helpful? Give feedback.
The cast_rays method is open3d's way of getting only the first intersection with a surface. The following two documentation sources show how to use the cast_rays method in O3D:
https://www.open3d.org/docs/latest/python_api/open3d.t.geometry.RaycastingScene.html
https://www.open3d.org/html/tutorial/geometry/ray_casting.html
Hope my struggles can help someone down the line somewhere. If anyone has any questions feel free to comment on this post and I will try to reply with help.