Repository navigation
fix(ifc): exports hold every EXPRESS rule: swept solids, USERDEFINED types, material associations (#1430) - #1432
Merged
Merged
Conversation
…types, material associations (#1430) A fixed-reference sweep is written under AdvancedSweptSolid, a body of several solids takes the one RepresentationType IFC4 accepts for all its items, a USERDEFINED type object names itself in ElementType, and an IfcSpace is associated with no material. CI's IfcOpenShell job runs IfcOpenShell's EXPRESS rules check on every export it writes and fails on any finding; Measure keeps schema finding counts for the held-out models.
DrunkOnJava
marked this pull request as ready for review
November 5, 2026 08:33
…ociates with an IfcSpace (#1430) Griffin, 2026-11-05: valid IFC4 by default, Revit's behind the flag. The default export associates no material with an IfcSpace, which IFC4's IfcRelAssociatesMaterial.AllowedElements does not allow. With --revit-set-placement (the MCP server's revit_set_placement) the writer keeps the association Revit's own export writes, and the output breaks that rule as Revit's does. The two entry points are additive (write_step_with_space_materials, write_step_to_with_space_materials), so StepOptions and the public API are unchanged for existing callers.
DrunkOnJava
added a commit
that referenced
this pull request
Nov 5, 2026
…is on when its head has moved on (#1334) (#1433) ## Summary The semantic check wrote a verdict only when the measured commit was still a pull request's head. A head moves on after Measure starts: the MCP contract sync moves it within minutes on any PR that changes a tool description, and the docs commit that records a run's figures moves it again. So the check read NOT MEASURED on most of the PRs it exists for, which nobody would notice, since NOT MEASURED does not block. It now also takes the one open pull request that holds the commit. ## Motivation Found on real data right after #1419 landed: `commits/f3c87e48/pulls` returns #1432, open, with its head at `00bd7dd3`, which is `f3c87e48` plus the watcher's contract sync. The delta read of #1419 objected to a verdict landing on a live head that was not measured. This keeps that: the verdict stays on the measured commit, and only the lookup of whose commit it is changes. ## Changes - `tools/ci/jev_check.py`: `pull_of_commit`, a pure function split out of `find_pull_request`. An open same-repository PR comes first: the one whose head it is, or else the only one holding it. Several holding it: NOT MEASURED. With none open, the closed one whose head or merge commit it is, so a run on a commit of main still finds the PR that landed it. A fork's PR is never taken and never makes the choice ambiguous, since anyone can open one holding any commit. The check's summary now names the PR and the head it had when scored, and says when that is not the measured commit and that the verdict says nothing about what changed after it. - `tools/ci/test_jev_check.py`: 12 failure-first tests of it (51 in all), run by the PII guard job. - `docs/maintaining.md` and the module's own text: what the lookup does. ## Testing `python3 tools/ci/test_jev_check.py`: 51 pass. A real scored run reads this path only on `main`, because the key is on `main` alone, so the first real proof comes after this lands: `gh workflow run semantic-check.yml --ref main -f run_id=<a complete Measure of a head that has moved>`, which I will run on #1432's run 42002548557 and report. Not measured: which PRs hold a shared commit in practice. Measure's head is normally a commit only one PR has; two open PRs holding it fail closed. ## Audit-honesty checklist - [x] No capability claim changes. The check stays advisory and not required (Griffin, 2026-11-04). - [x] No changelog fragment needed beyond #1334's, unreleased: this corrects it before any release. - [x] No emojis, private paths or personal addresses in committed files. ## Legal and contribution hygiene - [x] Apache-2.0. No Autodesk proprietary source, decompiled internals or NDA content. ## Breaking changes None. ## Related issues Refs #1334, #1427.
…als, a mix of solids holds the closed-operand rule, and the rules gate cannot be hidden (#1430) Second-read fixes to #1430: - A tessellated item in a union of solids is written as the faceted brep of its triangles: IFC4 takes a tessellated boolean operand only where it is closed, and the face set records Closed as $. Checked with IfcOpenShell on hand-written STEP files. No current producer builds such a union. - The elements CSV and the viewer's info panel, schedule and material highlight list no material for an IfcSpace, as the default IFC associates none; the glTF colours are a drawing choice and stay. - A USERDEFINED occurrence with no ObjectType is written without a PredefinedType, and an unnamed USERDEFINED type states an empty ElementType; neither occurs on a measured model. - ifc_validate_summary.py takes a message holding a % as written, so that a finding on an instance named with one no longer ends the check. - CI's rules gate runs after the witness steps, whatever they did, and also reads the two witness exports. - The holdout scrub stops at the property sets and says "not read" where a rules check left no count. - The option and the docs say that the space material half of --revit-set-placement is the writer's entry point.
…rial the elements CSV lists (#1430) A probe, not a unit test: it builds the model rvt-schedule builds and reads the CSV elements_csv writes on a real file, printing counts only: the spaces the model holds a material for, and the CSV's space rows and other rows that list one. The space rows must list none, as the default IFC associates none.
10 of 13 tasks
DrunkOnJava
added a commit
that referenced
this pull request
Nov 5, 2026
… lines (#421) (#1426) ## Summary Revit 2026 and 2027 projects now draw beams along their axes, stair runs and tread landings from their records, and floors, ceilings and slabs from their sketch lines, as 2024 and 2025 projects do. Five readers' release lists gain 2026 and 2027, and the Sketch curve list reader is read there too. It's a first slice of #1190, held to the same Autodesk samples saved by Revit 2024 and 2025. [Maintainer correction: the contributor's text said "sloped roofs as their planes" and "six readers"; sloped roofs are left out and the roof slope list is not widened, and a monolithic landing stays its box. See the maintainer sections below.] ## Motivation #1190 asks for each capability 2024 and 2025 have on every release from 2015 to 2027, "one capability on one release" at a time. On `main`, 2026 and 2027 already read the 2025 records (RE-124, RE-179): walls with their layers and joins, family boxes and saved meshes are the same as on 2025. Six readers were still limited to 2024 or 2025, so on 2026 and 2027 their elements were drawn as their record boxes. `exported.body_sources` on `main`: | body source | `rac_advanced` 2024 / 2025 / 2026 / 2027 | `rac_basic` 2025 / 2026 / 2027 | `rst_basic` 2024 / 2026 / 2027 | |---|---|---|---| | `partition_beam_axis` | 29 / 0 / 0 / 0 | | 345 / 0 / 0 | | `partition_beam_box_along_axis` | 8 / 0 / 0 / 0 | | 9 / 0 / 0 | | `partition_stair_run_sketch` | 5 / 10 / 0 / 0 | 2 / 0 / 0 | 1 / 0 / 0 | | `native_landing_tread` | 5 / 0 / 0 / 0 | | | | `partition_roof_slope` | 1 / 1 / 0 / 0 | | | ## Changes - `src/research/partition_beam_axes.rs`: `BEAM_AXIS_SUPPORTED_REVIT_VERSIONS` 2024 → 2024, 2026, 2027; `SKETCH_LINE_SUPPORTED_REVIT_VERSIONS` gains 2026, 2027. - `src/research/native_stairs.rs`: `NATIVE_RUN_REVIT_VERSIONS`, `NATIVE_RUN_SHAPE_REVIT_VERSIONS` gain 2026, 2027; `NATIVE_LANDING_REVIT_VERSIONS` 2024 → 2024, 2026, 2027. - `src/research/partition_roof_slopes.rs`: `ROOF_SLOPE_SUPPORTED_REVIT_VERSIONS` gained 2026, 2027 on the first head; it is 2024, 2025 again (maintainer). - `src/research/partition_schema_mvp/walls.rs`: a wall's profile openings (RE-151) checked the beam reader's list, so they now have their own, `WALL_PROFILE_OPENING_REVIT_VERSIONS` = 2024, the release they're measured on. - `tools/re/save_pair_bodies.py` (new): two rvt-rs exports of the same project, element for element by `Tag`, world box (3 mm) and volume (0.1%). - `reports/element-framing/RE-341-2026-2027-beams-stairs-roofs.md`, an addendum to `docs/format-reconnaissance.md`, `docs/status.md`, `docs/supported-profile.md`, `changelog.d/added/1190-2026-2027-beams-stairs-roofs.md`. 2025 isn't widened. Its beams and landings would change as well, and no Revit 2025 export that holds them can be published here. ## Testing Unit tests are banned in this repository: do not add them. Show the change working end to end on real files instead. - [x] `tools/check-local.sh` passes (fmt, clippy, rustdoc, build, real-file / CLI / contract checks) - `tools/check-local.sh --corpus` on the branch head, on `main` 77d71cb: passes (300 integration tests, 15 MCP). - [ ] 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 - **Not against Revit's own export:** Measured instead against the same Autodesk samples saved by 2024 and 2025, whose exports are measured against Revit's (RE-50, RE-56, #357, #824). The files are the pinned samples in `research/autodesk-sample-projects.tsv` (fetched, never stored). - Bodies these readers now draw: - `rst_basic` 2026 and 2027: 355 of 355 are the 2024 save's (345 beams by their axis, 9 along it, 1 stair run). - `rac_advanced` 2026 and 2027: 43 of 43 are the 2024 save's (37 beams, 5 tread landings, the sloped roof); 10 of 10 stair runs are the 2025 save's. [Maintainer: the sloped roof is no longer drawn on 2026 and 2027, so 42 of 42; the contributor's local figures are not re-run, and run 42016210686's check reads 42 beams and tread landings and 10 stair runs equal.] - `rac_basic` 2026 and 2027: 2 of 2 stair runs are the 2025 save's. - Every body in the file, differing from the reference save, `main` → this branch: - `rst_basic` 2026 and 2027 against 2024: 35 → 1 of 453 (the one left is a column, as on `main`). - `rac_advanced` 2026 and 2027 against 2025: 64 → 63 of 5,527. 10 stair runs become 2025's. 9 stop being 2025's and become 2024's: 2 beams and 5 landings that 2025 still draws as boxes, and a ceiling and a floor the sketch lines now draw as on 2024. - `rac_basic` 2026 and 2027 against 2025: 27 → 23 of 438. - Byte identity: of 107 local files, 101 export IFC and diagnostics byte for byte as on `main` (`SOURCE_DATE_EPOCH=1700000000`). That covers every 2015 to 2025 file: Autodesk's samples, Core Interior, the RE1 models, Einhoven, the BIM4LCA office and terrain housing, and puzzbobb's R2025 models. The 6 that change are the 2026 and 2027 saves of `rac_advanced`, `rac_basic` and `rst_basic`. - [x] If this touches the IFC exporter: the witness verdicts replay (see CONTRIBUTING.md) or the changed observations are refreshed in this PR - Core Interior (2024) exports byte for byte as on `main`, so its observations are unchanged. - [ ] If this is a performance change: reran `tools/bench.sh` and attached the before / after - N/A. ``` tools/fetch-autodesk-samples.sh samples 2024 2027 for f in samples/*.rvt; do rvt-ifc "$f" -o "${f%.rvt}.ifc"; done python3 tools/re/save_pair_bodies.py samples/2027-rstbasicsampleproject.ifc samples/2024-rstbasicsampleproject.ifc python3 tools/re/save_pair_bodies.py samples/2026-racadvancedsampleproject.ifc samples/2024-racadvancedsampleproject.ifc \ --sources partition_beam_axis,partition_beam_box_along_axis,native_landing_tread,partition_roof_slope ``` ## Audit-honesty checklist - [x] README / docs reflect the current state after this PR — no claims of features that are not actually shipped in this PR - [x] A user-visible change has its entry as a fragment under `changelog.d/<section>/` (see `changelog.d/README.md`), not in `CHANGELOG.md` - [x] If a limitation was resolved, the "Known limitations" / "What works today" section in the relevant docs is updated - `docs/supported-profile.md` (the 2026 row; 2027 is "as on 2026") and `docs/status.md`. - [x] If a new limitation was introduced, it is documented in the PR body and in-code - None new. 2025's beams and landings, and a wall's profile openings beyond 2024, are noted in the constants' docs and RE-341 §5. - [x] Commit messages describe WHAT changed and WHY, not "fix things" or "updates" - [x] No emojis in code, docs, or commit messages - [x] No private paths, personal email addresses, or internal jargon in committed files - [ ] If this is a reverse-engineering finding: a reproducible probe under `probes/examples/` and a dated addendum to `docs/format-reconnaissance.md` are included - The addendum is included. No new byte layout is decoded (the records are RE-124's and RE-179's), so there is no probe. `tools/re/save_pair_bodies.py` reproduces the measurement. ## 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`) - [x] Any new test fixtures use synthetic values (`testuser`, `111111`, `FY-20XX`, etc.) and contain no real-world PII - No fixtures. ## Breaking changes None. Only release lists change; their public constants keep their names and types. ## Screenshots or output samples `tools/re/save_pair_bodies.py` on 2027 `rst_basic` against 2024, `main` then this branch: ``` main: same 418, differ 35, not in the reference 0 IfcBeam: same 338, differ 32, not in the reference 0 IfcColumn: same 29, differ 1, not in the reference 0 IfcFooting: same 36, differ 0, not in the reference 0 IfcMember: same 2, differ 0, not in the reference 0 IfcSlab: same 4, differ 1, not in the reference 0 IfcStairFlight: same 0, differ 1, not in the reference 0 IfcWall: same 9, differ 0, not in the reference 0 this branch: same 452, differ 1, not in the reference 0 IfcBeam: same 370, differ 0, not in the reference 0 IfcColumn: same 29, differ 1, not in the reference 0 IfcFooting: same 36, differ 0, not in the reference 0 IfcMember: same 2, differ 0, not in the reference 0 IfcSlab: same 5, differ 0, not in the reference 0 IfcStairFlight: same 1, differ 0, not in the reference 0 IfcWall: same 9, differ 0, not in the reference 0 ``` ## Related issues Refs #1190, #421 --- Maintainer note: main was merged in, and the report renumbered from RE-340 to RE-341, since RE-340 on `main` is #1401's report. No reader changed. --- ## Maintainer changes (2026-11-05) The contributor's text above is kept as written. Where it is out of date it is corrected here. Six signed commits sit on top of the PR's earlier two (the contributor's 20bc9f2, untouched, and the earlier merge of `main`): a merge of `main` (5f52be1), the code (d50d53b), `tools/re/save_pair_bodies.py` (8e2a9e4), the docs (14952a4, f903515) and a clippy range fix (f149e22). **The title still says "and sloped roofs"; sloped roofs are no longer in this PR.** It cannot be edited from the branch; retitle at the squash, for example "feat(ifc): Revit 2026 and 2027 beams, stair runs, landings and sketch lines". **Sloped roofs are left out.** `ROOF_SLOPE_SUPPORTED_REVIT_VERSIONS` is 2024 and 2025 again, so the Summary's "sloped roofs as their planes" and the Changes line for `partition_roof_slopes.rs` above no longer apply. - The source comment said `rac_advanced`'s roof is its 2025 save's; RE-341 section 3 had it right: it is its 2024 save's body (532 triangles, 5.33 m3), and the 2025 save's is 12 triangles and 6.88 m3. No Revit export scores either. - On 2026 and 2027 an edge takes the 2024 reading of its slope, and the fascia, rafter cut and several-arrow readers are 2025 only, so a roof whose eave cut cannot be told would be drawn as a plain sloped slab. - The held-out digest has no roof-body scorer line: the third held-out model's roof left the record-box set on the first head with nothing scoring what replaced it. **A Sketch's curve list (RE-97) is read on 2026 and 2027.** The beam and sketch-line lists gate the readers floors, ceilings, slabs, footprint roofs and shaft voids use, so those change on 2026 and 2027 too (named in the docs and the changelog fragment now); but the list reader stayed `2024 | 2025`, so the guard for an edited sketch could not fire there. A list is taken only where it validates (RE-97). **What the PR changes on 2026 and 2027:** beams along their axes, stair runs and landings, the stair property sets and quantities (read from native records), and the floors, ceilings, slabs, footprint roofs and shaft voids drawn from sketch lines. Unread there: sloped roofs, spiral runs, stair names, railing heights and lengths, a wall's profile openings, IFC export overrides, the opening index. **Measured (Measure run 41988011289, head 1d5bbf0, base `main` 182ed21; counts only for held-out models).** The Testing section above says no Revit 2026 or 2027 export is available; five are held out in Measure. - Of 111 exports, 102 are byte for byte `main`'s and 9 differ, all 2026 or 2027: the six Autodesk samples and three held-out models. - Held-out 2026 and 2027: one stair flight each leaves the record-box set; property values equal Revit's go 209 to 224 of 352 (2026) and of 354 (2027), quantities 21 to 23 of 322 and 17 to 19 of 367; different and values Revit does not write unchanged. - The held-out 2026 and 2027 office models are identical, so no beam or landing is scored against a Revit export. - MCP consistency: 0 differ on every line of the three held-out models that moved. IFC rule findings on the 2026 and 2027 samples are the sloped-beam ones the 2024 saves have (#1432). **Not yet measured: the current head** (roofs left out, Sketch lists on 2026 and 2027, the script's counts). Measure run 42004827803 is on f903515; a later commit (f149e22) only rewrites an OR pattern of releases as a range for clippy, so it measures the same behaviour, but the figures above are not carried to it until it is read. The section 3 figures (355 of 355, 43 of 43, 10 of 10, 2 of 2) are the contributor's local pairs; the script dropped unmeshed shapes and repeated Tags silently, so they cannot say how many bodies were never paired, and it now counts those and exits 1. --- ## Maintainer changes, round two (2026-11-05): roofs, and a check against the earlier save Head e56d31b (signed) is f149e22 plus four commits: roofs held to the record-box solve (8f10a03), the check (85c7f01), docs (a57f4f5), a style fix (e56d31b). **Measure run 42010304828** measures this head: filtered (samples on, held-out models only), dispatched from branch `fix/1426-bodies-across-saves`, because the scorers and the workflow step come from the dispatch ref. **Not read yet**; nothing below is a result of that run. **The held-out house's roof is a guess, so roofs stay out of the widened readers.** With the slope list reverted its `IfcRoof` still left the record-box list (run 42004827803, head f903515: `box bodies` 45 to 44). A roof whose slope is not read is drawn as its sketch outline at the record box's full height, a level block at the highest point, and Revit's roof volume there is 14.2% of its box, so it is very likely sloped. 2024 and 2025 ship that body for such roofs (RE-50, RE-98, #884's hips over a T or U footprint), with its slab quantities withheld unless the layers fill the body, and measured it as a plan outline against Revit's upward-face area, never as a volume. Nothing measures it on 2026 or 2027. So on 2026 and 2027 a roof takes neither the Sketch curve list nor the lines' exact ends and no shaft void is cut from it (`roof_reads_exact_sketches`): it is read as on `main`. Floors, ceilings and slabs keep the widened readers, with shaft voids cut from floors and ceilings. The roof's state on this head is not measured, and the check below does not reach held-out models. **The check.** `tools/re/bodies_across_saves.py` holds each 2026 and 2027 save of `rac_advanced`, `rac_basic` and `rst_basic` to the same project's earlier saves, matched by `Tag`: beams, landings and sketch outlines (floors, ceilings, slabs and roofs with a recovered outline, shaft voids included) to the **2024** save, stair runs to the **2025** save. The 2025 save draws no beam or landing (its body sources hold none: record boxes), so it cannot be their reference. The 2025 save reads runs from native records as 2026 and 2027 do and draws all 10 of `rac_advanced`'s and 2 of `rac_basic`'s runs; the 2024 save's byte-anchor reader draws 5 and 1. It fails on a difference in IFC class, GlobalId, storey, `BodySource`, representation types and solid kinds, placement (0.001 ft), body volume or vertices (0.001 ft, both ways); on an element with no counterpart, one the earlier save draws otherwise, one of the earlier save's missing here, a missing export, fewer bodies than the sample holds (29 axes, 8 along them, 5 landings and 10 runs on `rac_advanced`; 345, 9 and 1 on `rst_basic`; 2 runs on `rac_basic`), the ceiling 147534 or floor 139803 not compared equal, and a check that compared nothing. It prints the number compared per class and the number left as boxes (counted, not scored). Measure's sample shard keeps the 2024 to 2027 exports of the three projects until it has run, and `tools/ci/check-bodies-across-saves.sh` fails the head side's shard (after the results upload) on any failure or any sample whose file was not written. The base side is not gated: its `bodies_across_saves.txt` shows what the check says of `main`. **It cannot catch** an error the earlier save shares with the 2026 or 2027 read. `RepresentationType` is compared as written: both saves come from the same build, so #1432's change to it does not show. The fragment, status, evidence, support matrix and RE-341 say all of this. **Proof it can fail.** Not on Autodesk's files yet: that is run 42010304828. On synthetic IFC pairs made with IfcOpenShell (not committed), the identical pair passes, and each of these exits 1: a candidate beam 1 mm deeper (volume), a beam moved one metre (placement and vertices), a different `BodySource`, a slab left out of the candidate (missing element), a missing 2025 save. On `main` the 2026 and 2027 saves draw no beam, so the base side's output should fail. **Differences.** If the check finds any on the real files, the reader narrows until it is never wrong and what it leaves out stays a box, counted; none is allowlisted. **Run 42004827803 figures** (head f903515, the main session's reading): 102 of 111 exports identical, 9 move (the six samples, the held-out house, the held-out 2026 and 2027 models); MCP 0 differ on 629 lines; rule findings `rac_advanced` 2 and `rst_basic` 14 each (the fixed-reference sweep, #1432); body sources base, head, 2024 save: `rac_advanced` beam axis 0, 29, 29, beams along 0, 8, 8, landings 0, 5, 5, runs 0, 10, 5, record boxes 5,205, 5,153, 5,157; `rst_basic` 0, 345, 345 and 0, 9, 9, run 0, 1, 1, record boxes 428, 73, 73; `rac_basic` runs 0, 2, 1, landing slab 0, 0, 1, record boxes 330, 328, 328. The slab and ceiling body source counts do not move on `rac_advanced` and equal the 2024 save's: a count match, not per element. --- ## Maintainer changes, round three (2026-11-05): the check's first results **Run 42010304828** (head e56d31b, filtered; the head side's check turned it red). Held to the same project's 2024 save (beams, landings, sketch outlines) and 2025 save (stair runs), every compared body equal in every field: - `rst_basic` 2026 and 2027, PASS: 354 `IfcBeam`, 1 stair run, 5 `IfcSlab` outlines. - `rac_basic` 2026 and 2027, PASS: 2 stair runs, 12 outlines (2 `IfcCovering`, 10 `IfcSlab`). Left as boxes where the 2024 save draws them: 1 `IfcSlab` (a landing slab) and 1 `IfcRoof`. - `rac_advanced` 2026 and 2027, FAIL, one failure each: ceiling 147534 was required as a compared outline and was not compared. Everything else was equal: 42 beams and landings (37 `IfcBeam`, 5 `IfcSlab`), 10 stair runs, 82 outlines (64 `IfcCovering`, 1 `IfcRoof`, 17 `IfcSlab`), floor 139803 among them. Left as boxes: 4 `IfcRoof`. - On the base side (`main`) the check fails as it should: 42 beams and landings and 10 runs left as boxes, floor 139803 differs in volume (440.512245 m3 against the 2024 save's 441.111228), and 147534 is drawn as an outline where the 2024 save draws its record box. **The ceiling 147534** is a record box in the 2024 save. At base the 2026 save drew an outline. On the head it is neither compared as an outline nor left out, so the Sketch curve list now holds it to the record box as 2024 does (inferred from the counts). The check now compares it under whatever source each save gives it and prints class, `BodySource`, `ProfileResolved` and volume in every save, so the next run states it. Nothing was removed from the required list or allowlisted. **The held-out house's roof** is back in the box list: its export is byte for byte `main`'s in that run. **rac_advanced's one compared `IfcRoof` and 4 left as boxes** are the same on both sides, so roofs are on `main`'s reader. **Head fec4833** is e56d31b plus the named-element check, these counts in the docs, a signed merge of `main` (with #1432 and #1431) and a signed merge of puzzbobb's own merge of `main`. **Final unfiltered Measure run 42016210686** (`base=main`, nordic, R2025, held-out, samples) is on it, dispatched from `fix/1426-bodies-across-saves` (the same head): it should read `rules:` findings 0 on the 2026 and 2027 samples now that #1432 is in. Not read yet; the docs carry run 42010304828's counts. --- ## Maintainer changes, round four (2026-11-05): the second read **Run 42016210686** (head fec4833, unfiltered; the main session's reading and mine of its artifacts): 103 of 111 exports identical, 8 move (the six 2026 and 2027 samples and the held-out 2026 and 2027 models); the EXPRESS `rules:` findings are 0 on 90 models and on 18 held-out ones (#1432 cleared them); MCP 0 differ on 629 lines; the check reads PASS on all six samples. Ceiling 147534: 2024 record box 5.14728698 m3, 2026 record box 5.14728698 m3, 2025 outline 4.15431293 m3. The semantic merge check reads NOT MEASURED on this commit because a fork's pull request is never scored there, which is by design. **Head d3635bb** (final unfiltered Measure: run 42023546789, not read yet): - **Only tread landings are drawn on 2026 and 2027.** A monolithic landing's outline lines go through `scan_landing_lines` and `scan_run_data`, which read 2024 only, so it stays its box: `rac_advanced`'s 5 landings are `native_landing_tread`, `rac_basic`'s one landing slab is a box. The matrix name, `user_impact` and notes, README, status, evidence, compatibility, supported-profile, the changelog fragment and RE-341 say so. - **The check is a job of its own** (`bodies-across-saves`, reading the head results), so a failure turns the run red and Compare still reports. A sample without its 2024 or 2025 save is SKIPPED, one with only some PARTIAL, and neither is a pass: each prints a notice and a line in the run summary, as does a run without `samples=true`, a `scorers` input that excludes it, or `sample_years` with no 2026 or 2027 sample. `sample_years="2026 2027"` no longer fails falsely. An unknown project fails. `docs/maintaining.md` says a change to a reader of Revit 2024 to 2027 is measured with `samples=true`. - **Outlines are compared with both earlier saves** (the 2025 one without scoring), and floor 139803 is printed in every save with its volume and vertex count. **Resolved in round five:** the floor is 441.111228 m3 with 170 vertices on the 2024, 2026 and 2027 saves and 440.512245 m3 with 24 on the 2025 save, which draws its arcs as chords because the arc readers (RE-96, RE-100) are not enabled on 2025; the 2024 reading is the one measured against Revit. It stays an outline. Enabling the arc readers on 2025 is #1440. - **Public docs say a sloped roof on 2026 and 2027 can still be a level block** (the record-box solve, as on `main`), that the check compares bodies and not quantities or property sets, that it cannot catch an error the earlier save shares, and that no 2026 or 2027 held-out model holds an `IfcBeam`, so the beam reader has run only on two Autodesk samples saved from earlier releases. - The fragment and report are renamed `...-beams-stairs-sketches`. --- ## Maintainer changes, round five (2026-11-05): #1428 merged, and the floor **Run 42023546789** (head d3635bb, unfiltered; the main session's reading): 103 of 111 exports identical, 8 move (the six 2026 and 2027 samples and two held-out models), `rules:` findings 0 on 90 models and 18 held-out, all six checks PASS, Compare green. **The floor is resolved, not open:** floor 139803 has 170 vertices and 441.111228 m3 on the 2024, 2026 and 2027 saves and 24 vertices and 440.512245 m3 on the 2025 save, so the 2025 save draws its arcs as chords (the arc readers RE-96 and RE-100 are not enabled there) and the 2024 reading is the one measured against Revit. Sketch outlines against the 2025 save: 81 equal, 1 differs (this floor), 0 drawn otherwise. Ceiling 147534 is a record box on 2024, 2026 and 2027 (5.147 m3) and an outline on 2025 (4.154 m3), because 2025 has no Sketch curve list reader. #1440 is the 2025 arc readers. **Head c8fb8d1** is d3635bb plus a signed merge of `main` (8f1c136, #1428 and #1432 and #1431 among it) and one commit. Two conflicts, both resolved by keeping both: `tools/ci/measure-reference-models.sh` (my bodies check and #1428's `areas_across_saves` side by side; the Areas call runs right after the exports and before any sample's IFC is deleted, so the saves my check keeps change nothing for it) and `docs/format-reconnaissance.md` (the RE-333 and RE-341 addenda). **A red Areas gate skipped Compare.** #1428's gate was a step of the measure job, so a failure there removed Compare's report, as my first bodies check did before round four. Both gates are now steps of one job, `same-project-gates` (`tools/ci/check-bodies-across-saves.sh` and `tools/ci/check-areas-across-saves.sh`, the Areas step moved with its logic unchanged: an `exit 0` and the scorer's own `passed: 25 Areas, 25 with a body, on each of 4 saves` line), each running whatever the other did, reading the head shards one directory each (two shards write an `areas_across_saves.txt`). Compare does not need that job, so a red gate leaves its report. Each gate keeps its own notice on a skip, and the job still needs `samples=true`. Tested with fake results: pass, skipped shard beside a passed one, fail, no result, no samples. **Final unfiltered Measure: run 42027058162** on c8fb8d1 (`base=main`, nordic, R2025, held-out, samples), the first run with both gates and the merged `rac_advanced` Areas. Expected: the same 8 exports against the new `main`, all six bodies checks PASS, the Areas gate passing. Not read yet; the docs carry run 42023546789's counts, labelled as that head. --- **Final unfiltered Measure on the merged head, run 42027058162 (c8fb8d1), read by the maintainer:** 103 of 111 exports are identical to main; 8 move, the six 2026 and 2027 samples of `rac_advanced`, `rac_basic` and `rst_basic` and 2 held-out models. `rules:` findings 0 on 90 models and 18 held-out, MCP 0 differ on 629 lines. The new `Same-project gates` job passes: all six bodies checks read PASS and the Areas gate passes with 25 Areas and 25 bodies on each of 4 saves. Compare is green. The semantic check reads NOT MEASURED because a fork's pull request is never scored, by design. Refs #1190, #421 --------- Co-authored-by: Griffin Long <[email protected]>
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
Brings the EXPRESS WHERE-rule findings Measure reports (#1106) to zero in the default export by fixing the three kinds of finding at the writer, keeps Revit's way of breaking one of them behind
rvt-ifc --revit-set-placement, makes everything that lists a material follow the default export, and adds a CI gate so a finding cannot come back on a model CI holds.Motivation
#1430. IfcOpenShell's default validation finds none of these, which is why no gate caught them. Findings on main, from Measure run 41988011289 (
rules:section of each model'sschema.txt):IfcShapeRepresentation.CorrectItemsForTyperst_basic2024 (14),rac_advanced2024 (2), Snowdon structural 2024 (10); #1426 carries it to 2026 and 2027IfcFixedReferenceSweptAreaSolid(the sloped beam's body) underSweptSolidCorrectPredefinedTypeonIfcAirTerminalType,IfcElectricApplianceType,IfcSpaceTypePredefinedTypeUSERDEFINEDwith noElementTypeIfcRelAssociatesMaterial.AllowedElementsIfcSpace(theTurning Free Spaceinstances: 42 on each office file, 2 on each terrain file)Decision (Griffin, 2026-11-05, through the question tool: "Valid IFC4, Revit's behind flag")
Revit's own office export breaks the second and third rules the same way. Measured with this check (IfcOpenShell 0.9.0.post1) on the BIM4LCA As-Built Revit IFC: 1,194 findings, among them
IfcAirTerminalType,IfcElectricApplianceType,IfcFurnitureTypeandIfcBuildingElementProxyTypewithUSERDEFINEDandElementType$, and on the terrain-concrete Revit IFC a material associated with 2IfcSpaceand 1IfcSpaceType. So the default export is valid IFC4, and Revit's behaviour is behind the flag, the same split as the property sets (RE-235):USERDEFINEDtype object writes its own name asElementType(kept either way, per the decision) and anIfcSpacehas no material association.rvt-ifc --revit-set-placement(and the MCP server'srevit_set_placement) keeps the material association Revit's export writes on anIfcSpace. That output breaksIfcRelAssociatesMaterial.AllowedElements, as Revit's own export does (42 spaces on each office file, 2 on each terrain file); the CLI help,docs/supported-profile.md,docs/status.md,docs/validation-evidence.md,docs/evidence.mdand the fragment say so. The CI gate and Measure'srules:section read the default output.PredefinedTypestaysUSERDEFINED(type GlobalIds hash it);ElementTypeis a value Revit's export leaves$.AdvancedSweptSolid. Revit draws a beam as anIfcExtrudedAreaSolidunderSweptSolid(checked on the 8 beams of one held-out model: counts only); redrawing it is a geometry change left out of this PR.Changes
First commits (c4b6e86, dab7621):
src/ifc/step_writer.rs:SolidShape::SweptPathunderAdvancedSweptSolid; a body of several solids takes the oneRepresentationTypeIFC4 takes for all its items (shared_representation_type); aUSERDEFINEDtype object writes its name inElementType;IfcSpacematerial associations are left out bywrite_step_with_optionsandwrite_step_toand kept by the newwrite_step_with_space_materialsandwrite_step_to_with_space_materials(additive entry points:StepOptionsis unchanged, so no struct literal and no semver surface breaks).src/bin/rvt_ifc.rs,rvt-mcp/src/exports.rs:--revit-set-placement/revit_set_placementpick the entry point.rvt-mcp/src/args.rschanges that option's description in the MCP contract, which the watcher's commit 00bd7dd carries intodocs/mcp-tools.jsonand.md.tools/ci/ifc_validate_summary.py --gate FILE...; the CI step;tools/ci/scrub-holdout-results.shkeepsschema validate:/schema rules:counts for held-out models.This push answers the second read:
IfcBooleanResult.FirstOperandClosedandSecondOperandClosed(the face set recordsClosedas$). It is now written as the faceted brep of the same triangles (emit_solid_shape'soperand; the top-level mix decides this fromsolid_kindbefore writing, the nested compound and the explicitBooleanResultoperands always). Checked with IfcOpenShell on hand-written STEP files: the union with the face set as the second operand, and as the first, finds one finding each; the same union with the face set marked closed, or written as the faceted brep (either position), finds none; extruded and tessellated items underCSGfindCorrectItemsForType, underSurfaceOrSolidModelnone. No current producer builds such a union, so no current output changes.step_writer::associates_materialis the one decision; the writer, the elements CSV (schedule_csv, sorvt-schedule, Python'sschedule_csv()and the viewer's download), the viewer's info panel, schedule and material count (scene_graph) and the viewer's material highlight (main.ts) list no material for anIfcSpace. There is no CSV under--revit-set-placement:rvt-ifcwrites none andrvt-schedulehas no such flag, so no schedule keeps a space's material. Left alone: the glTF colours (gltf.rs), because a colour on a space's mesh is a drawing choice and not an association; the MCP server andrvt-pylist no material of their own.ExportOptions::revit_set_placementnow says it places properties only, that the space material half is the writer's two entry points, that library, Python and wasm callers ofwrite_stepget the default, and why the two are not one setting: a setting both read would be a field ofStepOptions(a struct callers construct by literal, so a new field is a semver break) or of the model, which would also take the material from the glTF and the viewer.docs/evidence.md(the--revit-set-placementrow),docs/support-matrix.json(ifc-type-objectsandifc-material-layer-setsnotes; there is no capability of the flag itself), the fragment and this body now state the rule-breaking behaviour and the measured flag-on result; the stale comment at the representation maps (SweptSolid / CSG / Brep) is fixed.%in a message.json_logger.logdoesmessage % args, so a finding on an instance whose string holds a%raised and ended the check.literal_loggertakes a message without arguments as written. Reproduced on a hand-written file (anIfcSpaceTypenamed50 % Space %d %sand a second violating type): the old logger raisedTypeErrorafter 1 finding;--gatereports both and exits 1;--both(Measure's path) writes both findings to its rules file.if: ${{ !cancelled() }}, so a gate failure never skips the observation export a REPLAY_DRIFT fix needs; it also gates the two witness exports. It fails on a file an earlier failed step did not write, which is red already. The gate exits 1 on Revit's terrain export (52 findings) and, with all three kinds, on a hand-written file (CorrectItemsForType,CorrectPredefinedType,AllowedElements, plusWR11andWR41the stub file adds). The three kinds occur on none of Core Interior, Einhoven and the four RE1 projects, which read 0 onmain(run 41994889680 base side), so the gate would have passed those onmain; the tier-1 and synthetic exports were not checked onmain. The gate is a tripwire for the next regression, not proof that CI's own files had the old findings.USERDEFINED. An occurrence with.USERDEFINED.and noObjectTyperead is written without aPredefinedType(the writer invents no value); an unnamedUSERDEFINEDtype states an emptyElementType. Neither occurs on a measured model (the rules check reads 0 on all 90 models whose export it checks), so no measured byte should move; Measure below checks that.property sets:, and printsschema rules: not readwhen therules:section has nofindingsline (a timed-out check), andschema validate: not read/schema rules: not readforunreadable:. Run against hostileschema.txtinputs (names and ids in finding messages, fakefindings 0lines, a rules section cut off, an unreadable file, a validation skipped for size): only counts andEntity Entity.Rulenames leave, in 7 of 7 cases.probes/examples/probe_1430_space_materials.rs: counts the model's spaces with a material and the CSV's space rows that list one (expected 0), and the other rows that list one.Testing
Unit tests are banned: nothing added.
cargo fmt --all -- --check,python3 -m py_compile,actionlintandtools/release/changelog.py checkpass locally; nothing was compiled or run locally (CI and Measure are the build).Measured:
base=main,nordic,r2025,holdout,samples):rules:readsfindings 0on the 90 models whose export it checks; the 18 held-out models reportschema rules: findings 0as counts; 3 samples over the 30 MB the schema step reads are not measured, as before.rac_advanced,rst_basicand Snowdon structural); 0 rule findings on every model checked; the held-out counts at 0 on all 18; the MCP server's answers equal on 1,258 lines. CI's gate printedfindings 0on 13 files in 48 s on the CI run at f3c87e4.ifc_flags=--revit-set-placement, the two office files,base=main,schema,psets_vs_ifc,element_materials_vs_ifc): the rules check readsfindings 1on each office file at the head (IfcRelAssociatesMaterial.AllowedElements, 42 spaces in its message) andfindings 4atmain; the property set and material outputs are the same at both. This is the one flag-on export whoserules:section reads non-zero, and it is expected.ifc.sha256,element_materials_vs_ifcand every other output apart fromschema.txtandifc.sha256are the same at the two sides of run 41994889680 (diagnostics, timings, logs and MCP dump apart).Pending, on the head of this push (f5895a9): Measure run 42010709009, filtered,
base=main,nordic,sampleswithsample_years="2024 2024",models="nordic-office-* core-interior re1-architecture",scorers=schema,probe=probe_1430_space_materials.modelsdoes not reach the samples, so the run has all 10 of the 2024 samples (the 3 that moved and 7 that did not; 3 of them skip the schema step for size and are still hashed), the four office files, Core Interior and RE1 Architecture. Itsifc.sha256should equal run 42002548557's head side on all of them (the 7 that moved at their moved bytes, the rest unchanged), which is what confirms the union,USERDEFINEDoccurrence and consumer changes move no export byte; for theUSERDEFINEDoccurrence rule that means this: the 42Turning Free Spacespaces keep.USERDEFINED.because theirObjectTypeisFamily:Type(the tagged-space scorer readsObjectTypeequal on all 44), so only an occurrence with noObjectTypeloses itsPredefinedType, and the rules check reads 0 on every model where one would have shown. The probe prints, per model, the spaces the model holds a material for and the CSV's space rows that list one (expected 0);mainhas no such probe, so the base side skips it and shows no before count. Not measured at all: the elements CSV in the viewer's download; the viewer's panels and highlight (no browser run); the gate on the head of this push (it now reads 15 files, the 13 of the earlier shape and the two witness exports, so the 48 s above is for the old step shape); the 2026 and 2027 sample exports that #1426 will give their findings; and that the Rust and TypeScript of this push compile, which only CI says.Final unfiltered Measure on this head, run 42010834977 (f5895a9,
base=main,nordic,r2025,holdout,samples), read by the maintainer: 104 of 111 exports are identical to main. The 7 that move are the four office files and the 2024rac_advanced,rst_basicand Snowdon structural. The scorer diff isschema.txton those 7 only. Therules:section readsfindings 0on all 90 models it checks and on all 18 held-out models (counts). MCP consistency: 0 differ on 629 lines. The semantic check on this commit readspass: no semantic difference in 34 models. It compares sampled dumps, and the space materials this PR removes are not in them, so that pass says nothing about those materials: the rules check and the file comparison do. Not measured: the 3 samples over the schema step's 30 MB cap, as before, and the viewer's panels in a browser.Audit-honesty checklist
changelog.d/fixed/1430-express-rules.md, with the figures read from the runs above and what is not measured.--revit-set-placementwrites it into the IFC and then breaksAllowedElements.Breaking changes
None. Two public functions are added to
ifc::step_writer. The IFC text moves in three places only:RepresentationTypeof a sloped beam's body,ElementTypeofUSERDEFINEDtype objects, and the material associations onIfcSpace(default output). The elements CSV'smaterialcell is empty onIFCSPACErows.Related issues
Refs #1430