Metadata-Version: 2.4
Name: fascat
Version: 0.1.0
Summary: convert CAD STEP data into realtime-ready OpenUSD and glTF assets
Project-URL: Homepage, https://pavelsimo.github.io/fascat
Project-URL: Repository, https://github.com/pavelsimo/fascat
Project-URL: Issues, https://github.com/pavelsimo/fascat/issues
Author: pavelsimo
License: MIT
License-File: LICENSE
Keywords: cad,cli,gltf,openusd,step,usd
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
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: Topic :: Multimedia :: Graphics :: 3D Modeling
Requires-Python: >=3.10
Requires-Dist: cadquery-ocp>=7.7
Requires-Dist: fast-simplification>=0.1
Requires-Dist: meshoptimizer<0.3,>=0.2.30a0
Requires-Dist: numpy>=1.24
Requires-Dist: rich>=13.0
Requires-Dist: trimesh>=4.0
Requires-Dist: typer>=0.15
Requires-Dist: typing-extensions>=4.8
Requires-Dist: usd-core>=24.8
Provides-Extra: uv
Requires-Dist: xatlas>=0.0.9; extra == 'uv'
Description-Content-Type: text/markdown

# 🐱 fascat

Fascat is a Python library and CLI for converting CAD STEP data into realtime-ready OpenUSD and glTF assets.

[![release](https://img.shields.io/github/v/release/pavelsimo/fascat?style=flat-square&color=4d9e4d&logoColor=white)](https://github.com/pavelsimo/fascat/releases)
[![license MIT](https://img.shields.io/badge/license-MIT-ffd60a?style=flat-square&logoColor=white)](LICENSE)
[![Python](https://img.shields.io/badge/Python-3.10+-3776ab?style=flat-square&logoColor=white)](https://python.org)
[![PyPI](https://img.shields.io/pypi/v/fascat?style=flat-square&color=3775a9&logoColor=white)](https://pypi.org/project/fascat)
[![Homebrew](https://img.shields.io/badge/Homebrew-b28f62?style=flat-square&logoColor=white)](https://github.com/pavelsimo/homebrew-tap)
[![DeepWiki](https://img.shields.io/badge/DeepWiki-0088cc?style=flat-square&logoColor=white)](https://deepwiki.com/pavelsimo/fascat)

The V1 pipeline is intentionally narrow:

```text
STEP CAD -> imported assembly -> tessellated meshes -> repaired meshes -> staged materials and UVs -> optimized LODs -> OpenUSD/glTF
```

## Installation

### Homebrew (macOS / Linux)

```bash
brew tap pavelsimo/homebrew-tap
brew install fascat
```

### pip / pipx

```bash
pipx install fascat
# or
pip install fascat
```

## Quick Start

```bash
# Show help
fascat --help
fascat help convert

# Print version
fascat version

# Inspect a STEP assembly
fascat inspect motor.step
fascat --json inspect motor.step

# Convert STEP to binary OpenUSD
fascat convert motor.step
fascat convert motor.step motor.usdc --profile realtime-desktop

# Convert STEP to binary glTF for VR/runtime engines
fascat convert motor.step motor.glb --profile virtual-reality

# Tune tessellation, UVs, optimization, and LODs
fascat convert motor.step motor.usdc \
  --sag 0.1 \
  --angle 15 \
  --max-edge-length 25 \
  --target-triangles 500000 \
  --materials display \
  --uv1 box \
  --lods 0.5,0.25,0.1

# Preview a conversion without writing files
fascat convert motor.step motor.usdc --dry-run

# Emit a debuggable ASCII USD and report
fascat convert motor.step motor.usda --debug --report report.json

# Validate generated output
fascat validate motor.usdc
fascat validate motor.glb
```

## Commands

| Command | Description |
|---------|-------------|
| `fascat inspect input.step` | Inspect a STEP assembly before conversion |
| `fascat convert input.step [output.usdc]` | Convert STEP CAD into OpenUSD or glTF |
| `fascat validate output.usdc` | Validate generated USD or glTF output |
| `fascat help [command]` | Show top-level or command-specific help |
| `fascat version` | Print version and exit |

Fascat follows standard CLI stream conventions: primary output and JSON go to stdout, while errors and per-stage conversion progress go to stderr. Conversion validates the generated asset before reporting success. File arguments accept `-` for stdin/stdout where meaningful.

## Python API

```python
import fascat as fc

fc.convert(
    "pump.step",
    "pump.usdc",
    tessellation=fc.Tessellation(sag=0.1, angle=15, max_edge_length=25),
    stage=fc.StageOptions(materials="cad", uv0="box", uv1="unwrap"),
    optimize=fc.OptimizeOptions(target_triangles=1_000_000, preserve_instances=True),
    lods=fc.LODOptions((0.5, 0.25, 0.1)),
)

asset = fc.read_step("pump.step").tessellate().repair().stage().optimize()
asset.write_gltf("pump.glb")
```

## Docs

Full documentation at **[pavelsimo.github.io/fascat](https://pavelsimo.github.io/fascat)**.

## License

MIT
