Expand description
Reads STEP (ISO 10303-21) files and turns their B-rep solids into watertight triangle meshes.
let bytes = std::fs::read("part.step")?;
let mesh = stepmesh::read_step(&bytes, &stepmesh::Options::default())?;
let volume: f64 = mesh.solids.iter().map(|s| s.volume()).sum();Every returned solid is closed and consistently oriented, in millimetres, with assembly
placements applied. Input that cannot be meshed faithfully (an unsupported entity, an open
shell, a face that does not lay out in its parameter space) fails with an Error; no
approximate or partial result is returned.
Modules§
- p21
- ISO 10303-21 (“Part 21”) exchange structure.
Structs§
- Options
- Tessellation tolerances.
- Solid
Mesh - One placed solid, in millimetres. Triangles are counter-clockwise seen from outside.
- Step
Mesh - Every solid of a STEP file, one per placed instance.
Enums§
Functions§
- read_
step - Reads a STEP file and meshes each of its B-rep solids (assembly placements and units applied).