pyvista.create_grid#

create_grid(dataset, dimensions=(101, 101, 101))[source]#

Create a uniform grid surrounding the given dataset.

The output grid will have the specified dimensions and is commonly used for interpolating the input dataset.

Parameters:
datasetDataSet

Input dataset used as a reference for the grid creation.

dimensionstuple of int, default: (101, 101, 101)

The dimensions of the grid to be created. Each value in the tuple represents the number of grid points along the corresponding axis.

Returns:
ImageData

A uniform grid with the specified dimensions that surrounds the input dataset.

Raises:
NotImplementedError

If the dimensions parameter is set to None. Currently, the function does not support automatically determining the “optimal” grid size based on the sparsity of the points in the input dataset.