Repository navigation
fix(partitions): read Revit 2023 records' container and Levels' Building Story in their 32-bit forms - #738
Conversation
…ing Story in their 32-bit forms A 2023 element record's container reference is the u32 22 bytes before its marker (16 after the category), followed by ff ff ff ff, not the u64 at 2024's place relative to the marker. Joined on ElementId with the 2024 copy of Autodesk's same sample projects, the u32 agrees with 2024's container on every shared record of rac_basic, rst_basic and rac_advanced 2023 (1,201, 5,858 and 8,901), where the u64 disagrees on 9, 4,183 and 95, every container member among them. The Level reader takes the same field, so rac_basic's Level 800333, a container member, no longer fails the storey-set check and its six Levels are read. A 2023 Level's Building Story frame is ff ff ff ff 00 01, an f64, a u32 ElementId and the setting; the u64 frame found an unrelated run. Every Level of the three projects now gives the setting its 2024 copy gives. Storey agreement of the 2023 exports with the 2024 copies: 15.5 to 81.7 per cent (rac_basic), 91.9 to 95.2 (rst_basic), 90.0 to 97.8 (rac_advanced). 2024 exports are unchanged. Probe: examples/probe_32bit_container.rs; report: reports/element-framing/32bit-container-and-building-story.md. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Thank you, this is a careful piece of work. Joining each 2023 sample with its 2024 copy on ElementId is a strong oracle for a release that has no export of its own here, and the two fields are fail-closed in the right way ( As on #737, I replaced your commit with the same change, signed and rebased onto current On your open checkbox: I'll run the Measure workflow with Autodesk's samples ( |
3c367db to
b9c0a03
Compare
|
The Measure run is in: run 39114116073, this branch (
Arming it now. |
[Unreleased] becomes [0.5.0] — 2026-10-18, with an introduction, the contributors, and what to change when upgrading from 0.4. The community pull requests' entries are added and credited (#737, #738, #744, #751, #752, #753, #755, #757, #758), and the repeated Added, Changed, Fixed and Research headings are folded into one each, keeping every entry (107) and its order; everything from [0.4.0] down is unchanged. CITATION.cff said 0.1.2 (2026-04-20), though RELEASE.md has it agree with Cargo.toml at every tag. Its abstract now describes the project as the README does, without the "first open-source tool" and "verified against 11 releases" claims.
## Summary Prepare v0.5.0. Merging this is not the release: the release is the signed `v0.5.0` tag on the merged commit, which runs `publish.yml` (crates.io, PyPI, the release binaries and the container image). The tag waits for the maintainer's go-ahead. ## Motivation `main` is 0.4.0 plus everything under `[Unreleased]`: Revit 2026 projects (experimental), MEP ports, connections and systems, Revit's level, category, family, type and phase properties, rooms aggregated into their storeys, Snowdon Towers exporting again, and the first pull requests from outside contributors. Before 1.0 a breaking change bumps the minor version, and these are breaking for a 0.4 user: - The MSRV is 1.87 (was 1.85). - `rvt` has no `wasm` feature; the bindings are the `rvt-wasm` crate (C6). - Each `IfcSpace` is aggregated into its storey instead of contained in it (#744). - `ElemTableHeader::record_count` is a `u32` (#764). - Type objects take Revit's GlobalIds (RE-167). ## Changes - **Versions 0.4.0 → 0.5.0:** `rvt`, `rvt-py` and its pin, `rvt-wasm`, the `stream_evidence` pin, both lockfiles (only the workspace crates' version lines change), `.release-please-manifest.json` and `viewer/package.json`. - **`CHANGELOG.md`:** `[Unreleased]` becomes `[0.5.0] — 2026-10-18`. - An introduction, the contributors, and an **Upgrading from 0.4** section. - The community pull requests' entries are added and credited (#737, #738, #744, #751, #752, #753, #755, #757, #758). - The repeated Added, Changed, Fixed and Research headings, which later merges had appended, are folded into one each. All 107 entries are kept as written (checked as a multiset) and in their order, and everything from `[0.4.0]` down is byte-identical. - #778's clean-room policy change is added under Changed, so the section has 108 entries. - **`CITATION.cff`:** it said 0.1.2 (2026-04-20), though `RELEASE.md` has it agree with `Cargo.toml` at every tag. Its abstract now describes the project as the README does, without the "first open-source tool" and "verified against 11 releases" claims. - **Registry descriptions:** crates.io showed 0.4.0's description, which leaves out Revit 2023, and PyPI one that called element extraction and geometry "active research" and the export "document-level IFC4 scaffolding". `Cargo.toml` and `pyproject.toml` now say what the README says: typed elements from Revit 2023 to 2025 projects, 2026 experimental. - **Witnesses:** the IFC header carries the version (#417), so both Core Interior `rvt-rs.json` observations and their verdicts are refreshed from this pull request's CI run. ## Testing - CI on this pull request: every job `CI passed` requires, the witness replays among them. - On the tag, the publish workflow runs its own checks before anything is published: wheel install and model open on each OS, `cargo install` and the CLI sample smoke, the docs.rs build preview and the viewer load smoke. crates.io and PyPI publish only after all of them pass, and PyPI only after crates.io. ## Audit-honesty checklist - The docs keep describing 0.4.0 as the latest release until each 0.5.0 channel has been checked from what was published. That follows in a separate pull request (`docs/install.md`, `docs/python.md`, `docs/status.md`, `docs/supported-profile.md` and the README's release section). - crates.io's trusted publisher (repository DrunkOnJava/rvt-rs, workflow `publish.yml`, environment `crates-io`) has to be in place before the tag, as `docs/maintaining.md` says; it is a registry-side setting this repository cannot check. ## Legal and contribution hygiene N/A: release metadata only. Contributors are credited by their GitHub names in the CHANGELOG. ## Breaking changes Listed under Motivation, with the migration for each in the CHANGELOG's **Upgrading from 0.4**.
Summary
This fixes two 32-bit fields that Revit 2023 records are read with:
u3222 bytes before the marker, not theu64at 2024's place.ff ff ff ff 00 01 · f64 · u32 id · setting, not theu64form.Together they read
rac_basic2023's Levels, which were not read at all before, and raise storey agreement on all three Autodesk 2023 samples.Motivation
I found these while measuring Autodesk's 2023 sample projects against their 2024 copies (the RE-140 pairs, joined on ElementId; ElementIds and GlobalIds survive the re-save).
u64at 2024's place relative to the marker, 8 bytes after the category, is not the container. Onrac_basicit is an all-0xFFrun, so no 2023 record was ever a container member. As a result, Level 800333 (a container member on 2024, container 800214) was taken for a seventh standalone Level,recovered_levels_are_a_storey_setfailed, and no Level of the project was read.u64anchor found an unrelated run after the name, so every Level readNoneorfalse.Changes
src/partition_element_records_2023.rs: the container is theu32at marker - 22,0xffff_ffffmeaning unset. The unusedu64closure is removed.src/partition_level_records.rs:find_level_records_2023reads the sameu32(16 after the category).building_story_aftertakes the id width, and reads the 32-bit frame when it is 4.examples/probe_32bit_container.rs: joins a 2023 file with its 2024 copy and counts which reading of the container agrees.reports/element-framing/32bit-container-and-building-story.md,CHANGELOG.md.Testing
tools/check-local.shpasses (231 passed).rac_basic,rst_basicandrac_advanced, fetched withtools/fetch-autodesk-samples.sh(SHAs pinned inresearch/autodesk-sample-projects.tsv).RVT_SAMPLES_DIR(the 11 phi-ag families) andRVT_PROJECT_CORPUS_DIR(Einhoven, Core Interior), the wholeintegrationbinary passes except three targets that fail identically onmain120e2f9:elem_table_corpus::declared_element_ids_returns_sorted_deduped_set(skipped intest-targets.txt);ifc_synthetic_project(classedunit);project_count_fixtures(needs the magnetarIFC Exportsfolder, which I did not fetch).measure.ymlrun with-f samples=truewould score this against them.Storey agreement of each 2023 export with its 2024 copy's, per element:
mainrac_basicrst_basicrac_advancedThe Building Story setting of every Level now equals its 2024 copy's:
rac_basic: 6 Levels, all stories.rac_advanced: 5 Levels, all stories.rst_basic: 9 Levels, none a story.rac_basic's one element that 2024 does not export, a container member, is no longer exported. The 2024 exports of the three projects are unchanged apart from timestamps.Audit-honesty checklist
examples/probe_32bit_container.rsand the dated report is inreports/element-framing/. I did not add an addendum todocs/rvt-moat-break-reconnaissance.md; happy to if you want one.Legal and contribution hygiene
Breaking changes
None. Exports of 2023 files change: Levels are read where they were not, and container members are left out as on 2024.
Related issues
Refs #421. Related findings: RE-107, RE-118, RE-140.
🤖 Generated with Claude Code