Skip to content

Repository files navigation

isoext

PyPI version Documentation

GPU-accelerated iso-surface extraction for PyTorch

isoext is a high-performance library for extracting surfaces from scalar fields using CUDA.

Features

  • Marching Cubes — Fast triangular mesh extraction (about 5 ms for a 512³ grid on an RTX 5090)
  • Dual Contouring — Triangle meshes with sharp feature preservation
  • Flexible Grids — Dense uniform grids and memory-efficient sparse grids
  • Interactive Viewer — View meshes in the browser, built on viser
  • SDF Utilities — SDF primitives and CSG operations

Installation

Requires PyTorch with CUDA support; building from source needs CUDA 12.4+.

pip install isoext

Quick Start

import isoext
from isoext import viewer

grid = isoext.UniformGrid([256, 256, 256])
grid.set_values(grid.get_points().norm(dim=-1) - 0.8)  # Sphere

vertices, faces = isoext.marching_cubes(grid)

server = viewer.show(vertices, faces)  # opens the mesh in the browser
isoext.write_obj("sphere.obj", vertices, faces)

Documentation

See the full documentation for guides on grids, extraction methods, and the API reference.

License

MIT License. See LICENSE for details.

Releases

Packages

Used by

Contributors

Languages