Skip to content

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
DrunkOnJava merged 11 commits into
mainfrom
re/1067-wall-top-cuts
Oct 30, 2026
Merged

DrunkOnJava merged 11 commits into
mainfrom
re/1067-wall-top-cuts

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Oct 30, 2026 •

Copy link
Copy Markdown
Owner

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 in docs/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 of docs/contribution-map.md and 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.sh passes: this PR's CI. (No local build: the probe is built by Measure; python3 tools/release/changelog.py check and tools/ci/api-doc-ids.py pass.)
  • Verified end to end on real Revit files: Measure 41075127575 (both offices, probe and scorer), 41076305345 (every model), 41077948567 (the probe on Core Interior, RE1 and the R2025 models) and 41079569865 (every model, the scorer also reading each floor's level across the wall). BIM4LCA office files: CC BY-SA 4.0 (research/bim4lca-measure.tsv); R2025: Apache-2.0 (research/r2025-models.tsv). The runs measured the branch's commits, kept under refs/archive/2026-10-30/re/1067-wall-top-cuts once it lands.
  • N/A: the IFC exporter is unchanged.
  • N/A: performance.

The rule also cuts none of Core Interior's 360 walls, RE1 Architecture's 7 and the R2025 models' 138.

as built at permit
tops Revit cuts (highest point) 65 70
cut by the rule (top join / cut pair) 62 / 2 68 / 2
not cut by the rule 1 0
walls the rule cuts that Revit leaves whole 0 0
Revit's body cut somewhere on its centre line (RE-258: the highest point only) 94 96
walls with exactly one named level floor where Revit's full-height face area equals the plan outside the floor (to 0.002 ft²) 79 of 83 83 of 87

Audit-honesty checklist

Legal and contribution hygiene

  • Apache-2.0
  • No Autodesk proprietary content
  • No fixtures

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.

…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.
@DrunkOnJava

Copy link
Copy Markdown
Owner Author

Owner review. This is a research PR, and the exporter is unchanged.

  • RE-267 corrects RE-258 §3. The five walls per stage it called left whole are cut over the part of their plan a floor covers. That was invisible to a highest-point scorer.
    • The cover rule gives 64 of 65 tops as built and 70 of 70 at permit, with no false cuts.
    • It cuts none of Core Interior's 360 walls, RE1's 7 or the R2025 models' 138.
    • It is not shipped, for two stated reasons: one as-built wall's 0.085 ft stub is unexplained, and part-covered walls need stepped tops an extrusion cannot draw. That is the fail-closed reading of the result.
    • Every count names its Measure run (41075127575, 41076305345, 41077948567, 41079569865), and the report cites only element ids RE-258 already published.
    • §6 corrects RE-258's 'same records in both files' claim with byte evidence.
  • The new scorer, wall_top_cover_vs_ifc.py, is opt-in (cae146f): 68 s per office model is too much for every Measure run while its rule is unshipped. RE-267's reproduce command names it.
  • CI passed on cae146f, including clippy on probe_1067_native_dump.rs.

Nothing else to fix.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread tools/re/wall_top_cover_vs_ifc.py Resolved
… 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
DrunkOnJava disabled auto-merge October 30, 2026 17:58
@DrunkOnJava
DrunkOnJava enabled auto-merge (squash) October 30, 2026 18:11
@DrunkOnJava
DrunkOnJava merged commit 01973b4 into main Oct 30, 2026
27 checks passed
@DrunkOnJava
DrunkOnJava deleted the re/1067-wall-top-cuts branch October 30, 2026 18:22
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.
Repository owner deleted a comment from chatgpt-codex-connector Bot Oct 31, 2026
Repository owner deleted a comment from chatgpt-codex-connector Bot Oct 31, 2026
Repository owner deleted a comment from chatgpt-codex-connector Bot Oct 31, 2026
Repository owner deleted a comment from chatgpt-codex-connector Bot Oct 31, 2026
Repository owner deleted a comment from chatgpt-codex-connector Bot Oct 31, 2026
Repository owner deleted a comment from chatgpt-codex-connector Bot Oct 31, 2026
Repository owner deleted a comment from chatgpt-codex-connector Bot Oct 31, 2026
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