cast_to_pointset#

PolyData.cast_to_pointset(deep: bool = False) pyvista.core.pointset.PointSet#

Get a new representation of this object as a pyvista.PointSet.

Parameters
deepbool, optional

When True makes a full copy of the object. When False, performs a shallow copy where the points and data arrays are references to the original object.

Returns
pyvista.PointSet

Dataset cast into a pyvista.PointSet.

Examples

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