Repository navigation
feat(ifc): write walls' side areas and volumes where nothing cuts them and their body is the record's box (#1046) (RE-270) - #1162
Conversation
…urtain members' IsExternal (#1046) (RE-270)
|
Owner review: |
…e floors it is joined to leave it whole (#1046) (RE-270) (#1166) ## Summary #1162 and #1152 are on `main`. rvt-rs now also writes a wall's `GrossSideArea`, `NetSideArea`, `GrossVolume` and `NetVolume` on a wall joined to roofs, floors or footings that lie clear of it, when its record confirms its length: 18 more office walls as built and 22 at building permit, Revit's on every one, none different and none Revit's export leaves out (RE-270, the second rule). 2 of each are walls #1152 cuts at a floor. ## Motivation #1046 step 1 (walls). The first rule (#1162) takes the walls nothing joins to or cuts. Most of the rest are joined to a floor or roof at the top. Two readings decide whether such a wall is still the prism its record's box gives: whether the elements it is joined to leave it whole, and whether the box's ends are Revit's. The first is measured on rvt-rs's own bodies, the second by the record's `Length` (RE-252: the curve cut back at its joins is as long as the curve, both ends read twice alike). Each is needed: with the joins clear but no length, 45 of 53 office walls as built are right; with both, 18 of 18 (RE-270 §4). ## The wall top cuts (#1152) The pass runs after `wall_tops`, on purpose (stated in `export_content/wall_areas.rs` and at the call site): it reads each extrusion at its final height, and a wall that pass cut has the floor's underside for its top, which that floor then clears. RE-267 §7 found Revit's export writes no `Height`, and so (RE-270 §1) no side areas, on the cut walls it draws as a mesh: 1746099 and 1767978 as built, 1488456, 1746099, 1795193 and 3363820 at permit, and nothing read tells them from the rest. None of them gets a value: each holds a step the rule does not allow (a cut pair or a cutout), or a body that is not the record's box with a confirmed length (1767978 as built is drawn from its line). The rule takes 2 cut walls in each office (2897628 and 2897629, joined to floor 2991742 alone, Revit's on all four quantities in both files); the 3 other cut walls with a confirmed length and a record-box rectangle (2872774, 2872775, 2872777) are also joined to slab 1875411, whose body lies inside their height, so they stay out. No cut wall gets a value Revit omits, so no exclusion of `wall_top_cut_at_covering_floor` walls was needed; the exclusion would cost 2 walls in each office. ## Changes - `src/research/native_walls.rs`, `src/research/partition_schema_mvp/{fields,walls}.rs`: `WallRecords::bounded`, the walls whose record holds no step but the harmless ones, `JoinToRoofGStep` and `CleanPairGStep`, with the ElementIds their roof and floor joins name (top and base), and `WALL_BOUNDED_FIELD` on each. - `src/ifc/export_content/wall_areas.rs` (new), `src/ifc/export_content.rs`: a pass after `wall_tops` writes the four quantities of the first rule on each such wall that carries a `Length`, whose body is the record's box (a rectangle) and whose named elements are slabs, roofs or footings drawn as plain extrusions lying wholly above its top or wholly below its base. `prism_quantities` is the one formula both rules use. - Core Interior's witness observations (one wall more: `IFCQUANTITYAREA` 489 to 491, `IFCQUANTITYVOLUME` 356 to 358, copied from Measure's witness output), RE-270 §4, README, W7 (its own line, as #1177 sets out), the supported profile, the reconnaissance addendum and `changelog.d/added/wall-areas-volumes-joined.md`. ## Testing Unit tests are banned in this repository; none added. Measure [41120485504](https://github.com/DrunkOnJava/rvt-rs/actions/runs/41120485504): this branch (972d215) against `main` (6eca8e0, with #1152 and #1162), every model and every scorer. Only `qtos_vs_ifc` and Core Interior's witness observations move; every other scorer's output and `diagnostics.decoded.parameter_value_count` are byte-identical to `main`'s. Since that head, the branch only merges `main` commits that touch no `src/` file (probes, `psets_vs_ifc.py`, the holdout scrub, docs), so the exports are unchanged. [41124825328](https://github.com/DrunkOnJava/rvt-rs/actions/runs/41124825328) lists each wall (`tools/re/wall_quantities_vs_ifc.py`). | | office as built | at permit | R2025 | |---|---:|---:|---:| | walls the second rule adds | 18 | 22 | 0 | | ... of them cut by #1152 | 2 | 2 | 0 | | walls carrying the four, with #1162's | 67 | 70 | 91 | | the four equal to Revit's, of those | 67 | 70 | 91 | | the four equal before, after (each quantity, of 579 and 607 as built, 565 and 589 at permit) | 49 to 67 | 48 to 70 | 91, unchanged | | quantities equal, before | 27,948 | 27,878 | 775 | | quantities equal, after | 28,020 | 27,966 | 775 | | different, before and after | 1 (the mullion) | 1 | 0 | | written that Revit's export omits | 0 | 0 | 0 | The R2025 walls under roofs are all under sloped roofs, which rvt-rs draws as solids and the rule does not measure. Left out and measured: walls a floor passes through, cut pairs, cutouts, embedded walls and sweeps (RE-270 §6). - [x] Verified end to end on real Revit files (BIM4LCA office, CC BY-SA 4.0; puzzbobb's R2025 models, Apache-2.0): Measure above, `tools/re/wall_quantities_vs_ifc.py` and `probes/examples/probe_1067_native_dump.rs` reproduce it - [x] Witness observations refreshed in this PR - [x] No local build: `rustfmt` only; CI is the gate ## Audit-honesty checklist - [x] README, W7, the supported profile and the reconnaissance addendum say what is and is not written - [x] Changelog fragment under `changelog.d/added/` - [x] Limitations (walls a join intrudes on, sloped roofs, walls without a confirmed length, mesh-drawn cut walls) are in RE-270 §4 and §6 and this body - [x] Reverse-engineering finding: scorer, probe, addendum and report included ## Legal and contribution hygiene - [x] Apache-2.0; clean-room: revit-ifc is read for what Revit's exporter writes and cited (`CreateWallBaseQuantities`), not copied
Summary
rvt-rs now writes a wall's
Qto_WallBaseQuantities.GrossSideArea,NetSideArea,GrossVolumeandNetVolumeon the walls whose native record holds no step that cuts, embeds or sweeps the solid and whose body is the record's box cut back at its joins, a rectangle. They are Revit's on all 49 of the BIM4LCA office's such walls as built, 48 at building permit and 91 R2025 walls, none different and none Revit's export leaves out (RE-270).Motivation
#1046 step 1 (walls). revit-ifc's
CreateWallBaseQuantities(24.1 and 24.2, the office's exporter) takes the side areas from the faces of the wall's joined solid,NetVolumefrom its volume andGrossVolumeas the type's width times the gross side area. Revit's export writes the first three exactly where it writes aHeightand theNetVolumeon every wall, so a body that is Revit's gives all four. This is the first slice: the walls where the record says nothing but the joins shapes the solid and the body is a plain rectangle. The rest (top joins, openings, cut pairs, layered bodies) follow as their own rules.Changes
src/research/native_walls.rs,src/research/partition_schema_mvp/{fields,walls}.rs:WallRecords::whole, the walls whose record holds no step butBaseWallGStep,JoinEndGStep,VCWSplitFaceGStep,WallRefPlanesGStep,WallJoinTweakGStepandVerticalExtensionOfLayersGStep, andWALL_WHOLE_FIELDon each.src/ifc/export_content.rs:add_wall_areas_and_volumeswrites the four from the body's rectangle: the longer side times the height for both areas, the rectangle's area times the height forNetVolume, the writtenWidthtimes the side area forGrossVolume.tools/re/wall_quantities_vs_ifc.py(new scorer): meshes both files' walls and works the candidate quantities out of the faces; it pins the definitions on Revit's own bodies and sorts rvt-rs's walls by what their records hold.research/witness/magnetar-2024-core-interior{,-slim}/observations/rvt-rs.json:IFCQUANTITYAREA211 to 489 andIFCQUANTITYVOLUME78 to 356 (139 Core Interior walls gain four quantities, counted apart: its export has base quantities off), copied from Measure's witness output.docs/supported-profile.md,docs/release-1.0-criteria.md(W7), README,changelog.d/added/wall-areas-volumes.mdandchangelog.d/research/wall-areas-volumes.md.Testing
Unit tests are banned in this repository; none added. Measure 41108951821: this branch (8890550, the code; the commits after it change a doc comment and the docs) against
main(d1ef190), every model and every scorer. Onlyifc.sha256andqtos_vs_ifcmove, apart from Core Interior's witness observations. Quantity census (tools/re/qtos_vs_ifc.py):GrossSideArea,NetSideArea,GrossVolume: equal before, afterNetVolume: equal before, afterThe four are written on every wall of the selected 188 and on no other, so no value Revit omits is written (Revit writes all four on each). Left out and measured: walls with a top join (217 as built that have only roof or floor joins and clean joins, 163 right on the side areas and 118 on the net volume), walls with openings, cut pairs, embedded walls or sweeps (334, 71 right on the net volume), bodies from a wall's line or layers (7), and
GrossFootprintArea, which Revit omits on one of the 49 as built (3184170) and one of the 48 at permit. RE-270 has the definitions pinned on Revit's own bodies, the tables, and the reproduce commands.tools/re/wall_quantities_vs_ifc.pyandprobes/examples/probe_1067_native_dump.rsreproduce itrustfmtonly; CI is the gateAudit-honesty checklist
changelog.d/added/andchangelog.d/research/Legal and contribution hygiene
CreateWallBaseQuantities), not copied