Using trimesh, I need to find the triangle id for a point given a triangular mesh. The point lies on an edge of the mesh or it may be a triangle vertex.
import trimesh
import numpy as np
mesh = trimesh.load('mesh.off')
triangles = mesh.triangles
pt= [2.7605, 2.996054, 0.263109]
# Find the triangle id for the point pt
# ???
My question is how to get the triangle id for a point given a triangular mesh using trimesh.
Using
trimesh
you can find the ID of the triangle where the point lies with the following code: