IFClite TypeScript API
    Preparing search index...

    Function applyIfcxOverlay

    • Apply an IFCX file to doc as a layer of opinions rather than as a seed.

      seedFromIfcx routes every node through createEntity, a deliberate no-op on a path the doc already has — right for seeding from a snapshot, wrong for merging a layer whose purpose is to modify entities that already exist. This applier creates missing entities exactly as the seeder does, and writes existing entities' opinions on top: values overwrite, anything unmentioned is left alone. null removes a FLAT attribute, child or inherit ONLY: a nulled pset/quantity property survives, silently (pinned in test/apply-ifcx-overlay.test.ts).

      Deliberately NOT part of seedFromIfcx's option surface: the seeder is additive-and-idempotent (apps/viewer, snapshot/worker.ts seed a live session doc with it), and this is a different operation.

      Deletion opinions are honoured where the layer states them: an ifclite::deleted: true node removes the entity, matching composition, bakeLayers and the MCP layer store. A full IFCX snapshot emits only what an entity has though, so a key or entity deleted in the source doc is simply absent rather than nulled or tombstoned, and an overlay cannot tell that apart from "no opinion" — deletions propagate only from layers that state them explicitly. Across separate calls, a path this function itself deleted stays deleted regardless: see overlay-tombstones.ts.

      Parameters

      Returns IfcxFile