# Examples from pyvista.examples.downloads.download_gears
# =======================================================

# Download the dataset, split the bodies, and color each one.
import numpy as np
from pyvista import examples
dataset = examples.download_gears()
bodies = dataset.split_bodies()
for i, body in enumerate(bodies):
    bid = np.empty(body.n_points)
    bid[:] = i
    body.point_data['Body ID'] = bid
bodies.plot(cmap='jet')

# SEE ALSO:
#     Gears Dataset https://docs.pyvista.org/api/examples/dataset_gallery.html#gears-dataset
#     See this dataset in the Dataset Gallery for more info.

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

