Repository navigation
fix(elements): read a category's material on Revit 2015 to 2023 where its object style holds no pattern (#1805) (RE-464) - #1997
Merged
Conversation
DrunkOnJava
added a commit
that referenced
this pull request
Nov 14, 2026
…ent copy on Revit 2020 too, giving the one file measured Revit's layer widths on all 5 floors (#1805) (RE-466) (#2003) ## Summary A wall, floor, roof or ceiling type whose layer copies disagree now takes its current partition's copy on Revit 2020, as it does on Revit 2024 and later (RE-446). Before, such a type was dropped on every release before 2024, and its elements got no layer set (RE-466). On the held-out Revit 2020 file, read as counts and the one export of 126 that moves: - layer sets written: 12 to 17; - whole layer sets within 0.001 ft of Revit's: 12 of 12 to 17 of 17; - layer names equal to Revit's, in order: 23 to 28; - `Pset_SlabCommon.PitchAngle` equal 10 to 15 of 18; properties equal 497 to 502, different 0 before and after. The element-materials census: same set 98 to 99, IfcSlab different 2 to 6. All 6 differing sets (2 already on `main`) contain fewer layers than Revit's, and each is Revit's, names in order, once the layers Revit writes 0 thick are left out (6 of 6). Those are membranes. rvt-rs leaves them out because Revit's Snowdon IFC4 export does (RE-53), so Revit's exports disagree on them and this PR keeps leaving them out. The rise is that disagreement, not a wrong material. Only 2020 takes the rule (`CURRENT_COPY_32BIT_REVIT_VERSIONS`): none of Autodesk's 34 samples of 2015 to 2023 has a type whose copies disagree, so the held-out file is the only one that exercises it. ## Motivation #1805. RE-446 limited the current copy to 2024 and later because the held-out 2020 file's floors gained materials Revit's export does not give. Two causes: the category-material read, fixed from Autodesk's samples in #1997 (RE-464), and the membranes above. The held-out file shaped neither the reader nor the rule. ## Changes - `src/research/partition_compound_structure.rs`: `scan_type_layers` resolves disagreeing copies through `current_partitions` on 2024 and later and on `CURRENT_COPY_32BIT_REVIT_VERSIONS` (2020). - `tools/re/element_materials_vs_ifc.py`: says how a different set differs and counts the elements a shared Tag keeps out of the comparison. - `tools/re/layer_sets_vs_ifc.py`: says which way a layer count differs, and whether the set is Revit's once its 0-thick layers are left out. - `tools/ci/scrub-holdout-results.sh`: keeps those counts on held-out files. Until now it dropped `layer sets whose count differs from Revit's`, because its pattern allows no capital before a colon. - `docs/export-diagnostics.md`, `reports/element-framing/RE-466-current-layer-copy-revit-2020.md`, a changelog fragment. ## Testing - Measure [43578558197](https://github.com/DrunkOnJava/rvt-rs/actions/runs/43578558197): `7952aec6` (the code; later commits change doc comments, scorers and the report) against its merge-base, unfiltered, with nordic, r2025, samples, holdout and racadv. 125 of 126 exports identical, 102 of 102 diagnostics identical, `same-project gates` pass. Figures as above. - Held-out counts with the extended scorers: [43582032493](https://github.com/DrunkOnJava/rvt-rs/actions/runs/43582032493), [43582471166](https://github.com/DrunkOnJava/rvt-rs/actions/runs/43582471166) and [43582862119](https://github.com/DrunkOnJava/rvt-rs/actions/runs/43582862119). - Probe [43577510927](https://github.com/DrunkOnJava/rvt-rs/actions/runs/43577510927) (held-out counts): the unnamed layers' category material is Revit's on 4 of 4. Samples [43560071868](https://github.com/DrunkOnJava/rvt-rs/actions/runs/43560071868): `copies_disagree 0` on all 34. - Carry-proof [43583282604](https://github.com/DrunkOnJava/rvt-rs/actions/runs/43583282604): the final head against `7952aec6`, every export, scorers none. - [ ] `tools/check-local.sh`: no local builds; `rustfmt --check` passes; CI runs the rest. ## Audit-honesty checklist - [x] No claim beyond what the runs show; a held-out file shaped nothing; the membrane disagreement is stated with its count. - [x] A changelog fragment. - [x] No private paths or emojis. ## Legal and contribution hygiene - [x] Apache-2.0; no Autodesk source; no fixtures. Clean-room: byte observations of Autodesk's public sample projects only. Closes #1805.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The category-material reader (
scan_category_material_2023) now reads both forms of a category's object-styles entry on Revit 2015 to 2023. One form carries a pattern (RE-115's frame). The other has no pattern: a null object where thePatternHelperstands, the mark 20 bytes past the category and the material at 24 (RE-464). That second form is every host category of Autodesk'srac_advanced,rmeandrstsamples, whererac_basicholds the first. A wall, floor, roof or ceiling layer there that takes its category's material now carries it.What moves, per the Measure below: only
IfcMaterialLayerSetand element material lines, on 22 exports. Each newly written material is Revit's:racadv-2015toracadv-2020: 4 more elements each with Revit's material set (5,252 to 5,256);IfcWallStandardCasewith no material 4 to 0; layer names Revit's 667 to 671; whole layer sets within 0.001 ft 215 of 215 to 219 of 219.IfcWallwith no material 38 to 0; layer names 1,062 to 1,101; layer sets within 0.001 ft 235 of 236 to 274 of 275.rac_advancedof every year 2015 to 2023,rme_advancedandrme_basicof 2015 and 2019, andrme_basicof 2023. Their category-material layers now carry the material, asrac_basic's already did.No diagnostics counter moves (102 of 102 identical), and no property, quantity, body or entity count moves.
Motivation
#1805: a held-out Revit 2020 file's floors had layers with no material. A counts-only trace showed the category entry never read there. Autodesk's samples then showed the two forms (report RE-464, probe on
research/1805-layer-copies). The held-out file was not used to shape the reader.Changes
src/research/partition_materials.rs:scan_category_material_2023accepts the unpatterned entry (u32 0at +16, the mark at +20, the material at +24) beside the patterned one, and both copies of an entry must agree, as before.CATEGORY_MATERIAL_FRAME_2023andscan_category_materialdocument it.reports/element-framing/RE-464-category-material-without-pattern.md.Testing
Measure 43563790221:
7ffbde22(the code as merged here; later commits change only the report) against v0.23.028b5ed83, unfiltered, with nordic, r2025, samples, holdout and racadv.22 of 126 exports move, and 102 of 102 diagnostics are identical.
The only scorer lines that move are
element_materials_vs_ifcandlayer_sets_vs_ifc, with the figures above: no equal count falls, and nothing differs that did not.same-project gatespasses on7ffbde22.The held-out Frigento (2020) does not move. Why its floors read no category material stays on RE-446 follow-up: do the current copies of a floor or wall type's layers hold on Revit 2008 to 2023? The held-out Revit 2020 file's four floors say not for materials #1805, as counts.
tools/check-local.sh: no local builds;rustfmt --checkpasses; CI runs the rest.Audit-honesty checklist
Legal and contribution hygiene
Part of #1805.