entente.trimesh_search module¶
On Mac OS:
brew install spatialindex
pip install rtree trimesh
-
entente.trimesh_search.
faces_nearest_to_points
(mesh, query_points, ret_points=False)[source]¶ Find the triangular faces on a mesh which are nearest to the given query points.
Parameters: - query_points (np.arraylike) – The points to query, with shape kx3
- ret_points (bool) – When True, return both the indices of the nearest faces and the closest points to the query points, which are not necessarily vertices. When False, return only the face indices.
Returns: face indices as kx1 np.ndarray, or when ret_points is True, a tuple also including the coordinates of the closest points as kx3 np.ndarray.
Return type: object