mikedh/trimesh
Python library for loading and using triangular meshes.
What it solves
Trimesh simplifies the process of loading, manipulating, and analyzing 3D triangular meshes. It provides a robust, well-tested object-oriented interface for tasks like calculating mass properties, checking for watertight surfaces, performing boolean operations, and repairing common mesh defects.
How it works
Built on top of numpy, the library represents 3D models as Trimesh objects. It handles file I/O for various formats (like STL, OBJ, and GLB) and uses optional "soft" dependencies (such as scipy, networkx, or shapely) to unlock advanced features like convex hulls, graph operations, and ray-mesh queries. It includes an internal caching system to track changes and optimize performance for expensive geometric calculations.
Who it’s for
It is designed for developers and researchers working with 3D geometry in Python who need a reliable, feature-rich tool for geometric analysis, 3D printing preparation, or mesh processing without the overhead of complex CAD software.
Highlights
- Supports a wide range of import/export formats including STL, OBJ, PLY, and GLTF/GLB.
- Calculates physical properties like volume, center of mass, and moment of inertia.
- Includes tools for mesh repair, such as fixing triangle winding and filling holes.
- Provides built-in visualization support via OpenGL or browser-based notebooks.
- Enables advanced operations like voxelization, Laplacian smoothing, and boolean intersections.
Related
- Project
- Project
- Project
- Project