Skip to main content

Crate cadmpeg_codec_catia

Crate cadmpeg_codec_catia 

Source
Expand description

Reads CATIA V5 .CATPart files into cadmpeg_ir::CadIr.

CatiaCodec is the crate’s only entry point. It implements the shared Codec interface: it detects the V5_CFV2 file signature, inspects the catalogued logical streams, identifies the storage variant, and decodes the record families supported for that variant.

Support level: L2 on the cadmpeg support ladder for the standard-nested layout; other layouts are L1.

§Decode a part

use std::fs::File;

use cadmpeg_codec_catia::CatiaCodec;
use cadmpeg_ir::{CodecEntry, DecodeOptions};

let mut input = File::open("part.CATPart")?;
let decoded = CatiaCodec.decode(&mut input, &DecodeOptions::default())?;
println!("{} surfaces", decoded.ir.model.surfaces.len());

Read decoded.report.losses before consuming model relationships. A partial decode preserves the native payload in an unknown record and reports the model layers that remain unresolved.

Byte-level format semantics are documented in docs/formats/catia.md.

§Internal layout

wire reads endian scalars and tag records; solve holds the pure topology solvers; families/* pair each record vocabulary with its decode route; and assemble lowers decoded records into the neutral IR. All of these are crate-private; nothing but CatiaCodec is part of the public API.

Structs§

CatiaCodec
The CATIA V5 .CATPart codec.