web-ifc-compatible property/spatial surface over an AP214/AP242 step model.

Backed by AP214ProductStructureExtraction and AP214PropertyExtraction: getSpatialStructure returns the real nested, named, occurrence-keyed tree (replacing the old flat, nameless stub); getItemProperties / getPropertySets return the extracted attribute and validation rows; getAllItemsOfType is backed by the model type index.

This is the seam Share consumes (via IfcApiProxyAP214); nothing in Share changes — it lights up the moment this returns a real tree.

Constructors

Methods

  • Get every element of a STEP entity type, backed by the model type index.

    Parameters

    • type: number

      The numeric AP214 entity type id.

    • verbose: boolean

      When true, return raw line data; otherwise express ids.

    Returns Promise<any[]>

    The matching elements (ids or raw lines).

  • No-op type-name lookup retained for interface compatibility; AP214 surfaces STEP entity names directly on the nodes.

    Parameters

    • type: number

      The numeric type code.

    Returns string

    The empty string (AP214 has no IFC type-name map).

  • Resolve one express id to a web-ifc-shaped item, dispatching on what the id denotes:

    • a property single (a descriptive_/measure_representation_item id, referenced from a pset's HasProperties) → { expressID, Name: {type,value}, NominalValue: {type,value} }, the shape unpackHelper reads after it dereferences a HasProperties handle;
    • a tree node (NAUO occurrence id, or product_definition[_shape] id for single-part files) → { expressID, Name: {type,value} }, the part's identity row that the Properties panel runs through deref.

    Property-single ids and node ids are disjoint (distinct STEP entities), so the lookup is unambiguous.

    Parameters

    • id: number

      Express id to resolve.

    • recursive: boolean = false

      Unused; kept for web-ifc signature parity.

    Returns Promise<object>

    The web-ifc-shaped item.

  • Material properties are not modeled for AP214 at the Simplified tier.

    Parameters

    • elementID: number

      Node express id.

    • recursive: boolean = false

      Unused; kept for web-ifc signature parity.

    Returns Promise<any[]>

    An empty array.

  • Get a part's property sets: one IfcPropertySet-shaped set per grouping label (plain attributes vs. validation properties). Each set's HasProperties is an array of web-ifc reference handles ({ type: 5, value: itemExpressID }) that Share's Properties panel resolves back to individual properties via getItemProperties — emitting inline property objects instead would trip unpackHelper's reference-type guard.

    Parameters

    • elementID: number

      Node express id.

    • recursive: boolean = false

      Unused; kept for web-ifc signature parity.

    Returns Promise<any[]>

    The property sets for the element.

  • Get the real nested, named, occurrence-keyed product structure.

    Parameters

    • OptionalincludeProperties: IncludeProperties

      When true, merge each node's item properties onto the node (mirrors the IFC surface's includeProperties).

    • Optionaloptions: SpatialStructureOptions

      Optional shaping: { includeSolids: true } adds the ephemeral solid layer beneath multibody products (type: 'solid', ephemeral: true nodes) — see design/new/step-nonproduct-semantics.md.

    Returns Promise<Node>

    The root node. A single-root file returns its root directly; a multi-root file is wrapped in a synthetic container root.

  • Type properties are not modeled for AP214 at the Simplified tier.

    Parameters

    • elementID: number

      Node express id.

    • recursive: boolean = false

      Unused; kept for web-ifc signature parity.

    Returns Promise<any[]>

    An empty array.

  • Build the property/structure indexes NOW (they are otherwise built lazily on first property access). Called before a source-buffer spill: the index build is a full-model sweep of synchronous record reads, so it must run while the source is resident — after it, post-spill property reads are pure map lookups.

    Returns void