Skip to content

feat(ifc): a door's or window's OverallWidth and OverallHeight are the outline the symbol that draws it cuts in its host (#844) (RE-215) - #936

Merged
DrunkOnJava merged 4 commits into
mainfrom
feat/844-symbol-cut-sizes
Oct 24, 2026
Merged

DrunkOnJava merged 4 commits into
mainfrom
feat/844-symbol-cut-sizes

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Oct 24, 2026 •

Copy link
Copy Markdown
Owner

Summary

On Revit 2024 and 2025 files, each door's and window's OverallWidth and OverallHeight now come from the outline that the symbol drawing it cuts in its host (RE-215). That symbol's cut loop gives Revit's own export values on every door and window measured with one: Core Interior's 132 doors and 6 windows, RE1 Architecture's 4 doors, and each R2025 model's door and 3 windows. Core Interior's six windows had $; they now have Revit's 1500 by 2700 mm.

Motivation

#844: Core Interior's windows are of a type whose stored size is 1010 mm square, while Revit writes 1500 by 2700 mm, so RE-187's type size could not give them a size. revit-ifc sizes a door or window from ExporterIFCUtils.GetOriginalSymbol(familyInstance) (CLEANROOM.md source 5), which is not always the instance's type. This PR finds that symbol and its cut in the file:

  • A FamilySymbol record's m_pCutLoops points at one CurveLoop of GLines in the symbol's XZ plane.
  • A FamilyInstance names its type in m_masterSymbolId and the symbol that draws it in its InstanceInfo.m_symbolId.
  • For the windows, that symbol is 19275, the family's per-instance symbol, and its loop is 4.9213 by 8.8583 ft.

Refs #844: its other case, RE1's curtain-wall door 445975, has no cut loop and keeps $. Refs #810 (the BIM4LCA office is not measured: its host times out) and #227 (the opening's body, next).

Changes

  • src/native_symbol_cuts.rs (new research module): instance_cut_loops(rf, instances) reads, in one native pass, the given instances and every FamilySymbol, and returns each instance's CutLoop. A loop counts only if it is:
    • one closed loop of GLines,
    • with each line's start within 1e-6 ft of the previous line's end,
    • flat in y,
    • with some width and height.
  • src/partition_schema_mvp.rs: attach_cut_loop_sizes gives doors and windows on 2024 and 2025 (CUT_LOOP_REVIT_VERSIONS) the loop's X and Z extents (CUT_LOOP_SIZE_FIELDS). It skips doors that are an opening alone (RE-84).
  • src/ifc/export_content.rs: CutWidth / CutHeight (CUT_LOOP_SIZE_PROPERTIES) in the element's rvt-rs set.
  • src/ifc/step_writer.rs: OverallWidth / OverallHeight take the cut loop's size first, then RE-93's opening, then RE-187's type size.
  • tests/door_overall_sizes.rs: Core Interior's six windows are now asserted at Revit's 2700 by 1500 mm, where the test used to assert $.
  • examples/probe_re215_symbol_cuts.rs and tools/re/symbol_cuts_vs_ifc.py: the probe and scorer. The research branch re/810-symbol-cuts calls them RE-213; fix(ifc): Revit 2025's tapered walls are drawn tapered, from the face angles its wall types frame with twelve zero bytes (#358) (RE-213) #935 took that number first.
  • reports/element-framing/RE-215-symbol-cut-loops.md, a dated addendum to docs/rvt-moat-break-reconnaissance.md, docs/status.md, docs/supported-profile.md, docs/support-matrix.json (native-symbol-cut-sizes, partial, and the RE-93/RE-187 entry's note), README.md, CHANGELOG.md.
  • research/witness/magnetar-2024-core-interior*/observations/rvt-rs.json, regenerated by Measure: 276 more IFCPROPERTYSINGLEVALUE and the new observation hash. Nothing in the verdicts' semantic surface changes.

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: CI runs it (no builds on the maintainer's machine). Measure built the head with --profile ci. rustfmt and the let-chain scan pass.
  • Verified end to end on real Revit files: the command, the files (and their licence), and the measured result against Revit's own export are in the PR body, with the script or probe that reproduces it
    • Files: Core Interior (Revit 2024, MIT), RE1 Architecture (Revit 2025, MIT) and puzzbobb's R2025 models (Apache-2.0), each with Revit's own IFC export. Hashes are in the report.
    • Probe (run 40014065012, -f r2025=true -f probe=probe_re213_symbol_cuts -f probe_scorer=symbol_cuts_vs_ifc on re/810-symbol-cuts): the InstanceInfo.m_symbolId loop equals Revit's OverallWidth and OverallHeight within 0.001 ft on 132 of 132 doors and 6 of 6 windows on Core Interior, 4 of 4 RE1 doors with a loop, and 1 door and 3 windows on each of the R2025 models 12 to 17.
    • End to end (run 40114863653, this branch against main, with the R2025 models):
      • the IFC changes on Core Interior, RE1 Architecture and R2025 12 to 17 only;
      • door_window_sizes_vs_ifc on Core Interior's IfcWindow goes from equal 0, differ 0, $ 6 to equal 6, differ 0, $ 0;
      • every other scorer output is identical on all 29 models.
  • If this touches the IFC exporter: the witness verdicts replay or the changed observations are refreshed in this PR. The two rvt-rs observations are refreshed from that run's head output; main's output equals the committed files byte for byte.
  • Not a performance change. The native pass costs about 1.9 s on Core Interior (the probe's two passes; this is one).

Audit-honesty checklist

  • README / docs reflect the current state after this PR

  • If a limitation was resolved, the relevant docs are updated: the support matrix's RE-93/RE-187 note no longer says windows are unsized

  • If a new limitation was introduced, it is documented in the PR body and in-code. These cases are left out:

    • 2023, 2026 and 2027;
    • loops with arcs;
    • doors that are an opening alone.

    These are NOT MEASURED:

    • Snowdon Towers (local only), where the loop now comes before RE-93's and RE-94's type sizes;
    • the BIM4LCA office.
  • 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

  • If this is a reverse-engineering finding: a reproducible probe under examples/ and a dated addendum to docs/rvt-moat-break-reconnaissance.md are included

Legal and contribution hygiene

  • I agree this work is licensable under Apache-2.0 (see CONTRIBUTING.md)
  • This PR contains no Autodesk proprietary source, decompiled internals, or NDA'd SDK content (see CLEANROOM.md)
    • Contributor declaration: the finding comes from public byte observations of the corpus files, decoded through the file's own Formats/Latest schema. The exporter's rule comes from revit-ifc (LGPL, CLEANROOM.md source 5): ExporterIFCUtils.GetOriginalSymbol and GetDoorWindowDimensionFromSymbol, read for behaviour and cited, with no code copied. No Autodesk SDK source, disassembly, leaked documents or NDA material was used.
  • Any new test fixtures use synthetic values: there are none

Breaking changes

None. The new public items (research::native_symbol_cuts, partition_schema_mvp::CUT_LOOP_SIZE_FIELDS, CUT_LOOP_REVIT_VERSIONS, cut_loop_size_from_fields, ifc::export_content::CUT_LOOP_SIZE_PROPERTIES) are additions.

Screenshots or output samples

No IFC text is quoted, since Measure does not keep the exports. What changes on each of Core Interior's six windows is the IFCWINDOW's OverallHeight and OverallWidth: $ before, 2.7 and 1.5 m after. door_window_sizes_vs_ifc reads exactly those attributes (run 40114863653, quoted in Testing).

@DrunkOnJava
DrunkOnJava marked this pull request as ready for review October 24, 2026 17:23
@DrunkOnJava
DrunkOnJava enabled auto-merge (squash) October 24, 2026 17:23
@DrunkOnJava
DrunkOnJava merged commit 8d8f3a3 into main Oct 24, 2026
27 checks passed
@DrunkOnJava
DrunkOnJava deleted the feat/844-symbol-cut-sizes branch October 24, 2026 17:32
DrunkOnJava added a commit that referenced this pull request Oct 24, 2026
…s, through the instance's transform (#227) (RE-215) (#946)

## Summary

On Revit 2024 and 2025, a door or window whose type gives no opening now
cuts its host along the outline its symbol cuts (RE-215), placed by the
instance's transform (RE-87). The cut runs through the wall. Against
Revit's own export, the openings are now within 0.001 ft:

- Core Interior: 124 of 132 doors, which were within 0.26 ft, and all 6
windows, which were within 0.1 ft;
- RE1 Architecture: all 4 doors, which were within 0.26 ft.

Part of #227.

## Motivation

#227 asks for each door's and window's opening as Revit cuts it, not the
element's box. RE-215 (#936) read the outline that the symbol drawing a
door or window cuts in its host.

Revit places a door's IFC frame at its opening's corner, which hides
where that outline sits, so the opening has to be measured in the
instance's own frame. `examples/probe_227_opening_frames.rs` and
`tools/re/opening_frames_vs_ifc.py` do that (run
[40118231668](https://github.com/DrunkOnJava/rvt-rs/actions/runs/40118231668)).
There, the opening's X and Z ranges equal the outline's within 0.001 ft
on every door and window measured:

- Core Interior: 124 doors and 6 windows;
- RE1 Architecture: 4 doors;
- each R2025 model: 4 doors and windows.

Across the wall the opening runs from the outline's plane to its mirror,
which is the host's thickness, centred on the origin.

## Changes

- `src/partition_schema_mvp.rs`:
- `attach_cut_loop_sizes` also gives each door and window with an
outline and a transform, but no opening from RE-93 or RE-94, RE-93's
opening fields:
- centred on the outline's middle along the instance's X axis, so an
off-centre outline is placed right;
    - from the outline's bottom;
    - the outline's width and height;
  - the exporter cuts it as it cuts RE-93's, across the host's band;
- `push_filler_opening` takes that offset along the axis, and its two
existing callers pass 0.
- `examples/probe_227_opening_frames.rs` and
`tools/re/opening_frames_vs_ifc.py`, the research above.
- `reports/element-framing/RE-215-symbol-cut-loops.md` §7, `README.md`
(the openings row), `docs/supported-profile.md`,
`docs/support-matrix.json` (`native-symbol-cut-sizes`),
`changelog.d/added/loop-openings.md`.
-
`research/witness/magnetar-2024-core-interior*/observations/rvt-rs.json`,
regenerated by Measure. 130 more placements and points and 910 more
property values; nothing in the verdicts' semantic surface changes.

## 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: CI runs it. Measure built the head
with `--profile ci`, and rustfmt and the let-chain scan pass.
- [x] Verified end to end on real Revit files: the command, the files
(and their licence), and the measured result against Revit's own export
are in the PR body, with the script or probe that reproduces it
- Measure
[40118849373](https://github.com/DrunkOnJava/rvt-rs/actions/runs/40118849373),
this branch against main, with the R2025 models. Files: Core Interior
(Revit 2024, MIT) and RE1 Architecture (Revit 2025, MIT), with Revit's
own exports. `opening_boxes_vs_ifc`:

  | | main | this PR |
  |---|---|---|
| Core Interior doors | 132 within 0.26 ft | 124 within 0.001 ft, 8
within 0.26 ft |
  | Core Interior windows | 6 within 0.1 ft | 6 within 0.001 ft |
  | RE1 Architecture doors | 4 within 0.26 ft | 4 within 0.001 ft |

- `openings_vs_ifc` likewise: 130 of Core Interior's openings and RE1's
4 within 0.01 ft, none before.
- The IFC changes on those two models only. The R2025 models' doors and
windows already had RE-93's openings and are identical, and every other
scorer output is identical on all 29 models.
- [x] If this touches the IFC exporter: the witness verdicts replay or
the changed observations are refreshed in this PR. Both rvt-rs
observations are refreshed from the run's head output.

## Audit-honesty checklist

- [x] README / docs reflect the current state after this PR
- [x] If a new limitation was introduced, it is documented in the PR
body and in-code. These are left as they were:
- Core Interior's 8 doors with no RE-87 transform keep their box
opening;
  - 2023, 2026 and 2027;
  - Snowdon's RE-93 and RE-94 openings, which are already exact.
- [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
- [x] If this is a reverse-engineering finding: a reproducible probe
under `examples/` and the report's dated section are included. The
finding extends RE-215, so it is RE-215 §7, not a new number.

## Legal and contribution hygiene

- [x] I agree this work is licensable under Apache-2.0 (see
`CONTRIBUTING.md`)
- [x] This PR contains no Autodesk proprietary source, decompiled
internals, or NDA'd SDK content (see `CLEANROOM.md`)
- Contributor declaration: the rule comes from comparing the corpus
files' own records, read through their schema, with Revit's IFC exports.
No Autodesk SDK source, disassembly, leaked documents or NDA material
was used.

## Breaking changes

None.
DrunkOnJava added a commit that referenced this pull request Oct 24, 2026
…e assembles (#938) (#940)

## Summary

Changelog entries become fragments, one file per pull request at
`changelog.d/<section>/<name>.md`, and a release assembles them into
`CHANGELOG.md` (`tools/release/changelog.py assemble`). CI checks every
fragment (`tools/release/changelog.py check`). Closes #938.

## Motivation

Every pull request added its entry at the top of the same `[Unreleased]`
section, so each landing left every other open pull request in conflict
with main on `CHANGELOG.md`. The queue then skipped them as `DIRTY`
until someone merged main into each one by hand. On 2026-10-24 that
happened after every landing:

- #926 landing put #927 and #930 back in conflict;
- #936 landing did the same to #886, #887, #927, #930 and #935, all with
green CI.

The `merge=union` driver that resolves such conflicts is in a
maintainer's own git configuration, not this repository, and GitHub's
merge never applied it. Nor does union merging keep the blank line
between two entries.

A fragment is a file of its own, so two pull requests never touch the
same lines, and GitHub's update-branch, which the queue uses, merges
them cleanly.

## Changes

- `tools/release/changelog.py` (stdlib only):
- `check` fails on a fragment outside a known section (`added`,
`changed`, `fixed`, `removed`, `security`, `research`), an empty one, or
one whose first line does not start an item (`- **`);
- `assemble` puts each fragment at the top of its section under
`[Unreleased]`, making the heading in Keep a Changelog order where it is
missing, one blank line apart, in name order, and deletes the fragments.
- `changelog.d/README.md`: the format.
`changelog.d/changed/changelog-fragments.md`: this PR's own entry.
- `.github/workflows/ci.yml`: the `check` step, beside the
conflict-marker guard.
- `RELEASE.md` step 5 runs `assemble` first.
- `CONTRIBUTING.md`, `docs/maintaining.md` and the PR template point at
`changelog.d/`.
- `CHANGELOG.md`'s preamble says unreleased changes are also in
`changelog.d/`.

This PR leaves the existing `[Unreleased]` entries where they are. The
open pull requests' entries move into fragments in those pull requests,
each with one last merge of main.

## Testing

I ran the tool on a scratch copy of main's `CHANGELOG.md`:

- `check` with three fragments: `changelog.d: 3 fragment(s), each in a
section and starting an item`;
- `assemble` put two `added` fragments at the top of `### Added`, in
name order with a blank line between, and made `### Security` between
`### Removed` and `### Research`; it deleted the three fragments and
left `README.md`;
- `check` on a fragment that does not start an item, and on one in an
unknown directory: both reported, exit 1;
- on this branch, `check` passes on its one fragment, and
`tools/ci/api-doc-ids.py` and the YAML parse pass.

## Audit-honesty checklist

- [x] README / docs reflect the current state after this PR
- [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 (see
`CONTRIBUTING.md`)
- [x] This PR contains no Autodesk proprietary source, decompiled
internals, or NDA'd SDK content (see `CLEANROOM.md`)

## Breaking changes

None for users. Contributors write their entry under `changelog.d/` from
now on.
Repository owner deleted a comment from chatgpt-codex-connector Bot Oct 31, 2026
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