The proxy for IFC from the shim.

Implements

Constructors

  • Construct wwih a wasm module.

    Parameters

    • modelID: number
    • data: Uint8Array<ArrayBufferLike>
    • wasmModule: any

      The wasm module.

    • Optionalsettings: Loadersettings
    • Optionalprecomputed: IfcProxyLoadState

    Returns IfcApiProxyIfc

Properties

_isCoordinated: boolean = false
conwaywasm: ConwayGeometry
fs?: any = undefined
identity: number[] = ...
linearScalingFactor: number = 1
model: [default, IfcSceneBuilder, Map<number, [Vector<PlacedGeometry>, FlatMesh]>, Map<number, [GeometryObject, CanonicalMaterial, number[]]>, Vector<FlatMesh>, mat4]
modelID: number
NormalizeMat: mat4 = ...
properties: IfcProperties = ...

Contains all the logic and methods regarding properties, psets, qsets, etc.

Accessors

  • get sourceIsExternal(): boolean
  • Are the model's source bytes spilled to an external store (served through on-demand windows) rather than fully resident?

    Returns boolean

    True after spillSourceToExternalStore.

Methods

  • Closes a model and frees all related memory

    Returns void

  • Creates a map between element ExpressIDs and GlobalIDs. Each element has two entries, (ExpressID -> GlobalID) and (GlobalID -> ExpressID).

    Returns void

  • Creates a new model and returns a modelID number (unimplemented)

    Parameters

    • Optionalsettings: Loadersettings

      settings for generating data the model

    Returns number

    model ID

  • Page in the byte range backing a record so a following synchronous read (getLine / attribute access) succeeds. Fast no-op while the source is fully resident.

    Note: covers the record itself (including its inline elements), NOT entities it merely references — recursive flattening across references needs each referenced record ensured in turn.

    Parameters

    • expressID: number

      The record's express ID.

    Returns Promise<void>

    Resolves when resident.

  • Parameters

    • modelID: number

    Returns Uint8Array<ArrayBufferLike>

    unimplemented

  • Parameters

    • ptr: number
    • size: number

    Returns Uint32Array<ArrayBufferLike>

  • Parameters

    • expressID: number
    • flatten: boolean = false

    Returns any

    line data

  • Light attribute read: Name / LongName / GlobalId as web-ifc value handles, WITHOUT materialising the entity's full flattened record. Reads go through the typed entity's lazy per-field getters — the first access tokenizes the record's field offsets into the shared vtable, but only these attributes' values are deserialized. Used by the spatial structure's 'names' mode.

    Parameters

    • expressID: number

    Returns {
        GlobalId?: NodeValueHandle;
        LongName?: NodeValueHandle;
        Name?: NodeValueHandle;
    }

    { Name?, LongName?, GlobalId? } string handles ({type: 1, value}), each present only when the attribute exists and is non-null on the entity.

  • Parameters

    • heap: Uint32Array<ArrayBufferLike> | Float32Array<ArrayBufferLike>
    • startPtr: number
    • sizeBytes: number

    Returns Uint32Array<ArrayBufferLike> | Float32Array<ArrayBufferLike>

  • Parameters

    • ptr: number
    • size: number

    Returns Float32Array<ArrayBufferLike>

  • Parameters

    • input: string

      FILE_HEADER from step header

    Returns string[]

    array of fields in FILE_NAME

  • Drop this model's materialised entity/descriptor cache (and lazily rebuilt vtable data), returning that memory to the JS heap. Entities and attributes rematerialise transparently on next access, so this is safe to call between UI interactions to keep the property working set bounded to what the active UI has touched.

    Returns void

  • Lazily iterate the express IDs of all IfcRoot-derived entities (products, relationships, property sets, quantities — everything carrying a GlobalId) straight from the type index, without materialising entity descriptors or touching the source buffer.

    This lets property sweeps skip the ~96% of records in large models that are geometric resources, and stays safe on a spilled source. Multi-mapped entities may repeat, so callers should dedupe.

    Returns IterableIterator<number, any, any>

    Express IDs of IfcRoot subtypes.

  • Parameters

    • transformationMatrix: number[]

    Returns void

  • Release the resident source buffer and serve subsequent record reads through fixed-size windows paged in from the given external store (which must hold exactly the model's source bytes — e.g. the original file already sitting in OPFS). See StepModelBase.spillSourceToExternalStore.

    Parameters

    • store: StepExternalByteStore

      The external byte store.

    • OptionalchunkBytes: number

      Optional window size in bytes.

    • OptionalmaxResidentChunks: number

      Optional residency cap in windows.

    Returns void

  • Parameters

    • lineObject: any

    Returns void

  • Parameters

    Returns void

  • Cooperative construction (conway extension, used by OpenModelAsync): identical parse/extraction to the constructor path, but periodically yields to the event loop so progress UI can repaint — issue #301 §2.

    Parameters

    • modelID: number

      The model ID being opened.

    • data: Uint8Array<ArrayBufferLike>

      The IFC data buffer.

    • wasmModule: any

      The wasm module.

    • Optionalsettings: Loadersettings

      Loader settings (ON_PROGRESS is honored).

    Returns Promise<IfcApiProxyIfc>

    The constructed proxy.

  • Streamed-open construction (conway extension, used by OpenModelStreamed): the parse runs through the streaming columnar indexer, so the model's index is columnar from birth and the per-record object phase — the dominant JS-heap cost of the classic parse on large models — never exists. Geometry extraction is the same cooperative path OpenModelAsync uses, and everything downstream (meshes, properties, SpillModelSource) behaves identically to a classic open.

    Parameters

    • modelID: number

      The model ID being opened.

    • data: Uint8Array<ArrayBufferLike>

      The IFC data buffer.

    • wasmModule: any

      The wasm module.

    • Optionalsettings: Loadersettings

      Loader settings (ON_PROGRESS is honored).

    Returns Promise<IfcApiProxyIfc>

    The constructed proxy.