cadmpeg-ir
cadmpeg-ir is the common data model used by every cadmpeg codec. Use it to
work with decoded CAD data without coupling your code to one source format.
The crate includes the CadIr document type, codec traits, canonical JSON,
validation, structural diffing, and source annotations.
Install
Use
Create and validate an empty current-version document:
use Units;
use ;
let ir = empty;
let report = validate;
assert_eq!;
assert_eq!;
Format crates implement the object-safe Codec trait:
use ;
Scope
Version 1 covers units, tolerances, B-rep topology, analytic and spline geometry, tessellation, appearance, and design records. Entity IDs connect flat arenas, which keeps serialized documents stable and easy to diff.
Assembly structure is reserved. Feature history currently stores ordered
operations rather than a model that cadmpeg can replay. UnknownRecord keeps
source records that a codec cannot map yet.
Documentation
- API documentation
- CAD IR version 1
- Architecture and crate map
- Clean-room and legal policy
- Repository
Requires Rust 1.88 or later. Licensed under Apache-2.0.