KDTree.nearest_neighbor
- KDTree.nearest_neighbor(point, exclude=None)[source]
Find the nearest neighbor to a given point, excluding neighbors that have already been found.
- Parameters:
- point[float, float, float] |
compas.geometry.Point
XYZ coordinates of the base point.
- excludesequence[int or str], optional
A sequence of point identified by their label to exclude from the search.
- point[float, float, float] |
- Returns:
- [[float, float, float], int or str, float]
XYZ coordinates of the nearest neighbor. Label of the nearest neighbor. Distance to the base point.