pyvista.DataSetFilters.explode

pyvista.DataSetFilters.explode#

DataSetFilters.explode(factor=0.1)[source]#

Push each individual cell away from the center of the dataset.

Parameters:
factorfloat, default: 0.1

How much each cell will move from the center of the dataset relative to its distance from it. Increase this number to push the cells farther away.

Returns:
pyvista.UnstructuredGrid

UnstructuredGrid containing the exploded cells.

Notes

This is similar to shrink except that it does not change the size of the cells.

Examples

>>> import numpy as np
>>> import pyvista as pv
>>> xrng = np.linspace(0, 1, 3)
>>> yrng = np.linspace(0, 2, 4)
>>> zrng = np.linspace(0, 3, 5)
>>> grid = pv.RectilinearGrid(xrng, yrng, zrng)
>>> exploded = grid.explode()
>>> exploded.plot(show_edges=True)
../../../_images/pyvista-DataSetFilters-explode-1_00_00.png