Module flat

Module flat 

Source
Expand description

The flat encoder: AttributeValue and decoded property rows into the PropValue / PropertySet shape CSV, JSON, JSON-LD, IFCX, USD, BOS and the Python binding read (D41). The other encoder is render::columnar.

Moved from rust/export/src/model_props.rs (C6-8, #7783).

Structs§

Rendered
A property value rendered for the flat exports.

Constants§

EXPORT_PROPERTY_SCOPE
The property kinds the flat exports write: all seven (EXPORT-DATA-2, D47).

Functions§

decode_property_set
Decode one IfcPropertySet definition into our model.
flat_property
One decoded property in the flat exports’ shape; None for a nameless property or one with no value to show.
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).
map_enum
Map an IFC boolean/logical enum token to a friendly string.
new_property_decoder
The model’s property decoder: one per export, so one complex-property budget per model (#7675).
opt_string
ref_list
Collect the entity references in a STEP list attribute (e.g. (#44,#45)), dropping nulls/non-refs. An absent or $ attribute yields an empty Vec.
render_attributes
Render the attributes an entity’s own IFC class declares, by schema name.
render_value
Render an AttributeValue (single property value) to its display string, type tag and primitive kind. Typed values like IFCLABEL('x') decode to AttributeValue::Typed; the kind comes from its value. A list is not a single value and renders nothing (it used to render its second item under its first item’s name when the first was a string, F3c).
resolve_pset_defsDeprecated
Resolve a list of property/quantity set definition ids into non-empty (property_sets, quantity_sets), dropping undecodable refs. Each id is resolved on its own, so a repeated id yields a repeated set.