pyvista.RectilinearGrid.points

pyvista.RectilinearGrid.points#

property RectilinearGrid.points: NumpyArray[float][source]#

Return a copy of the points as an (n, 3) numpy array.

Returns:
numpy.ndarray

Array of points.

Notes

Points of a pyvista.RectilinearGrid cannot be set. Set point coordinates with RectilinearGrid.x, RectilinearGrid.y, or RectilinearGrid.z.

Examples

>>> import numpy as np
>>> import pyvista as pv
>>> xrng = np.arange(-10, 10, 10, dtype=float)
>>> yrng = np.arange(-10, 10, 10, dtype=float)
>>> zrng = np.arange(-10, 10, 10, dtype=float)
>>> grid = pv.RectilinearGrid(xrng, yrng, zrng)
>>> grid.points
array([[-10., -10., -10.],
       [  0., -10., -10.],
       [-10.,   0., -10.],
       [  0.,   0., -10.],
       [-10., -10.,   0.],
       [  0., -10.,   0.],
       [-10.,   0.,   0.],
       [  0.,   0.,   0.]])