# Examples from pyvista.DataSetFilters.remove_points
# ==================================================

# Remove 150 points from a sphere.
import pyvista as pv
sphere = pv.Sphere()
reduced_sphere = sphere.remove_points(ind=range(100, 250))
reduced_sphere.plot(show_edges=True, line_width=3)

# Remove a point from a mesh of line segments. The ids of the remaining points
# are kept.
points = [
    [0.0, 0.0, 0.0],
    [1.0, 0.0, 0.0],
    [2.0, 0.0, 0.0],
    [3.0, 0.0, 0.0],
]
lines = pv.PolyData(points, lines=[2, 0, 1, 2, 1, 2, 2, 2, 3])
reduced = lines.remove_points(ind=0)
reduced['vtkOriginalPointIds'].tolist()

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