cadmpeg-codec-nx 0.1.0

Decoder for Siemens NX .prt files: SPLMSSTR container enumeration, embedded Parasolid neutral-binary stream extraction, and topology/analytic-geometry decode with explicit loss reporting.
Documentation

cadmpeg-codec-nx

Decoder for Siemens NX .prt files.

What is implemented

An NX .prt is an SPLMSSTR container (Siemens PLM master storage) wrapping zlib-compressed Parasolid neutral-binary streams — NX authors geometry directly with the Parasolid kernel. This codec:

  • [NxCodec::detect] recognizes the unique SPLMSSTR magic. NX and Creo share the .prt extension, so detection is magic-based, never extension-based: a Creo/Granite .prt never carries this magic.
  • [NxCodec::inspect] parses the container header and HEADER/FOOTER directory, enumerates the named /Root/... streams, locates and classifies every embedded Parasolid stream (partition / deltas / plain cached body) by a zlib scan and its inflated prologue, and reads the SCH_ schema token.
  • [NxCodec::decode] reads the gate-passing analytic geometry carriers — POINT vertices, analytic surfaces (plane/cylinder/cone/sphere/torus), and analytic curves (line/circle/ellipse) — from every Parasolid stream into free carrier arenas, and preserves each stream verbatim as an unknown passthrough.

What is decoded, and what is reported as loss

Geometry decodes to a vertex point cloud plus analytic surface/curve carriers, emitted as unattached geometry: the face→loop→edge topology graph is byte-underdetermined without a full sequential record-framing walk (and its active-body face set additionally hangs on the undecoded partition↔deltas tombstone bridge), so it is reported, not fabricated. B-spline and procedural blend surfaces, cross-body Boolean composition, assembly placements, and the NX object-model metadata are counted in the [cadmpeg_ir::report::DecodeReport].