pyvista.PolyDataFilters.project_points_to_plane#

PolyDataFilters.project_points_to_plane(origin=None, normal=(0.0, 0.0, 1.0), inplace=False)[source]#

Project points of this mesh to a plane.

Parameters:
originsequence[float], optional

Plane origin. Defaults to the approximate center of the input mesh minus half the length of the input mesh in the direction of the normal.

normalsequence[float], default: (0.0, 0.0, 1.0)

Plane normal. Defaults to +Z.

inplacebool, default: False

Whether to overwrite the original mesh with the projected points.

Returns:
pyvista.PolyData

The points of this mesh projected onto a plane.

Examples

Flatten a sphere to the XY plane.

>>> import pyvista as pv
>>> sphere = pv.Sphere()
>>> projected = sphere.project_points_to_plane()
>>> projected.plot(show_edges=True, line_width=3)
../../../_images/pyvista-PolyDataFilters-project_points_to_plane-1_00_00.png