Skip to content

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

Merged
DrunkOnJava merged 6 commits into
mainfrom
fix/1842-framing-second-list
Nov 13, 2026
Merged

DrunkOnJava merged 6 commits into
mainfrom
fix/1842-framing-second-list

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Nov 13, 2026 •

Copy link
Copy Markdown
Owner

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_basic level 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.rs and the frame test helper give it empty.
  • src/research/partition_schema_mvp.rs: element_record_decoded reads 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_levels binds a framing record to the highest Level it names, source partition_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:

  • Probe and scorer on the BIM4LCA timber offices, concrete office and timber housing (Revit's export) and on the 2024 to 2027 saves of rac_advanced and rst_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).
  • Unfiltered Measure of this change (the rows registered on Revit 2027 structural model: 104 columns, beams, slabs, flights and footings on no storey (#1829) #1842), 43449255647 at 70380f3 against f8e2053: the two timber offices' storeys_vs_ifc go 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 six racadv models, the rac_advanced, rst_basic and rst_advanced saves and Snowdon Towers Structural; diagnostics differ on 5. The 2025 against 2026 rst_basic diff has no Level that differs (370 of 370), but LevelBindSource still differs on 12 beams with the same Level (row 3 of RE-454 section 5: held for the Level, not for the label).
  • The exports of both sides kept for the rac_advanced, rst_basic and rst_advanced saves of 2015 to 2027, 43456034222: each older save takes its 2024 save's Level on more beams than before and on none fewer (rst_basic 297 to 325 of 366, rac_advanced 12 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 one Reference Level name (Snowdon Towers Structural 942 of 942 beams, where 278 of 487 bound beams disagreed; rst_basic 370 of 370, 37 of 366 before; rac_advanced 37 of 37, 4 of 16 before).
  • Same-project gates: pass on 70380f3 (15:36 UTC); main merged since (a clean merge).

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

  • README / docs reflect the current state after this PR (docs/status.md, docs/export-diagnostics.md)
  • A user-visible change has its entry as a fragment under changelog.d/
  • Commit messages describe WHAT changed and WHY
  • No emojis in code, docs, or commit messages
  • No private paths, personal email addresses, or internal jargon in committed files

Legal and contribution hygiene

  • I agree this work is licensable under Apache-2.0
  • This PR contains no Autodesk proprietary source, decompiled internals, or NDA'd SDK content
  • No new test fixtures

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 LevelElementId and LevelBindSource say so.

Related issues

Refs #1842, #1864.

…rd's second reference list names, else its first list's highest (#1842) (RE-454)
…s an element in against each Level its record names, for the beams one or more storeys below Revit's and the records naming three Levels (#1842) (#1864)
…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)
@DrunkOnJava

Copy link
Copy Markdown
Owner Author

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: second_references and decode_second_reference_list (both bounds-checked, empty on Revit 2008 to 2023), the choice of list in element_record_decoded, the framing branch of resolve_base_constraint_levels (the highest Level, source partition_element_record_reference_level, registered in tests/value_sources_offsets.rs), and that every other class keeps RE-27 and RE-59. The measured rows are in the body and in RE-454 section 5: the unfiltered Measure 43449255647 and the kept exports of 43456034222 (no older save further from its 2024 save's Level, and every Level a beam is bound to carries one Reference Level name). Full CI is green on this head, and the same-project gates passed on 70380f3, which holds the source change; main has been merged since (a clean merge).

@DrunkOnJava
DrunkOnJava merged commit 4b5ad24 into main Nov 13, 2026
63 checks passed
@DrunkOnJava
DrunkOnJava deleted the fix/1842-framing-second-list branch November 13, 2026 16:19
DrunkOnJava added a commit that referenced this pull request Nov 14, 2026
… 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.
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