pyvista.ExplicitStructuredGrid.cell_id#

ExplicitStructuredGrid.cell_id(coords: ndarray[Any, dtype[integer]] | Sequence[ndarray[Any, dtype[integer]] | Sequence[int]] | Sequence[Sequence[ndarray[Any, dtype[integer]] | Sequence[int]]]) int | ndarray | None[ソース]#

セルのIDを返します.

パラメータ:
coordsIntArray

セル構造の座標.

戻り値:
int, numpy.ndarray, or None

セルID. coords がグリッド範囲外の場合は None

参考

pyvista.ExplicitStructuredGrid.cell_coords

セル構造の座標を返します.

>>> from pyvista import examples
>>> grid = examples.load_explicit_structured()
>>> grid.cell_id((3, 4, 0))
19
>>> coords = [(3, 4, 0), (3, 2, 1), (1, 0, 2), (2, 3, 2)]
>>> grid.cell_id(coords)
array([19, 31, 41, 54])