Every ancestor id of expressId, walking upward through spatial
containment (IfcRelContainedInSpatialStructure) and aggregation
(IfcRelAggregates, which also carries IfcRelNests — see
RelationshipType.Aggregates) to any depth. Excludes expressId
itself. Order is breadth-first by hop distance; a caller that only tests
whether some ancestor's Name matches doesn't depend on it.
Cycle-safe: a malformed file can have A contain/aggregate B and B
contain/aggregate A. A seen set means every id is enqueued at most
once, so the walk always terminates — with whatever ancestors it found
before the cycle closed — rather than looping or growing the queue
without bound.
Every ancestor id of
expressId, walking upward through spatial containment (IfcRelContainedInSpatialStructure) and aggregation (IfcRelAggregates, which also carriesIfcRelNests— see RelationshipType.Aggregates) to any depth. ExcludesexpressIditself. Order is breadth-first by hop distance; a caller that only tests whether some ancestor's Name matches doesn't depend on it.Cycle-safe: a malformed file can have A contain/aggregate B and B contain/aggregate A. A
seenset means every id is enqueued at most once, so the walk always terminates — with whatever ancestors it found before the cycle closed — rather than looping or growing the queue without bound.