Repository navigation
feat(ifc): leave PredefinedType off beams, columns, plates and coverings from 2027 (#1716) - #1728
Closed
DrunkOnJava wants to merge 1 commit into
Closed
DrunkOnJava wants to merge 1 commit into
DrunkOnJava wants to merge 1 commit into
Conversation
7 tasks done
Owner
Author
|
Superseded by #1764: the same commit on a fresh branch, with the measured rows in its body. |
DrunkOnJava
added a commit
that referenced
this pull request
Nov 11, 2026
…ngs from 2027, as the exporter's source does (#1716) (#1764) ## Summary A Revit 2027 save is now written without a `PredefinedType` on the occurrence of beams, columns, plates and coverings as well as on the ten classes #1692 measured. The extension is taken from Autodesk's public exporter source and not from a measured export: no Revit 2027 export in the repository holds one of these four classes, so nothing measures it. The measured ten stay in their own constant, the four are a second one, and the predicate that the writer, the viewer's panel, the schedule CSV and the MCP server all ask chains the two. ## Evidence **What I read.** #1716 and #1714 (body, files, diff), RE-427 sections 3 and 4, `src/ifc/category_map.rs` (`PREDEFINED_TYPE_LEFT_OUT_FROM`, `PREDEFINED_TYPE_LEFT_OUT_CLASSES`, `predefined_type_left_out`, the `MAPPINGS` rows, `PREDEFINED_TYPE_ENUMERATORS`, `EXPORT_OVERRIDE_TARGETS`), `src/ifc/step_writer.rs` (the occurrence's attribute tail and `type_entity_for`), `src/ifc/export_content.rs` (where an element's predefined type is chosen and where a property set's scope is matched), `src/ifc/standard_property_sets.rs`, the three other callers (`scene_graph.rs`, `schedule_csv.rs`, `rvt-mcp/src/views.rs`), `tools/ci/ifc_schema_arity.py`, `tools/ci/ifc4_property_sets.py`, `tools/ci/validate-real-ifc.py`, `docs/status.md`, `docs/release-1.0-criteria.md`, `changelog.d/README.md` and two existing fragments. **The rule.** Autodesk's public exporter source (revit-ifc, `Source/Revit.IFC.Export/Toolkit/IFCInstanceExporter.cs`, tag `IFC_v27.4.0.30`; CLEANROOM.md source 5, cited and not quoted) writes an occurrence's `PredefinedType` only where the element has no type object when it is created. Its callers include the creators of beams, columns, plates, coverings, ramps, ramp flights, piles, mechanical fasteners, family-based curtain walls and grids, so a typed element of those classes is left out by the same rule that #1692 measured on ten classes. The helper first appears in `v27.3.0.12`, so the exporter's build decides and not the save's release (the caveat of #1472). **What rvt-rs writes today.** `IFCBEAM` `.BEAM.` (StructuralFraming), `IFCCOLUMN` `.COLUMN.` (Column, StructuralColumn), `IFCPLATE` `.CURTAIN_PANEL.` (CurtainWallPanel) and `IFCCOVERING` `.CEILING.` (Ceiling). Checked in the evidence export of nordic-office-as-built: `rvt-rs.ifc` writes `.BEAM.`, `.COLUMN.`, `.CURTAIN_PANEL.` and `.CEILING.` on those classes, and Revit's own 2024 export of the same model writes the same values on the same Tags. The 2027 samples hold beams (`rst_basic` 370), columns, plates and coverings that rvt-rs writes a value on, and no Revit 2027 export of them exists. **What the extension leaves out, and why.** - A ramp, ramp flight, pile, mechanical fastener and grid are left out by the same source, and rvt-rs writes no `PredefinedType` on any of them: no mapping row carries one, none is in `PREDEFINED_TYPE_ENUMERATORS`, and none is an export-override target. Listing them would change no file, so they are named in the constant's doc and not in the list. - `IFCCURTAINWALL` is not added. The source's family-based curtain wall is not the system curtain wall and curtain panel wall that rvt-rs writes as that entity (they go through the exporter's curtain system creator, as the existing note on `export_override_applies` records), and no 2027 export holds one, so the value stays: fail closed. - Footings, shading devices and the MEP terminals are not in the source's list and keep their value. **What does not move.** The type objects, their GlobalIds and the property sets that depend on a predefined type take the element's value as before: `type_entity_for` is called with the unfiltered value, and the property set scope is matched against the model's value, not the written attribute. So `Pset_CoveringCeiling` and the type objects of the four classes are unchanged. ## Changes - `src/ifc/category_map.rs`: new `PREDEFINED_TYPE_LEFT_OUT_CLASSES_FROM_SOURCE` (`IFCBEAM`, `IFCCOLUMN`, `IFCCOVERING`, `IFCPLATE`), chained in `predefined_type_left_out`; the measured ten stay in `PREDEFINED_TYPE_LEFT_OUT_CLASSES`, and the docs of both, of `PREDEFINED_TYPE_LEFT_OUT_FROM` and of the predicate say which is measured and which is from the source. - `src/ifc/step_writer.rs`: the comment at the call site no longer counts ten classes. - `tools/ci/ifc_schema_arity.py`: `IfcBeam`, `IfcColumn` and `IfcCovering` added to `PREDEFINED_TYPE_LEFT_OUT` (the three of the four that `PREDEFINED_TYPE_REQUIRED` holds), or the arity check fails on a 2027 file that now writes a null there. - `docs/status.md` and `docs/release-1.0-criteria.md`: the sentence that said every class the 2027 pairs do not hold keeps its value is corrected, and the extension is labelled as taken from the exporter's source and not from a measured export. - `changelog.d/changed/1716-predefined-type-from-source.md`: new fragment. ## Measured One Measure run scored this change together with the four others it was drafted beside (run 43058225020, head `d17975d3`, base `aa5dc4c6`): every model, with the BIM4LCA office and housing, the 23 Revit 2025 models, Autodesk's samples of every release, rac_advanced, BIMcollab and the held-out pairs. All 39 shards and both same-project gates passed, and the check run `same-project gates` on `d17975d3` reads pass. 20 of 126 exports change; each changed row carries the name of the value its change writes, so the rows below are this change's alone. A second run kept both sides' exports of the 25 sample saves of 2024 to 2027, which no Revit export scores, and they were compared entity by entity with the step ids taken out (run 43073245751). A third measured the four office files with `--revit-set-placement`, as W7 is measured (run 43073951032). After the second read's two fixes, the stack's final head with `main` merged (`e41d96b5` against `39826420`) was measured again in full (run 43077331708, rows registered on #1636 before it was read): every row below repeats, 24 of 126 exports move and no other, and both same-project gates pass on that head. This change removes a value and no Revit 2027 export holds one of these four classes, so nothing scores it; what was checked is that it does exactly what it says and nothing else. | 2027 save | `IfcBeam` | `IfcColumn` | `IfcCovering` | `IfcPlate` | |---|---:|---:|---:|---:| | `rac_advanced` | 38 | 176 | 65 | 1,349 | | `rac_basic` | 0 | 3 | 2 | 44 | | `rme_advanced` | 0 | 135 | 43 | 629 | | `rme_basic` | 0 | 135 | 43 | 629 | | `rst_basic` | 370 | 30 | 0 | 0 | - Those are the occurrences whose `PredefinedType` goes from a value to unset. On each of the five exports no entity is added or removed and no other argument of any entity changes (the kept-export comparison); the `IfcOwnerHistory` time stamp aside. - Every 2024, 2025 and 2026 save is unchanged by this change, and no census row of the two held-out 2027 pairs moves: they hold none of the four classes. - `tools/ci/ifc_schema_arity.py`, with the edit this change makes to it, passes on every 2027 export, and no model's `schema.txt` changes. ## Still open - The evidence is the exporter's public source (revit-ifc, tag `IFC_v27.4.0.30`, cited in the constant's doc), as #1716 allows, not a measured export. A 2027 pair that holds a beam, column, plate or covering would measure it. - The exporter's build decides this, not the save's release (#1472); rvt-rs decides by release. - #1716 also names ramps, ramp flights, piles, fasteners and grids, on which rvt-rs writes no `PredefinedType`, and the family-based curtain wall, which is not the system curtain wall rvt-rs writes. None is changed here, so the issue can close with this. Stack: this is change 4 of 5 measured together; each branch holds the ones before it, so its own diff is its last commit until those land. First draft: #1728. ## 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=aa5dc4c6d93e861015c10e0a0d8f9f16c8b57e71 -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. ## 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
A Revit 2027 save is now written without a
PredefinedTypeon the occurrence of beams, columns, plates and coverings as well as on the ten classes #1692 measured. The extension is taken from Autodesk's public exporter source and not from a measured export: no Revit 2027 export in the repository holds one of these four classes, so nothing measures it. The measured ten stay in their own constant, the four are a second one, and the predicate that the writer, the viewer's panel, the schedule CSV and the MCP server all ask chains the two.Evidence
What I read. #1716 and #1714 (body, files, diff), RE-427 sections 3 and 4,
src/ifc/category_map.rs(PREDEFINED_TYPE_LEFT_OUT_FROM,PREDEFINED_TYPE_LEFT_OUT_CLASSES,predefined_type_left_out, theMAPPINGSrows,PREDEFINED_TYPE_ENUMERATORS,EXPORT_OVERRIDE_TARGETS),src/ifc/step_writer.rs(the occurrence's attribute tail andtype_entity_for),src/ifc/export_content.rs(where an element's predefined type is chosen and where a property set's scope is matched),src/ifc/standard_property_sets.rs, the three other callers (scene_graph.rs,schedule_csv.rs,rvt-mcp/src/views.rs),tools/ci/ifc_schema_arity.py,tools/ci/ifc4_property_sets.py,tools/ci/validate-real-ifc.py,docs/status.md,docs/release-1.0-criteria.md,changelog.d/README.mdand two existing fragments.The rule. Autodesk's public exporter source (revit-ifc,
Source/Revit.IFC.Export/Toolkit/IFCInstanceExporter.cs, tagIFC_v27.4.0.30; CLEANROOM.md source 5, cited and not quoted) writes an occurrence'sPredefinedTypeonly where the element has no type object when it is created. Its callers include the creators of beams, columns, plates, coverings, ramps, ramp flights, piles, mechanical fasteners, family-based curtain walls and grids, so a typed element of those classes is left out by the same rule that #1692 measured on ten classes. The helper first appears inv27.3.0.12, so the exporter's build decides and not the save's release (the caveat of #1472).What rvt-rs writes today.
IFCBEAM.BEAM.(StructuralFraming),IFCCOLUMN.COLUMN.(Column, StructuralColumn),IFCPLATE.CURTAIN_PANEL.(CurtainWallPanel) andIFCCOVERING.CEILING.(Ceiling). Checked in the evidence export of nordic-office-as-built:rvt-rs.ifcwrites.BEAM.,.COLUMN.,.CURTAIN_PANEL.and.CEILING.on those classes, and Revit's own 2024 export of the same model writes the same values on the same Tags. The 2027 samples hold beams (rst_basic370), columns, plates and coverings that rvt-rs writes a value on, and no Revit 2027 export of them exists.What the extension leaves out, and why.
PredefinedTypeon any of them: no mapping row carries one, none is inPREDEFINED_TYPE_ENUMERATORS, and none is an export-override target. Listing them would change no file, so they are named in the constant's doc and not in the list.IFCCURTAINWALLis not added. The source's family-based curtain wall is not the system curtain wall and curtain panel wall that rvt-rs writes as that entity (they go through the exporter's curtain system creator, as the existing note onexport_override_appliesrecords), and no 2027 export holds one, so the value stays: fail closed.What does not move. The type objects, their GlobalIds and the property sets that depend on a predefined type take the element's value as before:
type_entity_foris called with the unfiltered value, and the property set scope is matched against the model's value, not the written attribute. SoPset_CoveringCeilingand the type objects of the four classes are unchanged.Changes
src/ifc/category_map.rs: newPREDEFINED_TYPE_LEFT_OUT_CLASSES_FROM_SOURCE(IFCBEAM,IFCCOLUMN,IFCCOVERING,IFCPLATE), chained inpredefined_type_left_out; the measured ten stay inPREDEFINED_TYPE_LEFT_OUT_CLASSES, and the docs of both, ofPREDEFINED_TYPE_LEFT_OUT_FROMand of the predicate say which is measured and which is from the source.src/ifc/step_writer.rs: the comment at the call site no longer counts ten classes.tools/ci/ifc_schema_arity.py:IfcBeam,IfcColumnandIfcCoveringadded toPREDEFINED_TYPE_LEFT_OUT(the three of the four thatPREDEFINED_TYPE_REQUIREDholds), or the arity check fails on a 2027 file that now writes a null there.docs/status.mdanddocs/release-1.0-criteria.md: the sentence that said every class the 2027 pairs do not hold keeps its value is corrected, and the extension is labelled as taken from the exporter's source and not from a measured export.changelog.d/changed/1716-predefined-type-from-source.md: new fragment.What was not checked
-D warningsand rustfmt on the two Rust files.rac_advanced,rac_basic,rme_advanced,rme_basic,rst_basic) move only inPredefinedTypeon beams, columns, plates and coverings, with no entity added or removed; the two held-out 2027 pairs do not move, since they hold none of the four; every 2015 to 2026 export is byte-identical;psets_vs_ifc,qtos_vs_ifc,global_ids_vs_ifc,names_vs_ifcand the MCP consistency check are unchanged.tools/ci/ifc4_property_sets.py) reads a scoped set's scope from the occurrence'sPredefinedTypeor, where it gives none, its type's. A covering with no type object would now be a finding forPset_CoveringCeiling. Every covering of the evidence export is typed and itsIfcCoveringTypecarries.CEILING., but no 2027 sample was read.reports/element-framing/RE-427-revit-2027-predefined-type.mdstill calls this extension a follow-up. It is a dated record and is not edited here.Pilot draft: written by an automated worker and pushed as proposed, with rustfmt applied. Not yet read by a maintainer session; please do not review, approve or arm it.