Repository navigation
feat(ifc): export a slab sketched as separate pieces as one element per piece (#331) - #336
Merged
Merged
Conversation
Bugbot couldn't run - usage limit reachedBugbot 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_90f1ce56-2563-41fd-99c9-4d04e2b8b718) |
2 tasks done
DrunkOnJava
added a commit
that referenced
this pull request
Nov 15, 2026
…nces, never as positions, elevations, areas or volumes (#2066) ## Summary The Snowdon Towers files the reports measure on (the `.rvt` and Revit's IFC4 export from bldrs-ai/test-models, and the VIM edition) carry no licence, so only counts, lengths and differences from them are published. A sweep of the tree found absolute Snowdon figures in 28 files. Each is rewritten to the difference or length it stood for, or dropped. Griffin chose the full cleanup: the repository here, and the GitHub posts and release notes alongside it. ## Changes - **Site transform** (rotation, translation, vertical shift): `docs/reference-models.md`, RE-30, RE-52, RE-78, RE-83, and the export note in `research/witness-registry.json`. - **Room areas** (830902; 2181757's floor and sections; a record box): `CHANGELOG.md`, `docs/status.md`, `docs/rooms.md`, `docs/format-reconnaissance.md`, RE-374, and the rustdoc of `ROOM_PRISM_HEIGHT_FEET` and the `stored_solid_edges` source. - **Elevations and positions**: RE-33, RE-48, RE-49, RE-51, RE-52, RE-59, RE-100, RE-101 and `probe_re99_shaft_openings`'s module doc. Where a length or difference carries the point, it is given instead: 76.75 ft tall, 87.7 ft above the floor, 0.754 ft lower, 2.0 ft above it, 180 by 228 ft. - **Volumes and areas**: a flight's volume (RE-47), a beam's section area (RE-423, now a ratio of 0.58), and the #331 slab pieces' areas (`CHANGELOG.md`). - **Second pass** (`1893090c`, `f4856542`): this one read each table and paragraph whose heading or neighbour names Snowdon, not only the lines that do. It found: - two rooms' areas (RE-101); - a door's positions across its wall in internal feet (RE-121, now measured from the wall's face); - four roofs' volumes against Revit's (RE-401, now the percentage over); - wall 1996082's tops (RE-383, now differences); - beam 627866's direction (RE-49, dropped). RE-383 and RE-49 are from rvtReview's read. ## Testing Docs and doc comments only; no output changes. - `git grep` finds none of the figures left. - `research/witness-registry.json` still parses, and nothing hashes its text. - `tools/ci/api-doc-ids.py` passes. - The two `src/` files change in `///` comments only, so arm with `--no-gates "src/ changes are doc comments only; no output moves"`. Outside the tree, done the same day: - Ten posts are rewritten the same way, each with a dated edit note: PR #1587's, #297's, #332's and #336's bodies, issue #331's and #309's bodies, and comments on #1589, #295, #1165 and #1732. - Their earlier revisions are being deleted from GitHub's edit history. - The v0.17.0 release notes are fixed (release notes keep no public history). What cannot be withdrawn: - the git history of `main`, which is not rewritten; - the rustdoc of crate versions already published to docs.rs; - notification emails already sent; - GH Archive's copy of each post as first written. ## Audit-honesty checklist - [x] No figure that a claim rests on is lost: every agreement is kept as its difference or tolerance. ## Legal and contribution hygiene - [x] Apache-2.0. Removes figures measured on unlicensed third-party files. ## Breaking changes None. https://claude.ai/code/session_01TFTgj3Ddfs7cFGMNAgVAut
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
A slab sketched as several separate loops is several pieces, and Revit's own export writes each as its own
IfcSlabwith the element'sTag, the second named…:2. rvt-rs now does the same. A plan profile keeps every separate loop as a piece with the voids inside it. The exporter writes the largest piece on the element and each further piece as another element with the sameTagand a:2,:3suffix.Motivation
Closes #331. RE-43 stopped such sketches from producing voids outside the outer loop, but left the five Snowdon slabs as record boxes (up to 38 times Revit's area).
Changes
src/element_record_plan_profiles.rs:PlanPiece, andPlanProfile::pieces, which round-trips through the newm_plan_profile_piecesfield;plan_profile_from_segmentsclassifies loops by containment depth (even: a piece; odd: a void of its container) and gives no profile when loops cross;vertex_countcovers every piece;src/ifc/export_content.rs: the record-geometry builder returns one body per further piece, and the element loop writes each as a copy of the element with the piece's profile and a:Nname.ProfilePieceCountjoins the property set. A unit test covers two pieces.Measurements (Snowdon Towers Architectural, local only)
IfcSlabwith three tessellated bodiesIfcOpenShell reports no issue on the export. Every element of Revit's export in the entities rvt-rs writes is still exported, and nothing else changes. Core Interior and RE1 Architecture export byte-identically. RE1 Electrical differs from the RE-43 build only by RE-42's fixture names.
Testing
tools/check-local.shcargo +1.85.0 check --profile ci --all-targets,cargo +nightly check --manifest-path fuzz/Cargo.tomlpython -m ifcopenshell.validateon the Snowdon exportAudit-honesty checklist
Legal and contribution hygiene
Breaking changes
PlanProfilegains the public fieldpieces, so struct literals must set it. A multi-piece element exports as several IFC elements that share itsTag.Related issues
Closes #331. Refs RE-43, RE-25.
Note
Medium Risk
Changes IFC entity cardinality and public
PlanProfileshape; geometry logic is localized to slab sketch export with regression tests, but multi-element output can affect downstream consumers expecting one slab per Revit id.Overview
Slabs sketched as several disconnected loops now export like Revit: one IFC building element per piece, instead of falling back to the record bounding box after RE-43 rejected invalid outer+void profiles (#331).
Plan profile recovery classifies closed loops by nesting depth (even depth → piece outer; odd → void inside its container). Separate islands become multiple
PlanPiecevalues onPlanProfile, serialized viam_plan_profile_pieces; partially overlapping loops still yield no profile.IFC export keeps the first piece on the original element and clones additional
BuildingElementrows for each extra piece—sameTag, names suffixed:2,:3, each with its own extruded sketch profile. Diagnostics can recordProfilePieceCount.Docs (CHANGELOG, README, support matrix, RE-43 addendum) and unit/integration tests cover two-rectangle slabs, islands-in-voids, and crossing loops.
Reviewed by Cursor Bugbot for commit c2cf28d. Configure here.
Edited 2026-11-15: absolute Snowdon Towers figures (positions, elevations, areas) are removed. The Snowdon files measured here have no licence, so only counts, lengths and differences from them are published.