--- id: pytetwild version: "0.3.0" license: unclear license_treatment: copyleft maintenance: active --- # pytetwild — Python wrapper of fTetWild License: copyleft · Maintenance: active · Downloads: 114.5K/mo ## 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 above — 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 pip install pytetwild uv add pytetwild 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_current - Install friction: medium - Maintenance: active - Downloads: 114.5K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags tetrahedral mesh generation, surface to volume mesh, mesh tetrahedralization, 3D mesh conversion, fTetWild Python wrapper, volumetric mesh creation, tetrahedral meshing, mesh-generation, computational-geometry, scientific-computing [View on SkillFed](https://skillfed.io/packages/pytetwild) · [View on PyPI](https://pypi.org/project/pytetwild/)