Repository navigation
feat(ifc): RE-138 ports and port-to-port connections for ducts and pipes (#528) - #550
Merged
Merged
Conversation
…ed to (RE-138) (#528) A duct's or pipe's object lists its connectors' joins after its RbsCurveConnectorManager anchor, each written twice with the curve's own index inverted in the earlier copy. partition_connector_pairs reads them as pairs of (ElementId, connector index); the probe prints them and tools/re/connector_pairs_vs_ifc.py scores them against the IfcRelConnectsPorts of Revit's own export. Nothing is exported yet.
Bugbot couldn't run - usage limit reachedBugbot 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_34678f11-ea4a-4019-9f9b-61f9239a9a94) |
…-138) (#528) A list is read as stored in the later block after a curve's anchor and inverted in the earlier block, which brings the connector pairs to 94 per cent of Revit's connections that involve a duct or pipe on RE1 Mechanical and Plumbing in a first measurement. The pairs are attached to each duct and pipe as fields, resolved to entities once both elements are exported, and written as IfcDistributionPort, IfcRelConnectsPortToElement and IfcRelConnectsPorts with no flow direction. tools/re/ports_vs_ifc.py scores the export against Revit's.
…e port scorer validates the schema (#528) RE1 Mechanical: 56 of the 59 connections of Revit's export that involve a duct or pipe are written; Plumbing: 112 of 118. The ports have no flow direction. The scorer now also runs IfcOpenShell's schema validation on the port entities.
IFC4's IfcRelConnectsPortToElement relates a port to an IfcDistributionElement, and RE1 Mechanical's equipment is written as an IfcBuildingElementProxy: IfcOpenShell's validation found three relationships to it. A join is now written only when both elements are distribution elements.
…ion elements (#528) RE1 Mechanical 53 of 59 (89.8 per cent), Plumbing 112 of 118 (94.9 per cent); IfcOpenShell's IFC4 schema validation of both exports finds nothing. Measure run 36874925630.
DrunkOnJava
marked this pull request as ready for review
October 1, 2026 14:19
DrunkOnJava
enabled auto-merge (squash)
October 1, 2026 14:20
Bugbot couldn't run - usage limit reachedBugbot 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_df706702-87e2-485d-8850-55cdb7a357fe) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reads which element each end of a duct or pipe is joined to, from the lists in the curve's own object after its
RbsCurveConnectorManageranchor (RE-134), and writes them as ports and port-to-port connections (#528).IfcDistributionPortfor each connector,IfcRelConnectsPortToElementfor each port andIfcRelConnectsPortsfor each join whose two elements are exported as distribution elements: 53 of 59 (89.8 per cent) of Revit's connections that involve a duct or pipe on Mechanical and 112 of 118 (94.9 per cent) on Plumbing. Every port is tied to the element its name gives, and IfcOpenShell's IFC4 schema validation of both files finds nothing; before the distribution-element rule it found three errors, ports on equipment written as anIfcBuildingElementProxy. Core Interior's export is byte-identical and no other scorer changes.Port_<ElementId>_<index>. Fitting-to-fitting and equipment connections are not read.Measure runs 36872401031 (against main) and 36874925630; scorers
tools/re/connector_pairs_vs_ifc.pyandtools/re/ports_vs_ifc.py. A support-matrix entry, the changelog andreports/element-framing/RE-138-connector-pairs.mdare included.Refs #528, #96.
Note
Medium Risk
Changes IFC export with new MEP connectivity entities and partition binary parsing; behavior is gated to distribution elements and Revit 2025–measured layouts, but incorrect joins could misrepresent MEP topology in exported IFC.
Overview
Adds RE-138: decode duct and pipe connector joins from partition data after the
RbsCurveConnectorManageranchor, surface them on decoded elements, and emit IFC4 distribution topology (IfcDistributionPort,IfcRelConnectsPortToElement,IfcRelConnectsPorts).Parsing walks two duplicate list blocks and normalizes inverted curve connector indices in the earlier block. Joins are exported only when both connected elements are written as distribution types (skipping equipment exported as
IfcBuildingElementProxyto stay IFC4-valid). Ports are namedPort_<ElementId>_<index>with no flow direction (.NOTDEFINED.).Adds
partition_connector_pairs, schema attachment, probe/scorers (connector_pairs_vs_ifc.py,ports_vs_ifc.py), CI measure hook, support-matrix entry, and framing report. Coverage is partial vs Revit’s export on RE1 Mechanical/Plumbing (~90–95% of duct/pipe-involved connections); fitting-only joins are not read.Reviewed by Cursor Bugbot for commit e5d12ec. Configure here.