Skip to content

feat(ifc): a door set in no wall is placed at its stored origin, and the doors with no opening are measured against Revit's (#1494) (RE-361) - #1505

Merged
DrunkOnJava merged 3 commits into
mainfrom
research/1494-doors-no-opening
Nov 9, 2026
Merged

DrunkOnJava merged 3 commits into
mainfrom
research/1494-doors-no-opening

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Nov 5, 2026 •

Copy link
Copy Markdown
Owner

Summary

#1494, first round: a door rvt-rs binds to no host wall, whose stored transform is read and upright, is placed at its stored origin, as Revit's export places the doors it gives no opening (RE-357: 153 of 153 in Measure 42127619521); its record box stays where it is in the world. The probe now reads each element's stored host and that host's native wall record, and a new scorer counts the doors with and without an opening in each export (both mismatch directions), the origin, and what decides the axes of the doors RE-343's Rule 1 gets wrong. The axes half of #1494 is a measured negative: no rule with 0 wrong was found among those tried (RE-343's Rule 1 is wrong on 45 of 153), so this change writes no axes and #1494 stays open for them.

Motivation

#1494: can rvt-rs tell the doors Revit gives no opening from the file, and is there a rule with 0 wrong for their origin and for their axes?

Changes

  • src/research/partition_schema_mvp/placement_origins.rs (new), src/research/partition_schema_mvp.rs: the reader gives such a door the origin of its stored transform (m_opening_placement_origin_{x,y,z}), after the host is final.
  • src/ifc/export_content.rs, src/ifc/mod.rs: the origin travels as a hand-off; a last pass, after storeys are bound and openings cut, sets location_feet to it, turns the body into the box's rectangle as a placed extrusion at the old centre (so saved meshes and the family's extrusions, taken in the element's frame afterwards, follow), and writes RvtElementRecordGeometry.PlacementOriginSource = stored_origin_no_opening.
  • probes/examples/probe_re343_door_flips.rs: stored_host and the native wall record of each stored host.
  • tools/re/door_unwalled_vs_ifc.py (new), reports/element-framing/RE-361-doors-with-no-opening.md, changelog.d/changed/1494-doors-with-no-opening.md.

Testing

