pyvista.DataSet.cast_to_pointset

pyvista.DataSet.cast_to_pointset#

DataSet.cast_to_pointset(pass_cell_data: bool = False) pyvista.PointSet[source]#

Extract the points of this dataset and return a pyvista.PointSet.

Parameters:
pass_cell_databool, default: False

Run the cell_data_to_point_data() filter and pass cell data fields to the new pointset.

Returns:
pyvista.PointSet

Dataset cast into a pyvista.PointSet.

Notes

This will produce a deep copy of the points and point/cell data of the original mesh.

Examples

>>> import pyvista as pv
>>> mesh = pv.Wavelet()
>>> pointset = mesh.cast_to_pointset()
>>> type(pointset)
<class 'pyvista.core.pointset.PointSet'>