Repository navigation
feat(ifc): a wall's, ramp's, light fixture's and pipe segment's PredefinedType is its own or its type's (#1713) - #1787
Merged
Conversation
…finedType is its own or its type's (#1713)
This was referenced Nov 11, 2026
Open
DrunkOnJava
marked this pull request as ready for review
November 11, 2026 21:40
DrunkOnJava
deleted the
feat/1713-wall-ramp-light-pipe-predefined-type
branch
November 11, 2026 22:20
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.
DrunkOnJava
added a commit
that referenced
this pull request
Nov 14, 2026
…t is an IFC4 enumerator, so the wall hatches of the BIM4LCA files are TRAPDOOR as in Revit's export (#1713) (#2001) ## Summary A door takes its own or its type's "IFC Predefined Type" where that is one of IFC4's `IfcDoorTypeEnum` enumerators, as a railing, a wall, a ramp, a light fixture and a pipe segment already do (#1765, #1787). Revit's export writes `TRAPDOOR` on 52 doors of the BIM4LCA files, the wall hatches of its family `LU-3.VSS` among them (3 on each of the four housing files, 10 on each of the four office files), and `DOOR` on every other door of every model measured; rvt-rs wrote `DOOR` on all. A door with no value keeps `DOOR`. Part of #1713. ## Motivation #1713's table: `IfcDoor` 1,508 in both, 1,456 same, 52 differs, `TRAPDOOR` where rvt-rs writes `DOOR`. `IfcDoor` was left out of `PREDEFINED_TYPE_ENUMERATORS` since #792 because listing it would apply every door's own value as well, which was not measured. The baseline scorer run (Measure [43573832361](https://github.com/DrunkOnJava/rvt-rs/actions/runs/43573832361), `main` at `dc6b4721`) shows where that matters: the 52 are the only doors that differ on the 42 models with a Revit export, and the held-out pairs show `DOOR` on all of theirs but the 2027 pair's, where Revit's export writes none (`IfcDoor` is among the classes rvt-rs leaves off from Revit 2027, #1692). ## Changes - `src/ifc/category_map.rs`: `("IFCDOOR", ["DOOR", "GATE", "TRAPDOOR", "USERDEFINED", "NOTDEFINED"])` in `PREDEFINED_TYPE_ENUMERATORS`, and the doc comment says why `IfcStair` alone stays out. - A changelog fragment. ## Testing Registered before the run. Measure unfiltered against `main`, with nordic, r2025, samples, holdout and racadv: 1. On the four BIM4LCA housing files and the four office files, `IfcDoor` differs goes from 3, 3, 3, 3 and 10, 10, 10, 10 to 0 and "same" rises by the same; on every other model "differs" and "unset" stay 0 and "same" does not move. 2. `IfcDoorType` reads Revit's on those files too: the office's 5 types with `TRAPDOOR` (rvt-rs `{'DOOR': 95}` against Revit `{'DOOR': 90, 'TRAPDOOR': 5}` before). 3. The exports that move are the eight BIM4LCA files and any model with a door whose value is an enumerator other than `DOOR` (listed from the run). Every other export is byte-identical to `main`'s; held-out counts do not move for the worse. 4. `same-project gates` pass. - [ ] `tools/check-local.sh`: no local builds; `rustfmt --check` passes; CI runs the rest. ## Result Measure [43574526160](https://github.com/DrunkOnJava/rvt-rs/actions/runs/43574526160): `f5f37841` against `main` at `dc6b4721`, unfiltered with nordic, r2025, samples, holdout and racadv. The commit after it changes `docs/compatibility.md` only. 1. **Holds.** `IfcDoor` differs goes from 3, 3, 3, 3 on the housing files (74 of 74, 74 of 74, 76 of 76, 76 of 76 same) and 10, 10, 10, 10 on the office files (269 of 269, 269 of 269, 266 of 266, 266 of 266) to 0; "unset" and "NOTDEFINED where Revit writes none" stay 0. 2. **Holds.** `IfcDoorType` reads Revit's on all eight: the office's types go from `{'DOOR': 95}` against Revit's `{'DOOR': 90, 'TRAPDOOR': 5}` to `{'DOOR': 90, 'TRAPDOOR': 5}`, and the housing's from `{'DOOR': 31}` against `{'DOOR': 29, 'TRAPDOOR': 2}` to Revit's (the other files alike). 3. **Holds.** Only the eight BIM4LCA files move: 118 of 126 exports are byte-identical (the R2025 models, the held-out pairs, the samples, RE1, Core Interior and the terrain files among them) and 102 of 102 `diagnostics.json` files are identical, so no other door anywhere carries a value other than `DOOR`. 4. **Holds.** `same-project gates` pass on `f5f37841`, and so does the semantic check (1 finding in 42 models). ## Audit-honesty checklist - [x] No claim beyond what the run will show. - [x] A changelog fragment. - [x] No private paths or emojis. ## Legal and contribution hygiene - [x] Apache-2.0; no Autodesk source; no fixtures. ## Breaking changes None. ## Related issues Part of #1713.
This was referenced Nov 14, 2026
DrunkOnJava
added a commit
that referenced
this pull request
Nov 14, 2026
…fined type where that is an IFC4 enumerator, so the USERDEFINED proxy of each BIM4LCA file is written as in Revit's export (#1713) (#2009) ## Summary A building element proxy takes its own or its type's "IFC Predefined Type" where that is one of IFC4's `IfcBuildingElementProxyTypeEnum` enumerators, as a railing, a wall, a ramp, a light fixture, a pipe segment and a door already do (#1765, #1787, #2001). In each of the twelve BIM4LCA files (six housing, six office) one proxy carries `USERDEFINED` as its own "IFC Predefined Type" under an "Export to IFC As" of `IfcBuildingElementProxy` (probe, Measure 43588996635: element 1337778 of the housing files, 1337610 of the office), Revit's export writes `USERDEFINED` on it, and rvt-rs left it unset. A proxy with no value keeps the `NOTDEFINED` of `NOTDEFINED_DEFAULTS`. Part of #1713. Measure 43589444447 (`5e15df52` against `main`, unfiltered) moves those 12 exports and no other: - `IfcBuildingElementProxy`: 116 in both, same 104 to 116, unset 12 to 0; differs and `NOTDEFINED` where Revit writes none stay 0. Per file the proxy reads `USERDEFINED`: same 2 to 3 of 3 on the four large housing files, 0 to 1 of 1 on the two housing terrain files, 11 to 12 of 12 on the office as built and at permit, 10 to 11 of 11 on its two timber files, 0 to 1 of 1 on its two terrain files. - `IfcBuildingElementProxyType`: each type object follows its proxy, so rvt-rs's `USERDEFINED` goes from 0 to 12 (Revit's 12) and its `NOTDEFINED` from 54 to 42 (Revit's 36; the 6 type objects more than Revit's are not this change). - `diagnostics.json`: 102 of 102 identical. The held-out pairs and every other export are identical. ## Motivation #1713's census after #2002: `IfcBuildingElementProxy` 116 in both, 104 same, 12 unset where Revit writes `USERDEFINED`, 0 differs, 0 `NOTDEFINED` where Revit writes none. The class was left out of `PREDEFINED_TYPE_ENUMERATORS` because listing a class applies the own value of every element a category maps to it, which was not measured for proxies. ## Changes - `src/ifc/category_map.rs`: `IFCBUILDINGELEMENTPROXY` and its seven enumerators in `PREDEFINED_TYPE_ENUMERATORS`, with the evidence in the table's doc comment. - A changelog fragment. ## Testing Measure [43589444447](https://github.com/DrunkOnJava/rvt-rs/actions/runs/43589444447): `5e15df52` against `main` at `32ed4e6a`, unfiltered with nordic, r2025, samples, holdout and racadv. 1. **Holds.** The 12 unset proxies read `USERDEFINED`, equal to Revit's; no proxy of the 42 models, nor of the held-out pairs (counts only: 48 of 48 same, before and after), changes value otherwise. 2. **Holds.** 114 of 126 exports are identical to `main`'s, and so are all 102 `diagnostics.json` files; the 60 scorer lines that move are the proxy and proxy-type rows of the 12 files (5 each). 3. **Not shown.** A proxy whose "IFC Predefined Type" is text that is no enumerator is left unset, as before: no measured file holds one. - [ ] `tools/check-local.sh`: no local builds; `rustfmt --check` passes; CI runs the rest. ## Audit-honesty checklist - [x] The Summary states each change the run showed, with its count. - [x] A changelog fragment. - [x] No private paths or emojis. ## Legal and contribution hygiene - [x] Apache-2.0; no Autodesk source (the rule is Revit's measured export); no fixtures. ## Breaking changes None. ## Related issues Part of #1713.
DrunkOnJava
added a commit
that referenced
this pull request
Nov 14, 2026
…its own or its type's is NOTDEFINED on Revit 2024, as Revit's export writes it (#1713) (#2008) ## Summary A ramp or a geographic element with no "IFC Predefined Type" of its own or its type's is written with the `PredefinedType` `NOTDEFINED` on Revit 2024, as Revit's export writes it. After #2002 the residual census of #1713 (Measure 43583771747, 42 models with a Revit export) had 6 `IfcRamp` and 6 `IfcGeographicElement` unset where Revit writes `NOTDEFINED`, with "differs" and "NOTDEFINED where Revit writes none" at 0. The two entries join furniture, roofs, stairs, stair flights, proxies and railings in `NOTDEFINED_DEFAULTS`, on 2024 only: no other measured file and no held-out pair holds a ramp or a geographic element in both exports (RE-353). Part of #1713. Measure 43588992984 (`621e4707` against `main`, unfiltered) moves 7 exports: - `IfcRamp`: the one ramp of each of the six BIM4LCA housing files reads `NOTDEFINED`, unset 1 to 0 and same 0 to 1 on every file (38 in both on the 42 models, same 32 to 38). - `IfcGeographicElement`: 3 of the 23 on each of the two housing terrain files read `NOTDEFINED`, unset 3 to 0 and same 20 to 23 of 23 (Revit writes `NOTDEFINED` on 3 and `USERDEFINED` on 20). - The seventh export is Autodesk's Snowdon Towers architectural sample (no Revit export on Measure), whose 2 ramps now carry `NOTDEFINED`, as Revit's local IFC4 export of the sample writes on both. - `diagnostics.json`: 102 of 102 identical. The held-out pairs and every other export are identical. ## Motivation #1713's table: `IfcRamp` was 6 unset after #1787 ("a ramp Revit writes `NOTDEFINED` on"), and the geographic elements of the terrain files were not in it. ## Changes - `src/research/partition_schema_mvp/fields.rs`: `("IFCRAMP", &[2024])` and `("IFCGEOGRAPHICELEMENT", &[2024])` in `NOTDEFINED_DEFAULTS`, with their evidence in the table's doc comment. - A changelog fragment. ## Testing Measure [43588992984](https://github.com/DrunkOnJava/rvt-rs/actions/runs/43588992984): `621e4707` against `main` at `32ed4e6a`, unfiltered with nordic, r2025, samples, holdout and racadv. 1. **Holds.** On every model that had one, "unset in rvt-rs" goes to 0 and "same" rises by the same: 6 of 6 ramps and 6 of 6 geographic elements. "Differs" and "NOTDEFINED where Revit writes none" stay 0 in every class of every model. 2. **Holds.** 119 of 126 exports and 102 of 102 `diagnostics.json` files are identical to `main`'s; the 28 scorer lines that move are the ramp and geographic-element rows of the six housing files. 3. **Not shown.** No file of another release holds either class in both exports, so neither default is measured outside Revit 2024 (RE-353). - [ ] `tools/check-local.sh`: no local builds; `rustfmt --check` passes; CI runs the rest. ## Audit-honesty checklist - [x] The Summary states each change the run showed, with its count. - [x] A changelog fragment. - [x] No private paths or emojis. ## Legal and contribution hygiene - [x] Apache-2.0; no Autodesk source (the rule is Revit's measured export; `revit-ifc`'s `IFCExportInfoPair` is cited, not quoted); no fixtures. ## Breaking changes None. ## Related issues Part of #1713.
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 gives a
PredefinedTypeto everyIfcWall,IfcRamp,IfcLightFixtureandIfcPipeSegment; rvt-rs wroteNOTDEFINEDon 3,842 of 4,359 walls and$on all 38 ramps, 174 light fixtures and 48 pipe segments of the 42 models with a Revit export (#1713). This adds four rows tocategory_map::PREDEFINED_TYPE_ENUMERATORSwith the IFC4 enumerators ofIfcWallTypeEnum,IfcRampTypeEnum,IfcLightFixtureTypeEnumandIfcPipeSegmentTypeEnum, so an element of one of the four takes its own or its type's "IFC Predefined Type" where that value is an enumerator of the entity — the same rule RE-45, RE-419 and #1765 already apply to slabs, coverings, shading devices, roofs, the terminals, furniture and railings.Nothing else changes. The
Wall,ArcWall,Ramp,LightingFixture,PipeandGuttermapping rows keep theirpredefined_type(NOTDEFINEDfor the two wall rows,Nonefor the other four), so a wall with no value keepsNOTDEFINEDand a ramp, light fixture or pipe segment with none keeps$.category_map::predefined_type_left_outstill keeps the occurrence's value off a Revit 2027 save, walls included (#1692).Evidence
What Revit writes, per class, on the BIM4LCA office as built (
revit.ifc, Revit 2024), paired withrvt-rs.ifcbyTag:PredefinedTypeIfcWallPARTITIONING450,SOLIDWALL96,SHEAR53,PARAPET4,PLUMBINGWALL2,NOTDEFINED2NOTDEFINED607IfcRampSTRAIGHT_RUN_RAMP5$5IfcLightFixtureSECURITYLIGHTING43$43IfcPipeSegmentGUTTER12$12Every value is an enumerator of its entity, and no element of the four carries a value outside the list. The issue's widened scorer on the 42 models with a Revit export reads the same: 3,842 of 4,359 walls, all 38 ramps, all 174 light fixtures and all 48 pipe segments unset or
NOTDEFINEDin rvt-rs where Revit writes a value,differs0 on all four classes.Where the value comes from. Each class's type objects carry it: the office's
IfcPipeSegmentTypeJSV-3isGUTTER, its twoIfcLightFixtureType(OPA-1,OPA-2) areSECURITYLIGHTING, its fourIfcRampTypeAP-ulkoluiskaareSTRAIGHT_RUN_RAMP, and its 25IfcWallTypecarry the wall values. That is the type's "IFC Predefined Type", whichattach_ifc_export_overridesalready attaches to the element asm_ifc_predefined_type(ExportParameters::effective_predefined_type: the element's own, else its type's). RE-45 measured the same parameter on a wall type:teste_export_2025wall type 402 carriesIFC_EXPORT_PREDEFINEDTYPE_TYPE = "CLADDING"and Revit writes its 3 wallsIFCCOVERING .CLADDING., so a wall's occurrence value does fall back to its type's. The only thing that kept the value out of the export was that the four entities were not in the enumerator table, sopredefined_type_forreturnedNoneand the mapping's own value was written.The one place the value is not the type's alone. The office's wall type
KS-3has 6 walls: 4SOLIDWALLand 2NOTDEFINED. Revit writes twoIfcWallTypeobjects for it,SOLIDWALLandSTANDARD, and its twoIfcRelDefinesByTypetype the 4SOLIDWALLwalls by the first and the 2NOTDEFINEDones by the second. So the occurrence's value is the element's own before its type's, which is the ordereffective_predefined_typealready takes; the 2 walls carry their ownNOTDEFINED. This is the case the measurement has to confirm: if the reader does not find a wall's own value, those 2 would be writtenSTANDARDand the wall row would readdiffers2.What stays as it is. A wall with no value of its own or its type's keeps the mapping's
NOTDEFINED, which is what Revit writes on the 517 walls it writesNOTDEFINEDon. A ramp, light fixture or pipe segment with no value keeps$: Revit writesNOTDEFINEDon some of the 38 ramps, and no 2027 export of those three classes is measured, so noNOTDEFINEDdefault is added to their rows (the reason RE-419's furniture default is release-gated). A value that is no enumerator of the entity is left to the mapping, as before.Why
IfcStairandIfcDoorare still not listed. The table's doc comment says listing them would apply every door's and stair's own predefined type as well, which is not measured. That reason does not apply to the four: each is reached by the rows of one or two Revit categories (Wall and ArcWall, Ramp, LightingFixture, Pipe and Gutter), and the elements of those rows are the ones measured above.The CI check on Core Interior.
tools/ci/ifc_schema_arity.py --witness-agreementasserts every writtenIfcWallPredefinedTypeis in{"NOTDEFINED"}, the value Revit's own export of2024_Core_Interior_slim.ifcwrites on all 360 walls. A wall there can only take another value if the reader finds one Revit's export does not write, which the measurement would show asdiffers; the check cannot move otherwise.IfcWallstays inPREDEFINED_TYPE_REQUIRED, since the mapping'sNOTDEFINEDstill fills the slot on a wall with no value.Changes
src/ifc/category_map.rs:IFCWALL,IFCRAMP,IFCLIGHTFIXTUREandIFCPIPESEGMENTjoinPREDEFINED_TYPE_ENUMERATORSwith exactly the IFC4 enumerators ofIfcWallTypeEnum,IfcRampTypeEnum,IfcLightFixtureTypeEnumandIfcPipeSegmentTypeEnum, in schema order; the table's doc comment records the office's per-class counts, theKS-3case and why theIfcStair/IfcDoorreason does not apply.changelog.d/fixed/1713-wall-ramp-light-fixture-pipe-predefined-type.md: the user-visible change.docs/compatibility.md: the sentence that reads the Core Interior walls'.NOTDEFINED.as the value rvt-rs writes now says it is the default, replaced by a wall's own or its type's value where that is anIfcWallTypeEnumenumerator.docs/evidence.md: the conduit, conduit fitting and gutter row no longer says a gutter carries noPredefinedType.No test is edited.
tests/fixtures/synthetic-project.ifcholds fourIFCWALL .NOTDEFINED.whose elements are synthesized and carry no export parameter, so they keep the mapping's value.The rows the measurement must show
Unfiltered Measure against
mainataa5dc4c6d9, with the BIM4LCA office and housing, the 23 Revit 2025 models, Autodesk's samples,rac_advanced, BIMcollab and the held-out pairs:IfcWallIfcRampNOTDEFINEDonIfcLightFixtureIfcPipeSegmentdiffers0 on all 4,359, and the 2KS-3walls of the office stillNOTDEFINED.unset0: Revit writesNOTDEFINEDon some ramps, and a light fixture or gutter whose type rvt-rs does not join has no value to take. Those stay$, as before.type_objects_vs_ifc's tallies move on the office (its 25IfcWallTypefromNOTDEFINEDto the wall values, its 4IfcRampTypetoSTRAIGHT_RUN_RAMP, its 2IfcLightFixtureTypetoSECURITYLIGHTING, itsIfcPipeSegmentTypetoGUTTER). No WHERE rule finding is expected:USERDEFINEDwith noObjectTypeis still left unset by the writer (Exports break EXPRESS rules: swept solids under SweptSolid, USERDEFINED types with no ElementType, a material on a disallowed entity #1430).What was not checked
cargo build, nocargo clippy, nocargo test. CI builds and tests this head.KS-3pair is the one element of the evidence that could make the wall row readdiffers2, and if it does, the wall row must come out of this change until the reader's own-value path is shown to reach a wall.attach_ifc_export_overridesruns overout.wallsand reads the element's ownIFC_EXPORT_PREDEFINEDTYPEbefore its type's, and RE-45 measured a wall type's value reaching the occurrence, but no probe has listed a wall's own value.differs.docs/release-1.0-criteria.md's RE-427 sentence still reads the wall row of PredefinedType: Revit's export writes one that rvt-rs leaves none or NOTDEFINED on, on walls, railings, ramps, roofs, proxies, light fixtures, pipe segments and stairs (42 models with a Revit export) #1713 as open. It is left alone here: it is the line feat(ifc): a railing's PredefinedType is its own or its type's value (#1713) #1765 edits, and its numbers are a Measure run this change does not have yet. It should be updated with the measurement's row.NOTDEFINEDdefault is added to their rows.Measured
Unfiltered Measure 43100947234 with the held-out pairs (head
4d047255, this change's commit438473f9with #1789's one commit on top, againstmainate8a99d03; rows registered on #1636 before it was read; 42 shards and both same-project gates pass). Exactly 12 of 126 exports move, the 12 BIM4LCA files: every Revit 2025 model, held-out pair, sample save and Core Interior is byte-identical.IfcWall(12 files)IfcRamp(6 files)IfcLightFixture(4 files)IfcPipeSegment(4 files)KS-3walls that hold their ownNOTDEFINEDamong them: the reader finds a wall's own value before its type's.Still open
NOTDEFINEDon some ramps, and no 2027 export of the three is measured.TRAPDOOR.Testing
Breaking changes
None.