Repository navigation
feat(ifc): gable, hip and slope-arrow roofs as their planes, and roof slopes on Revit 2025 (#356) (RE-199) - #870
Conversation
dfcb45f to
0990e25
Compare
puzzbobb's change from pull request DrunkOnJava#870 (commits 54b93c1a, 0990e254 and fde03348), replaced by one signed commit with the same tree, since main requires signed commits.
… unread-joins finding on main (DrunkOnJava#356)
…he roof envelope's pieces (DrunkOnJava#356) (RE-199) arrow_heights read the tail, head and level f64s at at - 0x28 to at - 0x10 unchecked once the angle at at - 0x08 had passed, so a 16-byte ff run within the first 0x28 bytes of a line's data underflowed: a panic wherever overflow checks are on (debug builds, the i686 job). It now reads all of them from at.checked_sub(0x28). envelope_slab_mesh cuts the plan along up to about 2,000 lines for 32 planes, and each cut can split every piece, so a sketch with many defining edges could ask for millions of pieces before the record-box check rejects the body. Past MAX_ENVELOPE_PIECES (65,536) pieces or side segments it now draws nothing, as for any other body it cannot draw.
…e and vertices (DrunkOnJava#356) (RE-199) tools/re/roof_bodies_vs_ifc.py meshes every IfcRoof both exports hold (same Tag), the roof's own body and its aggregated parts' together, and compares the meshes' volumes and the farthest any vertex of Revit's body lies from rvt-rs's, in feet. Measure runs it on every model with a Revit export, so RE-199's volume and vertex table comes from a run on GitHub's runners rather than from one machine, and a roof that falls back to a level block shows.
fde0334 to
6f78e18
Compare
…e, without the parameter-definition pass (DrunkOnJava#356) (RE-199) scan_rafter_cuts reads m_paramSet, a field of the ProfileRoof's object graph, which native_document decodes against the schema registry alone. native_document::extract first decodes every parameter-definition owner in the file to project saved parameter values, which this reader does not use; extract_graphs skips that pass, as the wall-function reader does (RE-185). On Measure's same-runner timing (run 39600160617), Autodesk's rac_advanced 2025 sample exported 1.24x slower than main with the rafter-cut read. The probe also prints the slope arrows' heights and each roof's rafter cut and fascia depth, so a Measure run shows what was read.
…s from Measure (DrunkOnJava#356) (RE-199) README, docs/status.md, the support matrix's roof row, ROADMAP and an [Unreleased] CHANGELOG entry crediting puzzbobb now say what RE-199 draws and what it does not (DrunkOnJava#883, DrunkOnJava#884, DrunkOnJava#885). The report gives the oracle's hash, the Measure runs that reproduce its table (39602093604, and 39600694074 for the BIM4LCA office), what changes and does not on the reference models and Autodesk's samples, the same-runner timing, and marks the unattached imperial models and the unmeasured 2024 tutorial house as such.
DrunkOnJava
left a comment
There was a problem hiding this comment.
Thank you for this, and for building the oracle #356 asked for. Purpose-made models with Revit's own exports, under Apache-2.0, are what this project is short of, and Measure reproduces your table on GitHub's runners to the sixth decimal.
Measured (Measure run 39602093604, base main, -f r2025=true plus Autodesk's 2024 and 2025 samples, with a new scorer, tools/re/roof_bodies_vs_ifc.py, that meshes each roof in both exports): 18 of the 19 roofs in Revit's exports of your models now have Revit's body (every vertex within 3.7e-6 ft, the volumes yours), against 0 of 19 on main; the 19th is 11_RoofByExtrusion. The reference models, the BIM4LCA office, the family corpus and every 2024 sample but rac_advanced export byte-identically. rac_advanced draws one roof along its slope arrow in both its 2024 and 2025 saves, and the 2025 samples draw 29, 4 and 1 more elements from their sketches.
What I changed on your branch (maintainerCanModify is on):
- Signing.
mainrequires signed commits, so your three commits are replaced by one signed commit with the same tree (I checked it is identical tofde03348's), you as its author. Your second commit's author email had come through as--?; it now carries your noreply address. You don't need to do anything. - RE-199. RE-170 was already given out:
reports/element-framing/RE-170-unread-joins.mdis onmain. The report, probe and every mention are renumbered RE-199. arrow_heightsunderflow. After checking the angle atat.checked_sub(0x08), it readat - 0x18,at - 0x10,at - 0x28andat - 0x20unchecked, so a 16-byteffrun in a line's first 0x28 bytes panics wherever overflow checks are on (debug builds, the i686 job). It now reads all of them fromat.checked_sub(0x28), with the same results everywhere else.- A bound on
envelope_slab_mesh. With up to 32 planes it cuts along about 2,000 lines, and each cut can split every piece, so a crafted sketch could ask for millions of pieces before the record-box check rejects the body. Past 65,536 pieces or side segments it now draws nothing. - The rafter cut through
extract_graphs.m_paramSetis an object-graph field, andnative_document::extractfirst decodes every parameter-definition owner in the file, which this reader does not use. Same-runner timing showed rac_advanced 2025 at 1.24xmainwith it; throughextract_graphsit is 1.08x (rac_basic 2025 1.06x, every other file within 4%), and every export is byte-identical to theextractversion's. - Evidence and status. The roof scorer in every Measure run, the rafter cuts, fascia depths and slope arrows in the probe's output, and README,
docs/status.md, the support matrix, ROADMAP and a CHANGELOG entry crediting you. In the report I gave the oracle's hash, marked the seven unattached imperial models as not checkable from the repository, and qualified the tutorial-house sentence: on 2024 a roof's edges now also come from its Sketch's curve list, so that file is not known to export unchanged.
Two observations for later, in #885: on rac_advanced 2024 the defining edges of three 15° hips carry 0.0 at +0x3b, not −rise/run, so RE-56's 2024 rule rejects them, while the same edges in the 2025 save, also 0.0 there, pass your 2025 rule. And on 2025 those three hips are read but fail the record-box check: each box is exactly the hip's rise, about 1.348 ft over a 10 ft span, with no thickness added.
The follow-ups for the limitations you listed are #883 (roofs by extrusion), #884 (T and U footprints) and #885 (the cases with no oracle). This merges once CI passes.
## Summary Prepares v0.7.0 (RELEASE.md steps 4 to 8): the version files, the `[0.7.0]` changelog section assembled from `changelog.d/`, the README's release section, and corrections to the status docs where they still described the state before RE-212 or before the BIM4LCA office was measured. Merging this is not the release; the signed tag on its squash commit is. ## Motivation Griffin's go-ahead (2026-10-24, about 3:00 PM): tag v0.7.0 once #887, #930, #935, #940, #942 and #943 are on main with CI green. All six have landed, the last at b04c0cb (#930). #934 (`--revit-property-sets`, breaking) and #923 (the `ElementId` newtype, breaking) go in the next release. ## Changes - **Version files** (0.6.1 to 0.7.0): `Cargo.toml`, `rvt-py/Cargo.toml` (and its `=0.7.0` pin on `rvt`), `rvt-wasm/Cargo.toml`, the `rvt` pin in `tools/stream_evidence/Cargo.toml`, `viewer/package.json`, `CITATION.cff` (`date-released: 2026-10-24`), `.release-please-manifest.json`, and the workspace crates' entries in `Cargo.lock` and `fuzz/Cargo.lock`. - **`CHANGELOG.md`**: `python3 tools/release/changelog.py assemble` moved the nine fragments in, then `[Unreleased]` became `[0.7.0] — 2026-10-24`, with an introduction, credits to puzzbobb (#870, #886, #887, #935) and n3ur0m4n (#882), and "Upgrading from 0.6": the research readers behind `unstable-research`, the `#[non_exhaustive]` types, the error variants (and Python's `ValueError`), `SimpleDecoder`, the property set builders' `Vec`, the removed `ifc::pset_validate`, the element walk failing closed, and changed exports. Headings in the assembler's order (Added, Changed, Fixed, Removed, Research), one each. `[Unreleased]` is left empty. - **Entries corrected for the release as a whole**: #847's pipe-port entry said In ports' axes were wrong because their flow direction was not read, and that other family-instance ports had no placement; RE-212 and #943 changed both, and it now gives main's counts (Measure 40126110706, base side: 124 of 124 and 62 of 62 with Revit's axis; joined ports 108 and 53 as Revit's, 10 and 6 opposite). The unjoined-ports entry says Revit 2025 in its headline. RE-215's entry adds the office. - **`README.md`**: "Release 0.7.0 and main", what 0.7.0 adds in brief. The 0.6.1 section listed RE-215 under 0.6.0's additions; it shipped in neither. - **`docs/support-matrix.json`**: - `native-symbol-cut-sizes`: the BIM4LCA office's result, and `user_impact` limited to families whose symbol cuts an outline; - `element-record-mep-connections`: still said HVAC and piping directions, names and descriptions are not read and In ports' axes are reversed; it now states RE-212 (direction, `InPort_`/`OutPort_` names, `Flow` descriptions, axes), keeps SystemType and the electrical description as unread, and lists RE-212's probe, scorer, test and report as evidence. - **`docs/status.md`** and **`reports/element-framing/RE-215-symbol-cut-loops.md`**: the office, which §6 called NOT MEASURED, as measured on 2026-10-24 (Measure 40121636312 and 40122363218): 187 of its 269 doors cut an outline and have Revit's sizes; its 269 windows and other 82 doors are drawn by symbols with no cut loop (#810). ## 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 code changes; the version string changes the IFC header. - [x] Verified end to end on real Revit files: no behaviour changes; the measurements cited are the runs named above. - [ ] If this touches the IFC exporter: the IFC header carries the version (#417), so both Core Interior `rvt-rs.json` observations and their verdicts are refreshed from this PR's CI run (its `octetproof-core-interior` artifact) in a follow-up commit here, differing only in `witness_version` and the verdict hashes. - N/A: performance. ## Audit-honesty checklist - [x] README / docs reflect the current state after this PR - [x] The changelog section is assembled from the fragments; `changelog.py check` passes with none left - [x] Resolved limitations updated (RE-212's in the support matrix, the office's NOT MEASURED) - N/A: no new limitation - [x] Commit messages describe what changed and why - [x] No emojis in code, docs, or commit messages - [x] No private paths, personal email addresses, or internal jargon in committed files - N/A: not a reverse-engineering finding ## Legal and contribution hygiene - [x] Apache-2.0 - [x] No Autodesk proprietary content - [x] No fixtures ## Breaking changes The release's, listed under "Upgrading from 0.6" in `CHANGELOG.md`. This PR itself changes no API. ## Screenshots or output samples N/A: the IFC changes only in its header's version.
|
This shipped in v0.7.0, released today (2026-10-24) on crates.io, PyPI, the release archives and the container image, and it is credited in the release notes. Thank you. |
Summary
Exports Revit roofs as their sloped planes, not as level blocks. This covers gables, hips and L-shaped hips, slope arrows, rafter cuts and Revit 2025 roof slopes. Each body is drawn only where it reproduces the roof's record box height, as RE-56 does for sheds.
Motivation
Before this change, every multi-edge roof, every slope-arrow roof and every Revit 2025 roof was exported as a level block as tall as its record box. On Revit 2025, the edge-slope and sketch readers refused the file version, so every roof slope was lost, along with the outlines of edited sketches.
Full findings are in
reports/element-framing/RE-199-roof-planes.md(RE-199).Changes
src/partition_roof_slopes.rsedge_slope_inreads RE-56's edge block on Revit 2025, including each edge's plate offset.arrow_heights/scan_arrow_heightsread slope arrows (SlopeCurveData), set either by "Height at Tail" or by "Slope".scan_rafter_cutsreads the rafter cut (parameter -1001710: plumb, two-cut plumb or two-cut square) from the roof's object graph, andfascia_depthreads the fascia depth.src/partition_beam_axes.rs:scan_sketch_bounded_linesreads sketch line segments (RE-49) on 2024 and 2025.src/partition_schema_mvp.rs: carries edges, plate offsets, rafter cut and fascia depth through the instance fields.attach_roof_slopestakes a roof's edges from its Sketch's curve list where it has one.scan_sketch_curve_listsnow reads 2025.src/ifc/export_content.rs:roof_planes_solidbuilds a roof as its edges' straight-skeleton planes (each plane held to its edge's wedge, so L-shaped valleys come out right), with the eave set by the shallowest edge. It applies two-cut bodies and arrow planes.src/ifc/body_geometry.rs:envelope_slab_meshcuts the plan triangulation wherever two tops, two undersides, or an underside and a cut level meet, then lifts each piece into anIfcFacetedBrep, drawing nothing past 65,536 pieces or side segments.src/element_record_plan_profiles.rs: a roof's slope arrow is left out of its outline.examples/probe_re199_roof_edge_slopes.rs: probe that prints each roof sketch line's slope block, offsets and bounded line, the slope arrows, and each roof's rafter cut and fascia depth.tools/re/roof_bodies_vs_ifc.py, in every Measure run: each roof's body against Revit's export, its volume and how far Revit's vertices lie from rvt-rs's.reports/element-framing/RE-199-roof-planes.md: the RE-199 report.README.md,docs/status.md,docs/support-matrix.json,ROADMAP.md,CHANGELOG.md: the public status.Maintainer changes
puzzbobb's three commits were replaced by one signed commit with the same tree and puzzbobb as author, since
mainrequires signed commits. On top of it:main.arrow_heightsread four f64s atat - 0x28toat - 0x10unchecked, which underflowed (a panic under overflow checks) for a 16-byteffrun in a line's first 0x28 bytes. It now reads them fromat.checked_sub(0x28).envelope_slab_meshis bounded at 65,536 pieces or side segments, since a sketch with many defining edges could otherwise ask for millions of pieces before the record-box check.scan_rafter_cutsreads throughnative_document::extract_graphs, which skips the parameter-definition pass that made Autodesk's rac_advanced 2025 sample export 1.24x slower.Testing
Oracle:
R2025_Models.zip, attached to #356 under Apache-2.0 (sha2568673d803fb0b9b6aa20d08448eeed16eb34222566bfaf7a2dc761c064dc30d6a, pinned inresearch/r2025-models.tsv). It contains 23 purpose-made Revit 2025 projects, with Revit 25.0.2's IFC4 Reference View exports. Probe:cargo run --example probe_re199_roof_edge_slopes -- <file.rvt>.Measure on GitHub's runners, base
main, with the R2025 models, Autodesk's 2024 and 2025 sample projects, the probe and same-runner timing: run 39602093604 (headcf0ab157, whose code is this PR's).tools/re/roof_bodies_vs_ifc.pygives, for each roof in Revit's export (both meshed with IfcOpenShell):02_1Slope02_1Slope_Rafter2PlumbCut02_1Slope_Rafter2SquareCut02_1Slope_Rafter2SquareCut_Overhang03_2Slope_Rafter2SquareCut04_Gable04_Gable_Swapped_Slopes05_1Slope_ArrowDefined06_1Slope_ArrowDefined_SetToSlope08_LShapedHipRoof09_LShapedHipRoof_1Edge300Offset10_LShapedHipRoof_1Edge300Offset_Hole12_Rooms_Door_Windowsand the stairs files13to17hold02_1Slope's roof and match the same way: 18 of the 19 roofs in Revit's exports match (every vertex within 0.001 ft, volume within 1e-4), against 0 of 19 onmain. The 19th is11_RoofByExtrusion(#883).07_1Slope_ArrowDefined_2Cut50mmFasciahas no Revit export, but its body reproduces its record box (12.096 ft).Elsewhere (the same run, and run 39600694074 for the BIM4LCA office):
Core Interior, Einhoven, the four RE1 models, both BIM4LCA office models, the family corpus and every 2024 sample but rac_advanced export byte-identically to
main.rac_advanced, in its 2024 and its 2025 save, draws roof 201262 along its slope arrow (line 201283, tail 0, head 1.5 ft), reproducing its record box. On 2025 its three 15° hips are read as plumb cuts, but each record box is exactly the hip's rise with no thickness, so they fail the record-box check and stay level (Roof cases with no oracle: 2024 gables and hips, a square two-cut with a fascia, a slope arrow stopping short (RE-199 follow-up) #885).
On 2025, 29 more elements of rac_advanced, 4 of rac_basic and 1 of rst_basic are drawn from their sketches rather than as their boxes. None of the samples has a Revit export to compare against. puzzbobb measured rac_basic 2025's three floors locally: their volumes are now the 2024 save's.
The IFC4 schema check finds nothing new; each sloped roof is one fewer swept solid.
Same-runner timing (base and head on one runner, three rounds a file): rac_advanced 2025 1.08x
main(3,437 to 3,715 ms) and rac_basic 2025 1.06x (3,214 to 3,421 ms); every other file within 4%. With the rafter cut read throughextract, rac_advanced 2025 had been 1.24x (run 39600160617).puzzbobb's local runs (report section 7) also cover Snowdon Towers 2025, the Japanese 2025 samples and the Golden Nugget models, which cannot run in CI. Snowdon Facades 2025 gains a 7.1° shed and a 4.8° gable, both matching their record boxes, and took 11 s instead of 7 s before the rafter-cut change above.
Verified end to end on real Revit files (Measure runs above; probe and report included)
IFC exporter: witness verdicts replay, or changed observations refreshed (Core Interior's export is byte-identical)
Performance: same-runner timing above
Audit-honesty checklist
examples/is includedKnown limitations
Legal and contribution hygiene
Breaking changes
None to the API. IFC output changes for sloped roofs (now
IfcFacetedBrepbodies, not level extrusions) and for the 2025 elements listed above.Related issues
Closes #356 (RE-199). Follow-ups: #883, #884, #885.