Skip to content

feat(ifc): a family instance's port no duct or pipe joins is placed at its connector, through the instance's transform (#869) - #943

Merged
DrunkOnJava merged 5 commits into
mainfrom
feat/869-unjoined-ports
Oct 24, 2026
Merged

DrunkOnJava merged 5 commits into
mainfrom
feat/869-unjoined-ports

Conversation

@DrunkOnJava

Copy link
Copy Markdown
Owner

Summary

Each family-instance port that no duct or pipe joins is now placed at its connector. The point and axis come from the connector's entry in the symbol that draws the instance, carried through the instance's transform. On Revit 2025, all 100 such ports on the RE1 MEP models are within 0.01 ft of Revit's export, each with Revit's Z axis: 53 of 53 on Electrical, 29 of 29 on Mechanical and 18 of 18 on Plumbing. None had a placement before. Part of #869.

Motivation

#869: Revit's export places every IfcDistributionPort at its connector. rvt-rs placed a pipe's ports at its ends (#847), and from #922 a port joined to a placed duct or pipe port at that port's point, but every other family-instance port had no placement at all.

A FamilySymbol's m_arrConnectorData entries hold each connector's m_trf, which RE-212's probe printed:

  • m_or is the connector's point in the symbol's coordinates;
  • the third column of m_3x3 is its Z axis.

The axes and origin of RE-87's instance transform carry both into model space.

The symbol must be the one that draws the instance, its InstanceInfo.m_symbolId (RE-215), not its type. With the type's symbol, the first run (Measure 40116288661) placed 9 of Plumbing's 18 and 2 of Mechanical's 29 ports elsewhere:

  • most of Plumbing's by 0.0538 ft;
  • one of Mechanical's by 0.81 ft.

They are on fittings sized per instance, whose symbols are their own.

Changes

  • src/native_connectors.rs:
    • InstancePort gains frame: Option<ConnectorFrame>, the connector's point and Z axis in the symbol that draws the instance;
    • connector_ports reads every FamilySymbol's connector frames and each instance's InstanceInfo.m_symbolId in the same pass;
    • a frame counts only if its point is finite and its axis a unit vector;
    • InstancePort and ConnectorPorts drop Eq, since they now hold f64s. They are research types, outside the stable API.
  • src/ifc/mod.rs: attach_family_instance_ports gives each new port that point and axis through the instance's transform (scan_instance_transforms).
  • tools/re/port_places_vs_ifc.py also scores rvt-rs's placement of Revit's ports on elements other than segments that no segment's port joins.
  • docs/support-matrix.json:
    • the MEP connections entry says how these ports are placed and what was measured;
    • it updates the joined ports' axis counts to the ones since RE-212 (108 and 53 as Revit's, 10 and 6 opposite).
  • changelog.d/added/unjoined-ports.md (Changelog fragments: every landing puts the other open PRs' changelog entries in conflict with main #938).

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: CI runs it. Measure built the head with --profile ci, and rustfmt and the let-chain scan pass.

  • 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

    • Files: RE1 Electrical, Mechanical and Plumbing (Revit 2025, MIT, Drshelden/IFC-ECS) with Revit's own IFC exports, fetched by Measure.
    • Measure 40117533857, this branch against main, port_places_vs_ifc:
    model ports no segment's port joins, within 0.01 ft of Revit's Z axis as Revit's
    RE1 Electrical 53 of 53 53
    RE1 Mechanical 29 of 29 29 (14 In, 14 Out, 1 other)
    RE1 Plumbing 18 of 18 18 (8 In, 8 Out, 2 other)
    • Pipe-end ports (62 and 124) and joined ports (59 and 118) are placed as on main.
    • The IFC changes on the three RE1 MEP models only, and every other scorer output is identical on all models.
    • Timing, from the first run, whose two sides ran on the same CPU type: RE1 Electrical 1435 → 1454 ms, Mechanical 758 → 777, Plumbing 697 → 698. In 40117533857 the two sides ran on different CPU types.
  • If this touches the IFC exporter: the witness verdicts replay. Core Interior's export is unchanged, and so are its observations.

Audit-honesty checklist

  • README / docs reflect the current state after this PR
  • If a new limitation was introduced, it is documented. The placement is limited to Revit 2025, and Snowdon Towers' MEP models (2024, local only) are not measured.
  • Commit messages describe WHAT changed and WHY
  • No emojis in code, docs, or commit messages
  • No private paths, personal email addresses, or internal jargon in committed files

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)
    • Contributor declaration: the connector frames are read from the corpus files' own records through their Formats/Latest schema (RE-212's probe), and checked against Revit's IFC exports. No Autodesk SDK source, disassembly, leaked documents or NDA material was used.

Breaking changes

None in the stable API: research::native_connectors is behind unstable-research.

@DrunkOnJava
DrunkOnJava enabled auto-merge (squash) October 24, 2026 17:51
@DrunkOnJava
DrunkOnJava merged commit 6054fb9 into main Oct 24, 2026
28 checks passed
@DrunkOnJava
DrunkOnJava deleted the feat/869-unjoined-ports branch October 24, 2026 19:39
DrunkOnJava added a commit that referenced this pull request Oct 24, 2026
## Summary

Prepares v0.7.0 (RELEASE.md steps 4 to 8): the version files, the
`[0.7.0]` changelog section assembled from `changelog.d/`, the README's
release section, and corrections to the status docs where they still
described the state before RE-212 or before the BIM4LCA office was
measured. Merging this is not the release; the signed tag on its squash
commit is.

## Motivation

Griffin's go-ahead (2026-10-24, about 3:00 PM): tag v0.7.0 once #887,
#930, #935, #940, #942 and #943 are on main with CI green. All six have
landed, the last at b04c0cb (#930). #934 (`--revit-property-sets`,
breaking) and #923 (the `ElementId` newtype, breaking) go in the next
release.

## Changes

- **Version files** (0.6.1 to 0.7.0): `Cargo.toml`, `rvt-py/Cargo.toml`
(and its `=0.7.0` pin on `rvt`), `rvt-wasm/Cargo.toml`, the `rvt` pin in
`tools/stream_evidence/Cargo.toml`, `viewer/package.json`,
`CITATION.cff` (`date-released: 2026-10-24`),
`.release-please-manifest.json`, and the workspace crates' entries in
`Cargo.lock` and `fuzz/Cargo.lock`.
- **`CHANGELOG.md`**: `python3 tools/release/changelog.py assemble`
moved the nine fragments in, then `[Unreleased]` became `[0.7.0] —
2026-10-24`, with an introduction, credits to puzzbobb (#870, #886,
#887, #935) and n3ur0m4n (#882), and "Upgrading from 0.6": the research
readers behind `unstable-research`, the `#[non_exhaustive]` types, the
error variants (and Python's `ValueError`), `SimpleDecoder`, the
property set builders' `Vec`, the removed `ifc::pset_validate`, the
element walk failing closed, and changed exports. Headings in the
assembler's order (Added, Changed, Fixed, Removed, Research), one each.
`[Unreleased]` is left empty.
- **Entries corrected for the release as a whole**: #847's pipe-port
entry said In ports' axes were wrong because their flow direction was
not read, and that other family-instance ports had no placement; RE-212
and #943 changed both, and it now gives main's counts (Measure
40126110706, base side: 124 of 124 and 62 of 62 with Revit's axis;
joined ports 108 and 53 as Revit's, 10 and 6 opposite). The
unjoined-ports entry says Revit 2025 in its headline. RE-215's entry
adds the office.
- **`README.md`**: "Release 0.7.0 and main", what 0.7.0 adds in brief.
The 0.6.1 section listed RE-215 under 0.6.0's additions; it shipped in
neither.
- **`docs/support-matrix.json`**:
- `native-symbol-cut-sizes`: the BIM4LCA office's result, and
`user_impact` limited to families whose symbol cuts an outline;
- `element-record-mep-connections`: still said HVAC and piping
directions, names and descriptions are not read and In ports' axes are
reversed; it now states RE-212 (direction, `InPort_`/`OutPort_` names,
`Flow` descriptions, axes), keeps SystemType and the electrical
description as unread, and lists RE-212's probe, scorer, test and report
as evidence.
- **`docs/status.md`** and
**`reports/element-framing/RE-215-symbol-cut-loops.md`**: the office,
which §6 called NOT MEASURED, as measured on 2026-10-24 (Measure
40121636312 and 40122363218): 187 of its 269 doors cut an outline and
have Revit's sizes; its 269 windows and other 82 doors are drawn by
symbols with no cut loop (#810).

## 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: this PR's CI. No code changes; the
version string changes the IFC header.
- [x] Verified end to end on real Revit files: no behaviour changes; the
measurements cited are the runs named above.
- [ ] If this touches the IFC exporter: the IFC header carries the
version (#417), so both Core Interior `rvt-rs.json` observations and
their verdicts are refreshed from this PR's CI run (its
`octetproof-core-interior` artifact) in a follow-up commit here,
differing only in `witness_version` and the verdict hashes.
- N/A: performance.

## Audit-honesty checklist

- [x] README / docs reflect the current state after this PR
- [x] The changelog section is assembled from the fragments;
`changelog.py check` passes with none left
- [x] Resolved limitations updated (RE-212's in the support matrix, the
office's NOT MEASURED)
- N/A: no new limitation
- [x] Commit messages describe what changed and why
- [x] No emojis in code, docs, or commit messages
- [x] No private paths, personal email addresses, or internal jargon in
committed files
- N/A: not a reverse-engineering finding

## Legal and contribution hygiene

- [x] Apache-2.0
- [x] No Autodesk proprietary content
- [x] No fixtures

## Breaking changes

The release's, listed under "Upgrading from 0.6" in `CHANGELOG.md`. This
PR itself changes no API.

## Screenshots or output samples

N/A: the IFC changes only in its header's version.
DrunkOnJava added a commit that referenced this pull request Oct 24, 2026
…t their connectors, measured on the BIM4LCA office (#869) (#952)

## Summary

A Revit 2024 family instance's ports that no duct or pipe joins are now
placed at their connectors, through the instance's transform, as #943
does on Revit 2025. On the BIM4LCA office, a Revit 2024 project with
Revit's IFC4 export, all 43 such ports are within 0.01 ft of Revit's,
each with Revit's axis, where none was placed before. Part of #869.

## Motivation

#943 limited the placement to Revit 2025
(`PORT_PLACEMENT_REVIT_VERSIONS`), the RE1 models' release, and #869 was
retitled to say no other release had an MEP oracle. That was wrong: the
office is Revit 2024 and Revit's export of it holds 67 ports.
`port_places_vs_ifc` could not see that, because it compared world
coordinates. Revit writes the office's `IfcSite` at its shared
coordinates and rvt-rs at its internal ones, so every port read as far
from rvt-rs's.

## Changes

- `src/ifc/mod.rs`: `PORT_PLACEMENT_REVIT_VERSIONS` is `[2024, 2025]`,
with the office's measurement in its doc.
- `tools/re/port_places_vs_ifc.py`: compares each file in its own site
frame (`site_local`). With that, the office's 24 pipe ports read
correctly as at their pipes' ends: index 0 at the second end, index 1 at
the first, all axes outward. RE1's scores do not change.
- `docs/support-matrix.json`, the MEP connections entry: the 2024
measurement.
- `changelog.d/added/ports-2024.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`: CI.
- [x] Verified end to end on real Revit files. Measure
[40142301111](https://github.com/DrunkOnJava/rvt-rs/actions/runs/40142301111),
this branch against `main` (e622754), default models plus `-f
nordic=true -f r2025=true`:
- BIM4LCA office as built and at building permit (CC BY-SA 4.0, fetched
by Measure): ports no segment's port joins, 0 placed before, 43 of 43
within 0.01 ft of Revit's now, each with Revit's Z axis;
- every other model's IFC is byte-identical (Core Interior, Einhoven,
the four RE1 models, the 23 R2025 models), and every model's diagnostics
are the same.
- [x] Witness: Core Interior's export is unchanged.

## Audit-honesty checklist

- [x] README / docs reflect the current state after this PR
- [x] A user-visible change has its entry as a fragment under
`changelog.d/`
- [x] Resolved limitation updated (the support matrix)
- N/A: no new limitation. The office's 24 pipe ports stay unplaced,
because pipe axes are read on 2025 only
(`PIPE_AXIS_SUPPORTED_REVIT_VERSIONS`).
- [x] Commit messages describe what changed and why
- [x] No emojis in code, docs, or commit messages
- [x] No private paths, personal email addresses, or internal jargon in
committed files
- N/A: no new format finding (RE-87's transform and RE-215's original
symbol, measured on another release)

## Legal and contribution hygiene

- [x] Apache-2.0
- [x] No Autodesk proprietary content
- [x] No fixtures

## Breaking changes

None.

## Screenshots or output samples

N/A.
Repository owner deleted a comment from chatgpt-codex-connector Bot Oct 31, 2026
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.

1 participant