Skip to content

GuangyanCai/isoext

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
  • Dual Contouring — Triangle meshes with sharp feature preservation
  • Flexible Grids — Dense uniform grids and memory-efficient sparse grids
  • SDF Utilities — Optional primitives and CSG operations

Installation

Requires PyTorch with CUDA support, as well as the matching CUDA compiler.

pip install isoext

Quick Start

import isoext

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

vertices, faces = isoext.marching_cubes(grid)
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.