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 Homebrew DeepWiki

Fascat is a Python library and CLI for converting CAD data into RT3D assets.

flowchart TD
    A["STEP / IGES / BREP 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

Homebrew (macOS / Linux)

brew tap pavelsimo/homebrew-tap
brew install fascat

pip / pipx

pipx install fascat
# or
pip install fascat

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

# 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 CAD assembly before conversion
fascat convert input.step [output.usdc] Convert STEP, IGES, or BREP 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

import fascat as fc

asset = fc.read_step("motor.step")
# Or:
# asset = fc.read_iges("legacy.igs")
# asset = fc.read_brep("native.brep")

asset = asset.tessellate(
    fc.TessellationOptions(
        sag=0.1,
        sag_ratio=None,
        angle=15.0,
        relative=True,
        max_edge_length=None,
        max_polygon_length=None,
        free_edge_report=False,
        reuse_existing_meshes=True,
    )
)

asset = asset.repair(
    fc.RepairOptions(
        tolerance=0.05,
        merge_vertices=True,
        delete_degenerate=True,
        fix_winding=True,
        fill_small_holes=False,
    )
)

asset = asset.stage(
    fc.StageOptions(
        materials="cad",
        normals=True,
        uv0="box",
        uv1=None,
    )
)

asset = asset.optimize(
    fc.OptimizeOptions(
        target_triangles=500_000,
        preserve_instances=True,
        simplify=True,
        optimize_buffers=True,
    )
)

asset = asset.lods(
    fc.LODOptions(
        ratios=[0.5, 0.25, 0.1],
        mode="variants",
    )
)

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

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.3.0.tar.gz (3.1 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.3.0-py3-none-any.whl (346.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for fascat-0.3.0.tar.gz
Algorithm Hash digest
SHA256 61d762a44a669694c8efdd43a224900ea13cf5ecbaf1524086cd3f48fff10177
MD5 525d996706cdf01fce9eb1d6660b5afa
BLAKE2b-256 0cc9e9d90e376684950d58a1bcd9a89ba4fabfdef0f80651ea20706b66dcb245

See more details on using hashes here.

Provenance

The following attestation bundles were made for fascat-0.3.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.3.0-py3-none-any.whl.

File metadata

  • Download URL: fascat-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 346.1 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.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 07c7d2393a44037b6b5c4351b67bbe2a6d0f4cb7bcd090e12966e0b3180a7b25
MD5 d0dbca6ccfd748550ab6f493bbdcb9db
BLAKE2b-256 9353bad48ca00b53debe15a9a0853d8747e535c1837b038e1760b9789844d33e

See more details on using hashes here.

Provenance

The following attestation bundles were made for fascat-0.3.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