Skip to content

Quick Start

This page shows the most common workflows. See Commands for full option reference.


Convert a CAD file to GLB

bash
# Linux
xconvert convert model.step --out model.glb

# Windows
xconvert convert "C:\Models\assembly.STEP" --out "C:\Models\assembly.glb"

Output: model.glb and model.edges.json (edge lines for the viewer).


Convert with optimization (LODs + chunking)

For large models intended for the XViewr browser viewer, generate LOD levels and spatially chunk the output:

bash
xconvert convert model.step \
  --out model.glb \
  --lods 3 \
  --chunk

Output:

output/
├── model.glb           # Full-quality GLB
├── lod0.glb            # High quality (binary-search RMS target)
├── lod1.glb            # 75% of lod0 faces
├── lod2.glb            # 15% of lod0 faces
├── lod3.glb            # 4% of lod0 faces
└── chunks/
    ├── manifest.json
    ├── lod0/
    │   ├── chunk_0000_lod0.glb
    │   └── ...
    └── lod1/
        └── ...

Decimate an existing GLB

bash
xconvert decimate model.glb --out-dir model_lods/

Chunk an existing GLB

bash
xconvert chunk model.glb --out-dir model_chunks/

Check tool and binary status

bash
xconvert info --check-binaries

Inspect a 3D file

bash
xconvert info model.glb
xconvert info model.step --json   # machine-readable output

CI / automation (JSON progress)

Use --json to receive newline-delimited progress events on stdout:

bash
xconvert convert model.step --json | while read line; do
  echo "$line" | python3 -c "import sys,json; m=json.load(sys.stdin); print(m['type'], m.get('progress',''))"
done

Progress event types: start, progress, result, error.


Docker quick-start

bash
docker run --rm \
  -v "$(pwd)/models:/data" \
  optellix/xconvert:latest \
  xconvert convert /data/model.step --out /data/model.glb --lods 3 --chunk

XViewr SDK and xConvert CLI documentation.