find_cells_along_line#
- DataSet.find_cells_along_line(pointa: Iterable[float], pointb: Iterable[float], tolerance=0.0) ndarray [source]#
Find the index of cells in this mesh along a line.
Line is defined from
pointa
topointb
.- Parameters:
- Returns:
numpy.ndarray
Index or indices of the cell in this mesh that are closest to the given point.
See also
Examples
>>> import pyvista >>> mesh = pyvista.Sphere() >>> index = mesh.find_cells_along_line([0, 0, 0], [0, 0, 1.0])