Skip to content

fix(elements): read a category's material on Revit 2015 to 2023 where its object style holds no pattern (#1805) (RE-464) - #1997

Merged
DrunkOnJava merged 4 commits into
mainfrom
fix/1805-category-material-no-pattern
Nov 14, 2026
Merged

DrunkOnJava merged 4 commits into
mainfrom
fix/1805-category-material-no-pattern

Conversation

@DrunkOnJava

Copy link
Copy Markdown
Owner

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 the PatternHelper stands, the mark 20 bytes past the category and the material at 24 (RE-464). That second form is every host category of Autodesk's rac_advanced, rme and rst samples, where rac_basic holds 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 IfcMaterialLayerSet and element material lines, on 22 exports. Each newly written material is Revit's:

  • racadv-2015 to racadv-2020: 4 more elements each with Revit's material set (5,252 to 5,256); IfcWallStandardCase with 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.
  • held-out Warmond (2021): 423 to 462 elements with Revit's material set (39 more, all equal); IfcWall with 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.
  • held-out Gdynia (2021): 154 to 155 (1 more, equal); layer names 217 to 218; layer sets 107 of 108 to 108 of 109.
  • 14 Autodesk samples with no Revit export: rac_advanced of every year 2015 to 2023, rme_advanced and rme_basic of 2015 and 2019, and rme_basic of 2023. Their category-material layers now carry the material, as rac_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_2023 accepts the unpatterned entry (u32 0 at +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_2023 and scan_category_material document it.
  • reports/element-framing/RE-464-category-material-without-pattern.md.
  • A changelog fragment.

Testing

Measure 43563790221: 7ffbde22 (the code as merged here; later commits change only the report) against v0.23.0 28b5ed83, unfiltered, with nordic, r2025, samples, holdout and racadv.

Audit-honesty checklist

  • No claim beyond what the run shows; a held-out file shaped nothing.
  • A changelog fragment.
  • No private paths or emojis.

Legal and contribution hygiene

  • Apache-2.0; no Autodesk source; no fixtures. Clean-room: byte observations of Autodesk's public sample projects only.

Part of #1805.

@DrunkOnJava
DrunkOnJava merged commit 504efc2 into main Nov 14, 2026
36 checks passed
@DrunkOnJava
DrunkOnJava deleted the fix/1805-category-material-no-pattern branch November 14, 2026 06:43
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.
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