Skip to main content

convert CAD data into realtime-ready OpenUSD, glTF, OBJ, STL, and FBX assets

Project description

fascat

release license MIT Python PyPI DeepWiki

Fascat is a Python library and CLI for converting STEP, IGES, OpenCASCADE BREP, and JT CAD into realtime-ready OpenUSD, glTF, OBJ, STL, and FBX assets.

flowchart TD
    A["STEP / IGES / BREP / JT CAD"] --> B["Imported assembly"]
    B --> C["Tessellated meshes"]
    C --> D["Repaired meshes"]
    D --> E["Staged materials & UVs"]
    E --> F["Optimized LODs"]
    F --> G["OpenUSD / glTF / OBJ / STL / FBX"]

Installation

pip / pipx

pipx install fascat
# or
pip install fascat

The base install does not require a C++ compiler. To enable optional glTF EXT_meshopt_compression export, install the meshopt backend separately:

pip install "fascat[meshopt]"

Quick Start

# Show help
fascat --help
fascat help convert

# Print version
fascat version

# Inspect a CAD 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
fascat convert motor.step motor.glb --profile mixed-reality

# Convert JT 8.x/9.x/10.x tessellation to GLB and import all stored JT LODs
fascat convert assembly.jt assembly.glb --lod-selection all

# 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

# Keep valid stored LODs and generate only missing or invalid fallbacks
fascat convert assembly.jt assembly.glb --lod-selection all --lod-source auto

# 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

# Render multi-angle turntable previews of the result
fascat validate motor.glb --turntable-dir views/

Commands

Command Description
fascat inspect input.step Inspect a CAD assembly before conversion
fascat convert input.step [output.usdc] Convert STEP, IGES, BREP, or JT CAD into OpenUSD, glTF, OBJ, STL, or FBX
fascat validate output.usdc Validate generated USD, glTF, OBJ, STL, or FBX 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

import fascat as fc

asset = fc.read_step("motor.step")          # or read_iges(...) / read_brep(...) / read_jt(...)

asset = (
    asset.tessellate(sag=0.1, angle=15.0)
    .repair(tolerance=0.05)
    .stage(materials="cad", uv0="box")
    .optimize(target_triangles=500_000)
    .lods([0.5, 0.25, 0.1])
)

asset.write_usd("motor.usdc")
asset.write_gltf("motor.glb")

Keyword arguments mirror each operation's *Options dataclass; pass a prebuilt options object instead when you prefer (asset.repair(fc.RepairOptions(tolerance=0.05))).

Agentic Skill

skills/cad-to-rt3d is an agentic skill that automates the whole CAD → RT3D tuning loop: it converts with a target profile, validates geometry quality, renders the result from multiple turntable angles, compares each view against a high-fidelity reference conversion, and adjusts fascat flags iteration by iteration until the asset passes both deterministic gates (topology, triangle and file-size budgets — checked by scripts/gates.py) and a visual inspection of the renders.

Open this repository in your coding agent (or copy the skill folder into your own project) and ask, for example:

Use the cad-to-rt3d skill to convert motor.step for realtime-web.

Every iteration's settings, reports, and renders are kept in a <output>.fascat-work/ directory, so the tuning history stays auditable. The turntable rendering it relies on is plain fascat validate --turntable-dir — see the CLI reference for the flags.

Docs

Full documentation at pavelsimo.github.io/fascat.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fascat-0.6.0.tar.gz (3.2 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fascat-0.6.0-py3-none-any.whl (413.9 kB view details)

Uploaded Python 3

File details

Details for the file fascat-0.6.0.tar.gz.

File metadata

  • Download URL: fascat-0.6.0.tar.gz
  • Upload date:
  • Size: 3.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for fascat-0.6.0.tar.gz
Algorithm Hash digest
SHA256 674e5e3105b8232e05e44452774de44987d6cc7e68c9123edafa9b50ca0f799f
MD5 32e035a8d4c1c018f7ae691dc37a1041
BLAKE2b-256 891d949bdef9a619a53cf9857ddf6256d2c3cbb9f96b4a958aeafd4c0591764f

See more details on using hashes here.

Provenance

The following attestation bundles were made for fascat-0.6.0.tar.gz:

Publisher: release.yml on pavelsimo/fascat

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file fascat-0.6.0-py3-none-any.whl.

File metadata

  • Download URL: fascat-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 413.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for fascat-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fada84a4003aaf9389bbb99fb725683b1b7e6faedc1ded215e1df7c1ec6fa54e
MD5 e50439c924cfa2f813a0884b6f82754b
BLAKE2b-256 e5b1be57fd0e0781c5c168fa3d57349e05de81bff8d7b2be87bb3da71ed6c77f

See more details on using hashes here.

Provenance

The following attestation bundles were made for fascat-0.6.0-py3-none-any.whl:

Publisher: release.yml on pavelsimo/fascat

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page