NaviNIBS.util.pyvista.dataset module¶
- NaviNIBS.util.pyvista.dataset.find_closest_point(dataset, point, n=1)[source]¶
Similar to pv.DataSet.find_closest_point, but monkey-patches a cache of the vtkPointLocator to speed up repeated calls. It turns out this construction is more expensive than the actual find.
Note: the cache is not automatically reset by changes to the dataset, so may break (or give incorrect results) if dataset is changed.
- Return type:
int