Skip to content

research(elements): RE-357 measures where Revit places a door's or window's origin: one offset per type entity, x and z from the opening, y not (#1465) - #1497

Merged
DrunkOnJava merged 5 commits into
mainfrom
research/1465-door-window-origin
Nov 6, 2026
Merged

DrunkOnJava merged 5 commits into
mainfrom
research/1465-door-window-origin

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Nov 5, 2026 •

Copy link
Copy Markdown
Owner

Summary

RE-357 measures where Revit places a door's or window's IfcLocalPlacement origin, against the stored origin (InstanceTransform.origin), for #1465. The answer is a negative for a rule: the stored origin is not Revit's on any door or window set in a wall; the offset is one value per IfcDoorType or IfcWindowType entity (revit-ifc's per-type StyleTransform, from the instance that creates the type, not recorded in the file); x and z follow the element's own opening, y does not. The origin stays at the record box's centre. No exporter code changes.

Motivation

#1465: rvt-rs writes the origin at the record box's centre and Revit's is more than 0.5 ft away on almost all. Its done-when is either a rule with 0 wrong on the walled elements or the origin left at the box's centre with the measured reason.

Changes

  • tools/re/door_placements_vs_ifc.py: the door flips: origin lines (offset of Revit's origin from the stored origin by type entity, symbol and flip state, signs by state, per-axis agreement with each export's opening, the doors bound to none), with row lines for open models carrying the offsets, the two openings' boxes and the type entity. A held-out model prints counts and signs only (checked against tools/ci/scrub-holdout-results.sh's pattern on a simulated held-out run: 68 of 68 lines survive, no row).
  • reports/element-framing/RE-357-door-window-origin.md, changelog.d/research/1465-door-window-origin.md, and the door and window origin sentence of docs/status.md and of the matching row of docs/support-matrix.json.

Testing

Unit tests are banned in this repository: none added. No Rust changes.

  • tools/check-local.sh: not run (no source change; scorer, report and fragment only)
  • Verified end to end on real Revit files: Measure 42127619521, head 6b4058d17c07947543db4b6d2bc4c2e671fcedca (the scorer; the later commits of this PR change the report, the changelog fragment and two docs), -f base=none -f scorers=none -f keep_ifc=true -f nordic=true -f models="core-interior re1-* nordic-office-*" with the probe probe_re343_door_flips and the scorer door_placements_vs_ifc; every job succeeded, same-project gates included. Figures: 1,061 walled doors and windows (604 counted once), stored origin Revit's on 0; offset one value per type entity on 160 of 160; x and z the element's own opening on 919 of 919 office elements, y on 375 of 385 doors and 198 of 534 windows; both flips set 391 of 391, not written; no opening, stored origin on 153 of 153 doors.
  • python3 tools/release/changelog.py check and tools/ci/api-doc-ids.py pass; the scorer compiles and door_axes_vs_ifc.py, which imports it, imports.

Audit-honesty checklist

  • The report states what is not measured: held-out models, which instance creates a type, what GetTransformForDoorOrWindow computes (a RevitAPI call, body not read).
  • Changelog fragment under changelog.d/research/.
  • No emojis, no private paths.
  • Clean room: revit-ifc (source 5) read for behaviour (FamilyInstanceExporter, FamilyTypeInfo), cited by file and class, nothing copied.

Breaking changes

None.

Related issues

Closes #1465: the origin is left at the record box's centre with the measured reason, which is the second branch of its done-when. The both-flips-set agreement (232 of 600) is reported in the report and not written. Refs #1494: where Revit's export gives a door no opening, its origin is the stored origin (75 of 75 in the office, 1 of 1 in RE1); nothing is written for those doors here.

…ndow's origin: one offset per type entity, x and z from the opening, y not (#1465)

The scorer door_placements_vs_ifc.py prints Revit's origin less the stored origin by type entity, symbol and flip state, and per axis against the opening each export gives the element. Measured locally on three models; the Measure run is cited once it has finished. Refs #1465.
… not written and points the doors with no opening at #1494 (#1465)
…s' origin is stated in status and the support matrix (#1465)

The report, the changelog fragment, docs/status.md and the door and window row of the support matrix give the measured reason the origin stays at the record box's centre, with the run's figures.
@DrunkOnJava DrunkOnJava added the ready-when-green Draft whose code is complete: marked ready for review once its fast CI passes label Nov 5, 2026
@DrunkOnJava
DrunkOnJava marked this pull request as ready for review November 5, 2026 23:29
@DrunkOnJava DrunkOnJava removed the ready-when-green Draft whose code is complete: marked ready for review once its fast CI passes label Nov 5, 2026
@DrunkOnJava
DrunkOnJava enabled auto-merge (squash) November 5, 2026 23:58
@DrunkOnJava
DrunkOnJava merged commit b0b72a6 into main Nov 6, 2026
35 checks passed
@DrunkOnJava
DrunkOnJava deleted the research/1465-door-window-origin branch November 6, 2026 01:39
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.

Doors and windows: rvt-rs places the origin at the record box's centre, more than 0.5 ft from Revit's on almost all

1 participant