Module rows

Module rows 

Source
Expand description

(Moved from rust/export/src/model.rs, C6-8, #7783; ifc_lite_export::model re-exports it at the same paths.)

Shared export data model — one parse pass that yields the entities, property sets and quantity sets the tabular / semantic exporters (CSV, JSON, JSON-LD, Parquet) all consume.

Built directly on ifc_lite_core’s EntityDecoder / AttributeValue model (the Rust source of truth), so property + quantity extraction lives in Rust rather than the TS columnar-parser. Covers IfcProduct occurrences and their directly-attached IfcRelDefinesByProperties property/quantity sets.

Structs§

EntityRow
One exportable entity row.
ExportModel
The full extracted model.
Inherited
Which entries of an EntityRow’s property and quantity sets the entity inherits from its type rather than carrying itself.
ModelOptions
What the export should resolve beyond the attributes it always reads.
Placement
A product’s placement, composed from its IfcLocalPlacement chain.
PropValue
A single property value (IfcPropertySingleValue and friends).
PropertySet
A named property set (IfcPropertySet).
QuantitySet
A named quantity set (IfcElementQuantity).
QuantityValue
A single physical quantity (IfcQuantityLength/Area/Volume/…).

Enums§

ValueKind
The primitive a property value was written as in STEP, read from the decoded literal rather than guessed back from its type tag (#7681), so a typed exporter keeps IFCTHERMALTRANSMITTANCEMEASURE(0.24) a number and IFCLABEL('0.24') text.

Functions§

attribute_schema
The first declared FILE_SCHEMA entry that has a bundled attribute registry, or None. Attribute positions are schema-specific, so a reader of attributes by name must fail closed here rather than take the IFC4 layout. The attribute export and the rebar schedule both resolve through this, so they agree (#7681).
build_export_model
Build the export model from raw IFC/STEP bytes.
build_export_model_with_options
build_export_model with options. Same memory caveat: this collects.
fmt_num
Format an f64 without noisy trailing zeros (1.0 -> 1, 1.50 -> 1.5), and otherwise with the shortest digits that parse back to the same value (what JS String(n) shows for the same value in the ranges that matter).
stream_export_model
Stream one EntityRow per IfcProduct occurrence, in file order, invoking f for each row and then dropping it.
stream_export_model_with_index
Like stream_export_model but reuses a pre-built entity index. A caller also running the geometry pass ([crate::try_export_glb_with_stats_with_index]) over the same bytes builds the index once with [build_entity_index] and shares it across both, skipping the duplicate scan. entity_index MUST be built from the same content; output is identical to stream_export_model. Returns the model’s UnitScales, so a caller consuming attribute values can interpret them without a second pass over the file: the scales are resolved from the decoder this function already builds.
stream_export_model_with_inherited
stream_export_model_with_options, plus which of each row’s property and quantity entries the entity inherits from its type.
stream_export_model_with_options
super::stream_export_model_with_index, plus the decoded entity behind each row and whatever ModelOptions asked to resolve.
stream_export_model_with_property_kinds
Stream the default export rows with the canonical IFC kind of each property.