cell_coords#
- ExplicitStructuredGrid.cell_coords(ind)[source]#
Return the cell structured coordinates.
- Parameters:
- Returns:
tuple
(int
),numpy.ndarray
,or
None
Cell structured coordinates.
None
ifind
is outside the grid extent.
See also
pyvista.ExplicitStructuredGrid.cell_id
Return the cell ID.
Examples
>>> from pyvista import examples >>> grid = examples.load_explicit_structured() >>> grid.cell_coords(19) (3, 4, 0)
>>> grid.cell_coords((19, 31, 41, 54)) array([[3, 4, 0], [3, 2, 1], [1, 0, 2], [2, 3, 2]])