stream_export_model

Function stream_export_model 

Source
pub fn stream_export_model(
    content: &[u8],
    f: impl FnMut(EntityRow),
) -> UnitScales
Expand description

Stream one EntityRow per IfcProduct occurrence, in file order, invoking f for each row and then dropping it.

Unlike build_export_model, this never retains all rows and never caches the non-product entities (cartesian points, directions, index lists, …) that make up the bulk of a STEP file. Peak working set is bounded by the entity index plus the property side-map (both O(products)), so a model with tens of millions of entities extracts in a few GB instead of exhausting memory. Output is the caller’s responsibility to stream onwards (e.g. to S3/Parquet) and drop.