Meshers Python 0.1.0
In-process CPU float64 meshing of bounded implicit solids. No subprocess or intermediate mesh file is needed.
Install and use
Use Python 3.10+. Wheels are available for Linux x86-64, Windows x86-64, macOS Apple Silicon and macOS Intel. Users installing a wheel do not need Rust, Numba or SymPy.
python -m pip install "meshers[io]"
The base installation, pip install meshers, requires NumPy. The optional
io extra adds h5py for VTKHDF export; it does not install a viewer.
import meshers
mesh = meshers.generate("gyroid", cells=24, band=(-0.5, 0.5), periodic=(True, True, True))
points, tetrahedra = mesh.points, mesh.tetrahedra
mesh.write_vtkhdf("gyroid.vtkhdf") # requires h5py
Native fields: gyroid, schwarz_p, schwarz_d; their period is one physical
coordinate unit. Bounds default to the unit cube and use
(xmin, xmax, ymin, ymax, zmin, zmax). cells accepts an integer or three integers.
Without band, the solid is field <= 0. Periodicity defaults to disabled.
Custom and graded functions
Pass a pointwise NumPy-style callable field(x, y, z). Supported expressions
compile automatically inside the wheel, with automatic gradients and cached
machine code. CPU workers evaluate float64 directly, with the GIL released.
This supports callable grading, thickness and blends without an explicit
compilation step. See supported operations and limits.
Unsupported expressions fall back to batched NumPy callbacks with a warning.
Select that path explicitly with compile=False; callbacks must return (N,)
float64 arrays, and optional gradients (N,3). Functions must be deterministic
and independent of batch contents. Callback evaluation runs on the calling
Python thread.
See the graded example.
Results and failures
- Owned NumPy arrays: float64 points, int64 tetrahedra and boundary triangles.
- Boundary tags: 0 implicit, 1/2 x-/x+, 3/4 y-/y+, 5/6 z-/z+.
- Per-axis periodic node pairs plus geometry and quality diagnostics.
- VTKHDF volume or
surface=True, periodic master IDs and physical shift vectors. Volume files includeVolumeandMMGQuality, computed using the MMG formula in NumPy, not by calling mmgpy. - Invalid options raise
ValueError; failed meshing raisesMeshingError. Callback exceptions are preserved.KeyboardInterruptis propagated. - Pass
cancel=CancellationToken()and calltoken.cancel()from another thread for cooperative cancellation. A callback must return before it can be interrupted by that token. Tokens remain cancelled after use.
Output arrays own their storage and are mutable. Mutating them can invalidate connectivity, metadata or diagnostics. Surface output is the closed solid boundary, not an independent zero-level surface mesher. Small features may be missed at insufficient resolution; successful sampling is not geometry certification.
Validation and limits
The test suite covers automatic derivatives, cache invalidation, cancellation, periodicity, bounded callbacks, named intersections, physical coordinate scales and VTKHDF round trips. CI tests Python 3.10, 3.12 and 3.14 on Linux, Windows and macOS, plus installed platform wheels and an isolated source build. See the release checks and CI results. Thin, nonsmooth or poorly resolved geometry still needs application-specific convergence checks.
See the runnable examples and performance regression checks.
Maintainer build
Maintainers need a compatible Rust toolchain and Python to build wheels:
python -m pip install maturin
maturin build --release --interpreter python --out dist
End users install the resulting wheels. Source installations require Rust.
Retained intersections and mapped periodic ends
meshers.generate_intersection accepts named negative sublevel constraints,
an optional coordinate map and explicit rigid periodic transforms. It returns
the same Mesh type, with named surface access, feature edges and parameter
coordinates. See the intersection guide
and examples/curved_tpms.py. Source builds require Rust 1.95 or newer.
Release files for meshers 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| meshers-0.1.0.tar.gz | 236.0 kB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| meshers-0.1.0-cp310-abi3-win_amd64.whl | CPython 3.10 | abi3 | Windows x86-64 | Details |
| meshers-0.1.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.10 | abi3 | Linux glibc 2.17+ x86-64 | Details |
| meshers-0.1.0-cp310-abi3-macosx_11_0_arm64.whl | CPython 3.10 | abi3 | macOS 11.0+ ARM64 | Details |
| meshers-0.1.0-cp310-abi3-macosx_10_12_x86_64.whl | CPython 3.10 | abi3 | macOS 10.12+ x86-64 | Details |
Total release size: 8.5 MB
Release files / meshers-0.1.0.tar.gz
| Download URL | meshers-0.1.0.tar.gz |
|---|---|
| Size | 236.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0ac3e81a9b96a9a85a6904aa24d357baa8818b4e6f6e2ab5d39c572f366e0260
|
|
BLAKE2b-256 checksum How to use checksums |
7843ade3895e5fa031d659b1b434e1b3c9294e153cf1c01491d29ba6be06e27f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 19, 2026.
Transparency logRelease files / meshers-0.1.0-cp310-abi3-win_amd64.whl
| Download URL | meshers-0.1.0-cp310-abi3-win_amd64.whl |
|---|---|
| Size | 2.3 MB |
| Tags | CPython 3.10 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
9c6d5c9064653be2d282918ab4f423c140249397a5718d4aac70844b1db69c55
|
|
BLAKE2b-256 checksum How to use checksums |
cc8d4082e157408f27817c7592e0c9f1571fcaea3a7eae6af2b9319ce89c35df
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 19, 2026.
Transparency logRelease files / meshers-0.1.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | meshers-0.1.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 2.2 MB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
7e92d21e834c7c358e73280ae8fe72de3e6d80f8a85c63e22789096da0b4e1df
|
|
BLAKE2b-256 checksum How to use checksums |
54a270bb8ba8ae87b14e9e54905704058d3144bbd152978bb0b7f279fc64bab4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 19, 2026.
Transparency logRelease files / meshers-0.1.0-cp310-abi3-macosx_11_0_arm64.whl
| Download URL | meshers-0.1.0-cp310-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | CPython 3.10 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
120d6a3ecca8c0d3989939c2cf2faaba50c1913b257efd568c380f6c9b588843
|
|
BLAKE2b-256 checksum How to use checksums |
83a71f0fb728306347fe4f2c42f6a276b0d63e88fdad3eb6841e6a715b709630
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 19, 2026.
Transparency logRelease files / meshers-0.1.0-cp310-abi3-macosx_10_12_x86_64.whl
| Download URL | meshers-0.1.0-cp310-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 2.1 MB |
| Tags | CPython 3.10 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
609b7b82b9492a25c3c871f64500388904aadade8e42e99df07f506b1169be53
|
|
BLAKE2b-256 checksum How to use checksums |
56455891be34be9fd5e92ef2947a08dd4a33b9083dc38eab49d5c914eb429bcd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 19, 2026.
Transparency log