One open pipeline for native CAD.
cadmpeg is a toolchain for reading, inspecting, converting, and writing native CAD files. The CLI converts and inspects documents. The libraries add vendor-file support to other applications.
Decoders map vendor files into one documented IR: preview meshes, B-rep geometry, design intent, and parametric history where the format carries them. Validators, exporters, and downstream tools share that IR. Progress per format follows an L0–L9 support ladder.
Try it · Format support · Donate a test file · Contribute
Native CAD formats are proprietary and sparsely documented. cadmpeg recovers geometry and design data into one IR. Values retain source byte offsets. Inferred values are marked. Unsupported content is reported as loss.
Format knowledge comes from legally possessed CAD files and public documentation. Vendor SDKs, decompiled binaries, and confidential material are prohibited (LEGAL.md).
Build from source with Rust 1.88 or later:
git clone https://github.com/cadmpeg/cadmpeg
cd cadmpeg
cargo install --path crates/cadmpegHomebrew (macOS):
brew install cadmpeg/tap/cadmpegInstaller script (macOS, Linux):
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/cadmpeg/cadmpeg/releases/latest/download/cadmpeg-installer.sh | shWindows:
powershell -ExecutionPolicy Bypass -c "irm https://github.com/cadmpeg/cadmpeg/releases/latest/download/cadmpeg-installer.ps1 | iex"cadmpeg convert part.f3d -f stepConversion reports validation results and loss:
decode report (f3d): geometry_transferred=true
losses:
[info/geometry] 22 spline surface record(s) were decoded into NURBS carriers.
...
validation: OK (0 error(s), 0 warning(s))
wrote part.step (2125 entities)
- FreeCAD
.FCStd— L5 (schema 4 / file 1) - Autodesk Fusion
.f3d— L4 - SolidWorks
.sldprt— L4 - Rhino
.3dm— L8 (archive 50/60/70/80); older bands L1 / L0 - Siemens NX
.prt— L3 (selected or terminal-lineage-resolved body images); L2 (unresolved multi-partition history) - CATIA V5
.CATPart— L2 (standard-nested); L1 (other layouts) - Creo
.prt— L1 - STEP Part 21 AP203/AP214/AP242 — L9
- IGES 5.3 Fixed ASCII — L8
- ASM
.sat/.smt/.smb/.sabstreams — bare ShapeManager B-rep streams, binary and text encodings
Format support holds profiles and scoring rules. docs/formats/ holds byte semantics and open items.
input file ──▶ container decoder ──▶ format decoder ──▶ IR ──▶ validator ──▶ exporter ──▶ output + reports
Decoders produce the IR. Validators check it. Exporters consume it.
cadmpeg inspect part.f3d
cadmpeg decode part.f3d -o part.cadir.json
cadmpeg validate part.cadir.json
cadmpeg export part.cadir.json -f step -o part.step
cadmpeg convert part.f3d -f step -o part.step
cadmpeg diff a.cadir.json b.cadir.json
Output formats are cadir, step, fcstd, f3d, sldprt, and rhino; json aliases cadir. export and convert infer omitted formats from the output extension. Use --input-format to override source detection. Use --step-target and --reject-step-losses for STEP schema selection and strict loss refusal.
Machine-readable output from inspect --json, validate --json, and diff --json, plus command report files, uses CLI schema_version: 5. That envelope version is independent of CAD IR ir_version: "5".
Public test files are the most immediate need. If you can dedicate a CAD file to the public domain under CC0, please donate it to the corpus.
Other contributions:
- Implement a codec from a format specification.
- Resolve an open format item with byte-backed evidence.
- Add validators, exporters, IR tooling, corpus tooling, or CLI improvements.
Commits require DCO sign-off; decoder and specification changes also require a provenance declaration. See CONTRIBUTING.md, LEGAL.md, and the roadmap.
From the repository root:
cargo build --workspace
cargo test-fastRun an end-to-end smoke test:
cargo run -p cadmpeg-ir --example emit_cube > cube.cadir.json
cadmpeg export cube.cadir.json -f step -o cube.stepAI-assisted contributions are welcome when reviewed and concise. Clean-room rules still apply: do not pass vendor SDK knowledge through a model.
Code uses the Apache License 2.0; documentation and specifications use CC BY 4.0. Contributions use the corresponding license.
SolidWorks, Rhino, CATIA, Autodesk Fusion, Creo, NX, Parasolid, and other product names are trademarks of their respective owners. cadmpeg uses them only to identify the file formats its decoders target. cadmpeg is an independent project and is not affiliated with, endorsed by, or sponsored by any CAD vendor. See LEGAL.md.