Skip to content

feat(ifc)!: name each IfcSpace by its room number, as Revit's export does, with the ElementId as a property (#90) (RE-117) - #503

Merged
DrunkOnJava merged 1 commit into
mainfrom
feat/ifcspace-room-number
Sep 28, 2026
Merged

DrunkOnJava merged 1 commit into
mainfrom
feat/ifcspace-room-number

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Sep 28, 2026 •

Copy link
Copy Markdown
Owner

Summary

Revit's IFC exporter names an IfcSpace by its room number (Name) and describes it by its room name (LongName). rvt-rs wrote Name = Room-<ElementId>. Now it follows Revit's convention and writes the ElementId, which an IfcSpace has no Tag for, as an explicit ElementId property.

When a value is missing:

  • A room without a number keeps the Room-<ElementId> Name.
  • A room without a name gets an unset LongName ($). Before, it repeated the Name.

Measured

tools/re/room_names_vs_ifc.py (now keyed by the ElementId property) compares each space's (Name, LongName) with Revit's:

model release rooms equal to Revit's
Core Interior 2024 116 of 116 (IFC4 export, by GlobalId)
RE1 Architecture 2025 11 of 11 (IFC2X3 export)
Exemplo_data 2023 9 of 9 (IFC4 export)
Snowdon Towers 2024 54 of 54 (VIM)

Before this change, 0 had Revit's Name.

Unchanged by it:

  • Every GlobalId on Core Interior is unchanged, and IfcOpenShell's validator reports no issues.
  • The Snowdon room areas (room_areas_vs_vim.py, rekeyed) are still 45 of 54.
  • The glTF, the viewer and the room schedule are untouched: they read the model, whose entity name is unchanged.

Witnesses

The added property changes Core Interior's entity counts, so both Core artifacts' rvt-rs.json observations are refreshed. witness-verdict.py gives PASS on both, with three replay matches each, and ifc_schema_arity.py --witness-agreement passes.

Upgrade note

This is a breaking change for anything that read a room's ElementId from IfcSpace.Name: read the ElementId property instead. It is in the CHANGELOG under Changed.

Checks

  • Local: fmt, clippy, doc, MSRV 1.85, fuzz check, integration tests, and the corpus run via verify-real-files.sh.

Note

Medium Risk
Breaking change to exported IFC semantics for rooms; integrators keyed on IfcSpace.Name for ElementId need to migrate, though fallbacks and scoped behavior limit blast radius.

Overview
Breaking IFC room identity (RE-117): exported IfcSpace entities now match Revit’s exporter—Name is the room number, LongName is the room name, and the Revit ElementId is written as an ElementId property (since IfcSpace has no Tag). Rooms without a number still use Room-<ElementId> for Name; rooms without a name no longer duplicate Name into LongName (it is unset).

Export plumbing adds ROOM_ELEMENT_ID_PROPERTY on Room elements in export_content.rs and updates step_writer.rs to map RoomNumber / RoomName properties into the STEP attributes. Research scripts room_names_vs_ifc.py and room_areas_vs_vim.py key off the new property instead of parsing Name. Docs (CHANGELOG, README, support matrix) and Core Interior witness observations are refreshed (IFCPROPERTYSINGLEVALUE +116, new observation hashes).

Upgrade: consumers that took ElementId from IfcSpace.Name must read the ElementId property; glTF, viewer, and room schedule behavior is unchanged per the PR description.

Reviewed by Cursor Bugbot for commit a9570f5. Configure here.

…does, with the ElementId as a property (#90) (RE-117)
@DrunkOnJava
DrunkOnJava enabled auto-merge (squash) September 28, 2026 17:25
@cursor

cursor Bot commented Sep 28, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_e1c824ee-34aa-42e8-af88-414cdd1f6e51)

@DrunkOnJava
DrunkOnJava merged commit 8817754 into main Sep 28, 2026
19 checks passed
@DrunkOnJava
DrunkOnJava deleted the feat/ifcspace-room-number branch September 28, 2026 17:28
DrunkOnJava added a commit that referenced this pull request Sep 28, 2026
## Summary

Prepare v0.4.0. Merging this is not the release: the release is the
signed `v0.4.0` tag, which runs `publish.yml` (crates.io, PyPI, the
release binaries and the container image).

**Why 0.4.0.** The CHANGELOG follows semver, and before 1.0 a breaking
change bumps the minor version. Changes since 0.3.0 that consumers will
notice:
- `IfcSpace.Name` is now the room number (#503).
- Only building-story Levels become storeys (RE-118).
- System families are named in the file's saved locale (RE-123).
- `ElemRecord::owner_id` values change (#499).
- Public structs gained fields.

## Changes

- **Versions 0.3.0 → 0.4.0:** `rvt`, `rvt-py` and its pin, the
`stream_evidence` pin, both lockfiles (only the version lines change),
`.release-please-manifest.json` and `viewer/package.json`.
- **`CHANGELOG.md`:** `[Unreleased]` becomes `[0.4.0] — 2026-09-28`.
- A new **Upgrading from 0.3** section covers the room naming, storey
filtering, locale names, `owner_id`, struct fields and changed bodies
and counts.
- The 55 entries are regrouped by what they mean for a 0.3 user: Added
(Revit 2023 projects; every supported release), Changed and Fixed. They
were under two "Added" headings, with most additions under "Changed".
Entry text is unchanged.
- **Witnesses:** the IFC header carries the version (#417), so both Core
Interior `rvt-rs.json` observations are regenerated.
`witness-verdict.py` gives PASS with three replay matches for each.

## Checks

- fmt, clippy, rustdoc, MSRV 1.85, the fuzz check (locked), integration
tests, and `verify-real-files.sh --profile ci`.
- `cargo install --path . --locked`: `rvt-inspect --version` prints
0.4.0, and `rvt-info`, `rvt-inspect --json` and `rvt-ifc --diagnostics`
run on the 2024 sample family.
- `maturin build`: the 0.4.0 wheel installs in a clean venv and imports,
reporting `rvt.__version__ == "0.4.0"`.

The docs keep describing 0.3.0 as the latest release until each 0.4.0
channel has been verified from its published artifacts. That follows in
a separate PR.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Diff is version metadata, changelog curation, and witness JSON version
strings only; behavioral breaking changes ship in prior feature merges,
not in this PR.
> 
> **Overview**
> This PR **cuts the 0.4.0 release line** without changing decoder or
exporter code: it bumps **`0.3.0` → `0.4.0`** on `rvt`, `rvt-py`, the
viewer, `.release-please-manifest.json`, path/version pins in
`stream_evidence`, and the lockfiles.
> 
> **`CHANGELOG.md`** promotes the accumulated work from `[Unreleased]`
to **`[0.4.0] — 2026-09-28`**, adds an **Upgrading from 0.3** section
(room `IfcSpace.Name`, building-story storeys, locale system-family
names, `ElemRecord::owner_id`, new public struct fields, geometry/IFC
count shifts), and **reorganizes** the ~55 entries into Added / Changed
/ Fixed (Revit 2023 vs all releases) without rewriting entry text.
> 
> Both Core Interior witness **`rvt-rs.json`** observations update
**`witness_version`** to `0.4.0` so replay metadata matches the IFC
header version.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
518f90c. 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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant