Skip to main content

Python wrapper of fTetWild

Project description

pypi MPL

pytetwild is a Python library for mesh tetrahedralization. It is a Python wrapper around the efficient C++ library for tetrahedral meshing provided by fTetWild.

Installation

We have pre-built wheels for Python 3.8 - Python 3.12 for Windows and Linux x64.

The recommended way to install pytetwild is via PyPI:

pip install pytetwild

You can also clone the repository and install it from source, but since there’s C++ involved, the build is a bit more complicated. See CONTRIBUTING.md for more details.

Usage

To tetrahedralize a surface mesh:

>>> import pytetwild
>>> mesh = pytetwild.tetrahedralize("input_mesh.ply")
>>> mesh.vertices
array([[x1, y1, z1],
       [x2, y2, z2],
       ...], dtype=float32)
>>> mesh.tetrahedra
array([[i1, j1, k1, l1],
       [i2, j2, k2, l2],
       ...], dtype=int32)

You can also load a mesh, perform tetrahedralization, and export the tetrahedral mesh:

>>> import pytetwild
>>> pytetwild.tetrahedralize("input_mesh.ply", "output_mesh.ply")

License and Acknowledgments

This project relies on fTetWild and credits go to the original authors for their efficient C++ library for tetrahedral meshing. That work is licensed under the Mozilla Public License v2.0.

The work in this repository is also licensed under the Mozilla Public License v2.0.

Support

If you are having issues, please feel free to raise an Issue.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pytetwild-0.1.dev0.tar.gz (14.5 MB view hashes)

Uploaded Source

Built Distributions

pytetwild-0.1.dev0-cp312-cp312-win_amd64.whl (1.9 MB view hashes)

Uploaded CPython 3.12 Windows x86-64

pytetwild-0.1.dev0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.7 MB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

pytetwild-0.1.dev0-cp311-cp311-win_amd64.whl (1.9 MB view hashes)

Uploaded CPython 3.11 Windows x86-64

pytetwild-0.1.dev0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.7 MB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

pytetwild-0.1.dev0-cp310-cp310-win_amd64.whl (1.9 MB view hashes)

Uploaded CPython 3.10 Windows x86-64

pytetwild-0.1.dev0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.7 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

pytetwild-0.1.dev0-cp39-cp39-win_amd64.whl (1.9 MB view hashes)

Uploaded CPython 3.9 Windows x86-64

pytetwild-0.1.dev0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.7 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

pytetwild-0.1.dev0-cp38-cp38-win_amd64.whl (1.9 MB view hashes)

Uploaded CPython 3.8 Windows x86-64

pytetwild-0.1.dev0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.7 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page