Represents an IFC model deserialized from step.

Hierarchy (View Summary)

Constructors

  • Construct this model given a buffer containing the data and the parsed data index on that, adding the typeIndex on top of that.

    Parameters

    • buffer: Uint8Array

      The buffer to values from.

    • elementIndex: StepIndexEntry<EntityTypesIfc>[]

      The parsed index to elements in the STEP.

    Returns default

Properties

csgOperations: CsgMemoization = ...
curves: default = ...
elementMemoization: boolean = true

Will this model memoize elements, set to false to disable, true to enable.

Note that during periods where element memoization is disabled, it's not guaranteed element objects returned from this have referential equality even if they have ID equality.

externalMappingType: typeof default = IfcStepExternalMapping
geometry: IfcModelGeometry = ...
materials: IfcMaterialCache = ...
nullOnErrors: boolean = true

When an atribute is parsed from an entity in the model that causes a recoverable error, and the field is optional, return null instead of throwing an exception.

profiles: IfcModelProfile = ...
schema: default<EntityTypesIfc, default<EntityTypesIfc>>

The Step schema this is based on.

typeIndex: MultiIndexSet<EntityTypesIfc>
voidGeometry: IfcModelGeometry = ...
voidMaterials: IfcMaterialCache = ...

Accessors

  • get bufferBytesize(): number
  • Get the number of elements/entities in this model.

    Returns number

    The number of elements.

  • get size(): number
  • Get the number of elements/entities in this model.

    Returns number

    The number of elements.

Methods

  • Iterate over all the elements in this.

    Returns IterableIterator<default<EntityTypesIfc>>

    The iterable iterator to allow lazy iteration over all the elements in this.

    An element per iteration for all the elements in this.

  • Extract a set of elements given a local ID iterator.

    Parameters

    • from: Iterable<number>

      An iterable of local IDs

    Returns IterableIterator<default<EntityTypesIfc>>

    The iterable iterator to allow lazy iteration over the elements matching the local ids.

    An element per iteration matching the ids in from.

  • Given a cursor, get the matching entities for it as a lazy iterable iterator.

    Parameters

    • cursor: IIndexSetCursor

      The cursor to iterate over.

    • freeCursor: boolean = false

      Should the cursor be freed after

    Returns IterableIterator<default<EntityTypesIfc>>

    The iterable iterator to allow lazy iteration over a cursor.

    An element per iteration matching the ids in the cursor.

  • Given an express ID, return the matching element if one exists.

    Parameters

    • expressID: number

      The express ID to fetch the element for.

    Returns undefined | default<EntityTypesIfc>

    The element if one exists for that ID, otherwise undefined.

  • Given a local ID (i.e. dense index/reference), return the matching element if one exists.

    Parameters

    • localID: number

      The local ID to fetch for.

    Returns undefined | default<EntityTypesIfc>

    The matching element or undefined if none exists.

  • Given an express ID, return the matching element if one exists.

    Parameters

    • localID: number

      The local ID to fetch the element for.

    Returns undefined | number

    The express ID if one exists for that local ID, otherwise undefined.

  • Get an inline element by its address within a data-block.

    Parameters

    • address: undefined | number

      The addres to get the element from

    Returns undefined | default<EntityTypesIfc>

    The element if one exsists at that adddress, otherwise undefined.

  • Invalidate the cache store for this, so new items will be created.

    Parameters

    • dropVtable: boolean = false

      If true, remove the vtable entries for old entries as well, freeing up the v-table space on garbage collection.

    Returns void

  • Get the non empty type IDs for this without including sub-types, only direct instances.

    Returns IterableIterator<EntityTypesIfc>

    The unique set of non empty type IDs for this model.

  • Force the population of the the buffer entry for a particular element.

    Parameters

    • localID: number

      The local id to fetch the buffer entry for.

    Returns void

    Throws an error if the ID is invalid.

  • Force the population of the the vtable entry for a particular ID (i.e. extracting the field locations)

    Parameters

    • localID: number

      The id to fetch the vtable entry for.

    Returns boolean

    Did the vtable entry populate correctly?

    Throws an error if the ID is invalid.

  • Use the type index to get set of entities of a set of types not including sub-types from the list of type ids, acts as a union given the input type list, with lazy iteration over the set.

    Parameters

    • ...types: EntityTypesIfc[]

      The type ids for the types to get.

    Returns IterableIterator<default<EntityTypesIfc>>

    An iterable corresponding to the lazy set of items.

  • Use the type index to get set of entities of a set of types including sub-types, acts as a union given the input type list, with lazy iteration over the set.

    Type Parameters

    Parameters

    • ...types: T

      The list of types to return

    Returns IterableIterator<InstanceType<T[number]>>

    An iterable corresponding to the lazy set of items.

  • Use the type index to get set of entities of a set of types including sub-types from the list of type ids, acts as a union given the input type list, with lazy iteration over the set.

    Parameters

    • ...types: EntityTypesIfc[]

      The type ids for the types to get.

    Returns IterableIterator<default<EntityTypesIfc>>

    An iterable corresponding to the lazy set of items.