--- id: trimesh version: "5.0.0" license: The MIT License (MIT) Copyright (c) 2023 Michael Dawson-Haggerty Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the… (full text in the JSON record) license_treatment: permissive maintenance: active --- # trimesh — Import, export, process, analyze and view triangular meshes. License: permissive · Maintenance: active · Downloads: 12.8M/mo ## What it is and what it does Trimesh is a pure Python library for working with triangular mesh geometry, designed to handle 3D surface models with an API modeled after Shapely's Polygon object. It loads and processes common mesh formats (STL, PLY, OBJ, GLTF/GLB, 3MF, XAML, 3DXML) and provides a unified Trimesh object for manipulation and analysis. The library emphasizes watertight surfaces and includes built-in caching and change tracking via numpy array hashing. Core functionality includes geometric queries (volume, center of mass, moment of inertia, convex hulls, bounding boxes), mesh repair (winding, normals, holes), connectivity analysis, ray-mesh intersection, cross-sectioning for 3D printing, boolean operations, and visualization via OpenGL or Jupyter notebooks. Optional soft dependencies unlock additional features. The library is actively maintained, requires only numpy as a hard dependency, and supports Python 3.10+. Use it for: - Load and analyze 3D mesh files for geometric properties like volume, center of mass, and moment of inertia. - Repair and validate mesh topology (check watertightness, fix winding, merge duplicate vertices) before 3D printing or simulation. - Perform geometric operations like slicing meshes for 3D printing or computing convex hulls. - Query ray-mesh intersections and perform boolean operations (union, intersection, difference) on mesh geometry. - Visualize 3D meshes interactively in OpenGL windows or inline in Jupyter notebooks. - Split connected mesh components and analyze mesh connectivity using graph algorithms. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Trimesh loads, manipulates, and analyzes triangular mesh geometry in pure Python, with emphasis on watertight surfaces and a single hard dependency on numpy. Yes. Trimesh is actively maintained (release 13 days ago, 3649 GitHub stars), has zero known vulnerabilities, low install friction (numpy only), and permissive MIT licensing. It is the standard choice for 3D mesh processing in Python when you need to load, analyze, or manipulate triangular geometry. ## Install pip install trimesh uv add trimesh poetry add trimesh ## Installing trimesh Before you install: Low friction: pure Python wheel with only numpy as a hard dependency. Active maintenance (last commit 2026-08-14, release 13 days ago). Requires Python 3.10+. Optional soft dependencies add functionality but are not required for core mesh loading and analysis. License in practice: MIT license (permissive): you can use, modify, and distribute trimesh freely in commercial and private projects with minimal restrictions. Include the license notice in distributions. Quickstart: pip install trimesh import trimesh import numpy as np # Create mesh from vertices and faces mesh = trimesh.Trimesh( vertices=[[0, 0, 0], [0, 0, 1], [0, 1, 0]], faces=[[0, 1, 2]] ) # Query properties print(mesh.volume, mesh.is_watertight, mesh.center_mass) Requires Python 3.10 or later. Verify before relying: - Whether soft dependencies (scipy, networkx, pyglet, lxml, xxhash, embreex, shapely, rtree) install cleanly on platforms beyond Linux x86_64, MacOS ARM, and Windows x86_64. - Stability guarantees for the API beyond the stated one-year deprecation warning period. - Which specific mesh formats are supported for import and export beyond those mentioned in the description. ## Package facts - License: The MIT License (MIT) Copyright (c) 2023 Michael Dawson-Haggerty Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the… (full text in the JSON record) (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 12.8M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags triangular mesh processing, 3D mesh import export, watertight surface analysis, mesh geometry manipulation, STL PLY OBJ mesh loader, convex hull and mesh properties, ray mesh intersection queries, 3d-geometry, mesh-processing, scientific-computing [View on SkillFed](https://skillfed.io/packages/trimesh) · [View on PyPI](https://pypi.org/project/trimesh/)