tetgen
Python interface to tetgen
Decision gist · record as of 2026-08-14
Yes, if you need tetrahedral mesh generation for scientific computing. The package is actively maintained, has no known vulnerabilities, uses a permissive MIT license, and offers pre-built wheels that minimize installation friction. The single runtime dependency (numpy) is standard. Install only if you actually work with 3D mesh generation; it is not a general-purpose utility.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later; numpy is a runtime dependency.
- Medium install friction due to compiled C++ bindings, but mitigated by pre-built wheels for Python 3.10–3.14 across macOS (Intel and ARM), Linux (x86_64 and aarch64), and Windows.
- Actively maintained with recent releases and no known vulnerabilities.
License · maintenance · safety
MIT (permissive) — MIT license permits commercial and private use with minimal restrictions; attribution required but no copyleft obligations.
last release 2026-05-04 (102 days) · last repo commit 2026-08-01 · 310 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 105,840 downloads/mo, #12,676 on PyPI
Alternatives
Verify before relying
pip install tetgen
import tetgen
import numpy as np
tet = tetgen.TetGen(surface_mesh)
tet.tetrahedralize(order=1, mindihedral=20, minratio=1.5)
grid = tet.grid- Whether background mesh sizing functions support arbitrary user-defined criteria beyond proximity-based refinement.
- Performance characteristics and scalability limits for very large or complex polyhedral domains.
- Availability of detailed error handling and diagnostic output when mesh generation fails.
- Integration capabilities with visualization tools beyond what the fact sheet explicitly states.
What it is and what it does
tetgen is a Python wrapper around the TetGen C++ software for generating tetrahedral meshes of 3D polyhedral domains. It combines the speed of compiled C++ with Python's ease of use. The underlying TetGen engine (version 1.6.0) produces exact constrained Delaunay tetrahedralizations, boundary-conforming Delaunay meshes, and Voronoi partitions—all suitable for numerical methods like finite element or finite volume analysis.
Typical workflows involve passing a triangular surface mesh to tetgen, specifying quality constraints (dihedral angles, aspect ratios), and optionally using a background mesh to define spatially varying element sizes for adaptive refinement. The result is a tetrahedral grid that can be analyzed or exported for downstream simulation. The package supports Python 3.10 through 3.14 and depends only on numpy.
Use it for
- Generate tetrahedral meshes from surface geometries for finite element simulations in structural mechanics or fluid dynamics.
- Create adaptive meshes with finer elements near regions of interest using background mesh sizing functions.
- Produce Voronoi partitions for spatial analysis or computational geometry tasks.
- Refine existing meshes to meet quality constraints (minimum dihedral angles, aspect ratios) for numerical stability.
- Process manifold triangular surfaces into tetrahedral grids for numerical analysis workflows.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need tetrahedral mesh generation for scientific computing.
The package is actively maintained, has no known vulnerabilities, uses a permissive MIT license, and offers pre-built wheels that minimize installation friction. The single runtime dependency (numpy) is standard. Install only if you actually work with 3D mesh generation; it is not a general-purpose utility.
Install
tetgen on PyPI
Before you install
Medium install friction due to compiled C++ bindings, but mitigated by pre-built wheels for Python 3.10–3.14 across macOS (Intel and ARM), Linux (x86_64 and aarch64), and Windows. Actively maintained with recent releases and no known vulnerabilities.
Requires Python 3.10 or later; numpy is a runtime dependency.
License in practice
MIT license permits commercial and private use with minimal restrictions; attribution required but no copyleft obligations.
Quickstart
pip install tetgen
import tetgen
import numpy as np
tet = tetgen.TetGen(surface_mesh)
tet.tetrahedralize(order=1, mindihedral=20, minratio=1.5)
grid = tet.grid
Verify before relying
- Whether background mesh sizing functions support arbitrary user-defined criteria beyond proximity-based refinement.
- Performance characteristics and scalability limits for very large or complex polyhedral domains.
- Availability of detailed error handling and diagnostic output when mesh generation fails.
- Integration capabilities with visualization tools beyond what the fact sheet explicitly states.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Medium. Platform-specific wheel |
| Runtime dependencies | 1 packagenumpy |
| Maintenance | Actively maintained 102 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 105,840 / month, #12,676 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Intended Audience :: Science/ResearchOperating System :: Microsoft :: WindowsOperating System :: POSIXProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14 |
Evidence: tetgen-0.8.4-cp310-cp310-macosx_10_14_x86_64.whl; tetgen-0.8.4-cp310-cp310-macosx_11_0_arm64.whl; tetgen-0.8.4-cp310-cp310-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl; tetgen-0.8.4-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl; tetgen-0.8.4-cp310-cp310-win_amd64.whl; tetgen-0.8.4-cp311-cp311-macosx_10_14_x86_64.whl; tetgen-0.8.4-cp311-cp311-macosx_11_0_arm64.whl; tetgen-0.8.4-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl; tetgen-0.8.4-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl; tetgen-0.8.4-cp311-cp311-win_amd64.whl; tetgen-0.8.4-cp312-abi3-macosx_10_14_x86_64.whl; tetgen-0.8.4-cp312-abi3-macosx_11_0_arm64.whl; tetgen-0.8.4-cp312-abi3-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl; tetgen-0.8.4-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl; tetgen-0.8.4-cp312-abi3-win_amd64.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “3D mesh tetrahedralization”
- tetgentetgen wraps the TetGen C++ library to generate tetrahedral meshes…
- pytetwildpytetwild converts surface meshes into tetrahedral volume meshes…
- pymeshlabPyMeshLab provides Python bindings to MeshLab, enabling programmatic…
Give your agent the search over MCP, or paste the wish link into any chat.
More Mathematics packages
NetworkX provides data structures and algorithms for creating, analyzing, and manipulating graphs and networks, supporting everything from simple undirected graphs to complex directed and weighted networks.
kiwisolver is a Python binding to a fast C++ implementation of the Cassowary constraint solver, enabling you to solve systems of linear constraints and inequalities.
Install it if you need to solve constraint systems; skip it if you only need simple linear algebra.
SymPy is a Python library for symbolic mathematics, performing algebraic manipulation, calculus, equation solving, and mathematical expression simplification without numerical approximation.
ContourPy calculates contours of 2D quadrilateral grids using C++11 algorithms wrapped in Python, offering serial and multithreaded implementations without requiring Matplotlib as a dependency.
PyTorch provides GPU-accelerated tensor computation and automatic differentiation for building and training deep neural networks in Python.
onnxruntime loads and executes Open Neural Network Exchange (ONNX) models with a focus on inference performance across CPUs and accelerators.
Install it if you have ONNX models to run in production or development.
See also cytriangle · pytetwild · scikit-fem · triangle · fast-simplification · gmsh · manifold3d · PyGEL3D · tesseract · cmeel-qhull