Repository navigation
feat(ifc): a hollow-section column's NetVolume is the volume Revit computes (#1016) (RE-247) - #1773
Merged
Merged
Conversation
…t computes (RE-247)
DrunkOnJava
marked this pull request as ready for review
November 11, 2026 21:40
DrunkOnJava
added a commit
that referenced
this pull request
Nov 11, 2026
… (#1789) ## Summary On the BIM4LCA housing terrain model, 23 elements carry an "Export to IFC As" of `IfcGeographicElement` and Revit's own export writes every one of them as that entity, while rvt-rs wrote them as `IfcFurniture` (9), `IfcBuildingElementProxy` (12) and `IfcSlab` (2). The value was read but not honoured: `EXPORT_OVERRIDE_TARGETS` had no `IfcGeographicElement` entry, so `lookup_export_override_for` found nothing and each element kept its category's entity. This adds the target, limited to the four classes the export diagnostics name, with the element's own or its type's "IFC Predefined Type" where that is an `IfcGeographicElementTypeEnum` enumerator. The two floors are the ones #1772 opened with (Tags 1455094 and 1455321, `Floor:AP-nostopaikka.sijainti`): they are `IFCSLAB(..., '1455094', .USERDEFINED.)` today and carry the six `Qto_SlabBaseQuantities` values Revit does not write. ## Evidence **The rule.** An element of class `Floor`, `Furniture`, `Planting` or `SpecialtyEquipment` whose own or its type's "Export to IFC As" is `IfcGeographicElement` is written as `IFCGEOGRAPHICELEMENT`, with `PredefinedType` the element's own or its type's "IFC Predefined Type" where that is one of IFC4's `IfcGeographicElementTypeEnum` values, `TERRAIN`, `USERDEFINED` and `NOTDEFINED`, and `$` where it is not. **What it covers, from `evidence/nordic-housing-terrain-concrete`** (rvt-rs's diagnostics for the same model name exactly these 23: "IfcGeographicElement on Furniture 9, IfcGeographicElement on Planting 9, IfcFlowTerminal on SpecialtyEquipment 3, IfcGeographicElement on SpecialtyEquipment 3, IfcGeographicElement on Floor 2"): - `class_sets_vs_ifc.txt`: Revit's 65 `IfcGeographicElement` are 0 same, 23 written as another class (`IfcFurniture` 9, `IfcBuildingElementProxy` 12, `IfcSlab` 2) and 42 absent. The 23 are exactly the elements carrying the value; the 42 absent are `Toposolid` (5), `U2BicyclePost` (6) and `Sub-Division` (31), classes rvt-rs does not map at all and which this change does not touch. - `predefined_types_vs_ifc.txt`: Revit's `IfcGeographicElementType` carry `TERRAIN` 30, `USERDEFINED` 11, `NOTDEFINED` 1, and on the 23 elements Revit writes `USERDEFINED` on 20 and `NOTDEFINED` on 3. rvt-rs reads those same values as the element's own or its type's "IFC Predefined Type", so each of the 23 gets Revit's value: the 9 furniture, 6 planting, 3 specialty equipment and 2 floors `USERDEFINED`, the 3 planting `NOTDEFINED`. Checked in `rvt-rs.ifc`: 1421668 is `IFCFURNITURE(..., .USERDEFINED.)`, 1414066 and 1393277 are `IFCBUILDINGELEMENTPROXY(..., $)`, 1405092 `IFCBUILDINGELEMENTPROXY(..., $)`, 1455094 `IFCSLAB(..., .USERDEFINED.)`. - `qtos_vs_ifc.txt`: the six "rvt-rs quantities Revit does not write" are all on the two floors (`Depth` 1, `GrossArea` 2, `GrossVolume` 1, `NetVolume` 2), "Revit's Qto_SlabBaseQuantities: none". Traced in the code: every slab quantity is gated on the entity, not the class. `add_slab_gross_area` returns at `ifc_type != "IFCSLAB"`, `level_slab` and `shaped_floor_body` likewise, and `add_slab_pitch` is only reached through those two, so no slab set survives the entity change. `Pset_SlabCommon` is not written either: `reference_set_kinds` filters `STANDARD_PROPERTY_SETS` by `applies_to(ifc_type, ...)` and the set applies to `IFCSLAB` alone, and `is_external_set` has no arm for the new entity. - `psets_vs_ifc.txt`: Revit writes no `Pset_SlabCommon` on the two floors, no `Pset_FurnitureTypeCommon.Reference` on the 9 furniture and no `Pset_BuildingElementProxyCommon` on the 12 proxies; all three are in its "rvt-rs values Revit does not write" list, so they go with the class. The measurement will give the new total (49 today). - `type_objects_vs_ifc.txt`: "entity disagrees: 23 `IfcGeographicElement`" and "typed in ours: 501 of 501". Without a type entity the 23 would lose their type object, so `type_entity_for` gains `IFCGEOGRAPHICELEMENT` (tail `PredefinedType`, IFC4's `IfcGeographicElementType` declaring nothing after `ElementType`) and `revit_ifc_type_entity_name` gains its revit-ifc name for the hashed GlobalId of a second type object of one type, as RE-417 did for `IfcSolarDevice` and `IfcTransportElement` (commit 134db97). Each of the 23 is then typed by an `IfcGeographicElementType` with `USERDEFINED` or `NOTDEFINED`, both of which Revit writes. **What it leaves out.** The value is acted on for the four classes only (`OVERRIDE_CLASS_LIMITS`), because that is what is measured; revit-ifc takes the entity from the value on any `IfcProduct` (`ExporterUtil.GetExportType`), so the limit is the evidence's, not Revit's. An element of those classes carrying the value but no "IFC Predefined Type" is written with `$`: what Revit writes for one is not measured, so the target's default is `None` rather than a guess. The 42 `IfcGeographicElement` of Revit's export that rvt-rs does not write at all are `Toposolid`, `U2BicyclePost` and `Sub-Division`, unmapped classes outside this task. The three `IfcFlowTerminal` on `SpecialtyEquipment` are a different value with no target and stay `IfcBuildingElementProxy`, as they are; the diagnostics will still count them ("3 element(s) carry an "Export to IFC As" value the export does not apply ... IfcFlowTerminal on SpecialtyEquipment 3"). **The body** is unchanged: geometry is chosen by the decoded class, not the entity, so the 23 keep the bodies they have today. **No other model moves.** The office as-built diagnostics list only `IfcShadingDevice`, `IfcWall` and `IfcCovering` values, and the concrete housing as-built carries no `IfcGeographicElement` value at all, so no element of either changes class. **The measurement this pull request must name**, on both housing terrain models: of Revit's 65 `IfcGeographicElement`, how many rvt-rs writes as that class (23 are written as another class today: `IfcFurniture` 9, `IfcBuildingElementProxy` 12, `IfcSlab` 2, and 42 are absent and stay absent), "rvt-rs quantities Revit does not write" 6 to 0, and no class count moving on any other model. ## Changes - `src/ifc/category_map.rs`: the `IfcGeographicElement` target, its class limit to `Floor`, `Furniture`, `Planting` and `SpecialtyEquipment`, the `IfcGeographicElementTypeEnum` enumerators in `OVERRIDE_ONLY_ENUMERATORS`, and the doc comments. - `src/ifc/step_writer.rs`: `IFCGEOGRAPHICELEMENT` typed by `IFCGEOGRAPHICELEMENTTYPE`, and that entity's revit-ifc name for the hashed GlobalId. - `changelog.d/changed/1772-geographic-element.md`: the fragment. - `docs/supported-profile.md`, `docs/evidence.md`, `docs/support-matrix.json`: the honoured value and the evidence for it. No unit tests added; no test pins a value this moves. ## What was not checked I could not compile or run anything, so CI must confirm that the new target, the class limit and the enumerator list build and pass clippy, and that the writer emits `IFCGEOGRAPHICELEMENT(..., 'Tag', .USERDEFINED.)` and `IFCGEOGRAPHICELEMENTTYPE(..., .USERDEFINED.)` with the attribute counts IFC4 declares. The measurement must confirm, on both terrain models, the class counts above, the six quantities going to 0, the `PredefinedType` of the 23 and of their type objects, the property sets that go with the old classes, and that no other model's class counts move. The timber terrain model's own diagnostics and export were not in the evidence I could read: its 23 elements are assumed to be the same as the concrete model's, and the measurement is what settles it. ## Measured Unfiltered Measure 43100947234 with the held-out pairs (head `4d047255`: #1787's commit and this change's on top, against `main` at `e8a99d03`; rows registered on #1636 before it was read; 42 shards and both same-project gates pass). Only the four terrain models move for this change. | Model | Revit's `IfcGeographicElement` written as that class | written as another class | "quantities Revit does not write" | "values Revit does not write" | |---|---:|---:|---:|---:| | Housing terrain, concrete | 0 to 23 of 65 | 23 to 0 | 6 to 0 | 49 to 6 | | Housing terrain, timber | 0 to 23 of 65 | 23 to 0 | 6 to 0 | 49 to 6 | | Office terrain, concrete and timber | 0 to 1 of 105 each | 1 to 0 each | unchanged | 2 to 0 each | - `PredefinedType` same as Revit on the 20 `USERDEFINED` elements of each housing terrain model and on the office terrain's one, differs 0; the 3 Revit writes `NOTDEFINED` on are unset. - "different" is unchanged in both censuses, and no value becomes missing (1,575 and 1,578 property values equal before and after on the housing terrain models). - The cause was confirmed beforehand from rvt-rs's own diagnostics for the housing terrain model: 26 elements carry an "Export to IFC As" value the export does not apply, 23 of them `IfcGeographicElement`. The three enumerators equal IfcOpenShell's IFC4 schema tables. ## Still open - The 42 (housing) and 104 (office) terrain elements Revit writes as `IfcGeographicElement` that rvt-rs does not write at all. - The 3 elements Revit writes `NOTDEFINED` on. - #1751 (a sloped floor's `Depth`) can come back once this lands: the floor it tripped on is no longer a slab. ## Testing - Built, linted and tested by CI on this head; nothing was built on a workstation. - Measure 43100947234 measured 4d04725, which is #1787's head 438473f with this patch cherry-picked on top; the same-project gates verdict (pass) and the semantic verdict are on that commit, not on this branch's own head. #1787 has landed (`ed57e095`) and `main` is merged in here as `7ccd202a`, a clean merge: `git diff origin/main 7ccd202 -- src` is byte-equal to `git diff 438473f 4d04725 -- src` (index lines apart), and the delta outside `src` is byte-equal to this branch's own commit's. `main` also holds #1773 and #1771 since the run; neither touches `category_map.rs` or the two lines of `step_writer.rs` this changes. Measure 43108424934 measures this change again on `main` at `e7ac68e7` with everything else unlanded. - No test was added, and no pinned count moves: only the four terrain models' exports change. ## Breaking changes None.
This was referenced Nov 11, 2026
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.
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
Revit's export writes
Qto_ColumnBaseQuantities.NetVolumeon all 279 columns of the BIM4LCA office as built and rvt-rs writes it on 199 (Qto_ColumnBaseQuantities.NetVolume: 279, equal 199, different 0, missing 80,Missing…: 80; on IfcColumn x80). The 80 are the office's 79 hollow-section columns plus the round column: 199 box-drawn columns (RE-291) plus 79 hollow sections plus the one round column is 279, and the missing sets are exactly the four-property ones (Length,CrossSectionArea,OuterSurfaceArea,GrossVolume) thatadd_body_quantitieswrites for an unjoined column drawn as its type's hollow section.hollow_section_area_perimeteralso wroteGrossVolumeas the section's true area times the depth, and Revit'sGrossVolumeis equal there (278 of 279), so those columns are uncut and onlyNetVolumeis absent.The value Revit writes is not the section's area times the length: it is the volume Revit computes, which the arcs of the profile's rounded corners are missing from — the section's outside rectangle less its inside one, times the extrusion's depth. Measured on both IFC files of the office, matching by Tag:
GrossVolume/ Revit'sCrossSectionAreaNetVolumeThe office's 79 hollow-section columns are of exactly these three types (
Hollow Sections-Column:PI-2,PI-4,PI-5), each column carrying its own copy of the same profile, so the rectangle area is a constant per type and the value is linear in the length rvt-rs already writes (equal to Revit's on 279 of 279).Evidence
src/ifc/export_content.rs:add_body_quantities(the pass that writes an unjoined column'sLengthand, for a hollow section, itsCrossSectionArea,OuterSurfaceAreaandGrossVolume) said "ItsNetVolumeis left out: Revit's export writes the volume Revit computes, less than that on every one of the BIM4LCA office's hollow columns" — the direction of that difference is the opposite of what the two files show, and the volume is derivable.hollow_section_profilebuilds the section from the family'sb,Ht,tandkras a rounded rectangle spanningb×Htwith a hole spanning(b-2t)×(Ht-2t), which is what makes the two rectangles readable from the profile itself.src/ifc/export_content/column_quantities.rs(RE-291/RE-353, which write the box-drawn and cut columns),src/ifc/saved_meshes.rs(add_mesh_volumes,add_column_quantities,drop_column_box_quantities— none replaces a value a set holds, so the new one stands),src/ifc/entities.rs(IndexedCurve.points),src/research/partition_schema_mvp/{fields,framing}.rs(HOLLOW_SECTION_FIELDS).nordic-office-as-built(above),nordic-office-timber-as-builtandnordic-housing-concrete-as-built— the timber office has 0 hollow-section columns (column_bodies_vs_ifc.txt:family_type_hollow_section: 0 columns), so no file whoseNetVolumeis already equal can lose it.gh issue view 1203(closed): item 2 is the round column, item 3 the cut columns; the hollow sections'NetVolumeis not named as a decided negative, and the closed negatives RE-19, RE-20 and RE-399 are about other values.docs/evidence.md,docs/supported-profile.md,docs/release-1.0-criteria.mdall listed the hollow-section column'sCrossSectionArea,OuterSurfaceAreaandGrossVolumewithout theNetVolume;docs/format-reconnaissance.md(RE-221, RE-424) anddocs/w10-rerun.mdstate the hollow columns' bodies and the mesh pass, neither of which moves.Rule written: on a column that no
CleanPairGStepjoins, drawn as its type's hollow section,NetVolumeis the section's outside rectangle less its inside one times the extrusion's depth, where both rectangles are read off the profile's own rings and the difference is finite and positive. It is written in the same block as the three values that column already gets, so it covers exactly the columns whose area Revit's export confirms (the 79 office columns), and nothing else changes: the round column, the cut columns, the box-drawn columns and every column that already holds aNetVolumeare untouched.Changes
src/ifc/export_content.rshollow_section_area_perimeteralso returns the area the section's two rectangles span (outside less inside), and a newring_rectangle_areareads a ring's rectangle from its points; the value is dropped where it is not finite and positive (None, so no value is written).add_body_quantitieswritesNetVolumeafterGrossVolumefrom it.docs/evidence.md,docs/supported-profile.md,docs/release-1.0-criteria.md: the hollow-section column'sNetVolumeadded to the quantities listed.changelog.d/added/247-hollow-column-net-volume.md: new fragment.Measured
One Measure run scored this change together with nine others it was drafted beside (run 43086493417, head
f5f54467, base5e3ac5b0: 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 onmainas 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, head53c19487againste8a99d03, 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.Qto_ColumnBaseQuantities.NetVolumeequal, beforeStill open
Stack: this is change 1 of 7; each branch holds the ones before it, so its own diff is its last commits until those land. First draft: #1750.
Testing
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.Audit-honesty checklist
changelog.d/Legal and contribution hygiene
Breaking changes
None.