jaxmesh
JAX-based mesh primitives and isosurface extraction.
Installation
pip install jaxmesh
Quick Start
import jax.numpy as jnp
from jaxmesh import marching_tetrahedra, rectilinear_grid, save_mesh_as_ply
# Create a grid
x = jnp.linspace(-1, 1, 32)
coords = rectilinear_grid(x, x, x)
# Define a scalar field (sphere SDF)
field = jnp.sqrt(coords[..., 0]**2 + coords[..., 1]**2 + coords[..., 2]**2) - 0.5
# Extract isosurface
mesh = marching_tetrahedra(field, coords, level=0.0)
# Save to file
save_mesh_as_ply(mesh, "sphere.ply")
Features
Mesh Types
SimplexMesh- Base class for simplex meshesTriMesh- Triangle mesh with barycentric coordinates and gradientsTetMesh- Tetrahedral mesh with barycentric utilitiesQuadMesh- Quad mesh convertible to trianglesHexMesh- Hexahedral mesh convertible to tetrahedra
Isosurface Extraction
marching_tetrahedra(field, coords, level)- Extract triangle mesh from scalar fieldrectilinear_grid(x, y, z)- Create structured 3D grid coordinatesdecimate_mesh(mesh, max_faces)- Reduce mesh complexity
Geometry Utilities
compute_vertex_normals(mesh)- Per-vertex normalstriangle_barycentric_weights(vertices, point)- Barycentric coordinatestetra_barycentric_weights(vertices, point)- Barycentric coordinates
Level-Set Utilities
triangle_edge_intersections(values, level)- Find edge crossingstetra_edge_intersections(values, level)- Find edge crossingstriangle_zero_segment(vertices, values, level)- Extract level-set segmenttetra_zero_triangles(vertices, values, level)- Extract level-set facets
I/O
save_mesh_as_ply(mesh, path)- ASCII PLY export with normalssave_mesh_as_glb(mesh, path)- Binary glTF export
License
MIT
Metadata
Release files for jaxmesh 0.2.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 | Provenance | Actions |
|---|---|---|---|---|
| jaxmesh-0.2.0.tar.gz | 14.3 kB | Without provenance | Details for jaxmesh-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| jaxmesh-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for jaxmesh-0.2.0-py3-none-any.whl |
Total release size: 32.1 kB
Release files / jaxmesh-0.2.0.tar.gz
| Download URL | jaxmesh-0.2.0.tar.gz |
|---|---|
| Size | 14.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dcaaf15ca4df9ecc2332315f75b16da6eb729bf21f94fa287a99e80331a7080e
|
|
BLAKE2b-256 checksum How to use checksums |
7385266019504f7ba527c4649b1125be36880be900ff45c8c50b36515c808318
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.1
|
Release files / jaxmesh-0.2.0-py3-none-any.whl
| Download URL | jaxmesh-0.2.0-py3-none-any.whl |
|---|---|
| Size | 17.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1010a0971c57f416cbe8f5088c5f5720360127072cc43732756bb5b6b1ef95be
|
|
BLAKE2b-256 checksum How to use checksums |
386960701d83918066b3441e2cd4c7754282aba3719193d91eba0f06ced045ae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.1
|
Security for jaxmesh 0.2.0
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.