IFClite TypeScript API
    Preparing search index...

    Interface QuantityTable

    interface QuantityTable {
        count: number;
        entityId: Uint32Array;
        entityIndex: Map<number, number[]>;
        formula: Uint32Array;
        qsetGlobalId: Uint32Array;
        qsetIndex: Map<number, number[]>;
        qsetName: Uint32Array;
        quantityIndex: Map<number, number[]>;
        quantityName: Uint32Array;
        quantityType: Uint8Array;
        unitId: Int32Array;
        value: Float64Array;
        findByQuantity?(
            quantityName: string,
            operator: string,
            value: PropertyValue,
            qsetName?: string,
        ): number[];
        getForEntity(expressId: number): QuantitySet[];
        getQuantityValue(
            expressId: number,
            qsetName: string,
            quantName: string,
        ): number | null;
        sumByType(quantityName: string, elementType?: number): number;
    }
    Index
    count: number
    entityId: Uint32Array
    entityIndex: Map<number, number[]>
    formula: Uint32Array
    qsetGlobalId: Uint32Array
    qsetIndex: Map<number, number[]>
    qsetName: Uint32Array
    quantityIndex: Map<number, number[]>
    quantityName: Uint32Array
    quantityType: Uint8Array
    unitId: Int32Array
    value: Float64Array
    • Find entity ids whose quantity quantityName satisfies operator/value. When qsetName is given, only matches within that quantity set; an unknown quantity-set name matches nothing. The quantity mirror of PropertyTable.findByProperty: same comparePropertyValues semantics, and answered off quantityIndex, so the cost scales with the number of rows carrying that quantity name rather than with the number of entities being filtered.

      Optional so a duck-typed quantity table stays valid without it. EntityQuery.whereProperty then resolves quantity sets per candidate through IfcStoreBase.getQuantities instead — the same answer, more work.

      Parameters

      • quantityName: string
      • operator: string
      • value: PropertyValue
      • OptionalqsetName: string

      Returns number[]

    • Parameters

      • expressId: number
      • qsetName: string
      • quantName: string

      Returns number | null

    • Sum every quantityName row, optionally restricted to entities of elementType (an IfcTypeEnum value).

      The columnar implementation here and the cache-restored implementation in @ifc-lite/cache's readQuantities only ever see entityId per row — neither has the entity-type data needed to honor elementType, so both THROW when it is passed rather than silently returning the unfiltered total. A store that wants type-filtered sums must resolve entity ids via entities.getByType(elementType) itself and total the matching rows (see apps/viewer's server-backed QuantityTable, which does have that data in scope and implements the filter for real).

      Parameters

      • quantityName: string
      • OptionalelementType: number

      Returns number