IFClite TypeScript API
    Preparing search index...

    Interface IfcDataStore

    interface IfcDataStore {
        deferredEntityIndex?: EntityByIdIndex;
        derivedEntities?: DerivedEntities;
        dropCensus?: DropCensus;
        entities: EntityTable;
        entityCount: number;
        entityIndex: { byId: EntityByIdIndex; byType: Map<string, number[]> };
        fileSize: number;
        georeferencing?: GeoreferenceInfo | null;
        lengthUnitScale?: number;
        lengthUnitSource?: LengthUnitSource;
        onDemandClassificationMap?: Map<number, number[]>;
        onDemandDocumentMap?: Map<number, number[]>;
        onDemandMaterialMap?: Map<number, number[]>;
        onDemandPropertyMap?: Map<number, number[]>;
        onDemandQuantityMap?: Map<number, number[]>;
        parseTime: number;
        properties: PropertyTable;
        quantities: QuantityTable;
        relationships: RelationshipGraph;
        relationshipsPending?: true;
        resolvedClassifications?: Map<number, ClassificationInfo[]>;
        resolvedMaterials?: Map<number, Map<number, MaterialInfo>>;
        schemaVersion: "IFC2X3" | "IFC4" | "IFC4X3" | "IFC5";
        selectionRelationshipIndex?: {
            exceptionalDefinitionTargets: Map<number, number[]>;
            exceptionalSubjects: Map<number, number[]>;
            missing: number[];
            retryTypeRows: number[];
            typeDefinitions: Map<number, number[]>;
            typeExceptionalReferences: Map<number, number>;
            typeReferences: number;
            typeRefusals: Map<number, string>;
            typeRows: number;
            unverifiedTypeRows: number[];
        };
        source: IfcSourceBytes;
        sourceHeader?: IfcSourceHeader;
        sourceKind?: "step"
        | "tabular";
        spatialHierarchy?: SpatialHierarchy;
        spatialIndex?: SpatialIndex;
        strings: StringTable;
        getEntitiesByType(typeName: string): IfcEntity[];
        getEntity(expressId: number): IfcEntity | null;
        getProperties(expressId: number): PropertySet[];
        getQuantities(expressId: number): QuantitySet[];
    }

    Hierarchy (View Summary)

    Index
    deferredEntityIndex?: EntityByIdIndex
    derivedEntities?: DerivedEntities

    IFCX: table rows the file does not state as such (see DerivedEntities); export writes the file's classes.

    dropCensus?: DropCensus

    Semantic drop census (#4208): per-class scanned/retained counts, the classes the categoriser skipped, classes unknown to the schema registry, and IFCREL* classes seen but not indexed as relationship edges. Always present after a parse — its absence (not a zero count) is what means "the census did not run".

    entities: EntityTable
    entityCount: number
    entityIndex: { byId: EntityByIdIndex; byType: Map<string, number[]> }
    fileSize: number
    georeferencing?: GeoreferenceInfo | null

    Immutable pre-extracted georeferencing for stores without STEP resource rows.

    lengthUnitScale?: number

    Project length-unit scale to SI metres, avoiding repeat unit-graph parsing.

    lengthUnitSource?: LengthUnitSource

    Whether lengthUnitScale was declared by the first IFCPROJECT or is the assumed metre (#7395); absent when not parsed from STEP here.

    onDemandClassificationMap?: Map<number, number[]>

    On-demand classification lookup: entityId -> array of IfcClassificationReference expressIds Built from IfcRelAssociatesClassification relationships during parsing.

    onDemandDocumentMap?: Map<number, number[]>

    On-demand document lookup: entityId -> array of IfcDocumentReference/IfcDocumentInformation expressIds Built from IfcRelAssociatesDocument relationships during parsing.

    onDemandMaterialMap?: Map<number, number[]>

    On-demand material lookup: entityId -> associated material definition expressIds. Built from IfcRelAssociatesMaterial relationships during parsing. Each value is the expressId of IfcMaterial, IfcMaterialLayerSet, IfcMaterialProfileSet, IfcMaterialConstituentSet, IfcMaterialList, or a *Usage. The value is a LIST so a second IfcRelAssociatesMaterial targeting the same element (valid in the wild) is preserved rather than last-wins overwritten — the model-wide usage index depends on seeing every one.

    onDemandPropertyMap?: Map<number, number[]>

    On-demand property lookup: entityId -> array of property set expressIds Used for fast single-entity property access without pre-building property tables. Use extractPropertiesOnDemand() with this map for instant property retrieval.

    onDemandQuantityMap?: Map<number, number[]>

    On-demand quantity lookup: entityId -> array of quantity set expressIds Used for fast single-entity quantity access without pre-building quantity tables. Use extractQuantitiesOnDemand() with this map for instant quantity retrieval.

    parseTime: number
    properties: PropertyTable
    quantities: QuantityTable
    relationships: RelationshipGraph
    relationshipsPending?: true

    Only on the store onSpatialReady emits: relationships holds the hierarchy and typing edges, no IfcRelDefinesByProperties or association edges yet. Never on a completed or cache-restored store (#9192).

    resolvedClassifications?: Map<number, ClassificationInfo[]>

    Pre-resolved classification attrs, server-parsed path only — #3955.

    resolvedMaterials?: Map<number, Map<number, MaterialInfo>>
    schemaVersion: "IFC2X3" | "IFC4" | "IFC4X3" | "IFC5"
    selectionRelationshipIndex?: {
        exceptionalDefinitionTargets: Map<number, number[]>;
        exceptionalSubjects: Map<number, number[]>;
        missing: number[];
        retryTypeRows: number[];
        typeDefinitions: Map<number, number[]>;
        typeExceptionalReferences: Map<number, number>;
        typeReferences: number;
        typeRefusals: Map<number, string>;
        typeRows: number;
        unverifiedTypeRows: number[];
    }

    Parser-worker coverage for bounded current type reads, retained by worker/cache transport.

    Type Declaration

    • exceptionalDefinitionTargets: Map<number, number[]>
    • exceptionalSubjects: Map<number, number[]>
    • missing: number[]
    • retryTypeRows: number[]
    • typeDefinitions: Map<number, number[]>
    • typeExceptionalReferences: Map<number, number>

      Canonical fallback facts for rows the numeric byte scanner could not index.

    • typeReferences: number
    • typeRefusals: Map<number, string>
    • typeRows: number
    • unverifiedTypeRows: number[]

    The IFC source bytes, behind an accessor rather than a resident Uint8Array (#2183). Read ranges with slice/decodeUtf8; use withMaterialized for the genuine whole-file consumers, and toTransferable() to hand it to a worker without materialising here.

    byteLength === 0 is a supported state (server-parsed, synthetic, GLB, point-cloud), and length is aliased so existing presence guards keep their meaning.

    sourceHeader?: IfcSourceHeader

    Verbatim HEADER fields from the source file, when this store was built by parsing a STEP/IFC file. Absent for created-from-scratch models. Lets a round-trip export preserve the original FILE_DESCRIPTION items and the exact FILE_SCHEMA token (e.g. IFC4X3_ADD2).

    sourceKind?: "step" | "tabular"

    What backs this store's rows, which schemaVersion does not say.

    • 'step': STEP records. source holds them and entityIndex addresses them.
    • 'tabular': a reader handed over finished tables (IFCX is one). source holds the file's bytes, but they are not STEP, and entityIndex is empty: the entity table is the only list of rows.

    Absent on a store that states neither (synthetic, cache-restored, server-built). Ask sourceKind === 'tabular'; do not infer it from the schema label.

    Absent therefore reads as "not tabular", so the STEP-only gates keep their schemaVersion === 'IFC5' and empty-source clauses alongside this one: those still carry every store built before the marker existed (the synthetic builder sets no marker and no bytes). Dropping either clause would admit such a store, which is the defect #9890 set out to remove.

    spatialHierarchy?: SpatialHierarchy
    spatialIndex?: SpatialIndex
    strings: StringTable