Skip to content

feat(ifc): roofs sloped by several slope arrows (#885) (RE-307) - #1276

Merged
DrunkOnJava merged 9 commits into
mainfrom
re/885-multi-arrow-roofs
Nov 3, 2026
Merged

DrunkOnJava merged 9 commits into
mainfrom
re/885-multi-arrow-roofs

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Nov 3, 2026 •

Copy link
Copy Markdown
Owner

Summary

A footprint roof sloped by several slope arrows and no defining edge is drawn as one plane per arrow, where the wedge rule of RE-199 resolves them, on Revit 2025 for arrows set by their heights, with a plumb cut, a fascia depth read as 0 and one loop. On puzzbobb's 20_T_U_Roof (Revit 2025) the T-shaped roof 4149 is now Revit's body. The U-shaped roof 5941 stays its record box, as a measured negative: Revit slopes its two long outer walls along the arms only, and the rule behind that is not established.

Motivation

#885, RE-199 section 8: both roofs of 20_T_U_Roof were drawn as their record boxes (4,426 and 37,357 cubic feet against Revit's 437 and 1,846), since RE-199 read a single arrow per roof. Refs #885.

Changes

  • src/research/partition_schema_mvp/roofs.rs: attach_roof_slopes reads every arrow of a roof with no defining edge, on Revit 2025 only (the boundary line its tail lies on and is square to, set by its heights, tail height 0, rising slope, head inside the outline, one loop) and sets m_roof_arrow_planes; roof_arrow_planes_from_fields.
  • src/research/partition_schema_mvp/fields.rs: ROOF_ARROW_PLANES_FIELD.
  • src/ifc/export_content.rs: roof_arrow_planes_solid (underside level with the base along each arrow's line, top a plane's own T / cos(theta) above it, each surface with its own wedges, a top not cut at its edge's line) and arrow_roof_hip_ambiguous, which keeps a roof with a sloped edge that a reflex edge's extension meets inside it, beside a sloped neighbour at a convex corner, as its box (the U).
  • src/ifc/body_geometry.rs: envelope_slab_mesh_split (visible to the ifc module only); envelope_slab_mesh calls it with the same domains for both surfaces, so every earlier roof draws as before.
  • probes/examples/probe_re307_arrow_roofs.rs, reports/element-framing/RE-307-roofs-sloped-by-several-arrows.md, a changelog fragment, and the roof lines of docs/ (status, support matrix, evidence, supported profile, contribution map).

Testing

Unit tests are banned: none added. End to end on real files, through Measure on GitHub's runners (no local builds).

  • tools/check-local.sh passes: CI runs it on this PR (fmt, clippy, rustdoc and the real-file jobs); nothing was built locally
  • Verified end to end on real Revit files: puzzbobb's 20_T_U_Roof (Apache-2.0, research/r2025-models.tsv), against Revit 25.0.2's IFC4 export, tools/re/roof_bodies_vs_ifc.py, probe probe_re307_arrow_roofs
  • IFC exporter: Core Interior, Einhoven, the RE1 models and both BIM4LCA office models export byte for byte as main does, so the witness verdicts need no refresh
  • N/A: not a performance change

Measure 41657924215 (-f base=main -f nordic=true -f r2025=true -f probe=probe_re307_arrow_roofs -f probe_scorer=-, head 4d9d0d3b, main at 2e07e27a); the same result on the earlier heads in 41648509847, 41642988246 and, filtered to the model, 41642079234. The commits after 4d9d0d3b are documentation:

roof main this PR
4149, the T farthest vertex of Revit's body from one of rvt-rs's 10.4 ft 3.16e-06 ft
every vertex of Revit's body from rvt-rs's surface 2.26 ft 1.98e-06 ft
volume against Revit's 436.707420 ft3 4,426.405064 436.707816
5941, the U volume against Revit's 1,845.577001 ft3 37,356.983137 (box) 37,356.983137 (box)
  • Exports changed: 1 of 32 models (the 24 R2025 models, Core Interior, Einhoven, the four RE1 models and both BIM4LCA office models), r2025-20_T_U_Roof. The other 31 are byte-identical and every scorer's output for them is unchanged.
  • Roofs against Revit's body on the R2025 models (22): 19 match in vertices and volume on main, 20 here; every vertex within 0.001 ft of rvt-rs's surface, 20 and 21. No roof's score got worse.

Audit-honesty checklist

  • README / docs reflect the current state after this PR: no claim beyond the T; the U is stated as a record box
  • A user-visible change has its entry as a fragment under changelog.d/changed/
  • A limitation was narrowed, not resolved: the contribution map and docs/supported-profile.md say what is drawn and what is not
  • The new limitations are in the PR body, the report (section 7) and in code (arrow_roof_hip_ambiguous, arrow_roof_edges): the U and the configuration it shows (only the U is measured); Revit 2024 and other releases; arrows set by angle or with a tail height other than 0; a fascia depth that is not read; a two-cut or square rafter cut, a fascia depth, a hole; defining edges and arrows in one roof
  • 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
  • Reverse-engineering finding: the probe is probes/examples/probe_re307_arrow_roofs.rs, the report reports/element-framing/RE-307-roofs-sloped-by-several-arrows.md

Legal and contribution hygiene

  • I agree this work is licensable under Apache-2.0
  • Clean-room declaration (CLEANROOM.md): the changes in this PR are based on public byte observations of puzzbobb's 20_T_U_Roof.rvt (released by its author under Apache-2.0) and on Revit 25.0.2's own IFC4 export of it, read through IfcOpenShell, with buildingSMART's IFC4 specification. I have not used Autodesk SDK source, ODA SDK source, leaked internal documentation, NDA material, or decompiled internal Revit implementation code beyond public symbol exports, and I have not copied or translated code from revit-ifc.
  • No new fixtures: the models are fetched by Measure and never stored

Breaking changes

None. envelope_slab_mesh keeps its signature and its output; rvt::research items are outside the semver promise.

Screenshots or output samples

See the table above. The probe's output for both roofs (arrows, boundary lines, reflex-vertex extensions and what the export read) is in the probe.txt of Measure's r2025-20_T_U_Roof artifact.

Related issues

Refs #885 (the U and the roof cases with no oracle remain open there).

@DrunkOnJava
DrunkOnJava force-pushed the re/885-multi-arrow-roofs branch from ab2f480 to ae0edf0 Compare November 3, 2026 13:54
…es they define where the wedges resolve them (#885) (RE-307)

Each arrow's tail lies on one boundary line, square to it: its plane rises from that line at the arrow's slope, the underside level with the base there and the top a plane's own T / cos(theta) above. Each surface counts a plane within its own wedges, and a top is not cut at its edge's line. A roof holding a sloped edge that a reflex edge's extension meets inside, beside a sloped neighbour at a convex corner, keeps its record box.
…n as its planes, the U measured and left as its box (#885) (RE-307)
…w roofs with partly sloped walls, not every T or U roof (#885) (RE-307)
…heir heights, on one loop with a fascia depth read as 0, and the split mesh builder is private to the ifc module (#885) (RE-307)
@DrunkOnJava
DrunkOnJava force-pushed the re/885-multi-arrow-roofs branch from a2d02ab to 4d9d0d3 Compare November 3, 2026 14:52
…eight-set arrows, pins the measured commit, and cites the run on the reviewed head (#885) (RE-307)
@DrunkOnJava
DrunkOnJava marked this pull request as ready for review November 3, 2026 15:55
@DrunkOnJava
DrunkOnJava enabled auto-merge (squash) November 3, 2026 15:55
@DrunkOnJava
DrunkOnJava merged commit cef24f5 into main Nov 3, 2026
28 checks passed
@DrunkOnJava
DrunkOnJava deleted the re/885-multi-arrow-roofs branch November 3, 2026 16:09
DrunkOnJava added a commit that referenced this pull request Nov 3, 2026
…2025 run export as main does but one roof that main's #1276 moved (#1261) (RE-315)
@DrunkOnJava

Copy link
Copy Markdown
Owner Author

Automated Claude Code review (the maintainer's review agent; it read the code and run 41648509847): one blocking item, fixed in 4d9d0d3 and a262080. Angle-set arrows and Revit 2024 files were drawn though the PR said they were not; several arrows are now drawn only on Revit 2025, set by their heights, on one loop. RE-307 limits what it calls measured to the U and those arrows, and pins the measured commit.

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