Skip to content

An all-unset material map whose family is not read: the code and RE-299 section 3 read it in opposite ways #1929

Closed

Description

@DrunkOnJava

Two places where the code does something its own research report does not support. Found by the research-claims audit (batch 7) and checked by hand against main at 2aecb44.

1. Revit 2015 to 2022 GlobalIds are built by the episode rule (RE-208)

revit_global_ids (src/research/revit_global_ids.rs:350) picks the episode offset from the ElemTable record length alone: Some(elem_table::RECORD_LEN_40) => RECORD_EPISODE_OFFSET, Some(28) => RECORD_EPISODE_OFFSET_28. A 28-byte table is every release through 2023, so the rule RE-48 / RE-108 measured on 2023 runs on 2015 to 2022 too. Callers: src/ifc/mod.rs:2755, src/ifc/wall_cut_openings.rs:576.

  • RE-208 (reports/element-framing/RE-208-revit-2015-global-ids.md:7) is a measured negative: "Revit 2015 did not make this export's element GlobalIds from the episode history, so RE-48's rule cannot rebuild them." On the 2015 export every element has a prefix of its own.
  • 2016 to 2022 have no Revit export in the corpora to measure against, so the rule is unmeasured there.
  • The doc comment at revit_global_ids.rs:350 still says "(Revit 2023 and earlier, measured on 2023)".

A GlobalId that looks like Revit's but is not breaks matching across exports in other BIM tools without any warning. Options: gate the episode rule to the releases measured (2023 on the 28-byte branch) and fall back to the deterministic ids rvt-rs writes elsewhere, or keep it and say in the docs and the diagnostics that 2015 to 2022 GlobalIds are not Revit's. Gating changes 2015 to 2022 exports, so it needs a full Measure with samples=true.

2. An all-unset material map whose family is not read (RE-299 §3)

RE-299 §3 says: "Where the native record or the family is not read, the scan decides, as before." In src/research/partition_schema_mvp/materials.rs:123-132, draws is !map.all_unset || <family's shows_unset> != Some(false). Where the family document is not read, shows_unset is None, None != Some(false) is true, and the type is taken to draw: its empty list is dropped and its doors and windows are written as elements, not the scan's openings-only.

No measured file holds an all −1 map (RE-299 §4), so neither reading is measured. Decide which is meant, then fix the code or the report's sentence.

Neither changes an export of the measured corpora today as far as the reports say; (1) changes every 2015 to 2022 export if gated.

Activity

  1. DrunkOnJava commented on Nov 13, 2026

    @DrunkOnJava
    OwnerAuthor

    Decision on item 1, from the measurements the audit did not have (rvtDevelop has the numbers): the episode rule is kept on every 28-byte ElemTable, not gated to 2023. Against Revit's own exports it gives Revit's GlobalId on 145 of 151 paired elements of a Revit 2020 file, 181 of 181 and 1,696 of 1,698 on two Revit 2021 files (held-out models, counts only; Measure 43477851375), on 14 of 14 rooms of the 2018 sample against the public Revit 2018 export on every save from 2015 to 2023 (RE-326), and on 116 of 116 spaces of the 2020 sample (RE-333). It gives none on the 2015 BIMcollab example (0 of 241, RE-208) and on both Revit 2018 Vitoria models (0 of 1,314 and 0 of 1,441); those are the files whose elements probably store their own IfcGUID, which Revit's exporter takes first (RE-220 section 1, tested on #878). Gating would remove ids that are Revit's on 2020 and 2021. The doc comment of revit_global_ids and the report (RE-459) say this; item 2 is answered in RE-299 by rvtDevelop's docs PR.

    One more row, registered before its run: on the 2018 sample rac_basic_sample_project, the elements, not only the rooms, take Revit's GlobalId from the rule. Method: Measure with -f keep_ifc=true -f samples=true -f sample_years="2018 2018" keeps the 2018 save's export, and tools/re/global_ids_vs_ifc.py scores it against the public Revit 2018 export of RE-326 (sha256 1114ce91..., fetched by hand, not committed). Expected: every element the two exports share, except the parts Revit makes of its own (openings, stair components), as RE-108 found on 2023. A different result is reported as it is.

  2. DrunkOnJava commented on Nov 13, 2026

    @DrunkOnJava
    OwnerAuthor

    Item 1 is settled by #1934 (040fc011) and the measurement behind it (43506982243, RE-459), and it came out the other way from the options this issue listed:

    • The episode rule is measured on 2015 to 2022, not unmeasured, and gating it to 2023 would remove ids that are Revit's. Where a Revit export of the same project exists it gives Revit's GlobalId to rac_advanced 2015 to 2020 (5,436 of 5,515 on each), the Revit 2018 sample (434 of 435), Frigento 2020 (145 of 151), Gdynia 2021 (181 of 181), BIM Whale 2021 (1,696 of 1,698) and both Revit 2018 Vitoria projects (1,297 of 1,314 and 1,420 of 1,441, once the history parse stopped refusing four entries closed by 0x1e). The one failure is BIMcollab's Revit 2015 example (RE-208's), whose export went through another tool; Revit 2015, BIMcollab's structural example: 241 of 241 element GlobalIds differ from an export that went through another tool; the rule holds on rac_advanced 2015 #878 keeps that file.
    • What was wrong was the rest of the ids, and that is gated now. A storey takes the episode GlobalId on 2023 to 2027 only (STOREY_EPISODE_RELEASES); on 2017 to 2022 it is the project's own GUID with the Level's ElementId, which is Revit's on 69 of 69 storeys of 11 files; the project, building and site are that GUID with -16, -15 and -14 on 2017 to 2027 (63 of the 64 files whose export is of their own project).
    • The doc comment of revit_global_ids that still says the rule fails "on two 2018 projects" is stale and is fixed in a docs pull request that follows.

    Item 2 (the all-unset material map whose family is not read, RE-299 §3) is untouched; this issue is retitled to it and stays open.

  3. changed the title [-]GlobalIds of Revit 2015 to 2022 come from a rule RE-208 found wrong for 2015, and an RE-299 case the code reads the other way[/-] [+]An all-unset material map whose family is not read: the code and RE-299 section 3 read it in opposite ways[/+] on Nov 13, 2026
  4. DrunkOnJava commented on Nov 14, 2026

    @DrunkOnJava
    OwnerAuthor

    Both items are answered on main, so this closes.

    Item 1: settled by #1934 and RE-459 (the episode rule is measured on 2015 to 2022 where a Revit export exists, and the storey, project, building and site ids are what was gated), as the comment above says.

    Item 2: #1930 (864340c3) changed RE-299 section 3 to what the code does, and section 4 says what is reasoned rather than measured. Where the family is not read, a map with entries is geometry and the type draws (draws in materials.rs is !map.all_unset || family.shows_unset != Some(false), so None draws); the one case that keeps the flag is an all −1 map whose family document shows none of that geometry (RE-204). Section 4 lists "a type with an all −1 map and an unread family draws" as reasoned from section 2 and not measured, since no file in the corpora holds an all −1 map; the code and the report now say the same, and a file that holds one is the way to measure it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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