Skip to content
 
 

Repository files navigation

cadmpeg

Inspect and convert native CAD files from the command line. Add native CAD import to an application.

Purpose

Native CAD formats are proprietary, sparsely documented and cumbersome to work with. Building applications that support these formats requires navigating a maze of translator and SDK services without any open source options. cadmpeg aims to offer an open source solution for this problem.

Format knowledge comes from legally possessed CAD files and public documentation. Vendor SDKs, decompiled binaries, and confidential material are prohibited (LEGAL.md).

Install

Build from source with Rust 1.88 or later:

git clone https://github.com/cadmpeg/cadmpeg
cd cadmpeg
cargo install --path crates/cadmpeg

Homebrew (macOS):

brew install cadmpeg/tap/cadmpeg

Installer script (macOS, Linux):

curl --proto '=https' --tlsv1.2 -LsSf https://github.com/cadmpeg/cadmpeg/releases/latest/download/cadmpeg-installer.sh | sh

Windows:

powershell -ExecutionPolicy Bypass -c "irm https://github.com/cadmpeg/cadmpeg/releases/latest/download/cadmpeg-installer.ps1 | iex"

Quick start

cadmpeg convert part.f3d -f step

Conversion reports check results and loss:

decode report (f3d): geometry_transferred=true
losses:
  [info/geometry] 22 spline surface record(s) were decoded into NURBS carriers.
  ...
check: OK (0 error(s), 0 warning(s))
wrote part.step (2125 entities)

Format support

  • FreeCAD .FCStd: L5 (schema 4 / file 1)
  • Autodesk Fusion .f3d: L4
  • Autodesk Inventor .ipt/.iam: L1
  • SolidWorks .sldprt: L4
  • Rhino .3dm: L0
  • Siemens NX .prt: L2
  • CATIA V5 .CATPart: L1
  • Creo .prt: L1
  • STEP Part 21 AP203/AP214/AP242: L9
  • IGES 5.1/5.2/5.3 Fixed ASCII: L8
  • ASM/ACIS .sat/.smt/.smb/.sab streams: L3 (admitted binary and text branches)

Format support holds profiles and scoring rules. docs/formats/ holds byte semantics and open items.

Pipeline

input file ──▶ container decoder ──▶ format decoder ──▶ IR ──▶ validator ──▶ exporter ──▶ output + reports

CLI

Convert a native file to another format:

cadmpeg convert part.f3d -f step -o part.step

Inspect a native file:

cadmpeg inspect part.sldprt
format: sldprt (detected high)
container: sldprt-blocks
entries: 58
...
notes:
  - active Parasolid B-rep candidate: Contents/Config-0-Partition

Contributing

Public test files are the current need. If you can dedicate a CAD file to the public domain under CC0, 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.

Development

From the repository root:

cargo build --workspace
cargo test-fast

Run an end-to-end smoke test:

cargo run -p cadmpeg-ir --example emit_cube > cube.cadir.json
cadmpeg convert cube.cadir.json -f step -o cube.step

AI-assisted contributions are welcome when reviewed and concise. Clean-room rules apply: do not pass vendor SDK knowledge through a model.

Licensing

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, Autodesk Inventor, Creo, NX, Parasolid, ShapeManager, ACIS, 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.

About

Convert all CAD formats

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages