Interconnected objects

An IFC model is a collection of objects which are all interconnected. Doors and windows are related to walls, walls are related to building stories, and all those objects can be connected to the same property, for example the color red.

It is possible to retrieve all objects related to one specific object by using the attribute-operator. However this method requires intimate knowledge of the IFC schema. To retrieve all objects related to a door, over 25 explicit and inverse attributes need to be queried.

In the real world a space or a room seems directly connected to a window. This is not the case in an IFC model. As you can see in the figure six hops are needed to get from the space to the window. An architect without any knowledge of the IFC schema is unaware of this fact.

Asterisk operator

To simplify the retrieval of related objects the asterisk(*)-operator was introduced. This function lets the user select all directly and indirectly related objects. The code below selects one object first, then it selects all related objects.

Select ?Var1
Where ?Var1.Attribute.GlobalId = “3iSzpa9d93jhTDB7hG0QBW”
Select ?Var2 := ?Var1.*

Depth

A space is connected to a wall, the wall is connected to an opening and the opening is connected to a window. So a space and a window are indirectly connected, not directly. To retrieve all windows related to a space the asterisk operator can be used and it should be set to search with a depth of 6.

Select ?Var1
Where ?Var1.Attribute.GlobalId = “3iSzpa9d93jhTDB7hG0QBW”
Select ?Var2 := ?Var1.*(6)

Objectified relationships

You might wonder why the depth integer has to be set to a value of 6 and not to a value of 3. In the IFC schema a wall and a opening are not directly connected, they are connected to each other by another object, a relationship object. A opening and a window are connected by the IfcRelVoidsElement object. An IfcRelFillsElement object is another relationship object. This object connects an opening to a window or a door.