Skip to content

ci(measure): score the BIM4LCA office against Revit's exports, and every model's element sets per class (#763) - #790

Merged
DrunkOnJava merged 2 commits into
mainfrom
ci/measure-nordic-office
Oct 18, 2026
Merged

DrunkOnJava merged 2 commits into
mainfrom
ci/measure-nordic-office

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Oct 18, 2026 •

Copy link
Copy Markdown
Owner

Summary

Measure can score the BIM4LCA office against Revit's own exports (-f nordic=true), and a new scorer compares every model's element sets with Revit's, per IFC class (#763).

Motivation

#763: on the BIM4LCA concrete office as built, rvt-rs writes 31 of Revit's 63 slabs and 234 of its 308 spaces. Closing it starts with knowing which ElementIds are missing, on that file and on its building-permit sibling. Measure read neither model, and no scorer listed missing elements by id.

Changes

  • research/bim4lca-measure.tsv: pins the four entries of VTT's ARCH.zip (CC BY-SA 4.0) that Measure reads, the office as built and at building permit and Revit's IFC export of each, 309 MB. The format is the same as research/bim4lca-models.tsv, read by the same tools/ci/fetch-bim4lca.py.
  • .github/workflows/measure.yml:
    • a nordic input, which fetches those files into models by byte range;
    • an unreachable host is NOT MEASURED, and a stale pin fails the run.
  • tools/ci/measure-reference-models.sh:
    • the two office models in the model list, skipped with a skipping <name>: <rvt> absent line when not fetched, so runs without nordic are unchanged;
    • the new scorer first in IFC_SCORERS, so its output lands early.
  • tools/re/class_sets_vs_ifc.py: pairs elements by Tag and spaces by GlobalId, leaving out openings and virtual elements. For every class of Revit's export it counts the elements rvt-rs writes as the same class, as another class (named) or not at all, then the extra ones per class. It lists up to 200 missing and extra ids per class, with Name, ObjectType and storey. The output is sorted, so Measure compares head and base byte for byte. The IfcOpenShell file objects stay bound for as long as their instances are used (IfcOpenShell 0.9: Measure's scorers lose their file and cannot mesh walls #773).
  • Docs: docs/reference-models.md and a Research entry in CHANGELOG.md.

Testing

  • Measure's pull_request run (39149364530) measured this branch against main without nordic. Head, base and compare all passed.
    • The head job logs skipping nordic-office-as-built: ARK_NordicLCA_Office_Concrete_As-Built.rvt absent, and the same for the permit model.
    • The new scorer pairs all 970 of Core Interior's elements and spaces with Revit's, each class the same, none missing and none extra.
    • On RE1 it reports the IFC2X3-era classes of Revit's export, such as IfcFlowTerminal and IfcFurnishingElement, under "other": rvt-rs writes the IFC4 subtypes, as it should.
  • Bugbot's thread: openings were left out only by exact class. Fixed in baaf79f, which leaves out every subtype and counts repeated Tags.
  • gh workflow run measure.yml --ref ci/measure-nordic-office -f ref=main -f base=none -f nordic=true (39149337564) measures main on the office models. Its slab, space and wall sets go to Nordic LCA office: Revit's export has 44 family instances as IfcSpace (their own Export to IFC As) that rvt-rs writes as proxies #763.

Breaking changes

None.

…ery model's element sets per class (#763)

#763 needs the office's slab and space sets compared with Revit's by
ElementId, and Measure read neither the office nor such a list. With
`-f nordic=true` the Measure job reads the concrete office as built and at
building permit, with Revit's IFC export of each, by byte range
(research/bim4lca-measure.tsv), and scores them like the reference models;
a model whose .rvt is absent is skipped, so other runs are unchanged. The
new scorer tools/re/class_sets_vs_ifc.py, first in IFC_SCORERS, counts per
IFC class of Revit's export the elements rvt-rs writes as the same class,
as another class or not at all, paired by Tag and spaces by GlobalId, and
lists the missing and the extra ones with their name, type and storey,
sorted, so head and base compare byte for byte.
@DrunkOnJava DrunkOnJava added area:corpus Work in the corpus area. type:ci Continuous integration or automation work. labels Oct 18, 2026

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix prepared a fix for the issue found in the latest run.

  • ✅ Fixed: Opening subtypes kept in class sets
    • Replaced exact-type element.is_a() in LEFT_OUT with any(element.is_a(name) for name in LEFT_OUT) so IFC2X3 IfcOpeningStandardCase and other opening subtypes are excluded like sibling scorers.

Create PR

Or push these changes by commenting:

@cursor push c47e0433de
Preview (c47e0433de)
diff --git a/tools/re/class_sets_vs_ifc.py b/tools/re/class_sets_vs_ifc.py
--- a/tools/re/class_sets_vs_ifc.py
+++ b/tools/re/class_sets_vs_ifc.py
@@ -41,7 +41,7 @@
     """key -> (class, Name, ObjectType, storey), and the count of untagged elements."""
     out, untagged = {}, 0
     for element in model.by_type("IfcElement"):
-        if element.is_a() in LEFT_OUT:
+        if any(element.is_a(name) for name in LEFT_OUT):
             continue
         if not element.Tag:
             untagged += 1

You can send follow-ups to the cloud agent here.

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 454841d. Configure here.

Comment thread tools/re/class_sets_vs_ifc.py Resolved
…s repeated Tags (#763)

Openings were left out only when their class was exactly IfcOpeningElement, so a subtype such as IfcOpeningStandardCase stayed in and, repeating its door's or window's Tag, could replace that element in the map. The check is now inheritance-aware, and an element repeating a Tag already seen is counted and left out, the first one kept.
@DrunkOnJava
DrunkOnJava merged commit f09d307 into main Oct 18, 2026
30 checks passed
@DrunkOnJava
DrunkOnJava deleted the ci/measure-nordic-office branch October 18, 2026 17:35
@DrunkOnJava DrunkOnJava mentioned this pull request Oct 19, 2026
6 tasks done
DrunkOnJava added a commit that referenced this pull request Oct 19, 2026
## Summary

Prepare v0.6.0. Merging this is not the release: the release is the signed `v0.6.0` tag on the merged commit, after the maintainer's go-ahead. This stays a draft until then.

## Motivation

Since 0.5.1, `main` has:

- **IFC4's own property sets (#822):** the IFC2X3 sets 0.5 took from Revit's exports of the RE1 models are gone or moved to where IFC4 and Revit's own IFC4 export put them (#825, #829, #833), and Measure checks every export's standard property sets against buildingSMART's published IFC4 property set definitions (#826). That is rvt-rs's own check: buildingSMART's Validation Service has not been run on the exports, and quantity sets are not checked.
- **More of what Revit's exporter writes:** parameters named for an IFC4 property set's property (RE-194, #815, #817/#821), each element's `IsExternal` (RE-193, #814), a type's Fire Rating (#830), a door's overall size (#788), Revit 2024 Areas as spaces (#811), port types and electrical flow directions (#832), rooms with no number (#818), pieces' property sets (#819), a room's floor finish in IFC4's set (#820).
- **Older and newer releases, experimentally:** Revit 2015 to 2022 (#742) and 2027 (#740) element records.
- **Fixes:** Export to IFC As on fixtures, stairs, doors, curtain walls and wall sweeps (#796, #804, #812, #813), the latest copy of an element's or type's data (#803, #809), declared ElementIds (#797), diagnostics naming the file, not its folders (#785), the browser viewer's wasm32 string-length panic (#835), and `rvt-inspect`, `rvt-corpus doctor` and the viewer's File Status taking Revit 2015 and 2027 as releases rvt-rs reads (#838).
- **CI and release:** IfcOpenShell 0.9.0.post1 (#795), Rust installed with rustup (#793), a tag publishes nothing until the maintainer approves it (#786, #787), and Measure's office, R2025, paired-probe and per-sample hashing (#790, #799, #805, #806).

## Changes

- **Versions 0.5.1 → 0.6.0** in the nine files that carry them: `rvt`, `rvt-py` and its pin, `rvt-wasm`, the `stream_evidence` pin, `CITATION.cff` (with `date-released`), `.release-please-manifest.json`, `viewer/package.json` and both lockfiles' workspace entries.
- **CHANGELOG:** `[0.6.0] — 2026-10-19`, with an introduction, **Upgrading from 0.5** (the property sets that moved, the public API changes, the releases that now export elements) and the outside contributors credited: puzzbobb (#740, #742, #798), Erry91 (#788) and MadsHolten (#835). The section's headings were already single; its 41 entries are all kept, with #835's and #838's added. Its introduction says the property sets match buildingSMART's published IFC4 definitions by rvt-rs's own check, as does the README's release summary.
- **README:** "Release 0.6.0 and main" names v0.6.0 and summarises what it added. The lines that said `main` reads Revit 2015 to 2022 and 2027 now say experimental (since 0.6.0). The opening and "Not yet" lines name those releases, and so does the capability table. The bullet list of what 0.5.0 added is gone; #832 had put 0.6.0's port types in it. As Codex found, the IFC4 export row, the viewer paragraph and the decoder-work paragraph also said 2022 and earlier export only the scaffold, and the by-input table skipped 2014; they name 2015 to 2022, 2026 and 2027 now.
- **Witnesses:** the IFC header carries the version, so both Core Interior `rvt-rs.json` observations and their verdicts are refreshed from this pull request's CI run.

## Testing

- CI on this pull request, the witness replays included.
- Measure on `main` at 23a9d76, which is everything in this release but #835's wasm32-only fix and #838's CLI and viewer version range, neither of which changes an export: run [39273188597](https://github.com/DrunkOnJava/rvt-rs/actions/runs/39273188597). All 89 exports (the reference models, both BIM4LCA office files, Autodesk's 58 sample projects and the 23 R2025 models) have no finding in Measure's IFC4 property set check (#826, against buildingSMART's published definitions), and IfcOpenShell's schema validation finds nothing on any of the 89; none was too large to validate.
- Witnesses: both Core Interior observations and verdicts are taken from this pull request's CI run 39275014518; only `witness_version` and the verdict hashes differ, and CI's replay on b82c0c3 passes.

## 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
- [x] This PR contains no Autodesk proprietary source, decompiled internals, or NDA'd SDK content

## Breaking changes

See **Upgrading from 0.5** in the CHANGELOG: standard property sets moved to IFC4's, and five public API changes.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Version and documentation-only release prep with no runtime code changes in this PR.
> 
> **Overview**
> **Bumps the workspace from 0.5.1 to 0.6.0** across `Cargo.toml`, `rvt-py` / `rvt-wasm` / `stream_evidence` pins, lockfiles, `viewer/package.json`, `.release-please-manifest.json`, and `CITATION.cff` (release date 2026-10-19).
> 
> **Documents the release:** adds the `[0.6.0]` section to `CHANGELOG.md` (IFC4 property sets, broader Revit export parity, experimental 2015–2022/2027 element export, wasm viewer fix, and **Upgrading from 0.5** breaking notes). **README** now treats v0.6.0 as the current release—updates the support matrix and “Release 0.6.0 and main” to describe shipped capabilities instead of the old 0.5.1 bullet list.
> 
> No application or library source changes in this diff; it packages and narrates work already on `main`.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit c8826b82982270fd4f47b8da656f2e3e6021c76b. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:corpus Work in the corpus area. type:ci Continuous integration or automation work.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant