skillfed

pytetwild

Python wrapper of fTetWild

pytetwild v0.3.0 114.5K downloads/30d#12,290 on PyPI
Copyleft license Active released

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 pytetwild

uv

uv add pytetwild

poetry

poetry add pytetwild

Installing 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

Development Status :: 3 - AlphaIntended Audience :: Science/ResearchLicense :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)Operating System :: MacOSOperating System :: Microsoft :: WindowsOperating System :: POSIXProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Scientific/Engineering :: Information Analysis

Tags

tetrahedral mesh generationsurface to volume meshmesh tetrahedralization3D mesh conversionfTetWild Python wrappervolumetric mesh creationtetrahedral meshing
mesh-generationcomputational-geometryscientific-computing

More Information Analysis packages