#### IfcRelContainedInSpatialStructure

Natural language names

##### Semantic definitions at the entity

Entity definition

This objectified relationship, IfcRelContainedInSpatialStructure, is used to assign elements to a certain level of the spatial project structure. Any element can only be assigned once to a certain level of the spatial structure. The question, which level is relevant for which type of element, can only be answered within the context of a particular project and might vary within the various regions.

> EXAMPLE A multi-storey space is contained (or belongs to) the building storey at which its ground level is, but it is referenced by all the other building storeys, in which it spans. A lift shaft might be contained by the basement, but referenced by all storeys, through which it spans.

The containment relationship of an element within a spatial structure has to be a hierarchical relationship, an element can only be contained within a single spatial structure element. The reference relationship between an element and the spatial structure may not be hierarchical, i.e. an element can reference many spatial structure elements.

> NOTE The reference relationship is expressed by IfcRelReferencedInSpatialStructure.

Predefined spatial structure elements to which elements can be assigned are

- site as IfcSite
- building as IfcBuilding
- storey as IfcBuildingStorey
- space as IfcSpace

Occurrences of the same element type can be assigned to different spatial structure elements depending on the context of the occurrence.

> EXAMPLE A wall might be normally assigned to a storey, however the curtain wall might be assigned to the building and the retaining wall in the terrain might be assigned to the site.

> HISTORY New entity in IFC Release 2x.

> IFC2x PLATFORM CHANGE: The data type of the attribute RelatedElements has been changed from IfcElement to its supertype IfcProduct with upward compatibility for file based exchange.

Containment Use Definition:

The figure shows the use of IfcRelContainedInSpatialStructure to assign a stair and two walls to two different levels within the spatial structure.

Attribute definitions

# | Attribute | Type | Cardinality | Description | A
--- | --- | --- | --- | --- | ---
5 | RelatedElements | IfcProduct | S[1:?] | Set of elements products, which are contained within this level of the spatial structure hierarchy. | X
6 | RelatingStructure | IfcSpatialStructureElement | [1:1] | Spatial structure element, within which the element is contained. Any element can only be contained within one element of the project spatial structure. | X

Formal Propositions

Rule | Description
--- | ---
WR31 | The relationship object shall not be used to include other spatial structure elements into a spatial structure element. The hierarchy of the spatial structure is defined using IfcRelAggregates.

##### Inherited definitions from supertypes

Entity inheritance
Attribute inheritance

# | Attribute | Type | Cardinality | Description | A
--- | --- | --- | --- | --- | ---
IfcRoot
1 | GlobalId | IfcGloballyUniqueId | [1:1] | Assignment of a globally unique identifier within the entire software world. | X
2 | OwnerHistory | IfcOwnerHistory | [1:1] | Assignment of the information about the current ownership of that object, including owning actor, application, local identification and information captured about the recent changes of the object, NOTE: only the last modification in stored. | X
3 | Name | IfcLabel | [0:1] | Optional name for use by the participating software systems or users. For some subtypes of IfcRoot the insertion of the Name attribute may be required. This would be enforced by a where rule. | X
4 | Description | IfcText | [0:1] | Optional description, provided for exchanging informative comments. | X
IfcRelationship
IfcRelConnects
IfcRelContainedInSpatialStructure
5 | RelatedElements | IfcProduct | S[1:?] | Set of elements products, which are contained within this level of the spatial structure hierarchy. | X
6 | RelatingStructure | IfcSpatialStructureElement | [1:1] | Spatial structure element, within which the element is contained. Any element can only be contained within one element of the project spatial structure. | X

##### Formal representations

XSD Specification
`<xs:element name="IfcRelContainedInSpatialStructure" type="ifc:IfcRelContainedInSpatialStructure" substitutionGroup="ifc:IfcRelConnects" nillable="true"/>
<xs:complexType name="IfcRelContainedInSpatialStructure">
<xs:complexContent>
<xs:extension base="ifc:IfcRelConnects">
<xs:sequence>
<xs:element name="RelatedElements">
<xs:complexType>
<xs:sequence>
<xs:element ref="ifc:IfcProduct" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute ref="ifc:itemType" fixed="ifc:IfcProduct"/>
<xs:attribute ref="ifc:cType" fixed="set"/>
<xs:attribute ref="ifc:arraySize" use="optional"/>
</xs:complexType>
</xs:element>
<xs:element name="RelatingStructure" type="ifc:IfcSpatialStructureElement" nillable="true"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
`
EXPRESS Specification
`ENTITY IfcRelContainedInSpatialStructure
SUBTYPE OF (IfcRelConnects);
RelatedElements : SET [1:?] OF IfcProduct;
RelatingStructure : IfcSpatialStructureElement;
WHERE
WR31 : SIZEOF(QUERY(temp <* RelatedElements | 'IFCPRODUCTEXTENSION.IFCSPATIALSTRUCTUREELEMENT' IN TYPEOF(temp))) = 0;
END_ENTITY;

EXPRESS-G diagram

`

Link to this page