buildingSMART / buildingSMART/IFC4.x-development

Clarification in docs needed on whether two IfcRelConnectsPorts are allowed for a port.

Open
#145 5 comments 0 reactions 0 assignees View on GitHub
allocated allocated-mepf ifc-update-out
Dominant language
Python
Stars
234
Forks
123
Avg merge
15h 4m
Merged PRs (30d)
5

Description

IfcRelConnectsPorts suggest that the RelatingPort is the source and the RelatedPort is the sink:

> For port connections between elements, the RelatingPort is set to a port having FlowDirection=SOURCE and the RelatedPort is set to a port having FlowDirection=SINK.

However, what happens if the FlowDirection=SOURCEANDSINK for both ports?

Option 1: Does this mean that the order of RelatingPort and RelatedPort is arbitrary?
Option 2: Or does it mean that we should have _two_ IfcRelConnectsPorts? One pointing one direction, and the other pointing the other?

If option 1: the benefit is that you have less Rel entities to manage for the one connection. It also decouples the semantic meaning of RelatingPort=SOURCE and RelatedPort=SINK and the flow direction which could very well change or be recalculated later. For analysis, typically first a connection is made, then the direction is determined. Right now, determining the relationship means that you'd potentially have to switch the attributes.

If option 2: the benefit is that you can recursively traverse ConnectedTo (or ConnectedFrom, if you're going the other way) relationships to go through a model without writing complex "If FlowDirection=="SOURCEANDSINK" then ..." logic. It makes finding upstream or downstream objects in a system easier.

It would be good to decide on the preferred convention and to document it explicitly.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.