Repository navigation
fix(ifc): aggregate each IfcSpace into its storey instead of containing it - #744
Conversation
…ng it A space is a spatial element. rvt-rs listed every IfcSpace among its storey's IfcRelContainedInSpatialStructure elements, which IFC4 reserves for elements, grids and annotations, so no space had a parent in the spatial tree (buildingSMART validation rules SPS002 and SPS007), and IfcOpenShell and similar readers found no storey for a space or for the furniture B63 contains in it. Each space is now an aggregated part of its storey, or of the building where no storey join reached it, through IfcRelAggregates.
…regates Each storey with rooms now aggregates its spaces (10 storeys), so the source witness counts 13 IFCRELAGGREGATES where it counted 3. Nothing else in either observation moves, and both bridge witnesses still replay. Taken from this PR's octetproof-core-interior artifact (run 38027323816).
|
Thank you, this is the right fix: IFC4's spatial composition puts a space under its storey through Sorry for the wait on CI. GitHub held this PR's runs as a first-time contribution, and nobody was watching the queue for two weeks. Runs from established accounts no longer wait for approval. The run did catch one thing: the source witness's |
[Unreleased] becomes [0.5.0] — 2026-10-18, with an introduction, the contributors, and what to change when upgrading from 0.4. The community pull requests' entries are added and credited (#737, #738, #744, #751, #752, #753, #755, #757, #758), and the repeated Added, Changed, Fixed and Research headings are folded into one each, keeping every entry (107) and its order; everything from [0.4.0] down is unchanged. CITATION.cff said 0.1.2 (2026-04-20), though RELEASE.md has it agree with Cargo.toml at every tag. Its abstract now describes the project as the README does, without the "first open-source tool" and "verified against 11 releases" claims.
## Summary Prepare v0.5.0. Merging this is not the release: the release is the signed `v0.5.0` tag on the merged commit, which runs `publish.yml` (crates.io, PyPI, the release binaries and the container image). The tag waits for the maintainer's go-ahead. ## Motivation `main` is 0.4.0 plus everything under `[Unreleased]`: Revit 2026 projects (experimental), MEP ports, connections and systems, Revit's level, category, family, type and phase properties, rooms aggregated into their storeys, Snowdon Towers exporting again, and the first pull requests from outside contributors. Before 1.0 a breaking change bumps the minor version, and these are breaking for a 0.4 user: - The MSRV is 1.87 (was 1.85). - `rvt` has no `wasm` feature; the bindings are the `rvt-wasm` crate (C6). - Each `IfcSpace` is aggregated into its storey instead of contained in it (#744). - `ElemTableHeader::record_count` is a `u32` (#764). - Type objects take Revit's GlobalIds (RE-167). ## Changes - **Versions 0.4.0 → 0.5.0:** `rvt`, `rvt-py` and its pin, `rvt-wasm`, the `stream_evidence` pin, both lockfiles (only the workspace crates' version lines change), `.release-please-manifest.json` and `viewer/package.json`. - **`CHANGELOG.md`:** `[Unreleased]` becomes `[0.5.0] — 2026-10-18`. - An introduction, the contributors, and an **Upgrading from 0.4** section. - The community pull requests' entries are added and credited (#737, #738, #744, #751, #752, #753, #755, #757, #758). - The repeated Added, Changed, Fixed and Research headings, which later merges had appended, are folded into one each. All 107 entries are kept as written (checked as a multiset) and in their order, and everything from `[0.4.0]` down is byte-identical. - #778's clean-room policy change is added under Changed, so the section has 108 entries. - **`CITATION.cff`:** it said 0.1.2 (2026-04-20), though `RELEASE.md` has it agree with `Cargo.toml` at every tag. Its abstract now describes the project as the README does, without the "first open-source tool" and "verified against 11 releases" claims. - **Registry descriptions:** crates.io showed 0.4.0's description, which leaves out Revit 2023, and PyPI one that called element extraction and geometry "active research" and the export "document-level IFC4 scaffolding". `Cargo.toml` and `pyproject.toml` now say what the README says: typed elements from Revit 2023 to 2025 projects, 2026 experimental. - **Witnesses:** the IFC header carries the version (#417), 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: every job `CI passed` requires, the witness replays among them. - On the tag, the publish workflow runs its own checks before anything is published: wheel install and model open on each OS, `cargo install` and the CLI sample smoke, the docs.rs build preview and the viewer load smoke. crates.io and PyPI publish only after all of them pass, and PyPI only after crates.io. ## Audit-honesty checklist - The docs keep describing 0.4.0 as the latest release until each 0.5.0 channel has been checked from what was published. That follows in a separate pull request (`docs/install.md`, `docs/python.md`, `docs/status.md`, `docs/supported-profile.md` and the README's release section). - crates.io's trusted publisher (repository DrunkOnJava/rvt-rs, workflow `publish.yml`, environment `crates-io`) has to be in place before the tag, as `docs/maintaining.md` says; it is a registry-side setting this repository cannot check. ## Legal and contribution hygiene N/A: release metadata only. Contributors are credited by their GitHub names in the CHANGELOG. ## Breaking changes Listed under Motivation, with the migration for each in the CHANGELOG's **Upgrading from 0.4**.
Summary
Each
IfcSpaceis now an aggregated part of its storey (or of theIfcBuildingwhere no storey join reached it) throughIfcRelAggregates, instead of an element of the storey'sIfcRelContainedInSpatialStructure. Fixes #743.Motivation
A space is a spatial element. Written as a contained element, it had no parent in the spatial tree: buildingSMART validation rules SPS002 and SPS007 flag it, and IfcOpenShell-based readers found no storey for the room or for the furniture B63 contains in it.
Changes
src/ifc/step_writer.rs: spaces go to their own per-storey list (and an unplaced list for the building) instead of the containment lists; oneIFCRELAGGREGATESper storey with spaces (GlobalId from["aggregates", <storey gid>]) and one for the building (["aggregates", "building", "spaces"]). B63's containment of elements in spaces is unchanged. Both parents are allowed by the spatial composition table (IfcSpaceunderIfcBuildingStoreyorIfcBuilding).tests/space_containment.rs:spaces_are_aggregated_into_their_storey, end to end on2024_Core_Interior.rvtandRE1-Architecture.rvt(corpus-gated, like the file's existing test).Testing
cargo fmt --check,cargo clippy --all-targets --locked -- -D warnings: clean.cargo test --release --test integration -- space_containment:: project_count_fixtures:: witnesswithRVT_PROJECT_CORPUS_DIR= magnetarfd755e18+ the RE1 files (hashes as in CI): 11 passed. The new test fails on120e2f9(Core Interior 116 of 116 spaces not aggregated, RE1-Architecture 11 of 11) and passes with the change (0 and 0).get_aggregate); elements on Revit's storey 5,581 of 5,945, as with v0.4.0 (main + fix(elem_table): detect the record size by the ElementId, the second id #737 alone: 4,813).entity_countsnames element types;relationsisIFCRELFILLSELEMENT;storeysunchanged), so no verdict changes.tools/check-local.sh --corpus(rustc 1.99.0, Debian bookworm): fmt, clippy, rustdoc and the workspace build clean;verify-real-files.sh232 passed, 0 failed, both by default and against the corpora (phi-agd2eb1f3, magnetarfd755e18+ RE1).