pyvista.DataSet.find_cells_intersecting_line#
- DataSet.find_cells_intersecting_line(pointa: ndarray[Any, dtype[number]] | Sequence[int | float], pointb: ndarray[Any, dtype[number]] | Sequence[int | float], tolerance: float = 0.0) ndarray [source]#
Find the index of cells that intersect a line.
Line is defined from
pointa
topointb
. This method requires vtk version >=9.2.0.- Parameters:
- Returns:
numpy.ndarray
Index or indices of the cell(s) that intersect the line.
See also
Examples
>>> import pyvista as pv >>> mesh = pv.Sphere() >>> mesh.find_cells_intersecting_line([0.0, 0, 0], [1.0, 0, 0]) array([ 86, 1653])