IFClite TypeScript API
    Preparing search index...

    Function resolveEntityMeasureScales

    • Resolve length/area/volume scales for expressId's OWN IFCPROJECT, not necessarily the file's first one.

      An ordinary IFC file has exactly one IFCPROJECT (EXPRESS invariant), so store.lengthUnitScale / resolveMeasureScales — both resolved once from the file's first IFCPROJECT at parse time — are correct for every entity and this is a zero-cost fast path back to them.

      A multi-project file (the shape MergedExporter's documented auto unit-reconciliation mode produces for a federated merge of differently-unit'd models, see issue #1332) can contain a SECOND IFCPROJECT with its own, different declared units. An entity belonging to that later project was previously scaled by the FIRST project's units regardless — silently wrong, not absent, and compliance-critical for IDS (a Width >= 100mm requirement evaluates against the wrongly-scaled raw value). This resolves the entity's OWN owning project via the shared resolveOwningIfcProjectId (@ifc-lite/parser's owning-project.ts, also used by resolveEntityLengthUnitScale for #3554's material-layer fix — one containment walk, not a per-caller copy) and reads THAT project's units, falling back to the store-wide default when the walk can't place the entity (matches prior behaviour).

      Parameters

      Returns EntityMeasureScales