cell_data_to_point_data

UnstructuredGridFilters.cell_data_to_point_data(pass_cell_data=False, progress_bar=False)

Transform cell data into point data.

Point data are specified per node and cell data specified within cells. Optionally, the input point data can be passed through to the output.

The method of transformation is based on averaging the data values of all cells using a particular point. Optionally, the input cell data can be passed through to the output as well.

See also pyvista.DataSetFilters.point_data_to_cell_data().

Parameters
pass_cell_databool, optional

If enabled, pass the input cell data through to the output.

progress_barbool, optional

Display a progress bar to indicate progress.

Returns
pyvista.DataSet

Dataset with the point data transformed into cell data. Return type matches input.

Examples

First compute the face area of the example airplane mesh and show the cell values. This is to show discrete cell data.

>>> from pyvista import examples
>>> surf = examples.load_airplane()
>>> surf = surf.compute_cell_sizes(length=False, volume=False)
>>> surf.plot(smooth_shading=True)
../../../_images/pyvista-UnstructuredGridFilters-cell_data_to_point_data-1_00_00.png

These cell scalars can be applied to individual points to effectively smooth out the cell data onto the points.

>>> from pyvista import examples
>>> surf = examples.load_airplane()
>>> surf = surf.compute_cell_sizes(length=False, volume=False)
>>> surf = surf.cell_data_to_point_data()
>>> surf.plot(smooth_shading=True)
../../../_images/pyvista-UnstructuredGridFilters-cell_data_to_point_data-1_01_00.png