Unit tests are banned in this repository: none added.

  • tools/check-local.sh: not run (no local builds); cargo fmt --all -- --check, python3 tools/release/changelog.py check and tools/ci/api-doc-ids.py pass locally. CI builds it.
  • Verified end to end on real Revit files. Measure run 42523791605 (head b01dfc90, with the probe and keep_ifc): 3 models hold such doors, 153 in all, the rule is written on 151, and all 153 stand within 0.001 ft of Revit's origin; 0 written where Revit gives an opening; 681 doors checked with 0 openings in one export alone. The 2 unmarked doors are ones apply_placement_origins leaves. Measure run 42520016421 on the same head, base ab5f8e1c, unfiltered: 98 of 118 exports are main's, 20 move, same-project gates passes. The head adds only the report and the changelog fragment.
  • Axes: a measured negative, in RE-361 section 3. No rule with 0 wrong exists among those tried (RE-343's Rule 1 is wrong on 45 of 153), so the change writes none and Doors bound to no plain wall: 49 inverted relative to the axes rule, by IfcDoorType (RE-347 follow-up) #1494 stays open for them.

Audit-honesty checklist

  • The report states what each run measured and what none does.
  • Changelog fragment under changelog.d/changed/.
  • No emojis, no private paths.
  • Clean room: nothing from revit-ifc is copied.

Breaking changes

location_feet of a door rvt-rs binds to no host wall moves from the record box's centre to the stored origin, and with it the location in the elements CSV, the scene graph, the MCP views and the viewer's schedule for those doors; the body does not move. The decoded Door record gains m_opening_placement_origin_{x,y,z} on those doors.

Related issues

Refs #1494.

…the doors with no opening are measured against Revit's (#1494) (RE-361)
@DrunkOnJava
DrunkOnJava force-pushed the research/1494-doors-no-opening branch from 1ca4af7 to 399fa8e Compare November 8, 2026 20:04
@DrunkOnJava
DrunkOnJava enabled auto-merge (squash) November 9, 2026 02:01
@DrunkOnJava
DrunkOnJava merged commit e32d35a into main Nov 9, 2026
62 checks passed
@DrunkOnJava
DrunkOnJava deleted the research/1494-doors-no-opening branch November 9, 2026 02:01
DrunkOnJava added a commit that referenced this pull request Nov 9, 2026
…ed without its probe (#1537)

## Summary

`MEASURE_SCORERS` runs any `tools/re` script it names, outside the
scorer lists, as an IFC scorer, `<model.ifc> <revit.ifc>`. A scorer that
takes a probe's output then gets the IFC instead, finds no probe rows
and reports zeros with the step and run green: Measure run 42522552972
on #1505 did exactly that, on every model, and only reading the numbers
showed it. The script now stops with an error naming the right flags
when a scorer named this way documents a `<probe output>` argument.

## Testing

`bash -n` parses the script. The refusal is matched on a usage line of
`<probe...>` in any spelling (`\.py +<probe[- ._a-z0-9]*>`), which
catches 67 of the scorers in `tools/re` and none of `IFC_SCORERS` or
`GLB_SCORERS`. Measure run 42532321384, naming `port_directions_vs_ifc`
in `scorers`, stopped at the start with exit 2 and the error
"port_directions_vs_ifc reads a probe's output: dispatch it with -f
probe=<probe> -f probe_scorer=port_directions_vs_ifc, not in scorers".
DrunkOnJava added a commit that referenced this pull request Nov 9, 2026
… as its value source (#1498) (#1562)

## Summary

`main` fails Corpus health. #1512 (value sources for every `*Source`
value) and #1505 (a door set in no wall placed at its stored origin)
landed in the same batch, each green on its own. Together, the offsets
test finds `PlacementOriginSource=stored_origin_no_opening` with neither
a row in `SOURCE_VALUES` nor a declared gap: 1 door on RE1 Architecture,
74 on the BIM4LCA office as built and 76 at permit. That was seen on
#1560's full run, a dependency bump that changes no code.

The value has a source. `attach_opening_placement_origins` takes the
door's origin from
`partition_instance_transforms::scan_instance_transforms`, which notes
each transform it reads as an `instance_transform` value source. So:

- `element_provenance::property_readers` maps
`PlacementOriginSource=stored_origin_no_opening` to the
`instance_transform` reader, as `PlacementAxesSource` maps to its
readers.
- `tests/value_sources_offsets.rs` gains the row: sourced, from
`instance_transform`.

No export changes: value sources are diagnostics only. #1512's Measure
run 42542513656 found every export byte for byte the same with them in
place.

## Testing

This PR's full CI runs the Corpus health job, the one that failed. The
four tests that failed on #1560 should pass there:
-
`family_extrusion_value_sources_name_the_forms_the_body_was_rebuilt_from`
- `project_corpus_value_sources_name_the_copy_the_reader_took`
- `nordic_office_value_sources_name_the_copy_the_reader_took`
- `nordic_office_permit_value_sources_exercise_the_current_copy_rule`
DrunkOnJava added a commit that referenced this pull request Nov 23, 2026
…ide fails the run, and a tool of several exports is not run per model (#1541) (#2156)

## Summary

A scorer a Measure run names, or a probe's scorer, that exits non-zero
on the head side now fails the run. Before, it only raised an error
annotation on a green run (#1541), so a green run could hold a crashed
result that a page then cited or a change landed on. Run 45072403351 was
one: its one probe scorer exited 2 on both offices, and the run finished
green.

- **Where it is caught:** where the annotation already was, in `score`
in `tools/ci/measure-reference-models.sh`. Each one is also listed in
`scorer-failures-<shard>.txt` at the top of the shard's results: model,
scorer and exit status.
- **Where it fails:** in a last step of the compare job, after the
merged sides, the summary and every upload are written. So a failed run
still holds every output to look into.
- **The head side only:** the base side is the ref the run compares
with, usually main, so a crash or a finding there is that ref's own. It
is annotated as before and listed, and fails no run. In run 43330924424,
main failed the same-project gate on six samples that the head fixed.
- **Unchanged:** the default scorer set, where a scorer may exit 1 for a
finding, as #1541 asked.
- **A finding on the head side** fails the run too. The schema steps
tell a crash from a finding by the status (#1882), but here that rule
would miss a usage error a scorer raises with `sys.exit(__doc__)`, which
also exits 1. That matches the same-project gate, whose head-side
failure already turns the run red
(`tools/ci/check-bodies-across-saves.sh` in the same-project gates job).
- **Names:** a model whose results leave the runner only as counts
(held-out, `rac_advanced`, BIMcollab), or a pair once held out (spent),
is listed as "a model kept to counts". So the list, which the keep
workflow keeps with a run's outputs, names none of them, as its scan
requires.
- **Reuse:** the base side saves its results for later runs only when no
output holds an `exit N` line (step "Whether these results are whole"),
so a run that writes a failure list never saves one for reuse.
- **A tool that cannot run on one model** is no longer run on each one.
`areas_across_saves` named in `scorers` is taken as asking for its gate,
which already runs whenever the samples are in the run, as
`bodies_across_saves` is. Any other named scorer whose name ends
`_across_saves` or `_vs_base`, or whose usage line takes three files or
more, is refused at the start with what to dispatch instead, as #1505
refuses a probe's scorer.

The refusal names `pair_scorer`, the Measure input #2151 added.

## Motivation

A run dispatched for a scorer's answer should be green only if that
answer exists: a check that passes on a broken result is a defect of the
check.

**What the annotation fired on:** the census read the annotations of 839
of the 1,531 dispatched Measure runs since 2026-11-08: every one from
run 43152271314 (2026-11-12) to the census's start on 2026-11-22. It
stopped there to leave the API's hourly budget to other work. 23 of the
839 carry the annotation.
- **Read, a broken result each time:**
- probe scorers that did not take Measure's `--list` and printed their
usage: 45072403351; 43490409752, whose `history_base_vs_ifc` did so on
Core Interior; and 43683744673 and 44487715399, two of the eight runs
whose probe scorer exited 2;
- a probe scorer missing a module (43528327450, `No module named
'scipy'`);
- `areas_across_saves` named in `scorers`, which printed its usage per
model (read in 44953635018; 44684313099 and 44950815664 carry the same
annotation). It is now a named step.
- **Read, and by design:** the same-project gate `bodies_across_saves`
in 43330924424. On the base side main failed it on six samples, which
the head passed, so that run stays green: only the head side's list
fails a run.
- **Read, and by design until now:** the #2085 research gap scorer,
which took a model with no gap for empty output (read in 45002253953;
45000994205 carries the same annotation). That one is fixed on its
branch (`74f5cd01`): the 31 models of 45002253953 it failed now pass,
and empty or cut-off output still fails.
- **From the scorer alone:**
- `changed_bodies_vs_ifc` takes three files, so named per model it
prints its usage. It is now refused.
- `predefined_types_vs_ifc` has no exit of its own, so its exit 1 was an
uncaught exception.
- **Not readable:** 43555612089 and 43556799152 exited 1 only on a
held-out model, whose outputs Measure keeps to counts.
- **Not read:** the other six probe-scorer runs that exited 2, and
`ceiling_pieces_vs_ifc`, a research branch's scorer.
- **This PR's own test:** 45074654959 is one of them.

## Changes

- `tools/ci/measure-reference-models.sh`:
  - `score` appends each failure to `scorer-failures-${SHARD}.txt`;
  - `areas_across_saves` is a step run by name;
  - the start refuses a named scorer of several exports.
- `.github/workflows/measure.yml`: the compare job's last step, "A
scorer the run names did not fail", reads the head side's lists and
fails on any line.

## Testing

Unit tests are banned in this repository: do not add them.

- [x] **A crashing scorer, end to end** (Measure run 45074654959,
dispatched from this branch, and again at this head, `e8905590`, as
45087970349). It used `-f ref=82216d2c`, whose
`wall_saved_low_vs_ifc.py` did not yet take `--list` and exits 2, on the
as-built office.
- The run failed in the new step, with "head, nordic-office-as-built:
the scorer probe_score, named in this run, exit 2".
- `measure-head` and `measure-verdict` were still uploaded, and at this
head `measure-head` holds `scorer-failures-office-as-built.txt` with
that line.
- [x] **A scorer that passes** (45074662866, the same with `-f
ref=ef98f444`): green.
- [x] **`areas_across_saves` named with `class_sets_vs_ifc` on RE1
Architecture** (45077588273): green. `class_sets_vs_ifc` exited 0, and
no `areas_across_saves.txt` or failure list was written. Run 44953635018
had exited 2 there.
- [x] **The ordinary case** (45083352291, at `d12e8cc6`; the start's
checks have not changed since): `predefined_types_vs_ifc` and
`spaces_by_globalid_vs_ifc`, outside the default set, the second with a
usage line of no `<...>`, named on RE1 Architecture. Both ran per model
and exited 0, the run is green, and it wrote no failure list. The script
runs under `set -uo pipefail` without `-e`, so a usage line with nothing
to count leaves the count at 0.
- [x] **`readers_across_saves` named** (45077236233): refused at the
start.
- [x] **`changed_bodies_vs_ifc` named** (45082810572): refused at the
start with "changed_bodies_vs_ifc is not run on one model's export and
Revit's: its usage takes three files or more: run it on the kept
exports". An earlier run, 45082544925, showed the first message telling
it to use `pair_scorer`, which takes two files, so each kind now gets
its own message.
- [ ] **A base-side failure failing no run** is checked by reading only:
the step reads `measure-head`'s lists alone, and no run at this head has
a failure on the base side.
- [x] **The usage rule over every scorer in `tools/re`:** 14 match it.
`areas_across_saves` and `bodies_across_saves` are listed steps and run
as before, and the other 12 are refused: each takes several exports, a
probe and two files, a samples folder or a VIM file. None of the 43
default per-model scorers matches.
- [x] actionlint, zizmor, shellcheck and `tools/ci/check-workflows.py`
pass.

## Audit-honesty checklist

- [x] The default set's behaviour is unchanged: the list is written
under the condition the annotation already had, so a run that names no
scorer and has no probe scorer writes none.
- [x] No changelog fragment: repository tooling.
- [x] No emojis, private paths or internal jargon.

## Legal and contribution hygiene

- [x] Apache-2.0.
- [x] No Autodesk proprietary content.
- [x] No fixtures.

## Breaking changes

A run whose named scorer or probe scorer exits non-zero on the head
side, for a crash or a finding, now fails, and a run that names a scorer
of several exports is refused at the start. Before, both were green.

Review: rvtReview, the maintainer session, wrote this change. As
rvtDevelop is not running, it re-reads the diff and approves the change
itself on a green head (Griffin, 2026-11-12).
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