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_SHELL → ADVANCED_FACE
→ FACE_OUTER_BOUND/FACE_BOUND → EDGE_LOOP → ORIENTED_EDGE →
EDGE_CURVE → VERTEX_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§
- Step
Report - The result of a STEP export: what was written and what was lost.
- Step
Write Options - Options controlling the STEP HEADER metadata. All fields have neutral
defaults so
StepWriteOptions::default()produces a valid header.
Enums§
- Step
Error - 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
iras an AP214 STEP file intow, returning a report of what was written and what was lost.