Metadata-Version: 2.1
Name: isoext
Version: 0.7.0
Summary: A collection of algorithms for iso-surface extraction on GPU. Supports pytorch.
Author-Email: Guangyan Cai <gcai3@uci.edu>
Classifier: License :: OSI Approved :: MIT License
Classifier: Environment :: GPU :: NVIDIA CUDA
Classifier: Topic :: Multimedia :: Graphics :: 3D Modeling
Project-URL: Homepage, https://github.com/GuangyanCai/isoext
Project-URL: Documentation, https://guangyancai.github.io/isoext/
Requires-Python: >=3.10
Requires-Dist: viser
Description-Content-Type: text/markdown

# isoext

[![PyPI version](https://badge.fury.io/py/isoext.svg?)](https://badge.fury.io/py/isoext)
[![Documentation](https://img.shields.io/badge/docs-online-blue)](https://guangyancai.github.io/isoext/)

**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](https://viser.studio)
- **SDF Utilities** — SDF primitives and CSG operations

## Installation

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

```bash
pip install isoext
```

## Quick Start

```python
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](https://guangyancai.github.io/isoext/) for guides on grids, extraction methods, and the API reference.

## License

MIT License. See [LICENSE](LICENSE) for details.
