step-io
Lean STEP (ISO 10303) I/O for 3D CAD kernels — reads every mainstream AP, writes only modern AP242.
⚠️ Experimental — early stage; expect breaking API changes at any time.
Features
- Reads everything, writes AP242 — any mainstream AP comes in, legacy included; only AP242 edition 2 (IS) goes out.
- Lean — one universal schema model instead of a per-schema implementation; entities that never appear in real STEP files are pruned out.
- Heals non-standard input — what can be fixed is normalized; what cannot is dropped with a reason, never silently.
- Ergonomic API —
scene()navigates what you read with lightweight handles;StepBuilderwrites new files the way kernels hold data.
Quickstart
Reading STEP into a kernel or viewer:
let source = read.unwrap;
let = read.unwrap;
let header = model.header; // file name, authors, originating CAD system, schema, …
for solid in model.scene.all_solids
Writing STEP from a kernel:
let mut b = new.unwrap;
let part = b.part.unwrap;
// mirror your kernel's arrays, keeping one handle per element
let vs: = kernel.points.iter
.map
.collect;
let es: = kernel.edges.iter
.map
.collect;
let fs: = kernel.faces.iter
.map
.collect;
b.solid.unwrap;
write.unwrap;
Example app
step-loupe is a single-file, in-browser STEP viewer built on step-io (compiled to WebAssembly): a worked example of the reading API, rendering b-rep geometry, the assembly tree, PMI, units, and the provenance report.
Live demo: https://elgar328.github.io/step-loupe/?file=nist-ctc05.step
Design
step-io exists to sit between a 3D CAD kernel and the STEP files it exchanges.
Most STEP libraries carry per-schema entity and read/write code, so each supported schema adds source and binary size. step-io instead merges the mainstream APs into one universal schema and reads them all through a single pipeline. Entities that never appear in practice are left out, judged against 50,000+ real-world files — the entity coverage matrix lists exactly what is read and written.
Output is AP242 edition 2 (IS) only — AP203 and AP214 were merged into it in 2014, and every modern tool reads it. When edition 3 reaches IS and takes over, the output moves up with it: one output schema, always the current one.
Most of the pipeline is generated from the schemas rather than written by hand — no drift, little to maintain.
License
Licensed under either of MIT or Apache-2.0 at your option.
step-io's entity model derives from the ISO 10303 (STEP) EXPRESS schemas — third-party ISO artifacts that are free for implementers and carry their own terms, separate from the license above.
