download_gears#

download_gears(load=True)[source]#

Download gears dataset.

Parameters
loadbool, optional

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

Returns
pyvista.PolyData or 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):
...     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