Skip to content

Synthetic GlobalIds shift whenever earlier geometry changes #400

Closed

Description

@DrunkOnJava

Measured

Elements without a Revit GlobalId get a synthetic one from step_writer::make_guid(index): 0rvtrs followed by the STEP entity index. The index counts every entity written before the element, so any change that adds or removes an entity earlier in the file renumbers the GlobalIds of every such element after it. The ids are stable run to run, but not version to version.

On Snowdon Towers, drawing 24 curved walls as ring sectors adds profile points, and that alone changes the GlobalId of all 147 IfcOpeningElements and the 6 slabs that have no Revit GlobalId. Their geometry, properties and Tags are unchanged. RE-74 and RE-73 did the same.

Why it matters

A GlobalId is how IFC tools track an element across exports: BCF issues, clash results, model diffs, and any database keyed by it. Today an opening's GlobalId is not a stable identity between rvt-rs versions, or between two exports of the same model after unrelated geometry changes.

What would close it

Derive the fallback GlobalId from the element's own identity instead of its position in the file. For an opening, its host wall and the door or window it holds (both ElementIds); for a record element, its ElementId and entity kind. Hash that into the 22-character IFC alphabet with a fixed namespace. Then check that GlobalIds survive an unrelated geometry change: export the same file before and after one, and require every product with the same Tag to keep its GlobalId.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions