Skip to content

feat(ifc)!: ducts take their type, section, line and ports from their own record on Revit 2015 to 2027, and ports their SystemType (#1190) (RE-371) - #1524

Merged
DrunkOnJava merged 3 commits into
DrunkOnJava:mainfrom
puzzbobb:survey-1190-s11
Nov 9, 2026

Conversation

@puzzbobb

@puzzbobb puzzbobb commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

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 (A port's SystemType (its connector's system classification) and an electrical port's Flow=Source/Sink description are not written (RE-212 follow-up) #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.

  • 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.
  • 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 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.
  • 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

  • README / docs reflect the current state after this PR — no claims of features that are not actually shipped in this PR
  • A user-visible change has its entry as a fragment under changelog.d/<section>/ (see changelog.d/README.md), not in CHANGELOG.md
  • 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.
  • 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.
  • Commit messages describe WHAT changed and WHY, not "fix things" or "updates"
  • No emojis in code, docs, or commit messages
  • No private paths, personal email addresses, or internal jargon in committed files
  • 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

  • I agree this work is licensable under Apache-2.0 (see CONTRIBUTING.md)
  • 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.
  • 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).

@puzzbobb
puzzbobb requested a review from DrunkOnJava as a code owner November 8, 2026 16:59
@DrunkOnJava DrunkOnJava changed the title feat(ifc): ducts take their type, section, line and ports from their own record on Revit 2015 to 2027, and ports their SystemType (#1190) (RE-371) feat(ifc)!: ducts take their type, section, line and ports from their own record on Revit 2015 to 2027, and ports their SystemType (#1190) (RE-371) Nov 8, 2026
@DrunkOnJava

DrunkOnJava commented Nov 8, 2026 •

Copy link
Copy Markdown
Owner

@puzzbobb the Measure run on this head is in (42521220132, c08f97f0). The gains are real: the office's SystemType 0 to 24 of 67, all as Revit writes it; RE1 Mechanical's record-box bodies 68 to 43, ports at both ends on 31 of 31, axes as Revit's 53 to 59 of 59; RE1 Plumbing's axes 108 to 118 of 118. The same-project gates pass.

One thing blocks it: the export is not valid IFC4 on four samples, and the body doesn't say so.

  • schema.txt's IfcOpenShell validate goes from findings 0 to findings 10 on rme_advanced and rme_basic, 2015 and 2019 saves: 5 ConnectedFrom and 5 ConnectedTo each. Both inverses are SET [0:1] in IFC4, and these ports hold two relations. On rme_basic 2019, #87033 is the RelatedPort of both #87034 and #87041.
  • step_writer.rs:3940 allows it ("a port is shared by every join it is in"). partition_connector_pairs.rs doesn't change here, so the extra joins come from this PR's new connection source.
  • The 10 findings are 15 IfcRelConnectsPorts forming 5 separate chains, each 4 ports and 3 joins (A to B to C to D, with B and C in two joins each), in the same shape on these saves. A connector has one physical partner, so at least one join of each chain isn't real. Re-orienting a join would satisfy the schema while still writing it, so please don't fix it that way. (An earlier version of this comment suggested that; it was wrong.)
  • segment_joins and attach_connector_pairs each keep one join per connector, and export_content.rs unions both sides' lists, so a port gets two joins only where the two lists disagree. Which list is wrong isn't established. Printing those chains' Port_<id>_<index> names on an open sample and comparing with the 2024 save's joins should show it.
  • The fail-closed rule that follows: keep a join only where neither end has a conflicting join, prefer the one both sides list, leave a one-sided join out and count it in the diagnostics, then restate the body's connection totals.
  • The later saves can't show this fault. rme_* 2025 to 2027 go from validated to validate: skipped, over 30 MB with this change, and 2024 was already skipped. So after the fix, please count the ports per role on those exports directly (port_schema_findings in tools/re/ports_vs_ifc.py should do it), rather than relying on "every port and connection is the 2024 save's".

Two smaller points for the report:

Commit c08f97f0 also has no verified signature, so it can't land as it stands; I can re-sign it when it's next in line. Do you want to take the port fix, or should I, as on #1517?

DrunkOnJava added a commit that referenced this pull request Nov 9, 2026
…heir parts under them (#1190) (RE-366) (#1519)

## Summary

Revit 2015 to 2023 curtain walls are now `IfcCurtainWall`, with their
mullions and panels aggregated under them, turned along their own axes,
and with `Span`, `Length` and `IsExternal`. It's a sixth slice of #1190,
and the largest gap by element count: 4,661 parts on `rac_advanced`
alone. It's measured against the same Autodesk samples saved by a later
release, and, as counts, against Revit's own exports of `rac_advanced`
2015 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_mvp`
never called the curtain readers. `rac_advanced` on `main`:

| | 2023 | 2024 |
|---|---:|---:|
| `IfcCurtainWall` | 0 | 34 |
| elements aggregated under another | 0 | 4,515 |
| `partition_family_instance_oriented_box` | 0 | 148 |
| members with `Span` and `Length` | 0 | 3,252 |

## Changes

- `src/research/partition_schema_mvp.rs`: the branch calls
`attach_curtain_walls`, `attach_curtain_axes` and
`attach_curtain_member_is_external` on `CURTAIN_32BIT_REVIT_VERSIONS`
(2015 to 2023), and `bind_opening_hosts` after them, as on 2024.
- `.../records_2023.rs`: `recover_2023_records` returns each record's
reference list, and no longer binds hosts itself. 2008 to 2014 get the
same binding as before.
- `.../curtain.rs`: `attach_curtain_walls` takes those lists;
`attach_curtain_axes` reads through `scan_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 takes `attach_record_is_external`.
- `reports/element-framing/RE-366-2015-2023-curtain-walls.md`, an
addendum to `docs/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, by `Tag`, over a
Measure run's kept exports. `docs/support-matrix.json`'s
`element-record-curtain-walls` names 2015 to 2023 and RE-366, and the
class counts the docs cite for Vitoria's `ALD26 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.

- [x] The required gate passes: `full / CI passed` on the rebased head
(fmt, clippy, rustdoc, the test matrix with its `msrv` entry, the i686
job, corpus tier 2, IfcOpenShell, docs, wheels, audits, PII guard).
- [ ] 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
- **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](https://github.com/DrunkOnJava/rvt-rs/actions/runs/42581222440)
(the rebased head `6f71f93a` against `main` at `58fd08f2`, 118 exports,
held-out models as counts only): `rac_advanced` 2015 to 2020 (six pairs,
the same counts on each) `IfcCurtainWall` 34 of 34 (0 before),
`Pset_CurtainWallCommon.IsExternal` 32 of 32, `Pset_MemberCommon.Span`
3,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. Vitoria `ALD26 Before` (Revit 2018)
`IfcCurtainWall` 5 of 9 (0 before), the other 4 stay `IfcWall`, 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, `Span` 206 of 206, equal 2,737 to 2,948 of
5,317; the held-out `ALD26 Project` 5 of 8, `Span` 206 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`:

| save | curtain walls | aggregated as 2024 | under another wall | not
aggregated |
    |---|---:|---:|---:|---:|
    | `rac_advanced` 2015 to 2017 (each) | 34 of 34 | 4,384 | 0 | 80 |
    | `rac_advanced` 2018, 2019 (each) | 34 of 34 | 4,463 | 0 | 1 |
    | `rac_advanced` 2020 | 34 of 34 | 4,454 | 0 | 10 |
    | `rac_advanced` 2021 | 34 of 34 | 4,444 | 0 | 71 |
    | `rac_advanced` 2022 | 34 of 34 | 4,463 | 0 | 52 |
    | `rac_advanced` 2023 | 34 of 34 | 4,454 | 0 | 61 |
| `rac_basic` 2015, 2016, 2019, 2022, 2023 (each) | 9 of 9 | 188 | 0 | 4
|

- Those not aggregated, on `rac_advanced` 2023: 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.py` for the oriented boxes), `main` against
this change: `rac_advanced` 2023 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_basic` 2023 188 of 188 before and
after. The 148 oriented boxes are the 2024 save's on 2015, 2019, 2021
and 2023. On `rac_advanced` 2019 no body that matched on `main` stops
matching, and the 553 that still differ have the box they have on
`main`, at worst 15 mm off. RE-180 records `rac_advanced` 2019 and 2020
as an earlier edit in which curtain walls moved.
- Values against the 2024 save, `rac_advanced` 2023 / 2015: `Span` and
`Length` 3,252 of 3,252 / 3,241 of 3,252, the 11 about 7.5 mm off as
their boxes are; member `IsExternal` 3,147 equal and 45 not read / 3,077
and 79; panel `IsExternal` 1,307 of 1,307 on both; curtain wall
`IsExternal` 34 of 34 on both.
- Class and parts over every save
(`tools/re/curtain_classes_across_saves.py` on the kept exports of
Measure run 42579926185, head `6f71f93a`): of the 31 saves of 2015 to
2023 that have a 2024 save of the project, 511 walls are
`IfcCurtainWall` here and in the 2024 save; none is `IfcWall` there, and
none that is `IfcCurtainWall` there is `IfcWall` here. 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 9
`rac_advanced` saves, 9 on each of 9 `rac_basic` saves and 31 on each of
4 `rme_*` 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 from `IfcWall` to
`IfcCurtainWall`, gaining `Pset_CurtainWallCommon.IsExternal` and losing
`Pset_WallCommon.IsExternal` and `ExtendToStructure`. 4 curtain walls on
`rac_basic` gain 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_advanced` and `rac_basic` of 2015 to 2023,
`rme_advanced` and `rme_basic` of 2015 and 2019), the six `racadv` pairs
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.
- [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. No difference above the noise of three runs each (`rac_advanced`
2023, about 4.3 s; `rac_basic` 2019, about 2 s).

```
tools/fetch-autodesk-samples.sh samples 2015 2024
for f in samples/*.rvt; do rvt-ifc "$f" -o "${f%.rvt}.ifc"; done
python3 tools/re/save_pair_bodies.py samples/2023-racadvancedsampleproject.ifc samples/2024-racadvancedsampleproject.ifc --sources partition_family_instance_oriented_box
```

## 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`,
`docs/release-1.0-criteria.md`. The 2008 to 2014 rows now say "as on
2015, without curtain walls".
- [x] If a new limitation was introduced, it is documented in the PR
body and in-code
- None new. Still not read, RE-366 §5: a curtain wall's `Length`; family
and type names on mullions and panels, so their `ObjectType`,
`Reference` and materials; a part's `NetVolume` and `NetSurfaceArea`; a
corner mullion's curtain wall; a curtain grid's.
- [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
- [ ] If this is a reverse-engineering finding: a reproducible probe
under `probes/examples/` and a dated addendum to
`docs/format-reconnaissance.md` are included
- The addendum is included. No new byte layout is decoded, so there is
no probe.

## 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. New public constants and a function; existing names and types are
unchanged.

## Screenshots or output samples

`rac_advanced` 2023 against its 2024 save, this branch:

```
tools/re/save_pair_bodies.py --sources partition_family_instance_oriented_box
same 148, differ 0, not in the reference 0
```

## Related issues

Refs #1190, #1158

## Notes

It edits the same rows of `docs/supported-profile.md`,
`docs/evidence.md` and `docs/status.md` as #1518, #1520 and #1524, so
whichever merges later takes a small conflict.

---------

Co-authored-by: Griffin Long <[email protected]>
puzzbobb and others added 3 commits November 9, 2026 04:22
…own record on Revit 2015 to 2027, and ports their SystemType (DrunkOnJava#1190) (RE-371)

On Revit 2015 to 2023, 2026 and 2027 a duct was written untyped, named
Duct-<ElementId>, its record box as its body, with no Length and two
unplaced ports: 724 ducts on rme_basic and 728 on rme_advanced. On 2024 and
2025 RE-134 typed ducts by a byte scan that found no type for any of
Snowdon Towers HVAC's 1,053, and a duct off the model's axes had no Length
or ends (356 of them). A duct tapped into another had no port or join there
(406 on Snowdon), no port had a SystemType (DrunkOnJava#834), every Exhaust Air port
had a direction where Revit's export writes SOURCEANDSINK, and on 2015 to
2022 no family instance's port or join was read.

A duct's own RbsDuctCurve record holds all of it on every release from 2015
to 2027, in the shape of a pipe's (RE-370): its type (an AbsDuctType, named
by its SymbolInfo and shaped by its sweep profile), its section and the
direction its height lies along (m_vNormal), its one GLine at any slope,
its reference level and the elevations of its ends above it, which
Connector is at each end and where each tap is along the line, each
connector's joins, and each connector's calculated direction and system
classification (SegmentConnectorCalculation.m_eSystemType, numbered as a
system type's m_basicSystemType). attach_native_ducts reads them in one
projected pass, before RE-134's scan on 2024 and 2025, and writes the
fields RE-134 writes plus the normal, the taps, the joins and, for a duct
justified at its centre, its level and offsets. The line is held to a box
test like RE-131's: the section swept along it must be the record box. The
export draws the section along the line, writes each tap's port on the
line, and adds Revit's Constraints elevations, Slope and justification.

The connector pass reads each connector's system, writes the port's
SystemType as revit-ifc names the classification (Supply and Return Air
VENTILATION, Exhaust Air EXHAUST, Supply Hydronic HEATING; no other is
measured), and writes every Exhaust Air connector SOURCEANDSINK. It and the
family instances' joins now read 2015 to 2027 and a record's ids in their
4-byte form as well as their 8-byte one. A port joined to a placed one is
at its point with its axis turned unless exactly one of the two is a sink,
and a tap places no other port. A port whose own direction or system is
not read (a family instance whose 2015 to 2022 record the native path does
not decode) takes the opposite direction and the system of the port joined
to it.

Against Revit's own export of Snowdon Towers HVAC (2025) the record gives
Revit's type name, Length, section, body and every Constraints value on
1,053 of 1,053 ducts, and the export now writes 5,155 of Revit's 5,217
ports (the other 62 are on flex ducts, not read) and 2,528 of its 2,590
connections, every port at Revit's point, SystemType Revit's on 5,118 (the
other 37 electrical), FlowDirection on 4,889 (3,496 before). RE1
Mechanical's 25 ducts have Revit's type, length and body, and every port of
RE1 Mechanical and Plumbing now has Revit's point and axis. On Autodesk's
twelve MEP sample saves of 2015 to 2027 every duct is typed and drawn as
the 2024 save's but nine the project replaced or redrew before 2015, and on
2025 to 2027 every port and connection is the 2024 save's. Nothing but
ducts, ports and connections changes in the export.

(cherry picked from commit c08f97f029b90179a13bbf78eecccfa4a402bc8f)
…ps the other, and the ones left out are counted (DrunkOnJava#1524) (RE-371)

A connector has one physical partner. On the rme_advanced and rme_basic samples
of Revit 2015 and 2019, five chains of three joins each hold one that the 2024
save does not have (a connector joined to the second connector of an element it
is already joined to at its first), and the export was not valid IFC4: 10
ConnectedFrom and ConnectedTo findings on each file. A connector named with two
partners now keeps the one both sides' lists name where exactly one is, and none
otherwise; a join is written only where each end keeps the other, and the rest
are counted in exported.port_joins_left_out. A duct's reference level pushed by
its own record is not pushed again by attach_levels_32, and
apply_partner_directions' comment says what the code does.
…es under the join rule (DrunkOnJava#1524)

The ports table and the per-file table gave the totals before a join of two
connectors was written only where each end keeps the other. Run
42585486357's exports of the four rme saves of 2015 and 2019, through the
same comparison that reproduces the old rows to the digit, give 2,764 (2,764)
and 2,859 (2,853) for rme_basic, 2,742 (2,742) and 2,819 (2,798) for
rme_advanced; the 10 joins left out on each, and what they cost (5 ports'
place and 5 ports' direction), are in section 5.
DrunkOnJava added a commit that referenced this pull request Nov 9, 2026
…s an enumerated or list value (#1524) (#1590)

## Summary

`tools/re/bodies_across_saves.py` skips a property that holds no single
value instead of raising on it, so the same-project gate can judge an
export in which a product carries an enumerated or list property.

## Motivation

Measure run
[42585494298](https://github.com/DrunkOnJava/rvt-rs/actions/runs/42585494298)
on #1524 failed `Same-project gates` for the six `rme_advanced` and
`rme_basic` saves of 2025, 2026 and 2027. Each one's
`bodies_across_saves.txt` holds a traceback in place of its result:
`AttributeError: entity instance of type
'IFC4.IfcPropertyEnumeratedValue' has no attribute 'NominalValue'`, from
`properties`. The other nine samples (`rac_advanced`, `rac_basic`,
`rst_basic`, each of 2025 to 2027) passed.

#1524 types the 724 and 728 ducts of those samples, and a typed duct
carries `Pset_DuctSegmentTypeCommon.Shape`, which the writer emits as an
`IfcPropertyEnumeratedValue` (#686). `properties` read
`prop.NominalValue` on every property of every product it compares, and
an enumerated or list value has none. No export the check had read held
one before: the same six saves passed in run
[42583038481](https://github.com/DrunkOnJava/rvt-rs/actions/runs/42583038481)
on #1587's head, whose exports type no duct there.

## Changes

- `tools/re/bodies_across_saves.py`: `properties` reads `NominalValue`
with `getattr(prop, "NominalValue", None)` and skips a property without
one, as it already skipped one whose `NominalValue` is `None`.
`placement_source` reads it the same way (it tested the property's name
first, so it was not reached for a Shape, but it had the same pattern).

## Testing

Unit tests: N/A. The check is the scorer run on the exports that tripped
it.

- **The six exports that failed**, from the `keep_ifc` run
[42585486357](https://github.com/DrunkOnJava/rvt-rs/actions/runs/42585486357)
of #1524's head, through this branch's scorer with each save held to the
2024 and 2025 saves as Measure holds it: all six print `bodies across
saves: PASS` and exit 0, with their ports, cut openings, door and window
sizes, properties and census lines compared against the 2025 save (for
example `rme_advanced` 2026: ports 7,276 of 7,276 the same, properties
5,158 equal and none different, census 6,605 bodies the same). The same
scorer from `main` raises the `AttributeError` on all six, as the run's
own files show.
- **The Measure with this branch as its scorers' ref** is dispatched on
#1524's head next; its `same-project gates` verdict is the check on that
pull request.

## Audit-honesty checklist

- [x] The gate still fails on a real difference: only the read of a
property without a single value changed; every comparison after it is as
before.
- [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.
@DrunkOnJava

Copy link
Copy Markdown
Owner

Thanks for the ducts. What changed on this branch since you pushed:

rvtDevelop reads it next and I land it after.

@DrunkOnJava
DrunkOnJava merged commit a389b28 into DrunkOnJava:main Nov 9, 2026
38 checks passed
@puzzbobb
puzzbobb deleted the survey-1190-s11 branch November 9, 2026 10:17
@DrunkOnJava DrunkOnJava mentioned this pull request Nov 9, 2026
3 tasks done
DrunkOnJava added a commit that referenced this pull request Nov 9, 2026
## Summary

Release 0.17.0. Everything merged since 0.16.1 (29 pull requests, `main`
at 52282ea): Revit 2015 to 2023 curtain walls, curtain parts and steel
beam I sections, duct and port reads of Revit 2015 to 2027, walls'
`Height` on 2015 to 2023, room outlines from a stored solid's edges, two
wall rules on Revit 2024 (a stub cut whole; a profile-edited wall's top
and `Height`), no `ObjectType` on Revit 2026 and 2027 saves, and two
export claims made conditional (#1598). The saved-mesh default for every
class (#1610) and the wall profile pockets (#1608) are not in it; they
go in the next release.

## Changes

- Version 0.16.1 -> 0.17.0 in:
  - Cargo.toml;
  - rvt-py/Cargo.toml and its `=` pin;
  - rvt-mcp/Cargo.toml and its `=` pin;
  - rvt-wasm/Cargo.toml;
  - tools/stream_evidence/Cargo.toml's pin;
  - viewer/package.json;
  - CITATION.cff (version and date);
  - Cargo.lock and fuzz/Cargo.lock.
- `python3 tools/release/changelog.py assemble`: 17 fragments go into
`[0.17.0]`, with an introduction, what is not measured, and "Upgrading
from 0.16".
- README: the latest release and the "Upgrading from 0.16" and "after
0.17.0" fragments sentence.
- The Core Interior witness observations and verdicts, and the synthetic
fixtures, from this pull request's CI run (to be pushed).

## Testing

- `python3 tools/ci/release_preflight.py check --event workflow_dispatch
--ref-type branch --ref-name release/v0.17.0 --sha HEAD`: ok, version
0.17.0.
- `python3 tools/release/changelog.py check`: ok.
- The release's baseline Measure, `main` at 52282ea against v0.16.1
with every flag and the held-out models: run
[42632958286](https://github.com/DrunkOnJava/rvt-rs/actions/runs/42632958286)
(its result goes into the changelog before this is merged).
- The dry run RELEASE.md step 7 asks for, `publish.yml` dispatched on
this branch (to be run, and linked here).

Unit tests: N/A.

## Audit-honesty checklist

- [x] Each entry keeps its caveats; the introduction lists what is not
measured.
- [x] No emojis, private paths or PII.

## Legal and contribution hygiene

- [x] Apache-2.0. No Autodesk source, internals or NDA material.

## Breaking changes

The API changes of #1524 and #1598 and the `ObjectType` change of #1601,
listed under "Upgrading from 0.16".
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants