How can I find the intersection face between a line and a 3D mesh of trianlges?

42 vues (au cours des 30 derniers jours)
Emile Talon le 6 Nov 2020
Commenté : Emile Talon le 17 Nov 2020
Hello everyone,
I have a triangulated patch of a 3D object. I have the matrixes with all the vertixes and faces of my mesh.
Setting a line in the 3D space I would like to obtain the index of which face does my line intersect.
To be more specific:
Using the function Triangle/Ray Intersection (https://ch.mathworks.com/matlabcentral/fileexchange/33073-triangle-ray-intersection) I defined a ray normal to one of my traingles on the mesh. This ray is then intersecting my 3D object in a second triangle. I need to know which triangle is it in my matrix of faces 'f', in order to then compute the thickness of my object as distance of the two faces.
Thank you for any help,
I hope it is clear.
0 commentairesAfficher -2 commentaires plus anciensMasquer -2 commentaires plus anciens

Connectez-vous pour commenter.

Réponse acceptée

Abhisek Pradhan le 17 Nov 2020
Here is a link for a similar answered question. Hope it will help.
1 commentaireAfficher -1 commentaires plus anciensMasquer -1 commentaires plus anciens
Emile Talon le 17 Nov 2020
Thanks for your help, I had seen that question.
At the end I managed to solve my problem, using the function Triangle/Ray Intersection cited above twice: once to originate the rays and a second time in a loop. This loop allows me to go traingle by triangle and see where Intersection ==1.
This is computationally quite heavy (5mins for more or less 800.000 triangles), probably there is a more efficient way that involves the use of the cited function only once.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Surface and Mesh Plots dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by