Skip to content

feat(ifc): RE-141 ports for the joins of duct and pipe fittings (#528) - #552

Merged
DrunkOnJava merged 4 commits into
mainfrom
re/re141-connector-anchors
Oct 1, 2026
Merged

DrunkOnJava merged 4 commits into
mainfrom
re/re141-connector-anchors

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Oct 1, 2026 •

Copy link
Copy Markdown
Owner

RE-141 for #528. A fitting's joins are lists of the RE-138 form with the fitting first, found by the list alone anywhere in a partition, and the IFC export now writes ports for them.

Measured on GitHub's runners, head against main (Measure run 36902094526), against Revit's own IFC2X3 export of the MIT RE1 models:

model Revit's connections written before written now written, not in Revit's
RE1 Mechanical 73 53 (72.6%) 66 (90.4%) 0
RE1 Plumbing 126 112 (88.9%) 120 (95.2%) 1 (as before)
  • Every port is tied to its element and IfcOpenShell's schema validation finds nothing.
  • Core Interior, Einhoven, RE1 Architecture and RE1 Electrical are byte-identical to main.
  • A fitting's own record holds only the ascending ids it refers to, with no connector index; the pipes' connector managers are outside the leading record chain; a fitting's list is written once with its connector index as Revit numbers it (a pipe's earlier copy is inverted).

Not claimed: flow direction, port placement, the 7 and 6 connections left (equipment written as a proxy, which IFC4 allows no port on, and joins no list read gives). Revit 2025 only.

ConnectorJoins is now a list of (connector, element, element's connector), and the field names are built by connector_element_field and connector_index_field. Report: reports/element-framing/RE-141-fitting-joins.md.


Note

Medium Risk
Changes partition binary parsing and IFC MEP connectivity for fittings; scope is bounded to Revit 2025 RE1-style layouts but list scanning by pattern could theoretically mis-read unrelated bytes on other models.

Overview
Extends RE-138 MEP port export so duct and pipe fittings get IfcDistributionPort connections, including fitting-to-fitting joins that were previously skipped.

Fitting joins use the same counted two-reference list layout as curves, but lists are scanned anywhere in a partition via new partition_connector_pairs::scan_fitting_pairs, then merged in attach_connector_pairs with curve pairs. ConnectorJoins becomes a variable-length list (connector, peer element, peer index) with per-connector field names from connector_element_field / connector_index_field instead of fixed two-connector arrays. IFC export iterates that structure unchanged in spirit but now emits ports for every attached join on fittings.

On RE1 Mechanical/Plumbing vs Revit IFC, all port-to-port connections rise from 53→66 and 112→120 (90.4% / 95.2% of Revit’s totals); other models stay byte-identical. Adds RE-141 probes, report, changelog/support-matrix updates, and ports_vs_ifc.py scoring for every Revit connection.

Reviewed by Cursor Bugbot for commit 1fe41ba. Configure here.

…tor anchor and dumps what follows it (#528)

RE-138 reads the joins after a duct's or pipe's RbsCurveConnectorManager anchor, and a fitting's own object holds the joins that Revit's export has and the pipes' lists do not. This prints the schema's Connector and Port classes, how many anchors each class of record holds, the bytes after the first anchors of each, and the whole record of the first duct and pipe fittings, for an offline search for the ids Revit's export joins.
…wo references that start with a duct, pipe or fitting (#528)

The first RE-141 run found the pipes' connector managers outside the leading record chain and the fittings' own records holding only a sorted list of the ids they refer to, joined elements among them, with no connector index. This looks for the RE-138 list form anywhere in a partition with a fitting as its first reference, and prints the lists in the form the pairs scorer reads.
…ing to fitting included (#528)

A fitting's joins are written in the same list form as a duct's or pipe's, with the fitting as the first reference, and are found by the list alone anywhere in a partition. The fitting's own connector index is stored as Revit numbers it, in one copy, where a duct's or pipe's earlier copy is inverted. Fittings now carry their joins as fields like ducts and pipes, the joins type holds any number of connectors, and the export writes a port for each connector of a joined pair of distribution elements, so fitting to fitting connections, which the pipes' lists do not hold, are written too. ports_vs_ifc.py also scores every connection of Revit's export.
…or the fitting joins (#528)

The report records what a fitting's own record holds, where the joins are, the scores of the list scan against Revit's connections by what each end is, and the export head against main: 66 of 73 and 120 of 126 of Revit's connections written, no other model's output changed.
@DrunkOnJava
DrunkOnJava enabled auto-merge (squash) October 1, 2026 17:55
@cursor

cursor Bot commented Oct 1, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_09ff1aae-6481-4432-b1de-7fa7115644a7)

@DrunkOnJava
DrunkOnJava merged commit ba20e84 into main Oct 1, 2026
24 checks passed
@DrunkOnJava
DrunkOnJava deleted the re/re141-connector-anchors branch October 1, 2026 18:00
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