Metadata-Version: 2.4
Name: anvil-reduce
Version: 0.1.1
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Rust
Classifier: Topic :: Multimedia :: Graphics :: 3D Modeling
Classifier: Topic :: Software Development :: Libraries
Classifier: Operating System :: POSIX :: Linux
Classifier: Operating System :: MacOS
Classifier: Operating System :: Microsoft :: Windows
Requires-Dist: numpy>=1.21
License-File: LICENSE
Summary: Volume-based mesh proxy generator. Voxelize, marching-cubes, smooth, remesh. Fast, watertight, hands-off.
Keywords: mesh,geometry,decimation,proxy,lod,vfx,dcc,voxel,marching-cubes
Author-email: Alejandro Cabrera <voidreamer@gmail.com>
License-Expression: MIT
Requires-Python: >=3.9
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Homepage, https://github.com/voidreamer/anvil-reduce
Project-URL: Issues, https://github.com/voidreamer/anvil-reduce/issues
Project-URL: Repository, https://github.com/voidreamer/anvil-reduce

# anvil-reduce

Volume-based mesh proxy generator: voxelize, marching cubes, smooth, remesh.
Fast, watertight, hands-off. Native Rust core, Python bindings via PyO3.

## Install

```bash
pip install anvil-reduce
```

Inside DCCs:

```bash
mayapy -m pip install anvil-reduce          # Maya
hython -m pip install anvil-reduce          # Houdini
# Blender: install into the addon's bundled Python or vendor the wheel
```

## Quick start

One-shot file pipeline (the path most pipeline TDs want):

```python
from anvil_reduce import proxy_from_path

result = proxy_from_path(
    "hero.obj",
    "hero_proxy.obj",
    quality="balanced",          # "fast" | "balanced" | "high"
    transfer_normals=True,
)
print(f"{result['input_faces']} -> {result['output_faces']} in "
      f"{result['wall_seconds']:.2f}s")
```

NumPy-driven workflow:

```python
import numpy as np
from anvil_reduce import Mesh, generate_proxy

mesh = Mesh.from_numpy(positions, indices)   # (N,3) f64, (M,3) u32
proxy = generate_proxy(mesh, quality="balanced", target_faces=20_000)
positions, indices = proxy.positions(), proxy.indices()
```

## Quality presets

| Preset    | voxel_res | smooth | remesh | sdf  |
|-----------|-----------|--------|--------|------|
| fast      | 64        | 10     | 0      | off  |
| balanced  | 128       | 10     | 3      | off  |
| high      | 256       | 15     | 5      | on   |

Override individual knobs by passing them explicitly. `target_faces` auto-picks
`voxel_res`. `dilation` controls hull tightness (0 = tight, 1-3 = looser).

See <https://github.com/voidreamer/anvil-reduce> for the full project.

