Skip to content

red: B60 type GlobalIds (scratch, do not merge) - #662

Closed
DrunkOnJava wants to merge 1 commit into
mainfrom
red/b60-type-global-ids
Closed

DrunkOnJava wants to merge 1 commit into
mainfrom
red/b60-type-global-ids

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Oct 4, 2026 •

Copy link
Copy Markdown
Owner

Red run for B60's test alone.


Note

Low Risk
Test-only change plus CI manifest entry; no production exporter logic in this diff.

Overview
Adds B60 corpus verification that IFC type objects use the same GlobalId as Revit’s exporter for elements linked via IfcRelDefinesByType (matched by element Tag), complementing existing element-level GlobalId checks.

The new tests/type_global_ids.rs parses reference IFC STEP and rvt-rs exports from RVT_PROJECT_CORPUS_DIR (RE1 models + 2024_Core_Interior), compares type GlobalIds per tag, and fails with sample mismatches. type_global_ids is registered in tools/ci/test-targets.txt as a real CI target so it cannot be skipped silently.

Reviewed by Cursor Bugbot for commit 8f97f8601c492ba175147c0c9f30988f25ed0ffe. Configure here.

@DrunkOnJava
DrunkOnJava force-pushed the red/b60-type-global-ids branch from 8f97f86 to 273e907 Compare October 4, 2026 17:17
DrunkOnJava added a commit that referenced this pull request Oct 4, 2026
… (B60)

tests/type_global_ids.rs compares, for every element both exports relate
to a type, the type's GlobalId with Revit's, on the four RE1 models and Core
Interior. Door and window types are left out (B72).

Red on main (draft #662, run 37219969064, "Corpus health (tier 2)"):

  RE1-Architecture.rvt: 67 elements typed in both, 31 types' GlobalIds not Revit's; 5 doors and windows left out
  RE1-Mechanical.rvt: 49 elements typed in both, 37 types' GlobalIds not Revit's
  RE1-Plumbing.rvt: 123 elements typed in both, 54 types' GlobalIds not Revit's
  RE1-Electrical.rvt: 49 elements typed in both, 2 types' GlobalIds not Revit's
  2024_Core_Interior.rvt: 716 elements typed in both, 278 types' GlobalIds not Revit's; 138 doors and windows left out
  panicked at tests/type_global_ids.rs:166:5:
  RE1-Architecture.rvt: 31 of 67 typed elements' types have another GlobalId than Revit's; first: ["351456 (IFCFURNITURETYPE): Revit 3144CP5Ub2qhBtGD1R3koT, rvt-rs 3144CP5Ub2qhBtGD1R3koW", ...]
@DrunkOnJava

Copy link
Copy Markdown
Owner Author

Red output recorded in #663's test commit.

@DrunkOnJava DrunkOnJava closed this Oct 4, 2026
@DrunkOnJava
DrunkOnJava deleted the red/b60-type-global-ids branch October 4, 2026 17:50
DrunkOnJava added a commit that referenced this pull request Oct 4, 2026
…s GlobalId (B60) (#663)

RE-167: Revit gives a family instance's type the GlobalId of its
original symbol (ExporterIFCUtils.GetOriginalSymbol), which the
instance's GElement data object holds 20 bytes before its end
(FamilySymbol, SysMullionFamSym or SysPanelFamSym), and writes one type
object per original symbol with the symbol's Tag. Where an instance's
copies disagree, the highest-numbered partition's copy decides (Core
Interior's doors). An instance that uses its own geometry (0xffffffff)
takes a sub-element GlobalId of itself (revit-ifc InstanceAsType). B73:
a type Revit writes under several entities keeps its own GlobalId on the
group holding its lowest ElementId; the others hash the entity and
predefined type. Doors and windows (a hash with the door's flip) are
B72.

Red on draft #662 (run 37219969064); the output is in the test commit.
Green: Corpus health on 90cb85f (run 37224351714),
type_objects_take_revits_global_ids ok on RE1 x4 and Core Interior. The
witness observation for Core Interior is refreshed from CI's own
artifact (IFCCOLUMNTYPE 1 -> 175, IFCSLABTYPE 5 -> 7); IfcOpenShell
validates the export with no issues.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant