Repository navigation
red: B63 space containment (scratch, do not merge) - #644
Closed
DrunkOnJava wants to merge 1 commit into
Closed
DrunkOnJava wants to merge 1 commit into
DrunkOnJava wants to merge 1 commit into
Conversation
…ns them in (B63) Red run pending on the scratch draft PR.
Owner
Author
|
Red run recorded in the B63 PR's test commit (corpus 37211033155). |
DrunkOnJava
added a commit
that referenced
this pull request
Oct 4, 2026
…n its space (B63) (#645) B63. Revit's export of RE1 Architecture contains its 39 furniture items, sanitary terminals and equipment proxies in the IfcSpace of the room they stand in; rvt-rs contained all 73 elements in the storey. - New `IfcEntity::SpaceContainment`: a family instance written as IfcFurniture, IfcSanitaryTerminal or IfcBuildingElementProxy, hosted by nothing, whose location lies in the plan outline of a space on its storey (the space's body profile at its placement, voids excluded). - The writer contains those in the space instead of the storey. They keep their `storey_index`, so the viewer tree and the diagnostics' storey counts do not change. **Red** (draft #644, run 37211033155): RE1 Architecture, 39 of 60 elements contained differently from Revit's; the other four models 0. Output in the test commit's message. Only RE1 Architecture has rooms with such contents among the measured models; Core Interior's family instances are columns, doors and windows, which stay in their storey as in Revit's export. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Medium Risk** > Changes how spatial containment is emitted in IFC export (storey vs space), with geometry-based room assignment that could mis-place elements if outlines or locations are wrong. > > **Overview** > Implements **B63** so rvt-rs matches Revit’s IFC spatial containment: unhosted **family instances** exported as `IfcFurniture`, `IfcSanitaryTerminal`, or `IfcBuildingElementProxy` (with `RevitClass` = FamilyInstance) are linked to the **`IfcSpace`** whose plan outline contains their XY location, instead of only appearing under the storey. > > Export adds **`IfcEntity::SpaceContainment`** and **`contain_in_spaces`**, which builds each space’s plan polygon from its extrusion profile (including voids), tests containment via the newly public **`inside`**, and appends containment records. The STEP writer skips those elements in storey **`IFCRELCONTAINEDINSPATIALSTRUCTURE`** relations and emits separate relations into the space; **`storey_index` is unchanged** on the elements themselves. > > A corpus integration test **`space_containment`** compares containment by element `Tag` against reference IFC exports, and CI registers it as a **real** target. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit cb7566d. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
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.
Scratch branch: shows B63's new test red on main. Deleted after the red run is recorded.
Note
Low Risk
Test and CI registration only; no exporter or runtime behavior changes in this diff.
Overview
Adds B63 coverage: a new
realintegration test that exports RVT models withRvtDocExporter, parsesIfcRelContainedInSpatialStructurefrom STEP (by elementTag), and asserts each shared element is contained in the sameIfcSpacename (or storey-level container) as Revit’s reference IFC.The test runs when
RVT_PROJECT_CORPUS_DIRis set, pairing the fourRE1-*.rvt/RE1-*.ifcmodels plus2024_Core_Interior.rvtwith its slim IFC export; missing pairs are skipped.space_containmentis registered intools/ci/test-targets.txtso CI and the local gate run it like other corpus tests.Reviewed by Cursor Bugbot for commit 99c927e. Configure here.