Repository navigation
fix(elements): a beam or brace is in the storey of the Level its record's second reference list names, else its first list's highest (#1842) (RE-454) - #1915
Conversation
…rd's second reference list names, else its first list's highest (#1842) (RE-454)
…ation, floor and stair records that name none or one Level, and the scorer scores the highest Level where none lies within the box (#1842)
…ond reference list too, and the scorer scores the Level RE-174 and RE-175 read a beam's Reference Level from (#1842)
… Revit's storey, every bound Level one Reference Level name on three samples, and no older save further from its 2024 save's Level (#1842) (RE-454)
|
Self-approved as rvt-rs-review[bot] under Griffin's 2026-11-12 answer ("You are allowed to self-approve"). rvtDevelop was told at 16:00 UTC that this head was ready and had not answered. I re-read the whole source delta as a second reader would: |
… value as a label change, not a change (#1864) (#1969) ## Summary `rvt-diff --elements` now compares resolved values, not the rules that read them. An element whose `LevelBindSource` alone differs, or whose `BodySource` differs while its body is the same, counts as unchanged and is listed apart as a label change: `relabelled` in the JSON, each entry with its `labels`, and a "label changes" line in the summary. A body that differs is still a change, with its `BodySource` beside it. This is #1864's third bullet, as rvtReview decided it there. ## Motivation Two saves of `rst_basic` (2025 and 2026) bind the same Level to 12 beams by two rules (the reference list, the reference level). #1915's Measure shows `LevelElementId` equal on all 370 beams, yet `rvt-diff --elements` listed the 12 as changed, which hides the model's own changes among rvt-rs's provenance labels. The value each label stands for is compared on its own, so nothing real is dropped: `LevelElementId` and `LevelBindResolved` for a Level bind, and the body digest for a body. ## Changes - `src/ifc/element_diff.rs`: `LABEL_PROPERTIES` (`LevelBindSource`), and `BodySource` as a label only where the two bodies' digests are equal. `ElementChange::labels`, `ElementDiff::relabelled`. A relabelled element counts in `unchanged`, so `left_elements = removed + changed + unchanged + set_aside.left` still holds. Two failure-first tests of the pure comparison beside the existing ones: a Level bind's rule alone is a label, and a `BodySource` is a change where the body differs. - `src/bin/rvt_diff.rs`: the summary prints the label changes apart, and `--redact` scrubs them too. - `docs/schemas/rvt-diff-elements.schema.json`: `relabelled` (a `relabel` definition: no changes, at least one label) and `change.labels`. - `docs/library.md` and a changelog fragment. ## Testing No export changes. `tests/json_schema_contracts.rs` runs `rvt-diff --elements` and validates its JSON against the schema, and CI's `--lib` job runs the comparison's tests. The pair run: Measure [43544616792](https://github.com/DrunkOnJava/rvt-rs/actions/runs/43544616792), `probe_1864_body_diff` on the 2025 samples against their 2026 saves. Expected, registered before it runs: `rst_basic`'s 12 `LevelBindSource` differences leave the changed list, and `rac_advanced`'s roof 201262 (sketch on 2025, saved mesh on 2026) stays on it. - [ ] `tools/check-local.sh`: no local builds; `rustfmt --check` passes; CI runs the rest. ## Audit-honesty checklist - [x] The schema and the docs say what is compared and what is listed apart. - [x] A changelog fragment. ## Legal and contribution hygiene - [x] Apache-2.0. Part of #1864.
Summary
A beam or brace is bound to the storey of the Level its record's second counted reference list names, else its first list's, the one Level it names or the highest of several (RE-454, RE-174, RE-175). The storey bind read the first list alone, so on each BIM4LCA timber office file 63 beams were in a storey other than Revit's export puts them in.
Motivation
#1842 (a reporter's Revit 2027 model has 424 beams one to six storeys below Revit's) and #1864 (12
rst_basiclevel binds change between its 2025 and 2026 saves). Three probe runs on the models Measure holds with Revit's export show the cause (report RE-454, sections 2 and 3). Rows for this change were registered on #1842 before its Measure was dispatched.Changes
src/research/partition_element_records.rs:second_references, the second counted list, kept on each record (decode_second_reference_list);partition_element_records_2023.rsand the frame test helper give it empty.src/research/partition_schema_mvp.rs:element_record_decodedreads a framing record's Level from the second list where that names any Level, else the first, and keeps all the Levels a framing record names.src/research/partition_schema_mvp/levels.rs,element_record_level_refs.rs:resolve_base_constraint_levelsbinds a framing record to the highest Level it names, sourcepartition_element_record_reference_level.tests/value_sources_offsets.rs,docs/export-diagnostics.md: the new bind source.probes/examples/probe_1842_storey_rules.rs,tools/re/storey_rules_vs_ifc.py: the probe and scorer (research commits, already run in Measure 43440608938, 43443555682 and 43445936441).reports/element-framing/RE-454-framing-reference-level-storeys.md,docs/status.md,changelog.d/fixed/1842-framing-reference-level.md.Testing
Unit tests are banned in this repository; the change is measured end to end:
rac_advancedandrst_basic: the second list's Level is Revit's storey for 71 of 71 timber office beams (8 of 71 before) and the same on every save (report sections 2 and 3).storeys_vs_ifcgo from 67 elements in a different storey to 4 (the ramps) per file, +63 in Revit's storey, and no other scorer line moves; 109 of 146 exports are byte-identical, the 37 that differ are the offices, the sixracadvmodels, therac_advanced,rst_basicandrst_advancedsaves and Snowdon Towers Structural; diagnostics differ on 5. The 2025 against 2026rst_basicdiff has no Level that differs (370 of 370), butLevelBindSourcestill differs on 12 beams with the same Level (row 3 of RE-454 section 5: held for the Level, not for the label).rac_advanced,rst_basicandrst_advancedsaves of 2015 to 2027, 43456034222: each older save takes its 2024 save's Level on more beams than before and on none fewer (rst_basic297 to 325 of 366,rac_advanced12 to 14 of 16), so the change is not limited to Revit 2024 and later; within each Revit 2024 export every Level a beam is bound to carries oneReference Levelname (Snowdon Towers Structural 942 of 942 beams, where 278 of 487 bound beams disagreed;rst_basic370 of 370, 37 of 366 before;rac_advanced37 of 37, 4 of 16 before).Not measured: the reporter's Revit 2027 model (confidential; its counts after the release are the check), records of other classes that name three or more Levels (no open model with Revit's export has one).
Audit-honesty checklist
docs/status.md,docs/export-diagnostics.md)changelog.d/Legal and contribution hygiene
Breaking changes
None. A beam or brace that the first list placed in another Level than its Reference Level is in the Reference Level's storey, and its
LevelElementIdandLevelBindSourcesay so.Related issues
Refs #1842, #1864.