Examples

Several examples are available as rendered IPython notebooks.

ray.ipynb

An example showing simple ray-mesh queries.

section.ipynb

A demonstration of mesh-plane cross-sections, commonly referred to as “slicing” in the context of 3D printing.

shortest.ipynb

Given a mesh and two vertex indices find the shortest path between the two vertices while only traveling along edges of the mesh using a distance-weighted graph search.

texture.ipynb

Load and display a mesh with UV coordinates and texture images.

quick_start.ipynb

A simple example showing various properties of Trimesh objects.

colors.ipynb

A simple example of loading and displaying a mesh with face colors.

nearest.ipynb

An example showing nearest point queries, sampling the volume of box primitives generated from the oriented bounds and using PointCloud objects for visualization.

save_image.ipynb

A simple example showing how to save a 3D object as an image

curvature.ipynb

An example of the discrete gaussian curvature measure.