Repository navigation
feat(ifc): cut each window's opening from its type's Width, Height and Default Sill Height (#227) (RE-93) - #465
Merged
Conversation
…d Default Sill Height (#227) (RE-93)
DrunkOnJava
enabled auto-merge (squash)
September 28, 2026 06:48
Bugbot couldn't run - usage limit reachedBugbot 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_a3520d66-c137-4cff-9679-eabea04caeef) |
5 tasks done
DrunkOnJava
added a commit
that referenced
this pull request
Sep 28, 2026
…ough opening (#227) (RE-94) (#466) ## 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: - RE-93's guard counted an opening edge on the box's own edge as outside through round-off. It now allows 1e-6 ft, which lets 1 more door through. - The window-specific names from #465 are generalised: `FILLER_OPENING_FIELDS`, `FillerOpening`, `filler_opening_from_fields`, `FILLER_OPENING_PROPERTIES`, `filler_type_cut`. ## 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. - [x] 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. - [x] End to end against Revit's own Snowdon Towers IFC4 with `opening_boxes_vs_ifc.py`, as in the table. Windows are unchanged from #465 (56 within 0.001 ft). - [x] Snowdon Towers: only 57 door `IfcOpeningElement` bodies change, and the same 57 doors gain properties and overall sizes, all equal to Revit's. - [x] 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 - [x] 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. <!-- CURSOR_SUMMARY --> --- > [!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. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 7aaab7b. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
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
Windows cut Revit's opening, read from their type (RE-93, #227). A family type's value block (RE-77) holds its length parameters as:
The parameter is a BuiltInParameter's negative id (Width -1001301, Height -1001300), or a declared family parameter found by the name in its definition (0x56 bytes past its id). Revit's IFC4 export cuts a window's opening:
The 3.0 ft is the type's Default Sill Height. A window whose type stores Width, Height and Default Sill Height now takes that opening, and Revit's
OverallWidth/OverallHeight.Motivation
rvt-rs cut each window's record box, which takes in its trim: about 0.23 ft wider on each side, 0.26 ft lower and 0.19 ft higher than Revit's opening.
Results
opening_boxes_vs_ifc.py)OverallWidth/OverallHeightequal to Revit'sEvidence limit (sill). The sill Revit uses is the instance's own sill height, which is not read:
So the opening is used only where the window's record box, its actual geometry, holds it with at most 0.5 ft to spare on every side. A window with a moved sill would have its box moved with it and keeps the box opening. No Snowdon window exercises that guard, so its effect is not measured. This was agreed in chat before implementing.
Not changed:
Changes
scan_partition_lengths,family_parameters_named,type_window_openings(WindowTypeOpening).attach_window_openings,WINDOW_OPENING_FIELDS,WindowOpening,window_opening_from_fields.WINDOW_OPENING_PROPERTIESon windows that carry an opening.window_type_cut, which refines the RE-83 / RE-89 cut, with the record-box guard.OpeningCut::z_range_feet, where the cut starts and how high it is.Positionand depth;OverallHeight/OverallWidthare written from its opening.Testing
Unit tests are banned in this repository; none were added.
cargo +1.85.0 check, fuzz workspace check (--locked), andtools/ci/verify-real-files.sh --profile ciwith both corpora.opening_boxes_vs_ifc.py, as in the table.IfcOpeningElementbodies change, and the same 56 windows gain their properties and overall size. All 56 overall sizes equal Revit's.Legal and contribution hygiene
Breaking changes
ifc::entities::OpeningCutgains a field,z_range_feet(serde defaultNone).Related issues
Refs #227.
Note
Medium Risk
Changes IFC opening geometry and STEP serialization for windows and extends
OpeningCutwith a serde-default field; scope is gated to types with full parameters and a bounding-box guard, but export regressions are possible outside the measured Snowdon set.Overview
Windows whose types expose Width, Height, and Default Sill Height now get IFC openings and properties aligned with Revit’s export instead of the instance bounding box.
The partition layer decodes type length parameters from value blocks (
f64 · ff×8 · i64), resolves Default Sill Height by family parameter name, and attaches opening geometry (centre, axis, base, width, height) to upright windows via instance transforms. IFC export refinesOpeningCutthroughwindow_type_cut(with a record-box trim guard), adds optionalz_range_feetso opening solids sit at the sill and use type height, and writesOverallWidth/OverallHeightonIfcWindow. Doors, Double-Hung types without sill data, and louvers keep box openings.On Snowdon Towers, 56 of 68 windows match Revit openings within 0.001 ft (previously none); other local corpora stay byte-identical aside from timestamps. Adds probe
probe_re93_window_openings, scoreropening_boxes_vs_ifc.py, and RE-93 documentation.Reviewed by Cursor Bugbot for commit 8f9126f. Configure here.