pyvista.examples.downloads.download_gears#

download_gears(load=True)[source]#

Download gears dataset.

Parameters:
loadbool, default: True

Load the dataset after downloading it when True. Set this to False and only the filename will be returned.

Returns:
pyvista.PolyData | str

DataSet or filename depending on load.

Examples

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):  # pragma: no cover
...     bid = np.empty(body.n_points)
...     bid[:] = i
...     body.point_data["Body ID"] = bid
...
>>> bodies.plot(cmap='jet')
../../../_images/pyvista-examples-downloads-download_gears-1_00_00.png