Repository navigation
research(elements): Revit cuts a wall's top only where the floor covers it; the rule is exact at permit and misses one wall as built (#1067) (RE-267) - #1151
Merged
Conversation
…all's top (#1067) (RE-267) The probe prints every wall's and its joined floors' native step records, relations and saved parameters; the scorer reads each wall's top along its whole length in both files and the share of its plan each floor covers.
…p faces and where its plan lies outside a floor (#1067) (RE-267)
…rs it; the cover scorer reads the floor's level across the plan (#1067) (RE-267) Report, scorer in Measure's default list, changelog fragment, docs addendum and the RE-258 pointer.
… and on every model: no wall of Core Interior, RE1 or R2025 is cut (#1067) (RE-267) Run 41079569865 reads each floor's underside over three rows of stations; with the level-across condition the rule cuts 64 of 65 office tops as built, 70 of 70 at permit and none that Revit leaves whole, and none of the 505 walls of the other models.
It meshes every wall and its floors at 0.25 ft stations, 68 s per BIM4LCA office model and 21 s on Core Interior (Measure run 41079569865), and its rule is not shipped. RE-267's reproduce command names it with -f scorers, which keeps working.
Owner
Author
|
Owner review. This is a research PR, and the exporter is unchanged.
Nothing else to fix. |
DrunkOnJava
marked this pull request as ready for review
October 30, 2026 15:36
DrunkOnJava
enabled auto-merge (squash)
October 30, 2026 15:36
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cae146f070
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
7 of 9 tasks
… level faces are flat to 0.001 ft (#1067) Codex review on #1151: the probe's slab classes left out ProfileRoof, which RE-267 §4 says most of the office's floors are natively, so their records reached it only through the named-id pass and were not read as slabs; and the scorer counted any triangle within about 2.6 degrees of horizontal as a level face at its mean height, so a shallow sloped top could read as steps. A face is now level when its corners lie within 0.001 ft in height.
DrunkOnJava
disabled auto-merge
October 30, 2026 17:58
DrunkOnJava
enabled auto-merge (squash)
October 30, 2026 18:11
8 tasks done
DrunkOnJava
added a commit
that referenced
this pull request
Oct 30, 2026
…RE-267) (#1152) ## Summary A wall whose top join (`JoinToRoofGStep`, `m_baseOrTop` 1) or Join Geometry pair (`CutPairGStep`) names a slab, roof or footing is drawn up to that element's underside when the element covers the whole of the wall's plan (RE-267 §3). Every other wall keeps the body it has today: the walls a floor covers in part, which Revit steps, and the one wall as built that Revit cuts although 0.0243 ft² of its plan lies outside the floor. A cut wall gets no `Height`: Revit's export omits it on some of them. Draft, not armed. Based on #1151 (RE-267 and `wall_top_cover_vs_ifc`), which is armed and not yet on `main`, so this diff carries its commits until `origin/main` is merged in. ## Motivation #1067: rvt-rs draws 65 of the BIM4LCA office's walls as built (70 at permit) taller than Revit's body, because Revit cuts their tops at a floor. RE-267 measured the rule that is exact on them and narrowed it until it cuts no wall Revit leaves whole. This ships it as narrowed. ## Changes - `src/research/native_walls.rs`: `WallRecords::top_cutters`, the ElementIds a wall's top join and cut pairs name, read in the pass that already reads `JoinToRoofGStep` for RE-228 (no new pass over the file). A step whose ids are in a shape not read leaves the wall out. - `src/research/partition_schema_mvp/{fields,walls}.rs`: the wall field `m_wall_top_cutters` and its reader. - `src/ifc/export_content/wall_tops.rs` (new): the pass, run once every element is in the model. The floor must be an `IfcSlab`, `IfcRoof` or `IfcFooting` drawn as a plain extrusion (a roof drawn from its slopes is a solid and is left out, which is what keeps the R2025 roofs off the walls beneath them), with its underside between the wall's base and top and its outline covering the whole of the wall's plan, clear of its holes and openings (outside area under 1e-4 ft²). The wall's extrusion gets the lower height; the placement and `BoundingBoxHeight` stay, and the wall carries `BodyHeightSource` `wall_top_cut_at_covering_floor` and `TopCoverElementId`. - `src/ifc/export_content.rs`: the wall's pending cut and the call. - RE-267 (status, §7, reproduce), RE-258's update line, the changelog fragment, README, `docs/status.md`, `docs/supported-profile.md`, `docs/support-matrix.json`, `docs/release-1.0-criteria.md` (W6), `docs/contribution-map.md`, `ROADMAP.md` and the reconnaissance addendum. ## Testing Unit tests are banned here and none are added. End to end, Measure against `main`: run [41092512565](https://github.com/DrunkOnJava/rvt-rs/actions/runs/41092512565) (`--ref feat/1067-wall-top-cover`, `-f ref=555dbb358203c0ad77f35a030f54d821253e1fbd`, `-f base=main -f nordic=true -f r2025=true`, every model and scorer) and run [41092527900](https://github.com/DrunkOnJava/rvt-rs/actions/runs/41092527900) (the same with `-f scorers=wall_top_cover_vs_ifc`). The code of the head commit is the measured commit's; later commits are documentation. `wall_heights_vs_ifc`, walls with Revit's base and top: | Model | before | after | walls cut | other output that moved | |---|---:|---:|---:|---| | BIM4LCA office as built (607 walls) | 522 | 586 | 64 | `ifc.sha256`, `frames_vs_ifc` | | ... base Revit's and top not | 65 | 1 | | | | BIM4LCA office at permit (589) | 495 | 565 | 70 | `ifc.sha256`, `frames_vs_ifc` | | ... base Revit's and top not | 70 | 0 | | | | Core Interior (360 walls) | unchanged | | 0 | none; the export is byte-identical | | RE1 Architecture, Electrical, Mechanical, Plumbing | unchanged | | 0 | none | | Einhoven | unchanged | | 0 | none | | 24 R2025 models (138 walls with a body) | unchanged | | 0 | none | Of 1,441 per-model outputs, 1,435 are identical and 6 differ: `ifc.sha256`, `frames_vs_ifc.txt` and `wall_heights_vs_ifc.txt` of the two office models. `frames_vs_ifc` follows from the walls: its fit of rvt-rs's frame onto Revit's reads their heights (as built, the vertical shift is 0.009 ft where it was -0.016, the median residual 0.0096 ft where it was 0.0165). Exactly the 64 and 70 cut walls' bodies change, their tops only (no base, no plan), and each lands on Revit's top (`wall_top_cover_vs_ifc`: no wall that was equal to Revit's along its length differs now; 472 of 607 as built are equal, 416 before; 419 of 589 at permit, 367 before). The quantity census (`qtos_vs_ifc`), `psets_vs_ifc` and every other scorer are byte-identical. - [ ] `tools/check-local.sh`: not run, there are no local builds here; CI is the gate (build, clippy, doc, semver, Corpus health and the IfcOpenShell validation passed on an earlier commit of this PR with the same code but for the Height write; the head commit is running) - [x] Verified end to end on real Revit files: the commands, the files (the BIM4LCA office, CC BY-SA 4.0; Core Interior; RE1; puzzbobb's R2025 models) and the measured results are above and in RE-267 §7 - [x] IFC exporter touched: Core Interior's export is byte-identical, so no witness verdict or project-count fixture moves - [ ] N/A: not a performance change ## Audit-honesty checklist - [x] README and the docs reflect the state after this PR (`docs/status.md`, `docs/supported-profile.md`, the support matrix, W6, the roadmap) - [x] Changelog fragment `changelog.d/fixed/wall-top-cover.md` - [x] New limitations are documented in the PR body, in RE-267 §7 and in the module: the walls a floor covers in part (29 as built, 26 at permit) keep their full height where Revit steps the top; the one wall as built whose plan lies 0.0243 ft² outside the floor and which Revit cuts anyway is not cut; a cut wall gets no `Height`; a floor drawn as a solid (a sloped roof) cuts nothing - [x] No emojis, no private paths, no personal email addresses - [x] Not a new reverse-engineering finding: it ships RE-267 (probe and scorer are #1151's) ## Notes - The tolerance is 1e-4 ft², not RE-267 §3's 1e-6: in memory, one covered wall as built (1727582, against floor 1498471) measures 4.1e-6 outside, every other covered wall under 1e-9, and the walls a floor covers in part at least 0.0127. RE-267 §7 gives the margin. - The first draft triangulated a floor with its holes bridged in. Two storey slabs as built (1457693 and 1457785, nine holes each) did not triangulate that way and dropped out; the outline and each hole are now triangulated one by one, a hole that fails counting as its bounding box. - `Height` on a cut wall is Revit's on 62 of 64 as built and 66 of 70 at permit and never different (run 41091288700), but Revit's export writes none on the other 2 and 4, which nothing read tells apart; writing it would add values Revit omits, so it is left off. ## Breaking changes None. `WallRecords` (research, behind `unstable-research`) gains a field. ## Related issues Refs #1067 (left open for the stepped tops). Builds on #1151.
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
RE-267 reads why RE-258's rule cut 5 office walls per stage that Revit's export left whole: it did not leave them whole. Revit cuts a wall's top at the underside of the floor its top join (or a cut pair) names over the part of the wall's plan the floor covers, and leaves the rest at full height, so the highest point RE-258's scorer read does not move. A rule that cuts a top only where the named floor covers the whole of the wall's plan, and is level across it, gives 64 of the BIM4LCA office's 65 cut tops as built and 70 of 70 at permit, and cuts no wall that Revit leaves whole. One wall as built is cut by Revit with a 0.085 ft stub past the floor's edge, nothing read explains it, and a part-covered wall needs a stepped top an extrusion cannot draw. The exporter is unchanged and no wall is cut yet.
Motivation
#1067 (W6, and W7's walls'
Height, which RE-257 showed is the body's span). RE-258 asked what in the file separates the walls Revit cuts from the ones it leaves; the answer is the plan, not a field.Changes
reports/element-framing/RE-267-wall-top-cover.md: the finding, the tallies, what was compared and does not separate, the one wall, and the correction of RE-258 §3's claim that the two stages' records and floors are the same (they are not: the walls' plans differ by 0.03 ft).tools/re/wall_top_cover_vs_ifc.py(new, run when Measure names it with-f scorers=wall_top_cover_vs_ifc: it takes 68 s per office model and 21 s on Core Interior, and its rule is not shipped, so it stays out of the default list): reads each wall's top along its length in both files, the horizontal faces of its upper half, each floor's underside along and across it, and the part of its plan outside each floor. It is the reproduce command's dependency.probes/examples/probe_1067_native_dump.rs(new): every wall's step records and relations and saved parameters, and the records of the floors and elements they name.changelog.d/research/wall-top-cover.md, the dated addendum indocs/rvt-moat-break-reconnaissance.md, the Walls drawn taller than Revit's body on 78 of the BIM4LCA office's walls (RE-257) #1067 row ofdocs/contribution-map.mdand a pointer in RE-258, as RE-258's own PR (research(elements): Revit cuts a wall's top at the floor its top join names, on 63 of 65 office walls, but nothing tells the 5 it leaves (#1067) (RE-258) #1071) did.Testing
Unit tests are banned in this repository: do not add them. Show the change working end to end on real files instead.
tools/check-local.shpasses: this PR's CI. (No local build: the probe is built by Measure;python3 tools/release/changelog.py checkandtools/ci/api-doc-ids.pypass.)research/bim4lca-measure.tsv); R2025: Apache-2.0 (research/r2025-models.tsv). The runs measured the branch's commits, kept underrefs/archive/2026-10-30/re/1067-wall-top-cutsonce it lands.The rule also cuts none of Core Interior's 360 walls, RE1 Architecture's 7 and the R2025 models' 138.
Audit-honesty checklist
changelog.d/research/docs/contribution-map.mdLegal and contribution hygiene
I declare that this format finding comes only from public byte observations of the reference models and Revit's own exports of them (CLEANROOM.md source 1); no Autodesk or ODA SDK source, disassembly or NDA material was used.
Breaking changes
None.
Related issues
Refs #1067, #1016.