download_gears#
- download_gears(load: bool = True) PolyData | str[source]#
Download gears dataset.
- Parameters:
- Returns:
- output
pyvista.PolyData|str DataSet or filename depending on
load.
- output
Examples#
Download Python source code | Download Jupyter notebook
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
See this dataset in the Dataset Gallery for more info.