Trimesh is a Python library for loading and using triangular meshes with an emphasis on watertight surfaces.
The library addresses the need to manipulate and analyze 3D mesh geometry programmatically. It provides a full-featured Trimesh object designed in the style of Shapely's Polygon class, allowing developers to work with triangular mesh data through a consistent, intuitive API. The tool supports loading many common mesh formats including STL, PLY, OBJ, and GLTF/GLB with only numpy as a hard dependency, keeping installation lightweight while offering optional functionality through soft dependencies like scipy for convex hulls, networkx for graph operations, and embreex for fast ray queries.
Trimesh suits projects requiring 3D geometry processing in Python where mesh manipulation, analysis, and format conversion are central tasks. The minimal installation with just numpy covers basic mesh loading and manipulation, making it accessible for simple use cases. Developers working on platforms beyond standard Linux x86_64, macOS ARM, and Windows x86_64 should avoid the convenience extras and instead specify dependencies individually to ensure compatibility. The library's design philosophy prioritizes ease of installation and a stable, well-tested API similar to established geometry libraries.
The project maintains active pull request review and response. Development includes comprehensive test coverage tracked publicly. The tool is distributed through multiple channels including PyPI and Docker images. The maintainers acknowledge that while the API is mostly stable, specific version pinning is recommended for production deployments rather than relying on stability guarantees.