Repository navigation
perf(research): a face cut by its trim is cut across at the chord's v steps and at the v of the trim's own steps and cusps, and the triangles of 25 of 126 exports fall (#1737) (RE-437) - #1769
Merged
Conversation
… steps alone, where every trim point's v was a cut as well (#1737) (RE-436) The strips between the u knots stay at every trim point's u, so each corner of the trim is still a vertex; the cuts across them were the chord's v steps plus the v of every trim point, which cut every trapezoid that spans a point once more. trimmed_cells no longer asks a trim point's v to be a knot. A face meshed on its grid keeps every trim point as a knot, and a plane face that shares an edge with a cut face follows the same v knots.
…tered rows: 25 of 126 exports move and their triangles from saved graphics fall by 0.6% to 15% (#1737) (RE-437)
… cut by its trim, so no strip's cells run past a vertex of the next (#1737) (RE-437) Cutting a trimmed face across at the chord's steps alone left 8 cracks in each toilet of the office (rvtDevelop's read of #1769): a trim vertex on a strip boundary that the trim does not run through (the end of a step along the boundary, a hole's tip) is a vertex of one strip's cells only, and the neighbour's cell edge runs straight past it. trim_steps names those vertices and face_grid keeps their v as knots: the same global cut the base made, for these alone, so the strips stay conforming and a plane face that shares the edge follows grid.v. tools/re/mesh_tjunctions.py counts the cracks of a model's faces.
…ws: 25 of 126 exports move, the office's triangles fall 7.5% and its cracks are main's, RE1's shower head is a measured negative (#1737) (RE-437) The report, the changelog fragment, the 1706 fragment's sentence and the reconnaissance addendum describe the rule as measured: the chord's v steps and the v of the trim's steps and cusps, not the chord's steps alone, which the first version (Measure 43078686248) held its rows with and left 344 cracks in the office's 43 toilets. The figures are Measure 43091480051 (code 70bef87, ee2d9df merged over main a0c1c61, archived under refs/archive/2026-11-11/cited/; attempt 2 re-ran the 8 shards GitHub's artifact outage failed) and timing 43091485302: the triangles from saved graphics fall 7.53% on the office, 6.81% on Snowdon Towers Architectural, 4.6% on the large housing exports and 10.44% on rac_advanced; the cracks of tools/re/mesh_tjunctions.py are main's per class on the office, the timber office, the housing and RE1; BodySource changes 0 and the diagnostics of all 25 moved exports are equal.
This was referenced Nov 11, 2026
Open
DrunkOnJava
added a commit
that referenced
this pull request
Nov 12, 2026
…ght (#1016) (#1783) ## Summary Revit's IFC4 export of the BIM4LCA office as built writes `Qto_SpaceBaseQuantities.Height` on 308 minus 44 family-instance spaces; rvt-rs writes it on the 234 rooms and on none of the 30 Areas. This change writes an Area's `Height` as the height of its body, from its Level up to the Level above, on Revit 2024 to 2027, and leaves a Revit 2015 to 2023 Area without one, since no export of that release's Area height is measured. ## Evidence **The task is real and still open.** `docs/rooms.md:134` lists exactly this value under "What is not measured" for Areas ("which Revit writes on an Area and rvt-rs does not yet"), and the Areas row of `docs/support-matrix.json` says the same. No issue closes it against us: #1016 is the open W7 quantity umbrella and puts the remainder on #1046, #1165, #1203 (closed, columns), #1207 (spaces' `GrossVolume`, stepped rooms' `NetVolume`, Revit 25's area quantities), #1208 and #1209, none of which names an Area's height; #763 is closed and is about the 44 family-instance spaces. `RE-317` §2 measured the value as the same number as the Area's extrusion depth on all 30 Areas of both office files, and `RE-324` §"not measured" leaves it out for 2015 to 2023. Nothing in the code or docs is a decision against writing it. **Where the 14 are.** From `qtos_vs_ifc.txt`: `Height: 248, equal 234, different 0, missing 14`, `on IfcSpace x14`, and 6 more "on a repeated key, against the object held: missing 6"; `rvt-rs quantities Revit does not write: 0`, so rvt-rs writes `Height` on exactly 234 spaces. `space_kinds_vs_ifc.txt` splits the 308 `IfcSpace` into 234 rooms, 30 Areas and 44 family instances. In `revit.ifc` a family-instance space's `Qto_SpaceBaseQuantities` holds `GrossVolume` and `NetVolume` and no `Height` (e.g. `#787354`), while every one of the 30 Area spaces carries a one-quantity `Qto_SpaceBaseQuantities` that is an `IfcQuantityLength('Height',…)` equal to that Area's `IfcExtrudedAreaSolid` depth (e.g. `#69195`, height `3399.9999999999982` and depth `3399.9999999999982`). The Areas are `GFA 250mm` 1-5, `GFA` K/1/2/3/P/4/5, `BUSINESS SPACE` LIIK1, `OFFICE` TSTO1-TSTO11 and `HEATED NETAREA` K/1/2/3/4/5a. `tools/re/qtos_vs_ifc.py` keys a space by its `Name` and counts a repeated key apart: the 6 names shared by two or three Areas (1, 2, 3, 4, 5, K) are exactly its 6 "repeated key" heights, and the 14 missing are the 14 uniquely named Areas — LIIK1, TSTO1 to TSTO11, P and 5a. There are no other `IfcSpace` without `Height` in the office's export. **The rule.** rvt-rs already holds the number: a drawn Area carries `AREA_BODY_HEIGHT_FIELD` (`m_area_body_height`), the elevation of the next building story less its Level's (`RE-317`), and extrudes its body by it. Against Revit's own `Height` in the same file the two agree inside the census's 1e-5 relative tolerance: area `1` 3.400000 m against 3399.9999999999982 mm, TSTO5 3.950000 against 3949.9999999980364, 5a 5.970000 against 5970.0000000000118. So an Area that rvt-rs draws gets that number; an Area it refuses keeps none. A room and a family-instance space are untouched (`ROOM_HEIGHT_FIELD` is read unchanged, and neither kind has an Area field). **What stays out, and why the releases are gated.** A given Revit release's export is the oracle only where it exists: the Area height is measured on Revit 2024 (the office, both files, 30 of 30). Revit 2025 to 2027 Areas hold the same body height as that save — the same-project gate compares it, with `lowest and highest vertex`/`height` in `tools/re/areas_across_saves.py` — and `revit-ifc` takes the height from the Level distance for every release (cited in `RE-317` §2), so they are written too, labelled like the Areas themselves. A Revit 2015 to 2023 Area keeps none: the only export of one is an IFC2X3 export whose quantities are not measured (`RE-324`). The gate cannot be 2024 alone: `tools/re/readers_across_saves.py` compares the sample projects' saves from `FIRST_YEAR = 2024` against the 2025 save and fails a property written here and not in the reference, and `Qto_SpaceBaseQuantities.Height` is in its `ADDED` list. An Area that rvt-rs refuses a body for still has no `Height`, so on a project where Revit writes one on a refused Area the value stays missing, not wrong. ## Changes - `src/research/partition_area_records.rs`: `AREA_SPACE_HEIGHT_FIELD` (`m_area_space_height`) and `AREA_HEIGHT_REVIT_VERSIONS` (`2024` to `2027`), and a drawn Area's `body.height_feet` is pushed under the new field on those releases only. - `src/ifc/export_content.rs`: `add_space_height` takes that field as well as `ROOM_HEIGHT_FIELD` and writes it as `Qto_SpaceBaseQuantities.Height`. - `docs/rooms.md` (the room sentence and the unmeasured bullet), `docs/supported-profile.md` (the space quantity sentence) and the Areas row of `docs/support-matrix.json`: an Area's height is written on Revit 2024 to 2027, and 2015 to 2023 stays out. - `changelog.d/fixed/area-space-height.md`: the entry. No test pins this value, so `tests/` is unchanged. ## Measured One Measure run scored this change together with nine others it was drafted beside (run 43086493417, head `f5f54467`, base `5e3ac5b0`: every model, with the BIM4LCA office and housing, the Revit 2025 models, Autodesk's samples of every release, rac_advanced, BIMcollab and the held-out pairs; every shard and both same-project gates passed; rows registered on #1636 before it was read). Each change writes a value of a different name, so the rows below are this change's alone. Both sides' exports were kept, and the 58 sample saves, which no Revit export scores, were compared value by value. After the second read the stack was rebuilt on `main` as seven changes (the pipe change left it, and the roof and floor-opening rules were narrowed to square-cornered outlines) and measured once more in full (run 43100937918, head `53c19487` against `e8a99d03`, rows registered first, read on #1636): all shards and both same-project gates pass, "different" and "values Revit does not write" are unchanged on every model, and the rows below repeat except where a line says otherwise. | Model | `Qto_SpaceBaseQuantities.Height` equal, before | after | different | |---|---:|---:|---:| | Office as built, at permit | 234 of 248 each | 248 of 248 each | 0 | | Timber office as built, at permit | 231 of 244 each | 244 of 244 each | 0 | | Concrete housing as built | 82 of 89 | 88 of 89 | 0 | | Concrete housing at permit | 81 of 88 | 87 of 88 | 0 | | Timber housing as built | 84 of 91 | 90 of 91 | 0 | - Both same-project gates pass, and rac_advanced's 2026 and 2027 saves hold the `Height` of 116 spaces of their 2025 save (from 91), none differing. - Sample saves: 198 Areas in 6 saves gain the value (25 in each rac_advanced save of 2024 to 2027, 96 in Snowdon Towers Architectural, 2 in Structural). ## Still open - A 2015 to 2023 Area gets none: the only export of one of their Areas is an IFC2X3 one whose quantities are not measured (RE-324). Stack: this is change 4 of 7; each branch holds the ones before it, so its own diff is its last commits until those land. First draft: #1756, then #1777. ## Testing - Built, linted and tested by CI on this head; nothing was built on a workstation. - Verified end to end on real Revit files against Revit's own exports: the Measure runs named above, which anyone can repeat with `gh workflow run measure.yml --ref main -f ref=<this head> -f base=e8a99d03be8a76a2c8871ea8cc28d036653ec6e2 -f nordic=true -f r2025=true -f samples=true -f racadv=true -f bimcollab=true -f holdout=true`. - No test was added: no unit test, and no pinned count moves except where the body says so. - `main` has moved since those runs (#1769 re-meshes trimmed faces, and #1771, #1773, #1781, #1782, #1787 and #1789 landed). This head, `0f82cb8e`, is `main` at `d1a5c0ee` merged in, with one docs line merged word by word; its change against `main` is this pull request's own commit and nothing else (byte-equal outside `docs/`, word-equal inside). Measure 43108424934 measured the nine batch changes together on `main` with #1769 (`3f2a04c4` against `e7ac68e7`, rows registered on #1636 first): every count above repeats, and the same-project gates pass. ## Audit-honesty checklist - [x] Docs state what this change writes and what it leaves out - [x] A changelog fragment under `changelog.d/` - [x] No emojis, private paths or personal data in committed files - [x] Limits are in the body above and in the code's doc comments ## Legal and contribution hygiene - [x] Apache-2.0 - [x] No Autodesk proprietary source, decompiled internals or NDA material. Where revit-ifc (CLEANROOM.md source 5) is cited, it is read and cited by file and class, and no code is copied. - [x] No fixture with real-world personal data ## Breaking changes None.
DrunkOnJava
added a commit
that referenced
this pull request
Nov 12, 2026
… and Height (#1165) (#1784) ## Summary The 25 openings of the BIM4LCA office as built whose `Qto_OpeningElementBaseQuantities.Depth` Revit's export writes and rvt-rs's does not are the openings rvt-rs writes for a door that also cuts a second wall (`ifc::wall_cut_openings`'s `door_cut`, `quantities: false` since RE-338). They are written with no quantity set at all. This change writes their `Depth`, the extent the opening is extruded across that wall by, and leaves their `Width` and `Height` out. ## Evidence - `evidence/nordic-office-as-built/qtos_vs_ifc.txt`: `Depth: 308, equal 283, different 0, missing 25`, all 25 `on IfcOpeningElement x25`; a further 59 openings rvt-rs does not write are counted apart, and `rvt-rs quantities Revit does not write: 0`. - `evidence/nordic-office-as-built/unfilled_openings_vs_ifc.txt`, by kind of cutter and host: `IfcCurtainWall in IfcWall` 27 of 27, `IfcFireSuppressionTerminal in IfcWall` 39 of 39, `none in IfcWall` 30 of 30, `none in IfcSlab` 36 of 36 and `IfcSlab in IfcSlab` 1 have `Depth equal`; `IfcDoor in IfcWall` is the one kind with `revit: 39, written: 25` and `Depth in Revit's: 25` but no `Depth equal` line — rvt-rs writes those 25 openings and no `Depth` on any. - The counts close exactly: 283 equal = 187 openings of a door or window whose symbol cuts an outline (the filled openings, whose `Depth` the writer already writes) + 96 of the 99 wall-cut openings it writes (three curtain walls are written that Revit's export lacks); 283 + 25 = 308. So the 25 are precisely the door-in-second-wall openings, and Revit writes `Depth` on every one of them. - What Revit's value is. RE-321 §3 (the rectangular, cabinet and curtain-wall openings, all 96 equal) and RE-244 (the 187) find `Depth` to be the extrusion's depth, i.e. the extent the opening passes through the wall by, which is what `thickness_feet` already is for a wall-cut opening. On a door's second-wall opening that extent is the door's own width: `revit.ifc`'s opening `#77141` (Tag 1383546, unfilled, voiding `Basic Wall:VS-2:1352055`) carries `Width` 100, `Height` 2100, `Depth` 810 mm — the profile is the second wall's plane (the door's own wall thickness by the door's height) extruded 810 mm across it, and 810 mm is the door's own opening's across extent, which RE-338 §3 measured as the door's own opening box (equal to rvt-rs's box within 0.01 ft on 25 of 28 as built, and on all 25 these openings are the ones written). `Depth` = 3048 mm on exactly the 11 openings where the second wall runs *along* the door's wall, which rvt-rs leaves out (`door_second_wall_parallel_to_door_wall`, 9 of the 14 it leaves out of the 39). - Rule, and what stays out: `Depth` is written on every wall-cut opening whose host holds that quantity (all 607 walls that rvt-rs writes hold a `Width` here, and with `--no-base-quantities` the list is empty and nothing is written). `Width` and `Height` stay missing on the 25: Revit's export swaps them on a door's opening (RE-244, RE-235 §5) and nothing read says it does not on this one, even though `#77141`'s are the rectangle's extents. So `Width` 152 (missing 56) and `Height` 152 (missing 56) are unchanged, and the 14 door openings rvt-rs does not write are untouched. ## Changes - `src/ifc/step_writer.rs`: the wall-cut opening's quantity set is now written where its host holds the quantity, not only where `Width` and `Height` are written too; `Width` and `Height` are still pushed only for the rectangular, cabinet and curtain-wall openings, so their output is byte for byte what it was, and a door's second-wall opening gains a set holding `Depth` alone. - `src/ifc/entities.rs`, `src/ifc/wall_cut_openings.rs`: the doc comments of `quantities` say why that opening takes only its `Depth`. - `docs/supported-profile.md` and `docs/release-1.0-criteria.md`: the sentences listing what an opening a door cuts in a second wall carries gain the `Depth`, and say that its `Width` and `Height` stay out. - `changelog.d/added/1165-door-second-wall-opening-depth.md`: new fragment. ## Measured One Measure run scored this change together with nine others it was drafted beside (run 43086493417, head `f5f54467`, base `5e3ac5b0`: every model, with the BIM4LCA office and housing, the Revit 2025 models, Autodesk's samples of every release, rac_advanced, BIMcollab and the held-out pairs; every shard and both same-project gates passed; rows registered on #1636 before it was read). Each change writes a value of a different name, so the rows below are this change's alone. Both sides' exports were kept, and the 58 sample saves, which no Revit export scores, were compared value by value. After the second read the stack was rebuilt on `main` as seven changes (the pipe change left it, and the roof and floor-opening rules were narrowed to square-cornered outlines) and measured once more in full (run 43100937918, head `53c19487` against `e8a99d03`, rows registered first, read on #1636): all shards and both same-project gates pass, "different" and "values Revit does not write" are unchanged on every model, and the rows below repeat except where a line says otherwise. The first draft wrote `Depth` alone. `Height` was added after reading four such openings in Revit's export of the office (Width, Height and Depth 100 / 2100 / 810 and 300 / 2100 / 1210 mm, the same way round as on any rectangular opening; the table is in the last comment on #1749). | Model | `Depth` equal, before | after | `Height` equal, before | after | newly different | |---|---:|---:|---:|---:|---:| | Office as built | 283 of 308 | 308 of 308 | 96 of 152 | 121 of 152 | 0 | | Office at permit | 262 of 295 | 295 of 295 | 75 of 137 | 108 of 137 | 0 | | Timber office as built | 286 of 302 | 302 of 302 | 101 of 142 | 117 of 142 | 0 | | Timber office at permit | 247 of 281 | 263 of 281 | 74 of 121 | 90 of 121 | 0 | | Concrete housing as built, at permit | 72, 62 of 79 | 75, 65 of 79 | 18, 6 of 35 | 21, 9 of 35 | 0 | | Timber housing as built, at permit | 67 of 68 each | 68 of 68 each | 7 of 19 each | 8 of 19 each | 0 | - The timber office at permit read 9 `Depth` values different before and reads the same 9 after. - Sample saves: one opening in each rac_basic save of 2024 to 2027 gains the two values. ## Still open - `Width`, which Revit's export writes too, stays out: Revit's is the thickness of the wall the door stands in, and rvt-rs's outline is 0.2 mm wider than that on two of the four openings read, which the scorer would count as different. - A second wall that runs along the door's wall is still not written. Stack: this is change 5 of 7; each branch holds the ones before it, so its own diff is its last commits until those land. First draft: #1755, then #1779. ## Testing - Built, linted and tested by CI on this head; nothing was built on a workstation. - Verified end to end on real Revit files against Revit's own exports: the Measure runs named above, which anyone can repeat with `gh workflow run measure.yml --ref main -f ref=<this head> -f base=e8a99d03be8a76a2c8871ea8cc28d036653ec6e2 -f nordic=true -f r2025=true -f samples=true -f racadv=true -f bimcollab=true -f holdout=true`. - No test was added: no unit test, and no pinned count moves except where the body says so. - `main` has moved since those runs (#1769 re-meshes trimmed faces, and #1771, #1773, #1781, #1782, #1787 and #1789 landed). This head, `44bafde9`, is built on #1783's merged head `0f82cb8e`, so until #1783 lands its diff against `main` also shows #1783's change; its own change (`0f82cb8e..44bafde`) is this pull request's two commits and nothing else (byte-equal outside `docs/`, word-equal inside). It is armed only after #1783 has merged. Measure 43108424934 measured the nine batch changes together on `main` with #1769 (`3f2a04c4` against `e7ac68e7`, rows registered on #1636 first): every count above repeats, and the same-project gates pass. ## Audit-honesty checklist - [x] Docs state what this change writes and what it leaves out - [x] A changelog fragment under `changelog.d/` - [x] No emojis, private paths or personal data in committed files - [x] Limits are in the body above and in the code's doc comments ## Legal and contribution hygiene - [x] Apache-2.0 - [x] No Autodesk proprietary source, decompiled internals or NDA material. Where revit-ifc (CLEANROOM.md source 5) is cited, it is read and cited by file and class, and no code is copied. - [x] No fixture with real-world personal data ## Breaking changes None.
7 tasks done
DrunkOnJava
added a commit
that referenced
this pull request
Nov 12, 2026
…tities.Perimeter where its outline is square-cornered (#1208) (#1785) ## Summary On the BIM4LCA office as built Revit's export writes `Qto_SlabBaseQuantities.Perimeter` on 29 objects where rvt-rs writes none. Thirteen of the office's 42 slab perimeters are already counted apart as Revit's feet-unscaled defect (RE-235 §5, `REVIT_DEFECTS` in `tools/re/qtos_vs_ifc.py`); the other 29 are scored missing. Reading the 42 values against the profile each slab's body extrudes splits them cleanly in two, and the split is the element's class: **every `.ROOF.` slab's value is the outline's length in the file's unit, and every floor's, base slab's and stair landing's is that same length in feet.** This writes the roof ones — 10 of the 29 — and leaves the rest out with the reason stated. ## Evidence I mapped each of the 42 `Qto_SlabBaseQuantities` sets of `revit.ifc` to its `IfcSlab` (through its `IFCRELDEFINESBYPROPERTIES`) and to the `GrossArea` written beside its `Perimeter`, then read the profile the slab's body extrudes. The two readings of one value differ by 304.8, so each of the 42 is unambiguous against its area: | | as the file's unit (mm) | as feet | |---|---:|---:| | the 10 `.ROOF.` slabs | 4.7 to 197.9 m, 1.00 to 3.06 times `4*sqrt(area)` | 1,429 to 60,315 m | | the 32 `.FLOOR.`/`.BASESLAB.`/`.LANDING.` slabs | 0.020 to 0.87 m, far under `2*sqrt(pi*area)` | 5.8 to 264 m, 0.8 to 1.9 times `4*sqrt(area)` | Checked to the last digit where the profile is a plain outline in the export: - `Basic Roof:KA-1` 1461758 (area 261.2999 m²): outline 188,699.718 mm of lines plus two quarter arcs of radius 2925 mm, 197,888.88 mm against Revit's 197,888.87629548809. - `Basic Roof:YP-1` 2991742 (area 614.7886): 158,585.00 mm against 158,584.9999999993. - `Basic Roof:YP-4` 3165182 (area 491.8956): a 26,385 by 18,643 rectangle, 90,056.00 mm against 90,056.0000000018. - `Floor:VP-1` 1384047 (area 1017.0252): outline 174,303.6 mm plus its 6 holes 42,700.7 mm, 217,004 mm, against 743.65029082242927 read as feet, 226,664 mm — the export counts a hole's outline in its value. - `Floor:AP-2` 1439250 (a landing, area 16.6319): 2×(2,760.48 + 6,025) = 17,570.95 mm, against 57.64750022310872 ft = 17,571 mm. So the rule is narrowed to the class the evidence carries: **a roof** whose `GrossArea` the export writes (the scope `add_slab_gross_area` already uses for a flat roof: drawn as one extrusion of its sketch's outline, not sloped, its type's layers filling its body) and whose profile has no holes gets its `Perimeter`, the length of that outline. Arcs are tessellated at the profile's own 0.0005 ft (Ka-1's two arcs make 4.6% of the outline, so the polygon reads within 1e-6 of the arc length, well inside the census's 1e-5). What stays without, and why: - the 32 floors, base slabs and stair landings: Revit's value there is the length in feet, unscaled (five of them verified above and by the scorer), so writing the length would make 19 values different and 13 still counted apart; - the one `Non-Monolithic Landing` 3058084, whose value *is* the outline in mm (4,688.14 mm for 1.3804 m²): rvt-rs writes no `Qto_SlabBaseQuantities` on a landing at all (RE-295), so there is nothing to add it to; - a roof whose profile has holes: whether the export counts a hole's outline in the value is unmeasured (the office's 10 roofs have no holes; the housing has 2 roofs with holes, RE-413), so `profile_outline_length` returns `None` for `ArbitraryWithVoids`. Not a settled question: the maintainer's RE-235 §5 leaves out "a floor's `Perimeter`" only, issue #1208 (open) lists `Perimeter` among the slab quantities not written with the reason "Revit writes `Perimeter` in feet in a millimetre file", which holds for the floors and not for the roofs; no report or decision covers a roof's, and no merged pull request writes it. ## Changes - `src/ifc/export_content.rs`: `add_slab_gross_area` pushes `Perimeter` (as `PropertyValue::PositiveLengthFeet`) on a roof; a new `profile_outline_length` returns the length of a closed polyline profile and `None` for a profile with voids or another shape. The function's comment now says a floor's is left out and a roof's is written, with what stays without. - `changelog.d/added/1208-roof-perimeter.md`: the new fragment. - `docs/supported-profile.md`, `docs/evidence.md`: the roof's `Perimeter` in the two lists of the base quantities written. No test pins the set (`rg Qto_SlabBaseQuantities tests/` finds nothing), so no test is edited. ## Measured One Measure run scored this change together with nine others it was drafted beside (run 43086493417, head `f5f54467`, base `5e3ac5b0`: every model, with the BIM4LCA office and housing, the Revit 2025 models, Autodesk's samples of every release, rac_advanced, BIMcollab and the held-out pairs; every shard and both same-project gates passed; rows registered on #1636 before it was read). Each change writes a value of a different name, so the rows below are this change's alone. Both sides' exports were kept, and the 58 sample saves, which no Revit export scores, were compared value by value. After the second read the stack was rebuilt on `main` as seven changes (the pipe change left it, and the roof and floor-opening rules were narrowed to square-cornered outlines) and measured once more in full (run 43100937918, head `53c19487` against `e8a99d03`, rows registered first, read on #1636): all shards and both same-project gates pass, "different" and "values Revit does not write" are unchanged on every model, and the rows below repeat except where a line says otherwise. | Model | `Qto_SlabBaseQuantities.Perimeter` equal, before | after | different | |---|---:|---:|---:| | Office as built | 0 of 29 | 10 of 29 | 0 | | Office at permit | 0 of 29 | 10 of 29 | 0 | | Timber office as built | 0 of 28 | 8 of 28 | 0 | | Timber office at permit | 0 of 28 | 1 of 28 | 0 | | Concrete housing as built, at permit | 0 of 24, 0 of 20 | 1 of 24, 4 of 20 | 0 | | Timber housing as built, at permit | 0 of 28 each | 3 of 28 each | 0 | - The draft predicted the office's 10 and left the timber office and the housing open: they read equal too, and no model gains a value Revit's export does not write, the held-out pairs included. - Sample saves: none gains a value from this change. - **Narrowed after the second read:** a roof whose outline has a corner that is not a right angle now gets none. A sketch arc reaches the outline as chords within 0.0005 ft, whose length is short of the arc's by about a third of sagitta over radius; no corner between two chords is square, so a square-cornered outline holds no arc. The counts above are from before the narrowing. **After it (the final run):** 9 of 29 on each concrete office file, one fewer, and every other count as above (8 and 1 of 28, 1 of 24, 4 of 20, 3 and 3 of 28), none different. The one roof that fell on each office file read equal before, so its outline has a slanted straight edge, not an arc. ## Still open - A roof whose profile has holes gets none: whether Revit counts a hole's outline is not measured. - A roof whose outline has a slanted straight edge is left out with the arcs. Carrying the sketch's arcs to the outline and taking their length exactly would reach both. - A floor's `Perimeter` stays out: Revit's export writes it in feet in a file whose unit is millimetres (RE-235 section 5). Stack: this is change 6 of 7; each branch holds the ones before it, so its own diff is its last commits until those land. First draft: #1752, then #1774. ## Testing - Built, linted and tested by CI on this head; nothing was built on a workstation. - Verified end to end on real Revit files against Revit's own exports: the Measure runs named above, which anyone can repeat with `gh workflow run measure.yml --ref main -f ref=<this head> -f base=e8a99d03be8a76a2c8871ea8cc28d036653ec6e2 -f nordic=true -f r2025=true -f samples=true -f racadv=true -f bimcollab=true -f holdout=true`. - No test was added: no unit test, and no pinned count moves except where the body says so. - `main` has moved since those runs (#1769 re-meshes trimmed faces, and the six batch changes before this one landed). This head, `99db61c5`, is `main` at `1fe64d99` merged in, with two docs lines merged word by word; its change against `main` is this pull request's own two commits and nothing else (byte-equal outside `docs/`, word-equal inside). Measure 43108424934 measured the nine batch changes together on `main` with #1769 (`3f2a04c4` against `e7ac68e7`, rows registered on #1636 first): every count above repeats, and the same-project gates pass. ## Audit-honesty checklist - [x] Docs state what this change writes and what it leaves out - [x] A changelog fragment under `changelog.d/` - [x] No emojis, private paths or personal data in committed files - [x] Limits are in the body above and in the code's doc comments ## Legal and contribution hygiene - [x] Apache-2.0 - [x] No Autodesk proprietary source, decompiled internals or NDA material. Where revit-ifc (CLEANROOM.md source 5) is cited, it is read and cited by file and class, and no code is copied. - [x] No fixture with real-world personal data ## Breaking changes None.
7 tasks done
DrunkOnJava
added a commit
that referenced
this pull request
Nov 12, 2026
…Area where its outline is square-cornered (#1016) (#1786) ## Summary `Qto_OpeningElementBaseQuantities.Area` is now written on an opening a floor's sketch makes where its outline is not a rectangle, and on no other unfilled opening. On the BIM4LCA office as built that is the 5 openings the census lists as missing, and the 31 rectangular sketch openings, on which Revit's export writes no `Area`, keep none. ## Evidence The census (`evidence/nordic-office-as-built/qtos_vs_ifc.txt`): `Qto_OpeningElementBaseQuantities.Area: 5, equal 0, different 0, missing 5` (line 42), all on `IfcOpeningElement` x5 (line 123); 3 more on openings rvt-rs does not write (line 7) and 1 on a repeated key (line 78). Matching the two files of the office by Tag, the 5 are the same five objects: **3190490, 3143563, 3146720, 3147725, 3151525**, all named `Floor:VP-1:418397` in both files, each an opening of a floor's sketch (RE-151) that rvt-rs already writes, with its box and its `Reference` values equal. - **What Revit's value is.** In every one of the 13 opening quantity sets of Revit's export that hold an `IFCQUANTITYAREA`, the `Area` is the area of the polygon the opening's body extrudes: e.g. 3.4096666 m2 for opening 3190490, whose profile is a 890 x 3890 mm rectangle less a 230 x 230 mm notch (3.409662 m2 from rvt-rs's own outline, read in its file's metres), and 9.634416 m2 for 3146720 against 9.634423 m2 from that outline. The same holds for the four roof hatch openings (tag 2991742), the two wall profile openings (1671974) and the door opening that cuts two walls (1623922), which this change does not touch. - **What tells the 5 apart.** rvt-rs writes 36 openings of a floor's sketch on this file. Of those, exactly 5 have an outline that is not a rectangle (a 6-corner outline with a notch, closed by a repeated last point) and 31 are 5-point rectangles — and the 5 are Revit's 5, the 31 Revit's 31, on which Revit writes `Width` and `Height` and no `Area`. Nothing else separates them: the 5 sit in five different floors (1384047, 1451421, 1457693, 1457785, 1474132) among openings of the same name, the same kind and the same depth. - **A second model against the rule.** The housing as built's rvt-rs export holds 11 openings of a floor's sketch (`Floor:VP-2`, `Floor:AP-1`, `Floor:VP-1.OL`, `Floor:VP-1.KL`), all 5-point rectangles, and its census misses no `Area` at all: the rule adds nothing there. - **Rule.** On an opening a floor's sketch makes (`IfcEntity::VoidOpening`, not a face-hosted cut) whose outline has more than four corners, write `Area`, the outline's shoelace area in square feet, as the wall profile opening's `Area` is written (RE-381). Read from evidence: 5 of 5 equal on the model measured, none on the 31 Revit gives none. - **What it leaves out.** A quadrilateral that is not a rectangle (no measured export has one, and nothing tells it from the 31); every other kind of unfilled opening (a roof's hatch, a curtain wall's cut, a cabinet's, a door's in a further wall, a wall's own profile opening), which have their own rules; and a door's or window's opening. It also does not touch the existing 3 `Area` values rvt-rs writes on the timber office where Revit writes `Width` and `Height` instead (RE-402) — that is the wall profile opening's rule, not this one. - **`--no-base-quantities`.** The value is written only where rvt-rs writes base quantities at all, the gate a door opening's `Depth` and a wall profile opening's `Area` have (RE-242): with the flag every `Qto_` set is empty and no opening quantity is written. ## Changes - `src/ifc/step_writer.rs`: in the loop that writes an opening of a floor's sketch, a boolean of whether any `Qto_` set still holds quantities, and, on such an opening whose outline has more than four corners, its `Area` as `IfcQuantityArea`, the outline's area (the shoelace expression the wall profile opening's `Area` already uses). - `docs/supported-profile.md`, `docs/evidence.md`: the two sentences that list the openings' base quantities now say the floor sketch opening's `Area` is written. - `changelog.d/fixed/40-floor-void-opening-area.md`. ## Measured One Measure run scored this change together with nine others it was drafted beside (run 43086493417, head `f5f54467`, base `5e3ac5b0`: every model, with the BIM4LCA office and housing, the Revit 2025 models, Autodesk's samples of every release, rac_advanced, BIMcollab and the held-out pairs; every shard and both same-project gates passed; rows registered on #1636 before it was read). Each change writes a value of a different name, so the rows below are this change's alone. Both sides' exports were kept, and the 58 sample saves, which no Revit export scores, were compared value by value. After the second read the stack was rebuilt on `main` as seven changes (the pipe change left it, and the roof and floor-opening rules were narrowed to square-cornered outlines) and measured once more in full (run 43100937918, head `53c19487` against `e8a99d03`, rows registered first, read on #1636): all shards and both same-project gates pass, "different" and "values Revit does not write" are unchanged on every model, and the rows below repeat except where a line says otherwise. | Model | `Qto_OpeningElementBaseQuantities.Area` equal, before | after | different | |---|---:|---:|---:| | Office as built | 0 of 5 | 5 of 5 | 0 | | Office at permit | 0 of 6 | 6 of 6 | 0 | | Timber office as built, at permit | 0 of 12 each | 12 of 12 each | 0 | - "quantities Revit does not write" is unchanged on every model, the timber office's 3 included. - Before the narrowing Core Interior gained 20 `Area` sets on floor sketch openings that are not rectangles, which no Revit value scores (its export writes no base quantities); after it none is written there. - Sample saves: 12 openings gain the value, 10 in Snowdon Towers Architectural and 2 in Structural. - **Narrowed after the second read:** an outline with a corner that is not a right angle now gets none. Revit takes the area from the sketch's curves, and an arc reaches the outline as chords within 0.0005 ft, whose polygon is short of it by more than the scorer's 1e-5 on a small radius. The counts above, Core Interior's 20 and the samples' 12 included, are from before the narrowing. **After it (the final run):** all four office counts are kept (5 of 5, 6 of 6, 12 of 12, 12 of 12, none different), and Core Interior's export is byte-identical: none of its 20 openings passes, so no witness observation moves and no refresh is needed. - **Tightened again:** the `Area` is written only where the outline has more than four square corners, counted without the joints it runs straight through, so a rectangle one of whose edges is two sketch lines (five points, four corners) is left out: whether Revit calls that loop a rectangle is not measured. The helper that counts them is pure and has seven tests of the ways it can fail. ## Still open - A rectangle gets no `Area` (Revit's export writes its `Width` and `Height` there), and a four-cornered outline that is not a rectangle is left out as unmeasured. Stack: this is change 7 of 7; each branch holds the ones before it, so its own diff is its last commits until those land. First draft: #1758, then #1780. ## Testing - Built, linted and tested by CI on this head; nothing was built on a workstation. - Verified end to end on real Revit files against Revit's own exports: the Measure runs named above, which anyone can repeat with `gh workflow run measure.yml --ref main -f ref=<this head> -f base=e8a99d03be8a76a2c8871ea8cc28d036653ec6e2 -f nordic=true -f r2025=true -f samples=true -f racadv=true -f bimcollab=true -f holdout=true`. - No test was added: no unit test, and no pinned count moves except where the body says so. - `main` has moved since those runs: the eight batch changes before this one landed, with #1769, #1771, #1791 and others. This head, `422e9432`, is `main` at `000fc1af` merged in. The merge resolved one conflict in `src/ifc/export_content.rs`, where this pull request's own commits rewrite the corner helper #1785 added, by taking this branch's side; the resolved `export_content.rs` and `step_writer.rs` are byte-equal to the files Measure 43108424934 measured at `3f2a04c4`, and the change against `main` is this pull request's own three commits (byte-equal outside `docs/`, word-equal inside). - Because a source conflict was resolved, this head has an unfiltered Measure of its own against `main`, with kept exports: run 43133784518, rows registered on #1636 before it is read. Its same-project verdict and the advisory semantic verdict land on this head. - Autodesk's sample saves have no Revit export in Measure, so nothing scores them; the kept exports are read by element instead. In run 43113322070 (all nine batch changes on `main`) the only sample saves that gain this value are the two Snowdon Towers 2024 saves, Architectural 10 and Structural 2 openings, with no existing value changed or removed. Revit's own IFC4 export of the architectural file was made without base quantities, so those 12 `Area` values are written where no Revit export can check them. ## Audit-honesty checklist - [x] Docs state what this change writes and what it leaves out - [x] A changelog fragment under `changelog.d/` - [x] No emojis, private paths or personal data in committed files - [x] Limits are in the body above and in the code's doc comments ## Legal and contribution hygiene - [x] Apache-2.0 - [x] No Autodesk proprietary source, decompiled internals or NDA material. Where revit-ifc (CLEANROOM.md source 5) is cited, it is read and cited by file and class, and no code is copied. - [x] No fixture with real-world personal data ## Breaking changes None.
DrunkOnJava
added a commit
that referenced
this pull request
Nov 12, 2026
…as, gross volume and height (#1046) (#1741) ## Summary A wall whose saved mesh has more than four vertical faces gets `Qto_WallBaseQuantities.GrossSideArea`, `NetSideArea`, `GrossVolume` and `Height` where the mesh is a vertical prism less the openings rvt-rs cuts in it. Today such a wall gets `NetVolume` alone (`MAX_VERTICAL_FACES`, RE-388, RE-399). The wall takes the four quantities only when all of these hold: - it has at least one opening rvt-rs cuts (a door's or a window's rectangle); - every vertical face beyond the four of a prism lies within one opening's box: it is a jamb; - every horizontal face strictly between the mesh's lowest and highest point is the top or the bottom of an opening that spans it along the wall and across it; - the mesh has no sloped face, the wall runs along the model's axes, and its base is not attached (no `JoinToRoofGStep` with `m_baseOrTop` 0 in a record that was read). A wall of at most four vertical faces keeps today's rule, and a wall with no opening keeps the four-face gate. No value changes: the walls that qualify gain the four quantities, 320 to 348 values per BIM4LCA office file and 40 to 152 per housing file, and nothing else in any export moves. ## Motivation #1046: Revit's export gives most walls the full quantity set and some `NetVolume` alone, and the four-face gate left out every wall with a door or a window in it. On Revit's own bodies of the BIM4LCA office, walls that are a prism less their openings with no base join carry the full set 170 of 170, and those with a base join 0 of 5. The first version of this change had no opening condition. Its run (43073639246) read about 1,860 more quantities equal and none different, and wrote values Revit omits on two concrete-housing walls and the held-out house. Both housing walls have no opening: their extra faces come from something else, and nothing read tells them from the 36 plain prisms Revit does give the set (base attachment, end-join face count and side alignment were each refuted by a counter-example, recorded on #1046). So the rule is narrowed to walls where an opening explains every extra face, and what it leaves out is listed under Testing. ## Changes - `src/ifc/mesh_wall_quantities.rs`: `wall_mesh_quantities` takes the wall's frame, the world boxes of the openings cut in it and whether its base is attached. Two pure predicates decide the new case: `prism_less_openings` (the horizontal faces) and `jambs_explain` (the vertical faces beyond four); `largest_side_areas` is `side_areas` without the face-count gate. Five failure-first tests of the predicates: a sloped face, a face no opening reaches, an opening that does not span the face or end at its height, a wall with no opening, and a face outside every opening. - `src/ifc/saved_meshes.rs`: `wall_frame_and_openings` collects each wall's turn and the world box of every element it hosts, as the writer emits the opening. - `src/research/native_wall_cuts.rs`: `walls_with_no_base_join` names only walls whose record was read and holds no base join, so a failed read never counts as no base join. - `docs/supported-profile.md`, `docs/evidence.md`, `docs/release-1.0-criteria.md` state the widened gate; a changelog fragment is added. ## Testing Two unfiltered Measure runs with the held-out pairs; rows registered before each read, and both reads are on #1636. The first (43102116319, `672caa6a` against `b647c60b`) predates #1769, which re-meshes trimmed faces. The second (43115751418, `3392ff19` against `main` at `3abb42f0`, kept exports) is the landing evidence, and every figure of the first repeats in it. - None different on any model. On each of the 17 files whose Revit export writes base quantities, no wall gains a quantity that Revit's export of the same wall leaves off: "rvt-rs quantities Revit does not write" is unchanged on every one (the concrete housing as built stays at 7, the held-out house at 0). - Each of the four names gains, read equal: +80 on the office as built (`GrossSideArea` 299 to 379 of 579), +87 at permit, +78 and +80 on the timber office (`Height` +75 at permit), +38 and +36 on the concrete housing, +11 and +10 on the timber housing, +4 on the held-out house, +2 on each of the four held-out pairs and +3 on each of the four held-out office pairs. 1,771 quantities over 17 files. - `same-project gates`: pass. The advisory semantic check reads pass on the second run. - 37 of 126 exports move, the same in both runs. Counted apart, 1,880 values where no Revit export can say whether Revit writes them. They are the same rule on files with no oracle, not errors and not checked: - 292 on three models: Core Interior 71 walls (its reference export is a slimmed file with no property set and no `IfcElementQuantity` on any of its 360 walls), RE1 Architecture 1 wall (Revit's export writes property sets and no `IfcElementQuantity` on any element: base quantities were off in its setup, RE-242) and Einhoven 1 wall (Measure holds no Revit export of it). None is a wall where a Revit export leaves the set off while writing others. - 1,588 on 17 Autodesk sample saves of 2024 to 2027, read by element from the second run's kept exports: nothing that exists on `main` is changed or removed, and only the four names on `IfcWall` are added (21 walls on each rac_advanced save, 2 on each rac_basic, 30 on each rme_advanced and rme_basic, about 65 on Snowdon Towers Architectural). Core Interior's witness observations are refreshed in a commit of their own, taken from the second run's files; both verdicts replay PASS and are unchanged. What it leaves out: walls with no opening and more than four vertical faces (the two housing walls among them); walls whose extra faces come from a profile opening, a wall opening nothing fills, a face-hosted cut or a floor's void; walls turned off the model's axes; walls with an attached base (26 and 27 on the office, which Revit does give the set). - Built, linted and tested by CI on this head; nothing was built on a workstation. First drafted by an automated worker from the analysis on #1046; the narrowing, the measurement and this description are the maintainer session's. Part of #1046.
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 face cut by its trim is cut across at the chord's
vsteps and at thevof the trim's own steps and cusps, wheretrimmed_cellscut each strip's trapezoids at every knot ofvandface_gridmade every trim point'sva knot, so that a trim of T points left every trapezoid that held a point'svcut once more across the whole face. The strips keep a knot at every trim point'su(a trim segment must cross a strip whole, so each corner of the trim is still a corner of the cells). The cuts across them are now the chord's steps and thevof each vertex the trim does not run through from one strip to the next (trim_steps: the ends of a step along a strip boundary and the tip of a hole), because without those a strip's cells run straight past a vertex of the next strip's and leave a crack inside the face. A face meshed on its grid keeps every trim point as a knot on both axes, and a plane face that shares an edge with a cut face follows the samevknots (refined_plane_edge). No element stops being drawn from its saved mesh (BodySource changes 0).What moves (Measure, 126 exports against
main: 101 identical, 25 differ, the same 25 as the first version of this change): the triangles from saved graphics fall by 7.5% on the BIM4LCA office (all 107,887 of them in its 43 toilets, a toilet from 14,025 to 11,516), 6.8% on Snowdon Towers Architectural, 4.6% on the four large housing exports, 3.3% on the two terrain ones and 10.4% onrac_advanced; the IFCs by 0.4% to 6.6% (the office 117.1 to 113.6 MB, Snowdon Towers Architectural 272.1 to 257.6 MB). The cracks are identical per class tomain's on the office as built (160 in 57 face sets), the timber office (168 in 57), the housing and RE1, none in a toilet, and fewer onrac_advanced(394 to 374). One measured negative: RE1 Architecture's shower head has its farthest vertex from Revit's surface move from 0.009123 to 0.01007 ft, over the 0.01 ft column of its class.Motivation
#1737, the second lever of the density RE-430 measured (after RE-435): a toilet's two trimmed faces were 4,147 of its 14,025 triangles. A first version cut at the chord's steps alone and took 8.1% off the office, and rvtDevelop's read counted what its rows had not: the vertices of a face's cells inside a boundary edge of the same face's cells went from 160 to 504 on the office as built, the 344 more all in the 43 toilets. This version keeps the cuts that stop them and the diagnostic is in RE-437.
Changes
face_grid(src/research/native_parametric_mesh.rs): the trim points' coordinates join the knots ofu; for a face not meshed on its grid the knots ofvtake thevof the trim's steps and cusps (trim_steps) and no longer every trim point's;trimmed_cellsno longer asks a trim point'svto be a knot (a point off theuknots is refused as before). Four failure-first tests of the pure helpers: a trim point between thevknots is a corner and not a cut, a point on a vertical side between them is covered all the same, the vertices a strip beside passes by are the steps and the cusps (an L, a diamond, a square with a diamond hole), and a step of the trim is a vertex of the strips on both sides when itsvis a knot while chord steps alone leave a free edge off the trim.tools/re/mesh_tjunctions.py(new): the crack count, per class of the owning product, over a kept export.reports/element-framing/RE-437-trimmed-face-cuts.md, the reconnaissance addendum,changelog.d/changed/1737-trimmed-face-cuts.md, and the sentence ofchangelog.d/changed/1706-trimmed-faces.mdthat said every trim point was a knot.Testing
The measured commit is
70bef87acfbe(ee2d9dfe, the steps rule, merged overmaina0c1c61a), archived asrefs/archive/2026-11-11/cited/70bef87acfbe; the commits after it change the report, the fragments, the addendum and this description, and no source.keep_ifc(43091480051, againstmaina0c1c61a; GitHub's artifact outage of 2026-11-11 failed the uploads of 8 shards, whichgh run rerun --failedre-ran as attempt 2) andtiming(43091485302). Rows registered on Trimmed faces: an element drawn from a revolved or ruled face costs 9,000 to 17,000 triangles where Revit's export of it costs about 1,700 #1737 before the run (comment 6805810741) all hold: rows 1, 2, 4, 5 and 6 outright; row 3 on its registered columns (against Revit's export no class's median volume moves, and the counts within 1% of its volume and with every vertex of Revit's within 0.001 ft fall on no class), with the shower head's 0.01 ft column as a measured negative (RE-437 section 4); row 6: export time 0.97 to 1.02 and peak memory 0.98 to 1.05 ofmain's (1.05 asked), the office 1.00 in both.aafa5b1a, kept underrefs/archive/2026-11-11/cited/aafa5b1a2f15), held its five rows and left 344 cracks in the toilets: kept as the negative result in RE-437 section 2.same-project gatesand the semantic check on the measured commit;full / CI passedon the final headAudit-honesty checklist
changelog.d/changed/.reports/element-framing/RE-437-trimmed-face-cuts.md(status, artefact hashes by run, measured counts, reproduce commands naming a commit).Legal and contribution hygiene
Breaking changes
None.
Related issues
Refs #1737 (the chord, the third lever, stays open). Follows #1715, #1744, #1709.