Repository navigation
fix(ifc): a door's or window's width is the extent of its symbol's box-edge lines where its symbol cuts no loop (#810) (RE-318) - #1300
Merged
Conversation
…graphics for the sidelight doors' width (#810) (RE-318)
…light doors' family document (#810) (RE-318)
…nches marked, and probe the hatch doors' width with them (#810) (RE-318)
…d, to look for the last 5 mm of the O-16 door's width (#810) (RE-318)
…ol beside the hatch symbols' (#810) (RE-318)
…aphics by category and flags for their X extent (#810) (RE-318)
…x-edge lines where its symbol cuts no loop (#810) (RE-318)
… different extents (#810) (RE-318)
…bol wire width (#810) (RE-318)
DrunkOnJava
marked this pull request as ready for review
November 3, 2026 22:42
5 tasks done
DrunkOnJava
added a commit
that referenced
this pull request
Nov 3, 2026
… than the record box, and #810 leaves the contribution map (#810) (RE-318) (#1302) ## Summary Follow-up to #1300 from its post-merge review. A door's or window's `SymbolWireWidth` (the extent of the box-edge lines in its symbol's saved graphics) is now used only where it is no wider than the instance's record box along its width, by more than 0.001 ft; otherwise the record box's width is kept. No measured symbol's edges reach past the box (the widest equals it), so no export should change: a stray set of lines of no category can no longer widen a door past its box. Also removes #810 (closed by #1300) from the contribution map, corrects a module path in the support matrix, and adds to RE-318 §7 what the models outside the office do and do not show. ## Motivation #810, RE-318. The post-merge review of #1300 found no behaviour defect; it asked for a sanity bound tying the symbol width to the record box (all 350 and 346 measured values satisfy wire <= box), a stale contribution-map row, and an honest statement that the 31 identical models and the held-out models do not exercise the rule. ## Changes - `src/research/partition_schema_mvp/openings.rs`: `SYMBOL_WIRE_BOX_SLACK_FEET` (0.001 ft); `SymbolWireWidth` is attached only where it is at most the record box's width plus that slack. - `docs/contribution-map.md`: the #810 row goes. - `docs/support-matrix.json`: `SYMBOL_WIRE_WIDTH_FIELD` is in `partition_schema_mvp`, not `native_symbol_cuts`. - `reports/element-framing/RE-318-symbol-wire-width.md` §7 and `changelog.d/fixed/810-hatch-door-widths.md`: the bound, and what the other models do not show. ## Testing Unit tests are banned here. A byte-identity Measure run against `main` on the office files, RE1 and Core Interior is cited below once it is in; every IFC should be identical. ## Audit-honesty checklist - [x] Docs reflect the state after this PR - [x] The changelog fragment of #1300 is amended (still unreleased) - [x] No emojis, private paths or internal jargon ## Legal and contribution hygiene - [x] I agree this work is licensable under Apache-2.0 - [x] No Autodesk proprietary source, decompiled internals, or NDA'd SDK content ## Breaking changes None. ## Related issues Refs #810 (closed by #1300).
Owner
Author
|
Automated Claude Code review (the maintainer's review agent, read after merge; it read the code and runs 41725344128, 41728328224 and 41722740913): no blocking item in the code. A stale contribution-map row still listed #810 as open; it, and a bound so a symbol's box-edge width is used only where it is no wider than the record box, are in #1302. |
13 tasks done
DrunkOnJava
added a commit
that referenced
this pull request
Nov 4, 2026
#1308) ## Summary Nineteen properties of `RvtElementRecordGeometry` were values one stage of the export wrote so a later stage could read them back, not facts about the element. They no longer reach the IFC. The exporter keeps them to itself, works the opening cuts and each door's and window's `OverallWidth` and `OverallHeight` out of them as before, and hands the writer the result. Trust markers, provenance, identity and measured facts stay in the set. ## Motivation Griffin's decision of 2026-11-03 ("Move hand-offs out"): internal hand-off values leave users' IFC, trust markers stay. It extends the 2026-10-27 rule for scorer-only values (a value only rvt-rs's own stages or scorers read goes in internal state or the `rvt-ifc --diagnostics` JSON, never in the IFC; #1052). ## Inventory Every property written into `RvtElementRecordGeometry`, who reads it, and what this PR does with it. Hand-offs, moved out (19). No reader outside rvt-rs's own stages: nothing in `tools/re`, `tests`, the viewer, Python or the docs reads any of them, so the diagnostics JSON gets nothing. | Property | Written for | Read by | |---|---|---| | `OpeningCentreX`, `OpeningCentreY`, `OpeningAxisX`, `OpeningAxisY`, `OpeningBaseElevation`, `OpeningWidth`, `OpeningHeight` (RE-93, RE-94) | doors, windows | `ifc::filler_type_cut` (the opening cut); `OpeningWidth` and `OpeningHeight` also size `OverallWidth` and `OverallHeight` | | `InstanceOriginX`, `InstanceOriginY` (RE-87, RE-89) | turned family instances | `ifc::tapered_host_window_cut` | | `TypeWidth`, `TypeHeight` (RE-187) | doors | `OverallWidth`, `OverallHeight`, last choice | | `CutWidth`, `CutHeight` (RE-215) | doors, windows | `OverallWidth`, `OverallHeight`, first choice; whether the opening gets `Qto_OpeningElementBaseQuantities.Depth` (RE-244) | | `CutSolidWidth`, `CutSolidDepth`, `CutSolidHeight` (RE-225) | windows | `ifc::cut_solid_size` (the opening's depth and height) | | `BoxWidth`, `BoxHeight` (#810) | doors, windows | `OverallWidth`, `OverallHeight`, third choice | | `SymbolWireWidth` (RE-318) | doors, windows | `OverallWidth`, ahead of `BoxWidth` | Kept, with what justifies it: | Kind | Properties | Readers | |---|---|---| | Trust markers and provenance | `BodySource`, `ProfileResolved`, `ProfileSource`, `BodyHeightSource`, `TopCoverElementId`, `TopCoverElementIds`, `ThicknessResolved`, `Thickness`, `ThicknessSource`, `SpaceOutlineSource`, `AreaBodyRefusal`, `LevelBindSource`, `StoreyBindSource`, `FamilyNameSource` | 15 `tools/re` scorers, `saved_meshes.rs`, `schedule_csv.rs`, the quantity passes, `rvt-ifc` diagnostics, tests | | Identity and content | `LevelElementId`, `ElementId` (rooms), `RoomNumber`, `RoomName`, `FamilyName`, `TypeName`, `RevitClass`, `SourceStream`, the type's text parameters (RE-77), `NominalDiameter` | the writer (`IfcSpace` and `ObjectType` names), `IDENTITY_PROPERTIES`, `tests/fitting_nominal_diameter.rs`, `psets_vs_ifc` | | Measured facts a scorer, test or the viewer reads | `BoundingBoxHeight`, `AxisLength`, `SectionShape`, `SectionWidth`, `SectionDepth`, `SectionWebThickness`, `SectionFlangeThickness`, `Join{Start,End}WallElementId`, `Join{Start,End}RunsThrough`, `JoinCutWallCount` | `tests/column_cut_body.rs`, `beam_sections_in_ifc.py`, profile sets, the viewer's wall-join panel | | Descriptive, read by nothing | `ProfileVertexCount`, `ProfileVoidCount`, `ProfilePieceCount`, `TypeSymbolElementId`, `TypeSectionWidth`, `TypeSectionDepth`, `JoinTrimStart`, `JoinTrimEnd`, `JoinReachStart`, `JoinReachEnd`, `LevelBindResolved` | none; kept, since the decision covers hand-offs, not properties nobody reads | `AxisLength` and `SectionShape` are the borderline ones: `add_beam_length` reads `AxisLength` back to write `Qto_BeamBaseQuantities.Length` and `material_profile_sets_from_sections` reads `SectionShape`, but both are also the measured facts `beam_sections_in_ifc.py` scores from the IFC. They stay (moving them would need a diagnostics key and a schema for no change a user sees). The other rvt-rs sets (`RvtWallGeometry`, `RvtArcWall`, `RvtArcWallRectOpening`, `RvtFloorGeometry`, `RvtRsDiagnosticCandidate`) carry nothing a later stage reads back. ## Changes - `src/ifc/export_content.rs`: the 19 are collected in a separate list (`RecordGeometry::handoffs`, `TypedProductionAppend::record_handoffs`, by entity index) and never reach the entity's `property_set`. A mode without geometry records none, as it wrote none. The `*_PROPERTIES` constants stay `pub`, as the names of the hand-offs. - `src/ifc/mod.rs`: `opening_cuts_through_hosts` reads the hand-offs through new helpers, in place of the entity's property set. `filler_sizes_from_handoffs` is the `OverallWidth` and `OverallHeight` cascade (cut loop, opening, box or symbol wire width, type size), moved here unchanged from the STEP writer. `IfcModel::filler_sizes` is new. - `src/ifc/entities.rs`: `FillerSize` (width, height, whether the symbol cuts an outline). - `src/ifc/step_writer.rs`: reads `IfcModel::filler_sizes` instead of working the sizes out of properties. - `docs/support-matrix.json`: evidence names the new path. `changelog.d/changed/handoffs-leave-ifc.md`. - Witness observations of Core Interior (both artifacts), copied from this PR's CI. `viewer/tests/journey.spec.ts`: the Core Interior journey checks the downloaded IFC's door sizes. ## Serialised `IfcModel` The model JSON the viewer holds changes in two ways: a door's or window's `property_set` loses the 19 properties, and a `filler_sizes` key appears when it is not empty (like `opening_cuts`). Nothing else changes. The hand-offs are not in the model at all, so none reaches the viewer's panel or Python. A first design kept them on the model under `serde(skip)`; the viewer's "Download as IFC4 STEP" sends the model back through `modelToIfcStep`, so a skipped table would have written every door and window with `OverallWidth` and `OverallHeight` `$`. `filler_sizes` is serialised for that reason. Python's `rvt_to_ifc` calls `RvtDocExporter` and `write_step` on the exporter's own model, with no JSON between. The opening cuts run inside `export_rvt_doc_reporting`, before the model leaves the exporter; no pass runs them on a deserialised model. Viewer download path: `viewer/tests/journey.spec.ts` downloads the IFC but checks its header and one element line, not its bytes against `rvt-ifc`'s. No spec compares the two. ## Testing Unit tests are banned in this repository: none added. Nothing was built or run locally (`cargo fmt` only); the build, clippy, rustdoc and the real-file gates are this PR's CI. Measured end to end on GitHub's runners through Measure. - [x] `tools/check-local.sh` passes: not run locally; this PR's CI (fmt, clippy, rustdoc, the MSRV and platform builds, Corpus health, IfcOpenShell, semver) passes - [x] Verified end to end on real Revit files: see below - [x] If this touches the IFC exporter: the witness verdicts replay: both Core Interior observations refreshed from this PR's CI, replay PASS, verdict files unchanged - [x] Not a performance change Measured result (Measure [41755280111](https://github.com/DrunkOnJava/rvt-rs/actions/runs/41755280111), this change at `91bb0215` against `main` at `44b0b46c`, `-f nordic=true -f r2025=true -f samples=true -f holdout=true -f keep_ifc=true`, every scorer): - **The IFC is `main`'s but for the 19 properties.** For each of the 93 models whose IFC the run kept (Core Interior, Einhoven, the four RE1 models, the office's four files, 24 R2025 models, 58 Autodesk samples and the spent Vitoria pair), the base IFC with the 19 `IFCPROPERTYSINGLEVALUE` lines of `RvtElementRecordGeometry` removed, their ids dropped from the set's list and every id renumbered in file order, is byte for byte the head IFC (the run's clock in `FILE_NAME` and `IfcOwnerHistory` masked, as Measure's own `ifc.sha256` masks it). 62 of the 93 hold none of the 19 and are identical as written; 31 hold 22,338 between them (Core Interior 1,506; the office as built 3,959 and at permit 3,925; RE1 Architecture 47; the R2025 Rooms_Door_Windows and its five stair siblings 38 each; 21 Autodesk samples of 2024 to 2027, 10 to 2,501 each and 12,673 in all). `OverallWidth`, `OverallHeight`, the openings and every other attribute and property are therefore what they were. The comparison is `stepnorm.py` below. - **Scorers.** `scorer-diff.txt` (artifact `compare-scorer-diff`) holds two entries, both Core Interior's witness observation: `IFCPROPERTYSINGLEVALUE` 29,214 to 27,708 (-1,506) and the observation hash that follows from it. Every other scorer output of every model is identical, `psets_vs_ifc` (W7), `qtos_vs_ifc` and `door_window_sizes_vs_ifc` included, and so is every model's `diagnostics.json` and `rvt-info` output. - **Held-out models** (18, `-f holdout=true`, whose IFC is not kept): counts and scorer outputs identical to `main`'s. The IFC hash differs on 10 of them, as it does on the measured models with doors or windows above; their IFCs are not kept, so that is not checked line by line. - **Core Interior witness.** The fresh observations are the ones this PR's CI produced (`octetproof-core-interior`) for both artifacts, and differ from the committed ones only in `IFCPROPERTYSINGLEVALUE` (29,214 to 27,708) and the hash. `tools/ci/witness-verdict.py` with CI's arguments replays both to PASS (`replay: match` for all three witnesses), and the committed `verdict.json` of each is byte for byte what the replay writes, so no verdict file changes. The artifact's own verdict, which reports the drift, is not committed. `tests/fixtures/project-counts/2024-core-interior*.json` pin `IFCPROPERTYSET` (6,510), which does not move (no set empties), and no row pins `IFCPROPERTYSINGLEVALUE`, so neither fixture changes; Corpus health passes. - **The viewer's download.** `viewer/tests/journey.spec.ts` downloads the IFC but checked its header and one element line, not its bytes against `rvt-ifc`'s: no spec compared the two. The journey on Core Interior now asserts that the downloaded STEP has an `IFCDOOR` line with numeric `OverallHeight` and `OverallWidth` for every door the diagnostics count (132). It passes in Deploy viewer ([41756212239](https://github.com/DrunkOnJava/rvt-rs/actions/runs/41756212239)), which runs the browser's path (`modelToIfcStep` on the model sent back from JSON). Python's `rvt_to_ifc` writes the exporter's own model without JSON. - CI: all jobs pass, `semver checks` included (the `!` and the footer announce the break). The comparison script and the per-model log (`stepnorm.py <base.ifc> <head.ifc>`, exit 0 when identical) are not committed; the IFCs are in Measure's `measure-base` and `measure-head` artifacts for 90 days. ## Diagnostics No key is added to `rvt-ifc --diagnostics` and `docs/export-diagnostics.md` and `docs/schemas/export-diagnostics.schema.json` do not change: no scorer or test reads any of the 19. `parameter_value_count` counts `Pset_` values only and does not move. ## Audit-honesty checklist - [x] README / docs reflect the current state after this PR: the only doc naming these properties as written is the support matrix evidence, updated; `reports/` and `CHANGELOG.md` keep the history they recorded - [x] A user-visible change has its entry as a fragment under `changelog.d/changed/`, with the upgrading note - [x] No limitation is resolved or introduced - [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 ## Legal and contribution hygiene - [x] I agree this work is licensable under Apache-2.0 - [x] No Autodesk proprietary source, decompiled internals or NDA content; no new byte-level finding - [x] No new test fixtures; no real-world PII ## Breaking changes BREAKING CHANGE: `rvt::ifc::IfcModel` has a new public field, `filler_sizes`, and the property set of a door or window no longer holds `OpeningCentreX`, `OpeningCentreY`, `OpeningAxisX`, `OpeningAxisY`, `OpeningBaseElevation`, `OpeningWidth`, `OpeningHeight`, `InstanceOriginX`, `InstanceOriginY`, `TypeWidth`, `TypeHeight`, `CutWidth`, `CutHeight`, `CutSolidWidth`, `CutSolidDepth`, `CutSolidHeight`, `BoxWidth`, `BoxHeight` and `SymbolWireWidth`. Nothing user-facing changes value: `OverallWidth`, `OverallHeight` and the openings are what they were. ## Related issues Griffin's decision of 2026-11-03, "Move hand-offs out". Follows #1052 (scorer-only values) and #1300 (`SymbolWireWidth`). --- An automated Claude Code agent (Sonnet 5.5) wrote this change and measured it. The repo's Sonnet 5.5 xhigh review of a code-changing PR as it leaves draft is the maintainer session's to run; it had not run when this was written.
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
A door or window whose symbol cuts no loop takes its
OverallWidthfrom the extent along X of the lines of no category in that symbol's saved graphics (the edges of the boxes that bound its forms), ahead of the record box's width. That sizes the BIM4LCA office's last two doors that were 0.1137 ft wider than Revit's, 1756089 and 1765267, which are wall hatches (TRAPDOOR, familyLU-3.VSS) and not doors with a sidelight. One building's families; what the boxes are is inferred from Revit's widths, not documented.Motivation
Refs #810 (RE-318). RE-215 (cut loops), RE-225 (cut solid) and RE-229 (stored lengths) had all measured negative for these two doors. Candidates tested in the order briefed: the cut solid's unbounded plane (negative: its normal is along Y), the loaded family's own document (explains the 90 degree hatch's hidden 180 degree leaf, but is not a width reader), and the symbol's saved graphics (positive). The surfaces miss two doors (the 90 degree hatch hides the leaf its width includes; the O-16 door 1722215 is 5 mm short), hidden branches fix one, filtered branches none; the box edges, which hold both, are Revit's width on every door and window the office has.
Changes
src/research/native_symbol_cuts.rs:symbol_wire_widths, the extent along X of the visibleGLines of category -1 of each symbol's channel 103 record; a symbol with no such line, a degenerate or non-finite extent, an instance or component reference in its graphics, or two readings that disagree gets none.src/research/partition_schema_mvp/{fields,openings}.rs,src/ifc/{export_content,step_writer}.rs:SymbolWireWidth(rvt-rs's own set) where the record box sized the door or window, andOverallWidthtakes it ahead ofBoxWidth; height, cut loop, opening and type sizes are as before.src/research/native_family_forms.rs(family_records),native_graphics_traversal.rs,native_saved_mesh.rs,native_saved_scene.rs: research readers the probes need (a loaded family's own records; hidden and filtered saved-graphics branches, marked, off by default and absent from serialized output).probes/examples/probe_re318_*.rs(six),tools/re/{door_width_sources,hidden_geometry,symbol_curve_extents}_vs_ifc.py.reports/element-framing/RE-318-symbol-wire-width.md,changelog.d/fixed/810-hatch-door-widths.md,docs/status.md,docs/support-matrix.json,ROADMAP.md.Testing
Unit tests are banned in this repository: none added. Measured end to end on GitHub's runners through Measure; nothing was built or run locally (
cargo fmtonly).tools/check-local.shpasses (fmt, clippy, rustdoc, build, real-file / CLI / contract checks): not run locally, left to this PR's CImain's), so none to refreshMeasured result (Measure 41725344128, this change at
ae2078d3againstmainat53e06c02, default models plus-f nordic=true -f r2025=true, every scorer):The one door still
$is 1746275, which Revit writes 0 by 0 and whose symbol holds no such line. Onlydoor_window_sizes_vs_ifcmoves; every other scorer's output is identical,psets_vs_ifc(W7) andqtos_vs_ifcincluded (OverallWidth is an attribute, not a property). Widths that change in the office exports (41728328224): as built 1756089 and 1765267 (1.821669 m to Revit's 1.787000 m) and 1722215 (2.755007 m to 2.755000 m, Revit's); at permit the two hatches. Outside the office: 31 of 34 measured models write the same IFC byte for byte; the three that differ are the two office files and RE1 Architecture, where the only door the rule reaches, the curtain-wall door 445975, gainsSymbolWireWidth1.831871 m equal to itsBoxWidthand keepsOverallWidth1.831871 m (41728305941). Held-out models (-f holdout=true, 41725349619): all 18 models' counts and IFC hashes are identical tomain's, scorer diff empty. The box edges against Revit's widths (41725355196,probe_re318_symbol_curve_extents): 268 of 268 doors and 269 of 269 windows as built, 268 of 268 and 265 of 265 at permit, none missed.Audit-honesty checklist
docs/status.md,docs/support-matrix.jsonandROADMAP.mdupdated; scope stated as one building's familieschangelog.d/fixed/CUT_LOOP_REVIT_VERSIONSprobes/examples/and reportRE-318-symbol-wire-width.mdLegal and contribution hygiene
FamilyInstanceExporter.GetDoorWindowDimensionFromSymboland its calls toExporterIFCUtils.GetOriginalSymbol,GetMinSymbolWidthandGetMinSymbolHeight, CLEANROOM.md source 5) was read to learn which symbol and which dimension Revit's exporter measures, and none of its code was copied or translated;GetMinSymbolWidthis closed, and what it measures is inferred from Revit's widthsBreaking changes
None. The new
rvt::researchitems are behindunstable-research;native_saved_mesh::Primitivegainshiddenandfiltered, absent from serialized output when false, andSelectedGraphicsgains the same two fields.Screenshots or output samples
IFC output changed on the office exports and RE1 Architecture: see the measured tables above and report section 6.
Related issues
Closes #810: its last open item, the two doors' widths, is resolved on both office files. Whether other buildings' families agree is NOT MEASURED; RE-318, docs/status.md and the changelog state that limitation.
An automated Claude Code agent (Sonnet 5.5) wrote this change and measured it. A Sonnet 5.5 xhigh review subagent reads each PR that changes code or measured figures as it leaves draft (repo policy); this PR is a draft and has not had that review.