Repository navigation
feat(ifc): Revit 2015 to 2023 curtain walls are IfcCurtainWall with their parts under them (#1190) (RE-366) - #1519
Conversation
|
@puzzbobb an automated Claude Code review of this one found two things to settle before it lands. Measure is running on this head (run 42518197596), and Vitoria's
I'll fix the two doc lines myself on landing if you'd rather not push for them. Nothing else in the code came up as blocking: no panic or overflow path, and a wall only becomes a curtain wall when a mullion's list names it. |
|
@puzzbobb the Measure run on this head is in (42518197596), and most of it is very good. Against Revit's own exports, counts only:
Corrected: an earlier version of this comment said the 11 On all six Also for the report and Summary: the |
…heir parts under them (DrunkOnJava#1190) (RE-366) The 2015 to 2023 branch never called the curtain readers, so a curtain wall was an IfcWall, and its mullions and panels stood alone. A 32-bit record's reference list names a mullion's curtain wall as 2024's does, and a part's element data holds its transform in the same form, so RE-46's and RE-106's readers run there with no new layout. The branch passes them the lists the records already read. scan_instance_transforms is unchanged; curtain parts use a new entry point that takes any release's layout. bind_opening_hosts now runs after them, as on 2024, so that a door is set in no curtain wall (DrunkOnJava#439), and a curtain wall takes IsExternal and passes it to its parts. 2008 to 2014 stay as they were. Against the same Autodesk samples' later saves, rac_advanced's 34 curtain walls and rac_basic's 9 are the 2024 save's on every release, and no part lies under another wall. On rac_advanced 2023 all 3,312 members and 1,349 panels have the 2024 save's bodies. No Revit export of these curtain walls is scored. (cherry picked from commit 541b18fda29d86087a160192ab42314ec1df0175)
541b18f to
6f71f93
Compare
…ts class precision over every save, and the stale claims (DrunkOnJava#1190) Measure run 42581222440: rac_advanced 2015 to 2020, Vitoria's ALD26 Before and the held-out ALD26 Project, counted apart where IFC2X3 disagrees, the 11 Span values among them. Over the 31 saves with a 2024 save, 511 curtain walls equal the 2024 save's class and no part sits under a plain wall (tools/re/curtain_classes_across_saves.py). The 9 curtain walls written as walls on Vitoria Before are 4, and the 1,305 class count is 1,310, in every place that cited them, with the capability's text in the support matrix.
|
@puzzbobb I rebased this onto
rvtDevelop reads it next. Nothing is needed from you. |
…wall, and says its Revit-export results are IFC2X3 where the docs said none (DrunkOnJava#1190)
… own record on Revit 2015 to 2027, and ports their SystemType (#1190) (RE-371) (#1524) ## Summary A duct's own native record (`RbsDuctCurve`) gives it its type, its section, the line it runs along at any slope, its taps, its reference level and elevations, and each connector's join, direction and system, on every release from 2015 to 2027. Every duct is now typed and drawn as its section along that line, with Revit's `Constraints` values; every port gets the `SystemType` its connector's system names, and Exhaust Air ports are `SOURCEANDSINK`; on 2015 to 2022 the family instances' ports and joins are read. On Snowdon Towers HVAC (2025) the record gives Revit's own type name, `Length`, section, body and `Constraints` values on 1,053 of 1,053 ducts. It's an eleventh slice of #1190, stacked on #1523 (pipes, RE-370), whose `attach_native_pipes` it mirrors. ## Motivation - On 2015 to 2023, 2026 and 2027 a duct is an untyped `Duct-<ElementId>` box with no `Length` and two unplaced ports: 724 ducts on `rme_basic`, 728 on `rme_advanced`. - On 2024 and 2025 RE-134's byte scan typed none of Snowdon Towers HVAC's 1,053 ducts, and a duct off the model's axes (356 there) has no `Length` or ends. - A duct tapped into another has no port or join at the tap (406 on Snowdon). - No port has a `SystemType` (#834); Revit's IFC4 export writes one on every port. - Every Exhaust Air port has a direction where Revit's export writes `SOURCEANDSINK` (1,004 on Snowdon). - On 2015 to 2022 no family instance's port or join is read: 2,430 ports and no connection on 2019's `rme_basic`, against 7,370 and 2,948 on its 2024 save. ## Changes - `src/research/partition_schema_mvp/mep.rs`: `attach_native_ducts`. One projected native pass over the ducts not yet drawn along their line and the file's `AbsDuctType` records. From each duct's record: its type (`m_idType`, named by `SymbolInfo.m_name`, shaped by its sweep profile), its section (`m_dWidthOrDiameter`, `m_dHeight`, the height along `m_vNormal`), its one `GLine`, its taps (`SegmentConnectorPosition.m_paramOnCurve` between 0 and 1), each connector's join (`m_arrRefs`, type 1), and, where it's justified at its centre, its reference level (`m_assocLevelId`, before 2024 `m_idLevelStart`) and the elevations of its ends above it (`m_dOffsetStart`, `m_dOffsetEnd`). It writes the fields RE-134 writes, so the system family, `Pset_DuctSegmentTypeCommon`, quantities and end ports come from the existing code, plus the normal, the taps, the joins and the offsets. The line must pass a box test like RE-131's (the swept section is the record box within 0.002 ft); an oval duct keeps its box. It runs in the 2015 to 2023 branch and, on 2024 to 2027, before RE-134's scan; RE-134, the duct end keys and RE-172's level leave a duct the record gave values alone. `native_pipe`'s line and end reading is shared, and a pipe's record now gives its joins too. The 2015 to 2023 branch calls `attach_connector_pairs`. - `src/research/native_connectors.rs`: the connector pass reads each calculation's `m_eSystemType` (`Calculation`, `InstancePort::system_type`), names it (`distribution_system_of`: 1 and 2 `VENTILATION`, 3 `EXHAUST`, 7 `HEATING`, the classifications measured against Revit's IFC4 export; revit-ifc's `ConnectorExporter` read for the names, nothing copied), and gives an Exhaust Air connector `SOURCEANDSINK` (`port_flow_direction`). It and `family_instance_joins` read 2015 to 2027 and ids in their 4-byte form as well. `native_duct_shapes` reads 2015 to 2027. - `src/ifc/export_content.rs`: a duct drawn along its line is its section extruded along it (`BodySource` `native_duct_line`); each tap's port is on the line at its parameter; `Constraints` gets the Start, End and Middle Elevation, the Lower and Upper End Centerline, Bottom and Top Elevation, `Slope` (an `IfcRatioMeasure`) and the justification. - `src/ifc/mod.rs`, `src/ifc/step_writer.rs`, `src/ifc/entities.rs`: a port's `SystemType` is written; a port joined to a placed one takes its point with the axis turned unless exactly one of the two is a sink; a tap places no other port; a port with no direction or system read takes the opposite direction and the system of the port joined to it. `PropertyValue::Ratio`. - rvtReview's join rule, `src/ifc/export_content.rs`, `src/ifc/mod.rs`, `src/ifc/from_decoded.rs`, `docs/export-diagnostics.md` and its schema: a join of two connectors is written only where each end keeps the other as its one partner, or as the one partner both sides' lists name; the joins left out are counted in `exported.port_joins_left_out` under `connector_named_with_conflicting_partners`. `src/research/partition_schema_mvp/levels.rs`: a reference level a duct's own record named is not pushed a second time. - `probes/examples/probe_re371_ducts.rs` (each duct as the export draws it; with `--native`, each duct's record and every connector's calculation), `tools/re/ducts_vs_ifc.py`, `reports/element-framing/RE-371-native-ducts.md`, an addendum to `docs/format-reconnaissance.md`, `docs/status.md`, `docs/evidence.md`, `docs/supported-profile.md`, `changelog.d/added/1190-ducts-slopes-port-systems.md`. ## Testing Unit tests are banned in this repository: do not add them. Show the change working end to end on real files instead. - [x] `tools/check-local.sh` passes (fmt, clippy, rustdoc, build, real-file / CLI / contract checks) - `tools/check-local.sh --corpus` on the local corpus passes: all 301 real-file tests on the default and full-corpus runs, and the API doc-id check. A first run failed one test, `value_sources_offsets::project_corpus_value_sources_name_the_copy_the_reader_took`, because the new `BodySource` `native_duct_line` named no reader; the duct's own record and its type's are now noted as its value sources (`native_duct`, `native_duct_type`, listed in `docs/export-diagnostics.md`), and the export doesn't change with it. `cargo +1.87 check --all-targets` (MSRV) is clean. - [x] Verified end to end on real Revit files: the command, the files (and their licence), and the measured result against Revit's own export are in the PR body, with the script or probe that reproduces it - **Ducts against Revit's own export**, `probe_re371_ducts --native` and `tools/re/ducts_vs_ifc.py`: Snowdon Towers HVAC (2025, Revit 2025's IFC4X3 export, local only) **1,053 of 1,053 ducts** with Revit's type name, `Length`, section and body (the swept section's world box against Revit's within 0.01 ft; 1,045 round, 8 rectangular, level, vertical and sloped), and every `Constraints` value Revit writes (`Slope` on 1,012 of 1,012, none on the 41 vertical ducts, as Revit); RE1 Mechanical (MIT, `magnetar-io/revit-test-datasets`, IFC2X3) 25 of 25 with Revit's type name, `Length` and body. - **Ports against Revit's own export**, `tools/re/ports_vs_ifc.py` on the export: Snowdon Towers HVAC 5,155 ports (4,749 before; Revit 5,217, the other 62 on its 31 flex ducts, not read), 2,528 of Revit's 2,590 connections (2,122 before) and none it leaves out, every port at Revit's point (17 unplaced before), 5,008 with its axis (4,100), `SystemType` Revit's on 5,118 (0; the other 37 electrical), `FlowDirection` on 4,889 (3,496), all 1,004 Exhaust Air ports among them. RE1 Mechanical and Plumbing keep 59 of 59 and 118 of 118 connections and every flow, and every port of both now has Revit's point and axis (16 fitting ports were reversed). The BIM4LCA office's 24 pipe ports are `HEATING`, as Revit's (local only). - **Not against a Revit export on 2015 to 2023, 2026 or 2027**: none I have holds a duct. Held to the same Autodesk MEP samples saved by 2024 (pinned, fetched, never stored), which can't catch an error that save shares. Every duct of the twelve MEP saves is typed and drawn, and its type, length, section, ends, level and offsets are the 2024 save's but for nine 2015 ducts the project replaced or redrew between the saves. On 2025 to 2027 every port and connection is the 2024 save's (2026 and 2027 leave unjoined family ports unplaced, as before). On 2019, 7,184 of 7,370 ports and 2,764 of 2,948 connections (all of them the 2024 save's), no port's system another than the 2024 save's; the rest are family instances whose 2019 record the native path doesn't decode (report §5). - **Joins left out** (rvtReview). On 2015 and 2019 the records of five duct taps in each of `rme_basic` and `rme_advanced` name one duct connector as the partner of two others: three joins in a chain, of which the 2024 save has two and not the third. The first form of this change wrote all three (2,774 connections on `rme_basic` 2019, 2,769 of them the 2024 save's). A join is now written only where each of its ends keeps the other, so 10 joins on each of those four saves are left out, five the 2024 save has and five it does not, and each is counted. Of the 93 models of Measure run [42585494298](https://github.com/DrunkOnJava/rvt-rs/actions/runs/42585494298) those four are the only ones with a join left out. On `rme_basic` 2019 the connections are 2,764 and all the 2024 save's, and the cost is 10 ports: 5 lose the place their join gave them and 5 their direction (flow different 38 to 43). The ports table and the per-file table of RE-371 are restated, with the comparison that reproduces the old rows to the digit (section 5). - **Byte identity** against the RE-370 branch, `SOURCE_DATE_EPOCH=1700000000`: 25 of 58 sample saves (Autodesk's 53 of 2015 to 2027, Snowdon Towers' five of 2024) and 173 of 206 local project files of 2008 to 2027 export IFC and diagnostics byte for byte as before, Core Interior among them. On each of the 33 + 33 that change, an element-by-element comparison (class, name, every property set and representation by GlobalId; every port's name, flow, type, system and place; the connections) finds nothing changed but ducts, ports and connections. The files that change are the MEP files, the 2025 Snowdon, Golden Nugget and サンプル files, RE1 Mechanical and Plumbing (port axes), the office (24 ports' `SystemType`), and architectural files of 2015 to 2023 whose MEP family instances (lighting, sanitary, electrical fixtures, 30 to 36 a file) now have ports. Report §6 has the table. The join rule changes the four saves above further, and no other model of that run. - [x] If this touches the IFC exporter: the witness verdicts replay (see CONTRIBUTING.md) or the changed observations are refreshed in this PR - Core Interior (2024) has no ducts and exports byte for byte as before, so its observations are unchanged. - [ ] If this is a performance change: reran `tools/bench.sh` and attached the before / after - N/A. No slower where the work is the same: 5.1 to 5.2 s before and 5.1 to 5.3 s now on Snowdon Towers HVAC, 15.2 s and 15.6 s on `rme_basic` 2027, 30.2 s and 28.1 s on Golden Nugget's building services, 3.9 s on both for `rac_advanced` 2023. A 2015 to 2022 MEP file now reads its family instances' ports and joins, as 2024 does: `rme_basic` 2019 takes 6.7 s against 4.4 s (its 2024 save takes 17.4 s). ``` tools/fetch-autodesk-samples.sh samples 2015 2027 cargo run --profile ci -p rvt-probes --example probe_re371_ducts -- samples/2019-rme_basic_sample_project.rvt > 2019.txt cargo run --profile ci -p rvt-probes --example probe_re371_ducts -- samples/2024-rmebasicsampleproject.rvt > 2024.txt diff 2019.txt 2024.txt cargo run --profile ci -p rvt-probes --example probe_re371_ducts -- --native _project_corpus/Revit/RE1-Mechanical.rvt > native.txt python3 tools/re/ducts_vs_ifc.py native.txt _project_corpus/Revit/RE1-Mechanical.ifc cargo run --profile ci --bin rvt-ifc -- _project_corpus/Revit/RE1-Mechanical.rvt -o re1.ifc python3 tools/re/ports_vs_ifc.py re1.ifc _project_corpus/Revit/RE1-Mechanical.ifc ``` ## Audit-honesty checklist - [x] README / docs reflect the current state after this PR — no claims of features that are not actually shipped in this PR - [x] A user-visible change has its entry as a fragment under `changelog.d/<section>/` (see `changelog.d/README.md`), not in `CHANGELOG.md` - [x] If a limitation was resolved, the "Known limitations" / "What works today" section in the relevant docs is updated - `docs/status.md`, `docs/evidence.md` (the 2024 and 2025, 2026 and 2023 rows), `docs/supported-profile.md`. - [x] If a new limitation was introduced, it is documented in the PR body and in-code - None new. Not read, report §7: flex ducts and pipes (a `GHermiteSpline`), oval ducts' sweep, a pipe's `Constraints` elevations and a level pipe's invert outside 2025 (no oracle), a port's `SystemType` other than the four measured and any electrical port's, the flow directions revit-ifc's export order decides (266 on Snowdon), and the 2015 to 2022 family instances the native path doesn't decode. - [x] Commit messages describe WHAT changed and WHY, not "fix things" or "updates" - [x] No emojis in code, docs, or commit messages - [x] No private paths, personal email addresses, or internal jargon in committed files - [x] If this is a reverse-engineering finding: a reproducible probe under `probes/examples/` and a dated addendum to `docs/format-reconnaissance.md` are included - `probes/examples/probe_re371_ducts.rs`, `tools/re/ducts_vs_ifc.py`. ## Legal and contribution hygiene - [x] I agree this work is licensable under Apache-2.0 (see `CONTRIBUTING.md`) - [x] This PR contains no Autodesk proprietary source, decompiled internals, or NDA'd SDK content (see `CLEANROOM.md`) - revit-ifc's `ConnectorExporter` (CLEANROOM.md source 5) was read for how Revit's export names a classification and orders a join's ports; no code was copied or translated. - [x] Any new test fixtures use synthetic values (`testuser`, `111111`, `FY-20XX`, etc.) and contain no real-world PII - No fixtures. ## Breaking changes Public API, research and IFC model types: - `native_connectors::port_flow_direction` takes a fourth argument, the connector's system classification. - `native_connectors::ConnectorPorts::segments` maps to a `Calculation` (direction and system) instead of a direction. - `native_connectors::InstancePort` has a `system_type` field, and `ifc::entities::IfcEntity::Port` a `system_type` field (`#[serde(default)]`, so serialised models still read). - `ifc::entities::PropertyValue` has a `Ratio` variant; an exhaustive `match` outside the crate needs an arm for it. - `ifc::IfcModel` and `ifc::ExportedModelDiagnostics` have a `port_joins_left_out` field (a count by reason); a struct literal of either outside the crate needs it. New: `NATIVE_DUCT_REVIT_VERSIONS`, `DUCT_NORMAL_FIELDS`, `DUCT_OFFSET_FIELDS`, `DUCT_TAPS_FIELD`, `DuctBody`, `duct_body_from_fields`, `duct_offsets_from_fields`, `duct_taps_from_fields`, `square_to`, `native_connectors::{Calculation, EXHAUST_AIR, distribution_system_of}`, `DuctShape::of_profile` made public. ## Screenshots or output samples `rme_basic`, duct 420841, as the export writes it: ``` 2019 before IfcDuctSegment 'Duct-420841' box body, no Length, ports Port_420841_0, _1 NOTDEFINED 2019 after IfcDuctSegment 'Rectangular Duct:Mitered Elbows / Taps:420841' native_duct_line, Length 4.202239 m, ports InPort_420841_0 SINK, OutPort_420841_1, _4, _5 SOURCE (two taps), all VENTILATION Constraints: Reference Level 'Level 2', Middle Elevation 3.0132 m, Slope 0.000009, ... 2024 save the same ``` ## Related issues Refs #1190, #96, #834, #869 ## Notes Rebased on `main` after RE-370 and after #1518, #1519 and #1587 landed. rvtReview's commits on this branch are the join rule (`baab0262`) and the restated RE-371 (`215fd384`). --------- Co-authored-by: puzzbobb <--?> Co-authored-by: Griffin Long <[email protected]>
… the six exports it moves (#1553) (#1592) ## Summary `earcut` moves from 0.4.11 to 0.4.12. It re-splits six exports, and `tools/re/ifc_surfaces_same.py` shows that every surface of those six is the same surface it was: the same polygons, or the same points with the same faces and boundaries and only the diagonals that cut them different. Dependabot's ignore of `earcut` (#1557), which held it until that was shown, is removed. Closes #1553. ## Motivation `earcut` 0.4.12 ("speed up triangulation with slice inputs and faster hole bridging") changed which exports rvt-rs writes. Measure run 42538445237 found six moved of 92: Autodesk's `rac_advanced` sample on 2023, 2024, 2025, 2026 and 2027, and Snowdon Towers' architectural sample on 2024. Their `diagnostics.json`, `schema.txt` and stage counts were identical, so only the bodies could differ, and no scorer reads the bodies of those samples but `bodies_across_saves`. #1547 held the crate at 0.4.11 until a change of triangulation was shown to leave the surfaces as they were. rvt-rs calls `earcut` in `src/ifc/export_content.rs` and `src/research/native_saved_mesh.rs`. ## Changes - `Cargo.lock`, `fuzz/Cargo.lock`: `earcut` 0.4.11 to 0.4.12. `Cargo.toml` asks for `0.4.5`, so it is the lockfiles alone. - `tools/re/ifc_surfaces_same.py` (new): two exports of one file by builds that differ in nothing but a triangulator, paired entity by entity by STEP id (it stops if an id has another entity type on the other side). Each `IfcTriangulatedFaceSet` and `IfcFacetedBrep` is reduced to its polygons, rounded to a micrometre, and the two sides are compared: *same polygons* (the same multiset, in any order and from any corner), *same surface* (the same points, and in every plane the same total area to 1e-9 and the same boundary: the edges an odd number of its polygons hold, since a diagonal is held by two triangles and drops out), or *different*. It exits 1 on any different one. It reads no Revit export and writes nothing. - `.github/dependabot.yml`: the `earcut` ignore and its comment are removed. ## Testing Unit tests: N/A. The check is the script on the exports it was written for. - **The six moved exports, surface by surface.** Measure run [42593569119](https://github.com/DrunkOnJava/rvt-rs/actions/runs/42593569119) (`keep_ifc`, head `441e4781` against `main` at `f8238889`), then `tools/re/ifc_surfaces_same.py base.ifc head.ifc` on each pair: | export | surfaces compared | same polygons | same surface | different | |---|---:|---:|---:|---:| | `rac_advanced` 2023 | 124 | 123 | 1 | 0 | | `rac_advanced` 2024 | 125 | 124 (one a faceted brep) | 1 | 0 | | `rac_advanced` 2025 | 125 | 124 (one a faceted brep) | 1 | 0 | | `rac_advanced` 2026 | 124 | 123 | 1 | 0 | | `rac_advanced` 2027 | 124 | 123 | 1 | 0 | | Snowdon Towers Architectural 2024 | 172 | 170 | 2 | 0 | The 2023 pair is the one the first attempt could not pair: the earlier head was cut before #1519, so its 2023 export held other entities and the STEP ids did not line up. This head is on current `main`. - **Nothing else moves.** Measure run [42593566009](https://github.com/DrunkOnJava/rvt-rs/actions/runs/42593566009), the head against `main`, `-f samples=true -f nordic=true -f r2025=true -f racadv=true -f bimcollab=true -f holdout=true`, every scorer: 112 of the 118 exports are byte-identical and the six that differ are the six above; the scorer diff is empty (the held-out models, `racadv` and `bimcollab` included, whose results leave the runner as counts), and the `same-project gates` check run on the head reads `pass: 15 samples held to their earlier saves, and the Areas on 4 saves and on the 2021 save`. - `cargo deny`, `cargo audit` and the semver check run in this pull request's CI. ## Audit-honesty checklist - [x] A moved surface is judged by what it is, not by its hash: a triangulator that changed a boundary or an area would read *different* and exit 1. - [x] The script's limit is stated: it compares surfaces of two exports of one file that keep their STEP ids, which two builds that differ only in a triangulator do. A change that adds or drops an entity is outside it. - [x] No emojis, private paths or PII. ## Legal and contribution hygiene - [x] Apache-2.0. No Autodesk source, internals or NDA material. ## Breaking changes None. The exports of six samples change in the order and split of their triangles; the surfaces they draw do not.
…type, family and material, and a type's own material (#1190) (RE-367) (#1520) ## Summary Revit 2015 to 2023 curtain mullions and panels now have their type and family, and the mullions their material; a panel of these releases takes no material. It's a seventh slice of #1190 (on #1519, RE-366, whose parts these are). It's measured against the same Autodesk samples saved by a later release and, for the first time on these releases, against Revit's own IFC2X3 exports: `rac_advanced` 2015 to 2020, Vitoria's `ALD26 Before` and the held-out models (counts). It also fixes a material defect on Autodesk's 2024 samples, where every curtain part was `Wood - Laminated`, glazed panels included. ## Motivation With #1519, `rac_advanced` 2023 draws 3,312 members and 1,349 panels with no type object, `ObjectType`, `Other.Family`, `Other.Type`, `Reference` or material: the largest gap left against its 2024 save. A name entry on these releases holds no category (RE-109), so `resolve_type` can't run, and `type_and_family_names_2023` looks for a type record these types don't have. ## Changes - `src/research/partition_schema_mvp/curtain.rs`: `attach_curtain_part_types_32`. The type is the one id in a part's reference list with a name entry and no record of its own; the family is the `u32` at `CURTAIN_TYPE_FAMILY_OFFSET_32` (+265) of the type's data. - `src/research/partition_schema_mvp.rs`: the 2015 to 2023 branch calls it and `attach_curtain_materials`, and leaves these types out of `type_material_names_32`. - `.../materials.rs`, `src/research/partition_curtain_materials.rs`: on these releases a part's material comes from `m_renderStyleId` alone, named by `scan_materials_32`. The 64-bit offsets aren't read there. `native_render_styles` now names `NATIVE_RELEASES`. - `.../materials.rs`: on every release a type's `m_renderStyleId` replaces what a map gave. 2024 and later change here, so please look at this line on its own. On 2015 to 2023 a panel takes none (`CURTAIN_WALL_PANEL_CLASS`): see Testing. - `probes/examples/probe_re367_curtain_materials.rs`, `reports/element-framing/RE-367-2015-2023-curtain-part-types.md`, an addendum to `docs/format-reconnaissance.md`, `docs/status.md`, `docs/evidence.md`, `docs/supported-profile.md`, `changelog.d/added/1190-2015-2023-curtain-part-types.md`, `changelog.d/fixed/1190-curtain-part-render-style.md`. ## Testing Unit tests are banned in this repository: do not add them. Show the change working end to end on real files instead. - [x] `tools/check-local.sh` passes (fmt, clippy, rustdoc, build, real-file / CLI / contract checks) - `tools/check-local.sh --corpus` passes on this branch (`integration` 301 of 301, 6 filtered out), and `cargo +1.87 check --profile ci --all-targets` is clean. - [x] Verified end to end on real Revit files: the command, the files (and their licence), and the measured result against Revit's own export are in the PR body, with the script or probe that reproduces it - **Against Revit's own exports** (Measure run [42592510812](https://github.com/DrunkOnJava/rvt-rs/actions/runs/42592510812), `-f racadv=true -f holdout=true`, every scorer; IFC2X3, counted apart; details in RE-367 section 4a). `rac_advanced` 2015 to 2020, scored against the one export of the project: `Pset_PlateCommon.Reference` 1,349 of 1,349 equal (0 before), `Pset_MemberCommon.Reference` 3,276 of 3,284 (8 missing, 0 different), and `Name` and `ObjectType` equal on 3,276 members and 1,349 plates. Vitoria's `ALD26 Before`: the same on its 67 plates and 206 members (`Reference` 67 of 67 and 206 of 208), and 1,005 of 1,280 elements typed against 732, the type's name equal to Revit's on 1,079 of 1,079. The held-out `ALD26 Project` (counts): the same on 67 and 206. A held-out Revit 2022 office: its one plate equal. - **The 67 type `Tag`s the maintainer held this PR for.** `type_objects_vs_ifc.py` finds `Tag` equal on 938 of `ALD26 Before`'s 1,005 typed elements; the 67 that differ are the plates. Revit's export has five `IfcPlateType`s for them, each Tagged with the ElementId of a plate of the file, where rvt-rs writes the type's own ElementId. That is the exporter's convention, not a wrong type: Autodesk's open-source exporter sets an `IfcPlate` type's `Tag` from the instance (`FamilyExporterUtil.ExportGenericType`, read for what Revit writes), and Revit's IFC4 export of the BIM4LCA office at building permit shows the same on its 269 plates, the only type `Tag`s that differ there. - **A panel takes no material on 2015 to 2023.** None of `ALD26 Before`'s 67 plates has the material a panel type's `m_renderStyleId` gives (0 of 67 equal, run 42534783950), and no other Revit export scores a panel's material on these releases. Why is not decoded, so the panels keep none until a rule gives Revit's. The 206 mullions' materials equal Revit's, with and without this change. - Against the 2024 save's export, by `Tag`: type id, type name, family, `ObjectType` and `Reference` are equal on `rac_advanced`'s 3,276 mullions and 1,349 panels on each of 2015 to 2023, and on `rac_basic`'s 144 and 44. None differs. `rac_advanced`'s 36 stringers take no type here. - Materials, by `probe_re367_curtain_materials`, each type's `m_renderStyleId` against its 2024 save's, on the types both hold: `rac_advanced` 511 of 511 on 2015 to 2020 and 517 of 517 on 2021 to 2023; `rac_basic` 82 of 82 on 2015 and 91 of 91 on 2016 to 2023; `rme_basic` and `rme_advanced` 465 of 465 on 2015 and 2019; `rst_basic` 3 of 3 on 2017 to 2023 and 2 of 2 on 2016. - Mullions' materials against the 2024 export, with the fix below: `rac_basic` 144 of 144 and `rac_advanced` 3,276 of 3,276 on each save; the panels (44 and 1,349) have none. - **The 2024 fix.** `attach_curtain_materials` left alone a part that already had a material, so a type map beat `m_renderStyleId`. On `rac_advanced`, `rme_advanced` and `rme_basic` of 2024 every mullion and panel was `Wood - Laminated`. Now `rac_advanced` is `Metal - Aluminium, Black-Anodized`, `Glass` (`Glazed`) and `Stone - Granite` (`Solid`), and the `rme` samples `Metall - Lack - Grau`, `Fassade - Glas` (`Verglasung`) and `Fassade - Metallpanel` (`Metallpanel`). 4,625 and 2,079 and 2,079 parts change, materials only. Why the map gives one material there isn't decoded. - **What backs that fix, and what doesn't.** Against Revit's own exports, 20,989 mullions and panels equal Revit's before and after: the BIM4LCA office at both stages (10,263 and 10,300), its terrain housing (414) and RE1 Architecture (12). So no regression shows, but none of those is a part this changes. The new values rest on RE-201's rule, Revit's on Snowdon's 1,773 parts, on the types' own names, and on `rac_advanced`'s 2015 to 2023 saves. A Revit export of one of these three 2024 samples would settle it. - Against #1519's head, across 33 saves of 2015 to 2023: 36,584 members and 15,055 panels gain names and `Reference`, with no value changed, and the members their materials. No element appears or goes, and no storey, GlobalId, host or void changes. Only those members change material: no element of any other class does, and no panel. - Byte identity: of 206 local project files of 2008 to 2027, 193 export IFC and diagnostics byte for byte as #1519's head does (`SOURCE_DATE_EPOCH=1700000000`). The 13 that change are 2017 to 2023 files holding curtain walls. No file of 2024 or later, or before 2015, changes. The local files hold no 2024 save of those three samples; among Autodesk's samples, only those three of 2024 and later change. - [x] If this touches the IFC exporter: the witness verdicts replay (see CONTRIBUTING.md) or the changed observations are refreshed in this PR - Core Interior (2024) exports byte for byte as before, so its observations are unchanged. - [ ] If this is a performance change: reran `tools/bench.sh` and attached the before / after - N/A. Not benchmarked: it adds one pass over the type records on files that hold curtain parts. ``` tools/fetch-autodesk-samples.sh samples 2015 2024 cargo run --profile ci -p rvt-probes --example probe_re367_curtain_materials -- samples/2023-racadvancedsampleproject.rvt 2023 > 2023.txt cargo run --profile ci -p rvt-probes --example probe_re367_curtain_materials -- samples/2024-racadvancedsampleproject.rvt 2024 > 2024.txt diff 2023.txt 2024.txt ``` ## Audit-honesty checklist - [x] README / docs reflect the current state after this PR — no claims of features that are not actually shipped in this PR - [x] A user-visible change has its entry as a fragment under `changelog.d/<section>/` (see `changelog.d/README.md`), not in `CHANGELOG.md` - [x] If a limitation was resolved, the "Known limitations" / "What works today" section in the relevant docs is updated - `docs/status.md`, `docs/evidence.md`, `docs/supported-profile.md`. - [x] If a new limitation was introduced, it is documented in the PR body and in-code - None new. Still not read, RE-367 §6: a curtain wall's own type, a stringer's, a part's `NetVolume` and `NetSurfaceArea`, a curtain wall's `Length`. - [x] Commit messages describe WHAT changed and WHY, not "fix things" or "updates" - [x] No emojis in code, docs, or commit messages - [x] No private paths, personal email addresses, or internal jargon in committed files - [x] If this is a reverse-engineering finding: a reproducible probe under `probes/examples/` and a dated addendum to `docs/format-reconnaissance.md` are included - `probes/examples/probe_re367_curtain_materials.rs`. ## Legal and contribution hygiene - [x] I agree this work is licensable under Apache-2.0 (see `CONTRIBUTING.md`) - [x] This PR contains no Autodesk proprietary source, decompiled internals, or NDA'd SDK content (see `CLEANROOM.md`) - [x] Any new test fixtures use synthetic values (`testuser`, `111111`, `FY-20XX`, etc.) and contain no real-world PII - No fixtures. ## Breaking changes None. A new public constant; existing names and types are unchanged. ## Screenshots or output samples The same project's materials: ``` rac_advanced 2024, before 50 x 150mm: Wood - Laminated Glazed: Wood - Laminated Solid: Wood - Laminated rac_advanced 2024, now 50 x 150mm: Metal - Aluminium, Black-Anodized Glazed: Glass Solid: Stone - Granite rac_advanced 2023, now 50 x 150mm: Metal - Aluminium, Black-Anodized Glazed: Glass Solid: Stone - Granite ``` ## Related issues Refs #1190, #1519, #1158 ## Notes This changes 2024's output on three samples, so it's the part of this PR I'd review most closely. It could be split out if you'd rather take it separately. rvtReview's commits on this branch: the panel narrowing (`e7e1d5b8`) and the report, changelog and addendum for it (`dd5ecf61`). The branch is rebased on `main` after #1519, #1518 and #1587. --------- Co-authored-by: Griffin Long <[email protected]>
Summary
Revit 2015 to 2023 curtain walls are now
IfcCurtainWall, with their mullions and panels aggregated under them, turned along their own axes, and withSpan,LengthandIsExternal. It's a sixth slice of #1190, and the largest gap by element count: 4,661 parts onrac_advancedalone. It's measured against the same Autodesk samples saved by a later release, and, as counts, against Revit's own exports ofrac_advanced2015 to 2020 and of Vitoria's two models, all three IFC2X3; no Revit IFC4 export of a 2015 to 2023 curtain wall scores it.Motivation
#1190 asks for each capability 2024 and 2025 have on every release from 2015 to 2027. The 2015 to 2023 branch of
recover_partition_schema_mvpnever called the curtain readers.rac_advancedonmain:IfcCurtainWallpartition_family_instance_oriented_boxSpanandLengthChanges
src/research/partition_schema_mvp.rs: the branch callsattach_curtain_walls,attach_curtain_axesandattach_curtain_member_is_externalonCURTAIN_32BIT_REVIT_VERSIONS(2015 to 2023), andbind_opening_hostsafter them, as on 2024..../records_2023.rs:recover_2023_recordsreturns each record's reference list, and no longer binds hosts itself. 2008 to 2014 get the same binding as before..../curtain.rs:attach_curtain_wallstakes those lists;attach_curtain_axesreads throughscan_transforms_in_layout.src/research/partition_instance_transforms.rs:scan_transforms_in_layout.scan_instance_transforms, which door and family readers call, is unchanged..../parameters.rs: a curtain wall takesattach_record_is_external.reports/element-framing/RE-366-2015-2023-curtain-walls.md, an addendum todocs/format-reconnaissance.md,docs/status.md,docs/evidence.md,docs/supported-profile.md,docs/release-1.0-criteria.md,changelog.d/added/1190-2015-2023-curtain-walls.md.tools/re/curtain_classes_across_saves.py: a curtain wall's class and its parts' wholes against the same project's 2024 save, byTag, over a Measure run's kept exports.docs/support-matrix.json'selement-record-curtain-wallsnames 2015 to 2023 and RE-366, and the class counts the docs cite for Vitoria'sALD26 Before(1,305 to 1,310 of 1,314, 9 curtain walls written as walls to 4) are updated where they appear.Testing
Unit tests are banned in this repository: do not add them. Show the change working end to end on real files instead.
full / CI passedon the rebased head (fmt, clippy, rustdoc, the test matrix with itsmsrventry, the i686 job, corpus tier 2, IfcOpenShell, docs, wheels, audits, PII guard).Not against a Revit IFC4 export. Measured against the same Autodesk samples saved by a later release, which can't catch an error that save shares, and, as counts, against three Revit exports that are IFC2X3: a disagreement with an IFC2X3 view is counted apart and removes nothing, and the agreements below are results against IFC2X3 too. The files are the pinned samples in
research/autodesk-sample-projects.tsv(fetched, never stored).Against Revit's own exports, Measure run 42581222440 (the rebased head
6f71f93aagainstmainat58fd08f2, 118 exports, held-out models as counts only):rac_advanced2015 to 2020 (six pairs, the same counts on each)IfcCurtainWall34 of 34 (0 before),Pset_CurtainWallCommon.IsExternal32 of 32,Pset_MemberCommon.Span3,241 equal, 11 different and 24 missing of 3,276 (0, 0 and 3,276 before), property values equal 2,503 to 5,776 of 16,108. The 11 different are the 3,241 of 3,252 below: about 7.5 mm off Revit's as the record boxes are, counted apart. VitoriaALD26 Before(Revit 2018)IfcCurtainWall5 of 9 (0 before), the other 4 stayIfcWall, since by RE-46's and RE-72's rules neither a mullion's list nor a curtain grid that a part names names them,Span206 of 206, equal 2,737 to 2,948 of 5,317; the held-outALD26 Project5 of 8,Span206 of 206, equal 3,291 to 3,502 of 6,140. No other export of the 118 moves except the 22 samples below.Against the 2024 save, by
Tag:rac_advanced2015 to 2017 (each)rac_advanced2018, 2019 (each)rac_advanced2020rac_advanced2021rac_advanced2022rac_advanced2023rac_basic2015, 2016, 2019, 2022, 2023 (each)Those not aggregated, on
rac_advanced2023: 45 mullions at a corner whose record names two curtain walls, which the rule declines; 15 stair flights and landings, which this doesn't read; 1 opening.Bodies, to 3 mm on the world box and 0.1% on the volume (
tools/re/save_pair_bodies.pyfor the oriented boxes),mainagainst this change:rac_advanced2023 members 3,206 to 3,312 of 3,312, panels 1,307 to 1,349 of 1,349; 2015 and 2019 members 2,779 to 2,885 of 3,276, panels 1,145 to 1,187 of 1,349;rac_basic2023 188 of 188 before and after. The 148 oriented boxes are the 2024 save's on 2015, 2019, 2021 and 2023. Onrac_advanced2019 no body that matched onmainstops matching, and the 553 that still differ have the box they have onmain, at worst 15 mm off. RE-180 recordsrac_advanced2019 and 2020 as an earlier edit in which curtain walls moved.Values against the 2024 save,
rac_advanced2023 / 2015:SpanandLength3,252 of 3,252 / 3,241 of 3,252, the 11 about 7.5 mm off as their boxes are; memberIsExternal3,147 equal and 45 not read / 3,077 and 79; panelIsExternal1,307 of 1,307 on both; curtain wallIsExternal34 of 34 on both.Class and parts over every save (
tools/re/curtain_classes_across_saves.pyon the kept exports of Measure run 42579926185, head6f71f93a): of the 31 saves of 2015 to 2023 that have a 2024 save of the project, 511 walls areIfcCurtainWallhere and in the 2024 save; none isIfcWallthere, and none that isIfcCurtainWallthere isIfcWallhere. No mullion or plate sits under a wall that is not a curtain wall, here or in the 2024 save (49,903 sit under a curtain wall here). The 511 are 34 on each of 9rac_advancedsaves, 9 on each of 9rac_basicsaves and 31 on each of 4rme_*saves, which is why the tables above, covering the first two, hold 387.Across 33 saves of 2015 to 2023 against
main: 266 doors no longer fill an opening in a curtain wall and 235 curtain walls lose that void, all of them now equal to the 2024 save. 225 members and panels change storey, all to the 2024 save's. 511 elements go fromIfcWalltoIfcCurtainWall, gainingPset_CurtainWallCommon.IsExternaland losingPset_WallCommon.IsExternalandExtendToStructure. 4 curtain walls onrac_basicgain a family name. No element appears or goes, and no GlobalId changes.Byte identity, Measure run 42581222440: of 118 exports, 88 are byte for byte
main's. The 30 that differ are the 22 samples that hold curtain walls (rac_advancedandrac_basicof 2015 to 2023,rme_advancedandrme_basicof 2015 and 2019), the sixracadvpairs and the two Vitoria models. No export of 2024 or later, and none of the office, the Revit 2025 models, Core Interior, RE1 or BIMcollab moves, and no other held-out model. The same-project gates pass.tools/bench.shand attached the before / afterrac_advanced2023, about 4.3 s;rac_basic2019, about 2 s).Audit-honesty checklist
changelog.d/<section>/(seechangelog.d/README.md), not inCHANGELOG.mddocs/status.md,docs/evidence.md,docs/supported-profile.md,docs/release-1.0-criteria.md. The 2008 to 2014 rows now say "as on 2015, without curtain walls".Length; family and type names on mullions and panels, so theirObjectType,Referenceand materials; a part'sNetVolumeandNetSurfaceArea; a corner mullion's curtain wall; a curtain grid's.probes/examples/and a dated addendum todocs/format-reconnaissance.mdare includedLegal and contribution hygiene
CONTRIBUTING.md)CLEANROOM.md)testuser,111111,FY-20XX, etc.) and contain no real-world PIIBreaking changes
None. New public constants and a function; existing names and types are unchanged.
Screenshots or output samples
rac_advanced2023 against its 2024 save, this branch:Related issues
Refs #1190, #1158
Notes
It edits the same rows of
docs/supported-profile.md,docs/evidence.mdanddocs/status.mdas #1518, #1520 and #1524, so whichever merges later takes a small conflict.