Skip to main content

convert CAD STEP data into realtime-ready OpenUSD and glTF assets

Project description

fascat

release license MIT Python PyPI Homebrew DeepWiki

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

flowchart LR
    A["STEP 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"]

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

import fascat as fc

asset = fc.read_step("motor.step")

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.2.0.tar.gz (2.9 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.2.0-py3-none-any.whl (199.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for fascat-0.2.0.tar.gz
Algorithm Hash digest
SHA256 f4c30a05b2490fbba2ac30fe645bd7f95a19d04c25c8d8041db582f5e16d8a1f
MD5 4344de5a74f83398f3f5bd76fc5fb83a
BLAKE2b-256 50e50d24ae1ebee9596b4fe76cd3b680e87f6b505fb37be890f932c1b8feeff9

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: fascat-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 199.2 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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6fcc394f3b17e964ee8d15d72586f21ca6c406e0cab26d0ffc819d380219dc31
MD5 e7772928671374e7d9df16a771190188
BLAKE2b-256 4941ea74c8e9379d325d26defbd099162d2e1787c88a41d2857a982649f51246

See more details on using hashes here.

Provenance

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