Extracts the STEP product / assembly structure from a populated AP214StepModel into a nested, named, occurrence-keyed tree.

Mirrors the IFC precedent (src/ifc/ifc_property_extraction.ts) but for AP214/AP242: walks product / product_definition / next_assembly_usage_occurrence into a tree, resolves labels from product.name, and links each part to its shape representations so a NavTree node can highlight the right geometry instance.

Constructors

  • Parameters

    • model: default

      The populated AP214/AP242 step model to walk.

    • OptionalproductShapeMap: AP214ProductShapeMap

      Optional product↔shape map populated during geometry extraction. When provided its links are merged with the ones derived here so the tree's shapeRepresentationIds agree with the scene; the map is empty unless geometry extraction has run, so the entity-graph walk below is the primary source.

    Returns AP214ProductStructureExtraction

Methods

  • Build the product-structure tree.

    Parameters

    Returns ProductStructureNode[]

    The roots of the assembly forest. A single-part file yields one root; a multi-level assembly (e.g. as1) yields one root whose descendants are the NAUO occurrences.

  • Resolve the owning product_definition express id from a property_definition-style definition select. Handles the direct product_definition case and the product_definition_shape indirection (its own definition points at the product definition).

    Parameters

    • definition: undefined | {
          expressID?: number;
      }

      The resolved definition reference, or undefined.

    Returns undefined | number

    The product definition express id, or undefined if it does not resolve to one.