pyvista.CompositeFilters.cell_data_to_point_data#
- CompositeFilters.cell_data_to_point_data(pass_cell_data=False, progress_bar=False)[source]#
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:
- 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(scalars='Area')
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(scalars='Area')