Expand description
Inspect and structurally decode PTC Creo Parametric and Pro/ENGINEER .prt
files stored in the PSB container.
CreoCodec is the normal public decode API. A hidden fuzz module
exposes parser probes. Context-taking probes propagate errors and discard
successful parser values; primitive probes return (). CreoCodec
implements cadmpeg_ir::codec::Codec:
it detects the #UGC:1 and #UGC:2 UGC signatures, inspects named sections,
and decodes the geometry, topology, sketches, and design records supported
for that layout.
Support: L1 (ladder).
§Quick start
Use cadmpeg_ir::Codec::inspect to enumerate sections and read container
diagnostics:
use std::fs::File;
use cadmpeg_codec_creo::CreoCodec;
use cadmpeg_ir::codec::Codec;
use cadmpeg_core::decode::InspectOptions;
let mut input = File::open("part.prt")?;
let summary = CreoCodec.inspect(&mut input, &InspectOptions::default())?;
println!("{} sections", summary.entries.len());Use cadmpeg_ir::Codec::decode for a cadmpeg_ir::document::CadIr document and
its cadmpeg_ir::report::decode::DecodeReport.
§Format model
A PSB file begins with a #UGC:1 or #UGC:2 ASCII signature and header.
Legacy persistence uses a P_OBJECT body with optional named sections;
later persistence uses a table of contents and named binary sections.
Detection uses the signature because Siemens NX also uses .prt.
§Decode scope
Decode transfers complete model-space planes, selected cylinders, placed
cones, tori, and spheres when positional or feature construction establishes
model space, interpolation and NURBS-related carriers with complete control
bodies, reference lines, circles, and ellipses, connected topology with
analytic intersections and pcurves, SolidPrimdata triangle strips, a root
product identity occurrence, placed section sketches, and typed features,
parameters, and expressions. It preserves PSB geometry sections as
cadmpeg_ir::unknown::UnknownRecord values. The crate is read-only.
Surface prototype parameters describe family templates rather than placed instances. Other per-instance coordinates, curve families, face bindings, and feature evaluation remain incomplete. The decode report identifies these losses.
Structs§
- Creo
Codec - Codec for Creo Parametric and Pro/ENGINEER PSB
.prtfiles.