pyvista.DataSet.find_cells_intersecting_line#
- DataSet.find_cells_intersecting_line( ) NumpyArray[int] [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])