pyvista.StructuredGrid.dimensions#

property StructuredGrid.dimensions[ソース]#

グリッドの次元の長さ3タプルを戻します.

戻り値:
tuple

グリッドの寸法.

>>> import pyvista as pv
>>> import numpy as np
>>> xrng = np.arange(-10, 10, 1, dtype=np.float32)
>>> yrng = np.arange(-10, 10, 2, dtype=np.float32)
>>> zrng = np.arange(-10, 10, 5, dtype=np.float32)
>>> x, y, z = np.meshgrid(xrng, yrng, zrng, indexing='ij')
>>> grid = pv.StructuredGrid(x, y, z)
>>> grid.dimensions
(20, 10, 4)