pytetwild
Python wrapper of fTetWild
What it is and what it does
pytetwild is a Python wrapper around fTetWild, a C++ library for generating tetrahedral meshes from surface geometry. It takes a surface mesh—defined either as raw vertex and face arrays or as a PyVista PolyData object—and produces a volumetric tetrahedral mesh suitable for finite-element analysis, simulation, or other computational geometry tasks.
The library exposes two main interfaces: `tetrahedralize()` for raw numpy arrays and `tetrahedralize_pv()` for PyVista meshes. It offers control over mesh density via edge-length parameters, mesh quality via optimization settings, and computational efficiency via thread count. Pre-built wheels for Python 3.10–3.14 on major platforms make installation straightforward; the only runtime dependency is numpy.
Use it for:
- Generate volumetric tetrahedral meshes from CAD surface models for finite-element simulation.
- Convert 3D scan data or point-cloud-derived surfaces into analysis-ready tetrahedral grids.
- Prepare mesh inputs for computational fluid dynamics (CFD) or structural analysis solvers.
- Batch-process surface geometries into tetrahedral form for machine learning training data.
- Visualize and inspect internal mesh structure of solid objects in PyVista.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
pytetwild converts surface meshes into tetrahedral volume meshes using a Python wrapper around the fTetWild C++ library, supporting both raw numpy arrays and PyVista mesh objects.
Yes, if you need tetrahedral mesh generation and can work with Python 3.10–3.14. The copyleft license (MPL 2.0) requires disclosure of modifications; active maintenance and pre-built wheels lower friction. No known vulnerabilities. Suitable for research, simulation, and computational geometry workflows where mesh quality and control matter.
Install
pytetwild on PyPI
pip
pip install pytetwilduv
uv add pytetwildpoetry
poetry add pytetwildInstalling pytetwild
Before you install
Medium install friction due to compiled C++ components; pre-built wheels available for Python 3.10–3.14 on Windows, Linux, and macOS reduce friction significantly. Active maintenance as of 89 days since last release.
License in practice
Licensed under Mozilla Public License v2.0 (copyleft); you must disclose source code modifications and distribute under the same license if you redistribute the package or derivative works.
Quickstart
pip install pytetwild
import numpy as np
import pytetwild
vertices = np.array([[0, 0, 0], [1, 0, 0], [1, 1, 0], [0, 1, 0]])
faces = np.array([[0, 1, 2, 3]])
v_out, tetra = pytetwild.tetrahedralize(vertices, faces)
Requires Python 3.10–3.14; compiled wheels provided for common platforms (Windows, Linux, macOS on x86_64 and ARM64).
Verify before relying
- Performance characteristics and scalability limits for large meshes are not documented in the fact sheet.
- Quality metrics or comparison benchmarks against other tetrahedral meshing tools are not provided.
- Whether the optional pyvista extra dependency is required for production use or only for convenience.
Package facts
| License | not declared (copyleft) |
| Python support | supports the current Python release (<3.15,>=3.10) |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | 1 — numpy |
| Maintenance | actively maintained — 89 days since the last release |
| First released | |
| Downloads | 114,540/month — #12,290 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pytetwild-0.3.0-cp310-cp310-macosx_15_0_arm64.whl; pytetwild-0.3.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl; pytetwild-0.3.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl; pytetwild-0.3.0-cp310-cp310-win_amd64.whl; pytetwild-0.3.0-cp311-cp311-macosx_15_0_arm64.whl; pytetwild-0.3.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl; pytetwild-0.3.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl; pytetwild-0.3.0-cp311-cp311-win_amd64.whl; pytetwild-0.3.0-cp312-abi3-macosx_15_0_arm64.whl; pytetwild-0.3.0-cp312-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl; pytetwild-0.3.0-cp312-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl; pytetwild-0.3.0-cp312-abi3-win_amd64.whl
Tags
More Information Analysis packages
A drop-in replacement for Python's standard…
permissive · top 100 on PyPI
pyarrowpyarrow provides Python bindings to Apache…
permissive · top 100 on PyPI
networkxNetworkX provides data structures and…
permissive · top 1,000 on PyPI
snowflake-connector-pythonConnects Python applications to Snowflake data…
permissive · top 1,000 on PyPI
contourpyContourPy calculates contours of 2D…
permissive · top 1,000 on PyPI
snowflake-snowpark-pythonSnowpark Python provides APIs to query and…
permissive · top 1,000 on PyPI
fast-simplificationSimplifies 3D meshes by reducing the number of…
permissive · top 15,000 on PyPI
tetgentetgen wraps the TetGen C++ library to generate…
permissive · top 15,000 on PyPI
pyvistaPyVista provides a NumPy-native API for 3D…
permissive · top 5,000 on PyPI
vhacdxComputes approximate convex decomposition of…
unclear · top 5,000 on PyPI
manifold3dManifold3d creates and operates on manifold…
permissive · top 5,000 on PyPI
pymeshfixPyMeshFix repairs triangular meshes by removing…
agpl · top 15,000 on PyPI
numpy-stlReads, writes, and modifies STL mesh files…
permissive · top 15,000 on PyPI
pysplashsurfpySplashsurf provides Python bindings for…
permissive · top 15,000 on PyPI
xatlasGenerates UV texture coordinates for 3D…
permissive · top 15,000 on PyPI
PyGEL3DPyGEL3D provides Python bindings for a C++…
permissive · top 15,000 on PyPI