Skip to content

feat(ifc): cut each door Revit cuts at its rough size at its type's rough opening (#227) (RE-94) - #466

Merged
DrunkOnJava merged 1 commit into
mainfrom
feat/door-openings-from-type
Sep 28, 2026
Merged

DrunkOnJava merged 1 commit into
mainfrom
feat/door-openings-from-type

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Sep 28, 2026 •

Copy link
Copy Markdown
Owner

Summary

Doors that Revit cuts at their rough size get that opening (RE-94, #227). Revit's IFC4 export cuts each Snowdon Towers door centred on its origin along its X axis, from the origin up, in one of two sizes:

  • the type's Rough Width × Rough Height (-1001305, -1001304), read with RE-93's type-length reader;
  • or a frame-sized opening that no stored value gives.

What decides it is the door's body. Every door cut at its rough size has a body exactly Rough Height tall, and every other door's body is its frame's height. rvt-rs's record box is that body. So a door whose record box is its type's Rough Height tall now takes the rough opening, and Revit's OverallWidth / OverallHeight.

Results

Snowdon Towers' 126 doors against Revit's openings (opening_boxes_vs_ifc.py) main this PR
within 0.001 ft 0 54
within 0.1 ft 121 68
within 0.26 ft 1 0
over 1 ft 4 4
OverallWidth / OverallHeight equal to Revit's 0 57
  • The separation is measured on all 126 doors: 57 rough-sized doors all have a body Rough Height tall, and none of the other 69 does. Doors of one type fall on both sides.
  • The 3 doors in tapered Solar Walls take the rough size along the wall and in height. Across the wall they stay as before (RE-89's open case).
  • Opening-only doors (RE-84) are left out. RE1 Architecture's cased opening has a record box its Rough Height tall, but Revit cuts it 1.0 m wide against a 1.1 m Rough Width.
  • Frame-sized doors (67) keep their box opening.

Also here:

Changes

  • src/partition_type_parameters.rs: type_door_openings (DoorTypeOpening), and a shared type_lengths.
  • src/partition_schema_mvp.rs:
    • attach_door_openings, gated on DOOR_ROUGH_HEIGHT_TOLERANCE_FEET and on the type drawing geometry;
    • push_filler_opening, shared with windows;
    • the opening steps now run after RE-84's opening-only marking.
  • src/ifc/mod.rs: filler_type_cut also takes IfcDoor, and has the edge tolerance.
  • examples/probe_re94_door_openings.rs and reports/element-framing/RE-94-door-openings.md.
  • README, status, support matrix (the RE-93 row now covers doors), supported profile, recon addendum, CHANGELOG.

Testing

Unit tests are banned in this repository; none were added.

  • Gates: fmt, clippy -D warnings, rustdoc -D warnings, cargo +1.85.0 check, fuzz workspace check (--locked), and tools/ci/verify-real-files.sh --profile ci with both corpora.
  • End to end against Revit's own Snowdon Towers IFC4 with opening_boxes_vs_ifc.py, as in the table. Windows are unchanged from feat(ifc): cut each window's opening from its type's Width, Height and Default Sill Height (#227) (RE-93) #465 (56 within 0.001 ft).
  • Snowdon Towers: only 57 door IfcOpeningElement bodies change, and the same 57 doors gain properties and overall sizes, all equal to Revit's.
  • Byte-identical to main's apart from the timestamp: Snowdon structural, Core Interior, the four RE1 models, Einhoven, the MIT house (2024, 2025), Projeto1 and teste_export_2025.

Legal and contribution hygiene

  • Apache-2.0. Byte observations and comparisons with Revit's exported IFC; no Autodesk code.

Breaking changes

#465's public names are renamed, as listed above. Neither has been in a release.

Related issues

Refs #227.


Note

Medium Risk
Changes IFC opening geometry and renames pre-release public opening APIs; impact is limited to export accuracy on qualifying doors with regression scoring against Revit IFC.

Overview
Doors that Revit cuts at rough size now get IFC wall openings from the type’s Rough Width × Rough Height, centred on the instance origin, with matching OverallWidth / OverallHeight—but only when the door’s record box height matches Rough Height (within 1e-3 ft). Frame-height bodies, opening-only types (RE-84), and doors that fail the existing trim guard keep the bounding-box opening.

Implementation generalises RE-93’s window path: shared FillerOpening / FILLER_OPENING_* fields, push_filler_opening, type_door_openings, and filler_type_cut (windows and IfcDoor). Door attachment runs after opening-only marking. filler_type_cut also allows opening edges on the box boundary (−1e-6 ft spare) so one more case passes the guard.

Snowdon Towers: 54 doors within 0.001 ft of Revit’s openings (was 0); 57 overall sizes match Revit. Other local exports stay byte-identical except timestamps. Docs, support matrix, changelog, probe probe_re94_door_openings, and RE-94 report added.

Reviewed by Cursor Bugbot for commit 7aaab7b. Configure here.

@DrunkOnJava
DrunkOnJava enabled auto-merge (squash) September 28, 2026 07:16
@cursor

cursor Bot commented Sep 28, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_b263b4f7-8fb0-4673-aa9d-8ca6a2cf04bd)

@DrunkOnJava
DrunkOnJava merged commit a38e3fc into main Sep 28, 2026
20 checks passed
@DrunkOnJava
DrunkOnJava deleted the feat/door-openings-from-type branch September 28, 2026 07:18
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