Skip to main content

Crate cadmpeg_step

Crate cadmpeg_step 

Source
Expand description

§cadmpeg-step

A pure-Rust ISO 10303-21 (STEP) writer that serializes the cadmpeg IR (cadmpeg_ir::CadIr) into an AP214 ADVANCED_BREP_SHAPE_REPRESENTATION .step file directly from the IR graph.

§What it emits

The product-structure boilerplate mainstream kernels expect (PRODUCT, PRODUCT_DEFINITION, SHAPE_DEFINITION_REPRESENTATION, a unit-bearing GEOMETRIC_REPRESENTATION_CONTEXT), then one MANIFOLD_SOLID_BREP (or BREP_WITH_VOIDS) per IR region, down through CLOSED_SHELLADVANCED_FACEFACE_OUTER_BOUND/FACE_BOUNDEDGE_LOOPORIENTED_EDGEEDGE_CURVEVERTEX_POINT, with analytic and NURBS surfaces/curves.

§Honest loss reporting

Following the project ethos, write_step returns a StepReport listing every entity written and every IR fact that could not be represented (as cadmpeg_ir::LossNotes). Unrepresentable inputs are reported, never replaced with fabricated placeholder geometry; the writer only errors on an I/O failure of the underlying sink.

Structs§

StepReport
The result of a STEP export: what was written and what was lost.
StepWriteOptions
Options controlling the STEP HEADER metadata. All fields have neutral defaults so StepWriteOptions::default() produces a valid header.

Enums§

StepError
Errors from the STEP writer. The writer performs partial, loss-reported export rather than failing on unrepresentable geometry, so the only error is a failure of the output sink.

Functions§

write_step
Serialize ir as an AP214 STEP file into w, returning a report of what was written and what was lost.