extent#

property UniformGrid.extent: tuple#

Return or set the extent of the UniformGrid.

The extent is simply the first and last indices for each of the three axes.

Examples

Create a UniformGrid and show its extent.

>>> import pyvista
>>> grid = pyvista.UniformGrid(dimensions=(10, 10, 10))
>>> grid.extent
(0, 9, 0, 9, 0, 9)
>>> grid.extent = (2, 5, 2, 5, 2, 5)
>>> grid.extent
(2, 5, 2, 5, 2, 5)

Note how this also modifies the grid bounds and dimensions. Since we use default spacing of 1 here, the bounds match the extent exactly.

>>> grid.bounds
(2.0, 5.0, 2.0, 5.0, 2.0, 5.0)
>>> grid.dimensions
(4, 4, 4)