Openings and fillings

The void and fill relationships — hasOpenings and fillings from an element, hasFillings and voidsElement from an opening, fills and fillsVoid from a door or window.

An opening (IfcOpeningElement) voids a wall or slab (IfcRelVoidsElement); a filling — a door, a window — fills the opening (IfcRelFillsElement). Six relations walk these links in every direction; all are GET relations, usable in the dot and parenthesised forms of Sub-features and relations.

From the voided element#

Relation Target
hasOpenings The openings cut into this element.
fillings The doors and windows that fill those openings, without the opening in between.
BQL#
GET qid, attribute.Name, hasOpenings(qid, attribute.Name), fillings(qid, niceType, attribute.Name) WHERE type = IFCWALL

From the opening#

Relation Target
voidsElement The element this opening voids (single).
hasFillings The elements that fill this opening.
BQL#
GET qid, voidsElement.attribute.Name, hasFillings.niceType WHERE type = IFCOPENINGELEMENT

From the wall, hasOpenings.hasFillings reaches the same doors and windows as fillings, opening by opening.

From the filling#

Relation Target
fillsVoid The opening this element fills (single).
fills The element whose opening this element fills — the host wall — as a set.
BQL#
GET qid, attribute.Name, fillsVoid.qid, fillsVoid.voidsElement.attribute.Name AS HostWall, fills.attribute.Name WHERE type = IFCDOOR

Counting#

Openings and fillings are not children of the wall in the spatial tree, so they are not counted by COUNT(children). Count them over the relation instead, one number per wall:

BQL#
GET qid, attribute.Name, fillings(COUNT(qid) WHERE type IN (IFCDOOR, IFCWINDOW)) AS Fillings WHERE type = IFCWALL

Or query the fillings and group them by the element they fill:

BQL#
GET fillsVoid.voidsElement.attribute.Name AS Host, COUNT(qid) WHERE type IN (IFCDOOR, IFCWINDOW) GROUP BY fillsVoid.voidsElement.attribute.Name

Used in#