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§
- Entity
Row - One exportable entity row.
- Export
Model - 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. - Model
Options - What the export should resolve beyond the attributes it always reads.
- Placement
- A product’s placement, composed from its
IfcLocalPlacementchain. - Prop
Value - A single property value (
IfcPropertySingleValueand friends). - Property
Set - A named property set (
IfcPropertySet). - Quantity
Set - A named quantity set (
IfcElementQuantity). - Quantity
Value - A single physical quantity (
IfcQuantityLength/Area/Volume/…).
Enums§
- Value
Kind - 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 andIFCLABEL('0.24')text.
Functions§
- attribute_
schema - The first declared
FILE_SCHEMAentry that has a bundled attribute registry, orNone. 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_modelwith 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 JSString(n)shows for the same value in the ranges that matter). - stream_
export_ model - Stream one
EntityRowperIfcProductoccurrence, in file order, invokingffor each row and then dropping it. - stream_
export_ model_ with_ index - Like
stream_export_modelbut 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_indexMUST be built from the samecontent; output is identical tostream_export_model. Returns the model’sUnitScales, 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 whateverModelOptionsasked to resolve.- stream_
export_ model_ with_ property_ kinds - Stream the default export rows with the canonical IFC kind of each property.