# Examples from pyvista.PolyDataFilters.remove_unused_points
# ==========================================================

# Create `PolyData` with three points. The first two points are coincident
# and associated with `VERTEX` cells, and the third point is
# "unused" and not associated with any cells.
import pyvista as pv
points = [[0.0, 0.0, 0.0], [0.0, 0.0, 0.0], [1.0, 1.0, 1.0]]
faces = [1, 0, 1, 1]
poly = pv.PolyData(points, faces)
poly

# Since the third point is unused, we can remove it. Note that coincident points are not
# merged by this filter, so the two vertex points are kept as-is.
poly = poly.remove_unused_points()
poly

# ----------------------------------------------------------------------
# Generated by sphinx-examples-as-code https://github.com/pyvista/sphinx-examples-as-code
