Skip to main content

IFCSpatialQueries

Spatial and geometric queries on IFC models using a Bounding Volume Hierarchy (BVH). These queries detect geometric relationships not explicitly defined in the IFC schema.

Geometric vs Explicit Relationships: These nodes find relationships based on geometry (touching, intersecting, nearby). For explicitly defined IFC relationships, use IFCQuery nodes instead.

GetModelPrecision

Returns the model's geometric precision.

Inputs:

ParameterTypeDescription
ifcModelIFCModelThe loaded IFC Model

Output:

TypeDescription
doubleThe precision value in model units

GetOneMeterValue

Returns the value of one meter in the model's units.

Inputs:

ParameterTypeDescription
ifcModelIFCModelThe loaded IFC Model

Output:

TypeDescription
doubleOne meter expressed in model units

GetSpatialHierarchy

Builds and returns the spatial index structure for all loaded models. Uses a Bounding Volume Hierarchy (BVH) for efficient spatial queries.

Inputs:

ParameterTypeDescription
ifcModelIFCModelThe loaded IFC Model

Output:

TypeDescription
DictionaryContains the BVH structure, element count, and coordinate warnings

GetElementBoundingBox

Returns the axis-aligned bounding box of an element.

Inputs:

ParameterTypeDescription
ifcModelIFCModelThe loaded IFC Model
globalIdstringThe GlobalId of the element

Output:

TypeDescription
DictionaryMinX, MinY, MinZ, MaxX, MaxY, MaxZ, SizeX, SizeY, SizeZ, CenterX, CenterY, CenterZ

QueryByBoundingBox

Returns all elements whose bounding boxes intersect the specified region.

Inputs:

ParameterTypeDescription
ifcModelIFCModelThe loaded IFC Model
minXdoubleMinimum X coordinate
minYdoubleMinimum Y coordinate
minZdoubleMinimum Z coordinate
maxXdoubleMaximum X coordinate
maxYdoubleMaximum Y coordinate
maxZdoubleMaximum Z coordinate

Output:

TypeDescription
List of stringGlobalIds of elements in the region

GetIntersectingElements

Returns all elements whose bounding boxes intersect (overlap) with the source element. Intersection means the boxes share volume.

Inputs:

ParameterTypeDescription
ifcModelIFCModelThe loaded IFC Model
globalIdstringThe GlobalId of the source element

Output:

TypeDescription
List of stringGlobalIds of intersecting elements

GetTouchingElements

Returns all elements whose bounding boxes touch the source element. Touching means the boxes share a boundary but do not overlap.

Inputs:

ParameterTypeDescription
ifcModelIFCModelThe loaded IFC Model
globalIdstringThe GlobalId of the source element

Output:

TypeDescription
List of stringGlobalIds of touching elements

GetContainedElements

Returns all elements whose bounding boxes are fully contained within the source element.

Inputs:

ParameterTypeDescription
ifcModelIFCModelThe loaded IFC Model
globalIdstringThe GlobalId of the source element

Output:

TypeDescription
List of stringGlobalIds of contained elements

GetContainingElements

Returns all elements whose bounding boxes fully contain the source element.

Inputs:

ParameterTypeDescription
ifcModelIFCModelThe loaded IFC Model
globalIdstringThe GlobalId of the source element

Output:

TypeDescription
List of stringGlobalIds of containing elements

GetNearbyElements

Returns all elements within a specified distance from the source element.

Inputs:

ParameterTypeDescription
ifcModelIFCModelThe loaded IFC Model
globalIdstringThe GlobalId of the source element
searchRadiusdoubleMaximum distance to search in model units

Output:

TypeDescription
List of DictionaryEach dictionary contains GlobalId and Distance

GetElementsOnStorey

Returns all elements located on a specific building storey. Uses explicit storey elevation and height when available, falls back to geometric detection.

Inputs:

ParameterTypeDescription
ifcModelIFCModelThe loaded IFC Model
storeyGlobalIdOrNamestringThe GlobalId or Name of the building storey

Output:

TypeDescription
List of stringGlobalIds of elements on the storey

GetSpaceBoundingElements

Returns all elements that bound a specific space. Combines explicit IFC relationships and geometric proximity detection.

Inputs:

ParameterTypeDescription
ifcModelIFCModelThe loaded IFC Model
spaceGlobalIdstringThe GlobalId of the IfcSpace

Output:

TypeDescription
List of DictionaryEach dictionary contains GlobalId, Name, IfcClass, SourceModel, and RelationType

GetConnectedElements

Returns all elements geometrically connected to the source element. Includes intersecting, touching, and contained elements.

Inputs:

ParameterTypeDescription
ifcModelIFCModelThe loaded IFC Model
globalIdstringThe GlobalId of the source element

Output:

TypeDescription
List of DictionaryEach dictionary contains GlobalId, Name, IfcClass, SourceModel, and RelationType

Tip: For explicit IFC relationships like IfcRelConnectsElements, use IFCQuery.GetConnectivity instead.