Skip to content

IFC Mapping Specification

Declarative mapping from IFC entity classes to the Pragmatic BIM Data Contract schema and the ingestion adapter database projection.

Files

File Role
ifc_mapping.yaml Entrypoint: version, schema URI, imports list
ifc_mapping.merged.yaml Generated single-file artifact for adapters (regenerate after edits)
_conventions.yaml Global rules, metadata capture, field anchors, value normalization rules
_pset_fallbacks.yaml PropertySet lookup lists for code_or_number and performance properties (default + Revit / ArchiCAD / Vectorworks)
_relationships.yaml IFC rel class → relation_type
_fragments.yaml Shared field, geometry, and attribute fragments
_templates.yaml Shared entity templates (inherits)
entities/architectural.yaml Walls, slabs, doors, spatial context, structure
entities/hvac.yaml Ducts, pipes, equipment, systems
../../scripts/merge_ifc_mapping.py Merge split sources → ifc_mapping.merged.yaml

Split sources are the source of truth. Edit those, then regenerate the merged file.

This directory contains no adapter logic — only declarative YAML plus the merge helper script.


File layout and merge workflow

YAML anchors (&name / *name) do not work across files. Split sources are concatenated in imports order by the merge script so anchors resolve correctly.

ifc_mapping.yaml          ← entrypoint (imports list)
_conventions.yaml         ← conventions + metadata anchors
_pset_fallbacks.yaml      ← tool-specific pset lists
_relationships.yaml
_computed_relations.yaml  ← relations and quantities computed from geometry
_fragments.yaml           ← geometry / field fragments (uses pset anchors)
entities/architectural.yaml
entities/hvac.yaml        ← entity blocks (indented under entities:)
_templates.yaml
        │
        ▼  python scripts/merge_ifc_mapping.py
ifc_mapping.merged.yaml   ← single file for adapters

After editing any split file:

python scripts/merge_ifc_mapping.py

CI check (merged file up to date):

python scripts/merge_ifc_mapping.py --check

Adapters can either load ifc_mapping.merged.yaml directly, or implement the same imports merge at runtime.

Where to edit what

Change File
New Revit / ArchiCAD / Vectorworks pset _pset_fallbacks.yaml
New promoted performance property _pset_fallbacks.yaml (lookup) + _fragments.yaml (performance_properties_building_element or performance_properties_space)
New typed quantity from a PropertySet _pset_fallbacks.yaml (lookup) + _fragments.yaml (quantity_values_*)
Value normalization rule _conventions.yaml (normalize_*)
New IFC class (architectural) entities/architectural.yaml
New IFC class (HVAC) entities/hvac.yaml
New relationship rule _relationships.yaml
Geometric relation, threshold, or computed quantity _computed_relations.yaml
IFC class whose contract class depends on the pragmaticBIM Reference match entity block with reference_element_map
Metadata / GlobalId conventions _conventions.yaml
Shared field or geometry pattern _fragments.yaml or _templates.yaml

Purpose

IFC exports vary by authoring tool and project. This mapping:

  1. Normalizes IFC instances to PBS entity types (canonical_type) and module categories (content_kind).
  2. Projects schema slots onto adapter columns (name, code_or_number, storey, attributes).
  3. Declares IFC relationship → content_relations.relation_type mappings aligned with PBS schema slot names.
  4. Assigns geometry roles for the content_geometries table.
  5. Promotes rule-relevant PropertySet values to typed performance_properties with canonical keys and normalized values.

Schema slots are defined in contract/ (LinkML YAML at folder root). This mapping must not introduce fields absent from those modules.


Database projection

The adapter writes three tables:

content

Column Source
content_kind physical, virtual, or context (see below)
canonical_type PBS LinkML class name, optionally with variant suffix (e.g. SeparatorSlab.floor)
canonical_type_version Pinned schema release (currently v0.0.7 in ifc_mapping.yaml)
name Entity.name
code_or_number Primary identifier from classifications or PropertySet fallbacks
storey parent_level resolution via spatial containment (GlobalId of IfcBuildingStorey)
source_id IFC GlobalId — primary IFC ↔ contract link (see below)
source_system Export origin (revit, archicad, vectorworks, or default ifc)
attributes JSONB of PBS schema slots for the entity class, including ifc_global_id, performance_properties[], and metadata[]

IFC ↔ contract identity (GlobalId)

IFC GlobalId is the stable crosswalk between the source model and PBS contract records:

Location Role
content.source_id Primary lookup key on ingest and re-import
attributes.ifc_global_id PBS Entity.ifc_global_id slot (same value)
content_relations.source_content_id / target_content_id Relationship endpoints

Re-imports, updates, and change detection match on GlobalId. The adapter should not generate a new contract id when GlobalId already exists for the same model scope.

Defined in ifc_mapping.yaml under conventions.ifc_contract_link.

content_relations

Column Source
source_content_id Source element GlobalId
target_content_id Target element GlobalId
relation_type PBS relationship slot name (e.g. parent_level, separates_spaces)

RDF projection

ifc2rdf writes the same mapping as an RDF graph instead of tables. conventions.rdf_projection declares the differences:

Key Meaning
field_slots Top-level fields emitted as schema slots (name → name, storey → parent_level, classifications → classifications). Other fields (for example code_or_number) are not emitted, so their PropertySet values stay in metadata[].
exclude_entities IFC classes without an RDF node (IfcOpeningElement: connection_functional_types is required and has no IFC source).

Instance IRIs are {base_uri}{GlobalId}; relations become triples whose predicate is the slot URI. Inlined records (classifications, metadata, performance_properties) are blank nodes typed with their class and its ancestors (for example pbs:FireProperty, pbs:PerformanceProperty); enum slots such as property_key hold the enum meaning IRI (pbs:fire_property_resistance_rating).

content_geometries

Column Source
geometry_role body_3d, footprint_2d, axis, or point (GeometryRepresentationType)
geometry_space IFC representation context or storey GlobalId
geom Geometry payload (adapter-specific)

content_kind and canonical_type

content_kind is the Entity type discriminator (see Entity.content_kind and ContentKind). IFC ingestion produces physical, virtual, context, and project (from IfcProject). Application pipelines create other entity kinds directly.

content_kind Entity branch Examples
physical Physical elements SeparatorWall, ConnectionPhysical, Equipment
virtual Virtual entities Space, System, ConnectionVirtual, TimeRecord, CostRecord, Material
context Spatial context BuildingContext, LevelContext, ZoneContext, PerimeterContext
project Business delivery scope Project
program Portfolio or capital program Program
product Commercial offering Product
deliverable Project outcome or handover Deliverable
requirement Requirements PerformanceRequirement, SpatialRequirement, RegulatoryRequirement, BriefRequirement, DeliverableRequirement, ScheduleRequirement, CostRequirement, MaterialRequirement
artifact Artifacts Artifact
contract Contracts Contract
decision Decisions Decision
task Tasks Task
process BPMN process instances Process
agent Agents Person, Company, SoftwareAgent
message Messages Message

Change records (PropertyChange, GeometryChange, etc.) are not entities and have no content_kind. Adapters or validation pipelines create them directly in a separate change store. Use the concrete change class together with change_type where applicable.

CostRecordRole (cost, price, estimate, actual) is application-created on CostRecord entities — not produced by IFC ingestion. Catalog cost and price records attach to Product.catalog_cost_records; project estimate and actual records use applies_to_entities.

Variant suffixes disambiguate IFC PredefinedType or transport role without inventing new PBS classes:

  • SeparatorSlab.floor, .roof, .baseslab
  • ConnectionPhysical.duct, .pipe, .network_other, .column, .beam
  • Boundary.ceiling, .flooring, .cladding

YAML file structure

The entrypoint ifc_mapping.yaml declares version metadata and an imports list. Split modules compose the full mapping (see File layout and merge workflow above). Adapters typically load ifc_mapping.merged.yaml.

Merged structure:

mapping_version: "1.6.0"
schema_uri: https://schema.pragmaticbim.ch/
canonical_type_version: "v0.0.7"

conventions: ...
pset_fallbacks: ...
relationships: ...
computed_relations: ...
fragments: ...
entities: ...
templates: ...

Entity block

Each entities.Ifc* entry defines:

Key Description
content_kind Module category for the DB
canonical_type PBS class (fixed, or selected through canonical_type_from)
canonical_type_from predefined_type_map (IFC PredefinedType) or reference_element_map (pragmaticBIM Reference match, see Element identification)
inherits Merge fields from another entity or templates.* entry
fields Top-level DB column lookups
attributes PBS schema slots stored in JSONB
geometry Primary and secondary geometry_role values
relations IFC relationship classes that apply to this entity

Field source types

Source type Adapter behavior
ifc_attribute Read a direct IFC attribute
ifc_attribute_fallback Try attributes in order; first non-empty wins
ifc_pset_fallback Try PropertySet/property pairs in order; first match wins
ifc_pset_performance Promote PropertySet values to typed performance_properties[] records through a lookup and a normalization rule (see Performance properties)
ifc_pset_quantity Promote PropertySet values to typed quantity_values[] records through a lookup and a normalization rule (lengths converted to metres; see Typed quantities from PropertySets)
ifc_attribute_all All IFC entity attributes on the instance, minus excluded/promoted ones
ifc_pset_all All PropertySet properties on the instance, minus those used elsewhere
metadata_merge Combine multiple metadata capture rules into one metadata[] array
ifc_classification Map IfcClassificationReference via IfcRelAssociatesClassification
ifc_relation Resolve value through an IFC relationship
ifc_attribute_heuristic Map attribute value through keyword rules with a default
ifc_relation_heuristic Infer value from related entities (e.g. system discipline)
vocabulary_lookup Map IFC PropertySet or attribute values through SKOS bridge TTL files and/or vocabulary prefLabels
vocabulary_derived_classification Derive a Classification entry from a resolved enum/slot via a mapping bridge
attribute_derivation Derive a typed attribute when unset (e.g. is_above_ground from parent_level.elevation)
constant Fixed PBS enum or string value
predefined_type_map Branch on IFC PredefinedType

Fallback convention

Property lookups use ordered fallback lists. The adapter applies conventions.fallback_policy: first_match_wins.

Resolution order for code_or_number

  1. If source_system_overrides[source_system] exists, try those PropertySet pairs first.
  2. Then try the shared fallbacks list (tool-agnostic IFC standard psets).
  3. If still empty, use the first classifications[].classification_code from IfcRelAssociatesClassification.

Source system overrides

source_system Typical extra psets
revit Pset_Revit_IdentityData.Mark, Pset_Revit_TypeIdentity.Type Mark
archicad ARCHICAD_General.ID, ARCHICAD_General.Element ID
vectorworks Vectorworks_General.Tag, Vectorworks_Data.RecordName

Shared defaults (Pset_BuildingElementCommon.Reference, etc.) are always appended after tool-specific entries in the entity fallbacks list.

When extending: add new entries at the top of the relevant override list for a source system. Do not reorder existing entries — downstream projects may depend on current precedence.

Source system fallbacks (after the standard psets)

A lookup may also declare source_system_fallbacks[source_system]. These pairs are tried after fallbacks. The full order is source_system_overrides → fallbacks → source_system_fallbacks. Performance properties use this form: the standard Pset_*Common value is the declared IFC exchange, and exporters copy their own parameter into it. The Revit Duplex sample shows tool psets disagreeing with it (PSet_Revit_Structural.Structural = false where Pset_SlabCommon.LoadBearing = true).


Classifications

All mapped entities include a classifications field mapping. The adapter populates the PBS classifications[] slot (inlined Classification objects) from IfcRelAssociatesClassification:

Classification slot IFC source
classification_scheme ReferencedSource.Name, fallback "ifc"
classification_code Identification or ItemReference
classification_label Name
classification_uri Location
classification_source ReferencedSource.SourceRoles

This is especially important for entities with weak PBS typing (IfcBeam, IfcColumn, IfcStair, IfcRamp) where classification_code may also serve as code_or_number.


Metadata capture (IFC attributes and PropertySets)

All mapped entities populate attributes.metadata[] (PBS MetadataEntry). Two capture rules are merged (metadata_merge):

1. IFC entity attributes

Every IFC entity attribute on the instance is stored unless already promoted elsewhere:

Excluded (promoted) Destination
GlobalId source_id, attributes.ifc_global_id
Name, LongName, ObjectType content.name (falls back to GlobalId because Entity.name is required)
Description attributes.description
Attributes mapped to typed PBS slots e.g. PredefinedType → separator_slab_type

Key format: {IfcClass}.{AttributeName} — e.g. IfcWall.OverallHeight, IfcDoor.OverallHeight.

2. PropertySets

Every PropertySet property not used for code_or_number or typed attribute slots. Values promoted to performance_properties stay in metadata as well (keep_used_in: [attributes.performance_properties]), so the raw value remains traceable next to the normalized record:

Key format: {Pset}.{Property} — e.g. Pset_WallCommon.FireRating.

Value serialization

metadata_value is stored as text (MetadataEntry.metadata_value). The adapter serializes IFC values (numbers, booleans, enums, object references) to strings. Object references may use GlobalId where resolvable.

Example attributes JSONB fragment:

{
  "ifc_global_id": "3l$8vj$nL1Pu4$G9QjXjC",
  "separator_wall_type": "unit_boundary",
  "performance_properties": [
    {
      "property_class": "FireProperty",
      "property_key": "resistance_rating",
      "property_value_type": "string",
      "property_value_string": "EI60",
      "source_pset": "Pset_WallCommon",
      "source_property": "FireRating",
      "source_value_raw": "EI 60",
      "mapping_version": "1.6.0"
    }
  ],
  "metadata": [
    { "metadata_key": "IfcWall.OverallHeight", "metadata_value": "3.0" },
    { "metadata_key": "Pset_WallCommon.FireRating", "metadata_value": "EI 60" }
  ]
}

Performance properties

Rule checks (SHACL, SPARQL) need one stable path and one normalized value per property. Rule-relevant PropertySet values are therefore promoted to typed PerformanceProperty records on Entity.performance_properties (entity_performance_schema.yaml). The canonical key comes from the domain enum (FirePropertyKey, AcousticPropertyKey, ThermalPropertyKey, StructuralPropertyKey).

The fragment performance_properties_building_element (_fragments.yaml) is attached to IfcWall, IfcCurtainWall, IfcSlab, IfcRoof, IfcCovering, IfcDoor, IfcWindow, IfcColumn, IfcBeam, IfcStair, IfcStairFlight, and IfcRamp. The fragment performance_properties_space is attached to IfcSpace.

IFC source (Pset_*Common) Class property_key Value Normalization rule
FireRating FireProperty resistance_rating string normalize_fire_rating
FireRating suffix -RF1 … -RF4 FireProperty reaction_to_fire string normalize_fire_rating (suffix_routes)
FireRating suffix -Sa, -Sm, -S200 FireProperty smoke_rating string normalize_fire_rating (suffix_routes)
AcousticRating AcousticProperty rating_db number, dB normalize_acoustic_rating_db
ThermalTransmittance ThermalProperty thermal_transmittance number, W/m2K normalize_thermal_transmittance
IsExternal ThermalProperty is_external boolean normalize_boolean
LoadBearing StructuralProperty load_bearing boolean normalize_boolean
ePset_Space.PeakOccupancyActual (then Pset_SpaceOccupancyRequirements.OccupancyNumberPeak) IndoorEnvironmentProperty peak_occupancy number normalize_count
ePset_SafetyLighting.SafetyRatedDuration FireProperty safety_rated_duration number (min) normalize_safety_duration_min
ePset_SafetyLighting.SafetyStartUpTime FireProperty safety_start_up_time number (s) normalize_safety_start_up_s
ePset_SafetyLighting.SafetySupplyType FireProperty safety_supply_type string normalize_safety_token
ePset_SafetyLighting.SafetyFloorIlluminance FireProperty safety_floor_illuminance number (lx) normalize_safety_illuminance_lx
ePset_SafetyLighting.SafetyNotSwitchable FireProperty safety_not_switchable boolean normalize_boolean
ePset_EscapeSign.LightingType FireProperty escape_sign_lighting_type string normalize_safety_token
ePset_EscapeSign.SupplyType FireProperty escape_sign_supply_type string normalize_safety_token
ePset_EscapeSign.MountingHeight FireProperty escape_sign_mounting_height number (m) normalize_escape_sign_mounting_height

ePset_Space.EscapeRouteRole maps to Space.escape_route_role (HORIZONTAL / VERTICAL / EXIT). IfcLightFixture maps to Equipment with the safety-lighting properties; mep-escape-sign proxies map to Equipment with the escape-sign properties.

Typed quantities from PropertySets

Rule-relevant length PropertySet values are promoted to typed QuantityValue records on Entity.quantity_values via ifc_pset_quantity. Lengths are converted from project units to metres. Each record carries derivation with derivation_source_kind: ifc_explicit and derivation_method set to {pset}.{property}.

IFC source quantity_type Attached to
ePset_StairFlight.ClearWidth / ePset_Stair.ClearWidth clear_width IfcStair, IfcStairFlight
Pset_StairFlightCommon.TreadLengthAtInnerSide / ePset_Stair.TreadLengthAtInnerSide tread_length_at_inner_side IfcStair, IfcStairFlight
ePset_Space.EscapeRouteClearWidth escape_route_clear_width IfcSpace

Pset_*Common stands for the common pset of each mapped class (Pset_WallCommon, Pset_SlabCommon, Pset_DoorCommon, …). The lookup lists perf_* in _pset_fallbacks.yaml enumerate the pairs where IFC defines the property. An instance carries only the common pset of its own class.

Tool-specific source_system_fallbacks (tried after Pset_*Common):

Property revit archicad vectorworks
FireRating PSet_Revit_Type_Identity Data.Fire Rating, PSet_Revit_Type_Other.FireRating, PSet_Revit_Other.FireRating General Ratings.Fire Resistance Rating —
AcousticRating PSet_Revit_Type_Other.AcousticRating, PSet_Revit_Other.AcousticRating General Ratings.Acoustic Rating —
ThermalTransmittance PSet_Revit_Type_Analytical Properties.Heat Transfer Coefficient (U) General Ratings.Thermal Transmittance —
IsExternal — (exporter writes Function to Pset_*Common) — (exporter writes Position to Pset_*Common) —
LoadBearing PSet_Revit_Structural.Structural — (exporter writes Structural Function to Pset_*Common) —

Vectorworks maps ratings into Pset_*Common through the Data Manager; add project-specific custom psets to the vectorworks lists.

Record slots

Slot Value
property_class PerformanceProperty subclass from the mapping entry; JSONB discriminator only (RDF uses rdf:type)
property_key Canonical key from the domain enum (RDF: enum meaning IRI, e.g. pbs:fire_property_resistance_rating)
property_value_type string, number, or boolean (from the rule's value_type)
property_value_string / _number / _boolean Normalized value
property_unit, property_unit_uri From the rule (dB / QUDT DeciB, W/m2K / QUDT W-PER-M2-K)
source_pset, source_property PropertySet pair the value came from
source_value_raw Raw value before normalization
mapping_version mapping_version of this mapping

The raw value also stays in metadata[] under {Pset}.{Property}.

Normalization rules

Rules are declared in _conventions.yaml and applied in this order:

Key Applies to Effect
remove_whitespace string Remove all whitespace ("EI 90" → "EI90")
upper_case string Upper-case the value ("ei90" → "EI90")
suffix_separator string Split the value at the separator; the first part is the main value
suffix_routes string Each suffix matching pattern becomes a separate record with the route's property_key. Suffixes without a route are dropped from the normalized value and remain in source_value_raw
accept_pattern string The main value must match (full match), otherwise the value is rejected
number_pattern number Numeric IFC values are used as-is; text uses the first match (comma decimals accepted)
accept_range number Bounds with operators gt, gte, lt, lte
true_values / false_values boolean Case-insensitive text matches; IFC booleans are used as-is; anything else (for example UNKNOWN) is rejected
unit, unit_uri number Written to property_unit / property_unit_uri

A rejected value does not stop the lookup: the next pair in the list is tried, and the first value that normalizes wins. Rejected values remain in metadata[] only, and ifc2rdf lists them in its conversion report.

Fire rating examples (normalize_fire_rating):

Raw value resistance_rating Separate record
EI 90, EI90, ei 90 EI90 —
EI 90-RF1 EI90 reaction_to_fire = RF1
EI 30-Sa EI30 smoke_rating = SA
EI 30-C EI30 — (-C kept in source_value_raw)
F90, T30 (DIN 4102) F90, T30 —
Fire Rating, FireRating (Revit placeholders) rejected —
耐火等級レベル1 (Japanese grade label) rejected —

accept_pattern (^[A-Z]{1,4}[0-9]{2,4}$) admits EN 13501-2 and DIN 4102 class notations. National labels outside that pattern stay in metadata[]. EN 13501-2 classes with a performance index (EI2 30) lose the space between index and minutes (EI230).

Acoustic and thermal examples: Rw 52 dB → 52 dB; R'w = 45 (-1;-3) → 45 dB; AcousticRating (Revit placeholder) is rejected, as is any value outside 10–100 dB. ThermalTransmittance values (0.3, 1.4, …) are used as numbers within 0 < U ≤ 10. They are read in the project's thermal transmittance unit, which is W/(m²·K) unless the IFC file assigns another unit.

Rule check example (walls with fire resistance EI90):

PREFIX pbs: <https://schema.pragmaticbim.ch/>
SELECT ?wall WHERE {
  ?wall a pbs:SeparatorWall ; pbs:performance_properties ?p .
  ?p pbs:property_key pbs:fire_property_resistance_rating ; pbs:property_value_string "EI90" .
}

Relationship mappings

Global rules live under relationships in ifc_mapping.yaml. Each entity lists which IFC rel classes apply.

IFC relationship relation_type When
IfcRelContainedInSpatialStructure parent_level RelatingStructure is IfcBuildingStorey
same parent_space RelatingStructure is IfcSpace
same parent_building RelatingStructure is IfcBuilding
IfcRelAggregates parent_* Spatial hierarchy (site → building → storey)
IfcRelAssignsToGroup group_members Assigned to IfcZone / IfcGroup
IfcRelAssignsToSystem parent_system Element → system
same contained_entities System → member elements
IfcRelSpaceBoundary separates_spaces Wall/slab/curtain wall → space
same connects_spaces Door/window → space
same bounded_by Covering → space
same adjacent_elements (space_relation_type) Space → every mapped boundary element; serialized as bot:adjacentElement
IfcRelConnectsElements connects_physical_elements (symmetric: stated on both elements) Structural joints, host connections
IfcRelConnectsPathElements connects_physical_elements (symmetric) Wall-wall junctions, duct/pipe run connectivity
IfcRelFillsElement connects_physical_elements Door/window ↔ opening
IfcRelVoidsElement hosted_by (chain_relation_type) Door/window → wall: IfcRelFillsElement to the opening, then IfcRelVoidsElement to the host
IfcRelServicesBuildings serves_spaces / serves_zones System service area
IfcRelAssociatesClassification classifications Populates classifications slot

Geometry roles

Uses GeometryRepresentationType values:

Entity group Primary Secondary
Walls, slabs, roofs, curtain walls, stairs, ramps, equipment, doors, windows, fittings body_3d footprint_2d
Duct/pipe segments axis body_3d
Spaces footprint_2d body_3d
Spatial contexts (site, building, storey, zone) footprint_2d point
Beams/columns (ConnectionPhysical) axis body_3d

Geometry output (ifc2rdf)

ifc2rdf tessellates every mapped IfcProduct once (IfcOpenShell, world coordinates, metres). From that single pass it writes:

  • an optional GLB file (--geometry-out) with one node per product, named by the IFC GlobalId, so viewers resolve RDF nodes to meshes without a lookup table;
  • per node, one pbs:GeometryRepresentation for each role the entity block lists that the converter can produce (computed_relations.geometry.representations):
Role geometry_reference geometry_format Payload
body_3d {glb file}#{GlobalId} (or {ifc file}#{GlobalId} without GLB) gltf (or ifc) bbox_min_* / bbox_max_*
footprint_2d {ifc file}#{GlobalId} wkt geometry_wkt (plan outline, union of the projected triangles) and the bounding box
  • a height quantity (bounding-box height, m).

Roles the converter does not compute (axis, point) are not written. Products without a tessellated body are listed in the report (geometry failed). --no-geometry skips the pass and every computed relation.


Element identification (pragmaticBIM Reference)

Element definitions come from a pragmaticBIM-reference checkout (elements/*.yaml), located by --reference, $PBS_REFERENCE_PATH, or the sibling checkout ../elementplan/pragmaticBIM-reference. Each definition's applicability expression is evaluated against every IFC object:

(entity_ifc4=IfcBuildingElementProxy AND PredefinedType=USERDEFINED AND ObjectType=Wartungsraum)
  OR (entity_ifc2x3=IfcBuildingElementProxy AND ObjectType=Wartungsraum)
  • Clauses: NAME=VALUE, bare NAME (attribute or property is set), Pset.Property=VALUE, and entity_ifc2x3 / entity_ifc4 / entity_ifc4_3 for the IFC class (IFC4X3 files also accept entity_ifc4 when the expression has no entity_ifc4_3 clause). A bare NAME is looked up as an IFC attribute first, then in every property set.
  • All language variants (de, en, fr, it) are evaluated; any match counts.
  • Specificity: the score is the number of clauses satisfied by the matching branch. The highest score wins, so architecture-slab-balcony (4 clauses) beats structural-slab-floor (2). Ties are kept and listed as ambiguous reference match in the report.

The best match(es) are written as classifications:

Slot Value
classification_scheme pragmaticbim-element
classification_code element code (for example ARC-RAILING)
classification_uri https://pragmaticbim.ch/id/element/{id}
classification_version git describe of the reference checkout
classification_source pragmaticBIM-reference

Entity blocks with canonical_type_from: reference_element_map choose the contract class from the match. IFC objects without a listed match are not converted and are counted as no reference match:

IfcBuildingElementProxy:
  content_kind: virtual
  canonical_type_from: reference_element_map
  reference_element_map:
    pragmaticbim:element/architecture-maintenance-space:
      canonical_type: ReservedVolume.maintenance
      reserved_volume_type: maintenance

Without a reference checkout the stage is skipped (skipped stage in the report) and reference-mapped classes are not converted.


Computed relations

_computed_relations.yaml configures relations and quantities derived from geometry. Entries run in file order after the IFC relationships, so a geometric fallback (only_when_unset) only fills what IFC did not state. Each entry names a method, a subject and an object selector, and usually the target_slot on the subject (neighbour distances omit target_slot and write DerivedMeasurement entities instead).

Selectors combine with AND: contract_class (including subclasses), ifc_class, property (Pset.Property: value), exclude_property.

Relation Method Subject → object Geometric test Quantities
separates_spaces / connects_spaces / bounded_by / adjacent_elements space_adjacency wall / slab / curtain wall / door / window / covering ↔ Space Fallback when IfcRelSpaceBoundary is missing or incomplete: plan gap ≤ half wall thickness + contact_tolerance (slabs: space floor on slab top or ceiling on slab bottom, plan overlap ≥ min_plan_overlap); IFC pairs win; disagreements and precision/recall go into the conversion report; each kept pair emits a ConnectionVirtual (connection_virtual_type: adjacency) with Derivation (ifc_explicit or ifc_geometry) —
hosted_by opening_in_host door / window → Separator Plan distance ≤ max_plan_distance, vertical overlap; prefers the host whose oriented plan envelope contains the opening centre —
rests_on vertical_contact wall / slab / column / beam / footing → same; Equipment → same objects Subject bottom within the object's vertical extent (± contact_tolerance, above the object's bottom), subject rises above the object's top, plan overlap ≥ min_contact_area —
connects_physical_elements side_contact wall / column / beam ↔ same Plan distance ≤ max_plan_distance, vertical overlap ≥ min_overlap_height, no rests_on between the pair; written on both elements —
intersects_elements prism_overlap ReservedVolume → PhysicalElement Plan overlap ≥ min_overlap_area and vertical overlap ≥ min_overlap_height (touching does not count); the product the volume belongs to is skipped —
neighbours neighbour_distance Equipment → PhysicalElement Horizontal gap between the plan outlines ≤ max_horizontal_distance and vertical gap between the height ranges ≤ max_vertical_distance; each gap is 0 where the elements overlap DerivedMeasurement with horizontal_clear_distance and vertical_clear_distance plus a display LINESTRING Z (no target_slot)
guards_space barrier_walking_surface SafetyBarrier → Space Plan distance ≤ max_plan_distance; space floor between barrier base − max_floor_below_base and base + floor_tolerance guards_space on the barrier; DerivedMeasurement with height_above_walking_surface (barrier + worst-case space), all guarded spaces as derivation_inputs, vertical LINESTRING Z
lit_space window_daylight exterior window → interior Space connects_spaces from IFC space boundaries, else the nearest space within max_plan_distance with vertical overlap lit_space and area_glazed on the window; DerivedMeasurement with glazing_ratio (space + contributing windows, those windows as derivation_inputs); no measurement without floor area or windows
escape_route_next escape_route interior Space, door → door / stair Walking distance in plan around the corners of each space; spaces whose outlines touch along ≥ min_open_width form one open zone; doors join zones (connects_spaces, else spaces within max_door_distance); the route ends at an external door no more than max_exit_above_lowest above the lowest one, or, on storeys without one, at a stair that leaves the storey; spaces are measured from the most remote point of their outline escape_route_next on doors and spaces; DerivedMeasurement with escape_route_length (space + first portal, or door + exit; route portals as derivation_inputs; route LINESTRING Z); exit portals write none
opens_in_escape_direction door_opens_in_escape_direction swing door → boolean After escape_route: travel direction through the door (centre → next portal, or outward for exits) vs the door's local +Y from ObjectPlacement; only for swing OperationType values —
ground_floor resolve_ground_floor LevelContext Per building, in order: Pset_BuildingStoreyCommon.AboveGround/EntranceLevel, storey name convention (EG/00, U##, FD, ##, {base}.Z), then lowest elevation ≥ 0. Exactly one is_ground_floor; ambiguous candidates pick the lowest elevation and are reported above_ground, is_ground_floor, ground_reference_source
height_above_ground_floor height_above_ground_floor window / space / SafetyBarrier + ground-floor LevelContext Reference height (bottom sill/floor or top barrier) minus ground-floor elevation; negative values kept; not_measurable without a resolved ground floor DerivedMeasurement height_above_ground_floor with vertical LINESTRING Z
height_above_terrain height_above_terrain window / space / SafetyBarrier + TerrainSurface Sample terrain (lowest_outside within outside_buffer, or under_footprint); prefer projected surface; no ground-floor fallback; negative values kept DerivedMeasurement height_above_terrain with vertical LINESTRING Z

Quantities are pbs:QuantityValue records (quantity_type, quantity_value, quantity_unit, QUDT quantity_unit_uri). Area and floor-area sources are read in the IFC area unit; dimensions in the IFC length unit.

The relations are evidence for rules evaluated outside this repository, for example:

Rule Evidence
Fall protection ≥ 1.10 m above the walking surface SafetyBarrier → guards_space; DerivedMeasurement height_above_walking_surface
Height above ground / terrain DerivedMeasurement height_above_ground_floor or height_above_terrain on windows, spaces and barriers
Doors in fire-rated walls carry a fire rating ConnectionPhysical → hosted_by → Separator with FireProperty
Fire-rated walls reach the slab above a SeparatorSlab rests_on the wall
Load path: slab → column → slab, no floating load-bearing elements chains of rests_on; load-bearing element without a rests_on target
Maintenance and clearance volumes stay free ReservedVolume → intersects_elements (should be empty)
Swing path of components on dampers is clear DerivedMeasurement neighbour distances on the component: clear distance (horizontal and vertical) ≥ swing path, except the elements it rests_on
Minimum glazing ratio of habitable rooms lit_space; DerivedMeasurement glazing_ratio
Maximum horizontal escape route length escape_route_next; DerivedMeasurement escape_route_length
Clear stair / escape-route width clear_width, tread_length_at_inner_side, escape_route_clear_width quantities
Door opens in escape direction ConnectionPhysical.opens_in_escape_direction
Fire compartment of a space Space.parent_zone where ZoneContext.zone_type is fire
Escape-route role of a space Space.escape_route_role
Safety lighting duration / start-up / illuminance FireProperty keys on IfcLightFixture
Escape sign lighting type / supply / mounting height FireProperty keys on mep-escape-sign

Worked examples

IfcWall → SeparatorWall

# entities.IfcWall (abbreviated)
content_kind: physical
canonical_type: SeparatorWall
fields:
  name: Name → LongName → ObjectType
  code_or_number: Pset_WallCommon.Reference → … → Revit Mark
  storey: IfcRelContainedInSpatialStructure → walk up to IfcBuildingStorey
attributes:
  separator_wall_type: unit_boundary
  ifc_global_id: GlobalId
  performance_properties: FireRating → FireProperty.resistance_rating, … (see Performance properties)
geometry:
  primary: body_3d
  secondary: footprint_2d
metadata_examples:
  - IfcWall.OverallHeight
  - Pset_WallCommon.FireRating
relations:
  - IfcRelContainedInSpatialStructure
  - IfcRelSpaceBoundary

IfcDuctSegment → ConnectionPhysical

content_kind: physical
canonical_type: ConnectionPhysical.duct
attributes:
  connection_physical_type: duct
  connection_functional_types: [ventilation]
  transport_medium: air
geometry:
  primary: axis        # centerline
  secondary: body_3d
relations:
  - IfcRelConnectsPathElements
  - IfcRelAssignsToSystem

Connection functional types

ConnectionPhysical.connection_functional_types is a multivalued semantic assignment (SKOS vocabulary ConnectionFunctionalType). IFC ingestion sets a default where unambiguous; assign additional values when needed (for example glazed door → [access, visual]).

Rule Behavior
Multi-type One connection may carry multiple functional types
opening_other Physical enum stays ambiguous; assign access and/or visual at functional-type stage
IfcPipeSegment Functional type inferred from IfcDistributionSystem.PredefinedType (heating, cooling, fresh_water, waste_water, special_media)
IfcOpeningElement No default functional types — assign per case
transport_medium Coarser bootstrap medium kept alongside functional types for ingestion

Physical type (connection_physical_type) remains IFC-derived and single-valued. See classification/mapping/connection-functional-to-physical-type.mapping.ttl for compatible physical forms per functional type.

IfcBuildingStorey → LevelContext (ground floor)

Contract slot IFC source
elevation IfcBuildingStorey.Elevation (metres)
above_ground Pset_BuildingStoreyCommon.AboveGround when present (UNKNOWN left unset)
is_ground_floor Pset_BuildingStoreyCommon.EntranceLevel when present
ground_reference_source Set by resolve_ground_floor (ifc_property / name_convention / elevation)

When IFC properties are missing, the naming convention (EG/00 ground, U##/FD below, 01–99 above, {base}.Z inherits the base storey) is tried; otherwise the lowest storey with elevation ≥ 0 is the ground floor.

IfcGeographicElement → TerrainSurface

Contract slot IFC source
class IfcGeographicElement (PredefinedType TERRAIN preferred)
terrain_surface_status ObjectType heuristic: projected / neu / new → projected, else existing

Terrain body meshes support terrain_height_at(x, y) and stay out of the plan-outline spatial index used for other elements.

IfcSpace → Space (conditioning and above-ground)

Space carries optional design-state booleans as typed PBS slots (not requirements):

PBS slot IFC source Notes
is_heated Pset_SpaceCommon.IsHeated As-designed heating flag
is_cooled Pset_SpaceCommon.IsAirConditioned As-designed cooling / AC flag
is_above_ground — (no standard IFC pset) Explicit override; see derivation below

IfcBuildingStorey.Elevation maps to LevelContext.elevation (unit m). When is_above_ground is unset on a Space, adapters apply the attribute_derivation rule in conventions.space_above_ground_from_level:

if space.is_above_ground is null and parent_level.elevation is known:
  is_above_ground := parent_level.elevation >= 0

Explicit is_above_ground on Space always wins over the derived value.

Prescriptive validation (application layer): when a brief requires a space to be heated, cooled, or above ground, create a PerformanceRequirement with requirement_property_key matching the Space slot name (is_heated, is_cooled, or is_above_ground), target_value_boolean: true, and link via applies_to_entities. Compare the Space slot (or derived is_above_ground) to the requirement target and record the outcome as MatchChange with match_status met, unmet, or unknown.

Example requirement entity:

content_kind: requirement
canonical_type: PerformanceRequirement
name: Office heating requirement
requirement_property_key: is_heated
target_value_boolean: true
applies_to_entities: [<Space id>]

Example match change when validation runs between revisions:

change_type: match
related_requirement: <PerformanceRequirement id>
affected_subject: <Space id>
match_status: met   # or unmet / unknown
from_revision: ...
to_revision: ...

Performance targets on walls, slabs, and spaces

Element catalogues (for example the pragmatic BIM Swiss add-ons) pair each target attribute with the attribute carrying the delivered value. The delivered value becomes a PerformanceProperty on Entity.performance_properties; the target becomes a PerformanceRequirement linked via applies_to_entities, with requirement_property_key set to the same key. Comparing both yields a MatchChange.

Element Target (requirement pset) Delivered value Performance class Key Operator
Wall, slab ePset_WallRequirement / ePset_SlabRequirement.FireRatingRequired Pset_WallCommon / Pset_SlabCommon.FireRating FireProperty resistance_rating minimum
Exterior wall, roof, base slab ThermalTransmittanceMax Pset_WallCommon / Pset_SlabCommon.ThermalTransmittance ThermalProperty u_value maximum
Interior wall, floor slab AirborneSoundInsulationMin ePset_Wall / ePset_Slab.AirborneSoundInsulation AcousticProperty airborne_sound_rating_db minimum
Floor slab ImpactSoundLevelMax ePset_Slab.ImpactSoundLevel AcousticProperty impact_sound_rating_db maximum
Load-bearing wall, floor slab, base slab SeismicStructureClassRequired ePset_Wall / ePset_Slab.SeismicStructureClass StructuralProperty seismic_structure_class minimum
Wall, slab GlobalWarmingPotentialMax ePset_Wall / ePset_Slab.GlobalWarmingPotential EnvironmentalProperty gwp_embodied maximum
Space ePset_SpaceRequirement.<Key> (for example SummerTemperatureMax) ePset_Space.<Key>Actual IndoorEnvironmentProperty for example summer_temperature_max per key
Space ePset_SpaceRequirement.DesignAreaLoad ePset_Space.DesignAreaLoadActual StructuralProperty design_area_load minimum

Requirement psets map to requirements, never to performance_properties: a target value on an element is not evidence that the element performs.

IfcSlab PredefinedType split

Per IfcSlabTypeEnum (IFC 4.3). CEILING is not a slab type — ceilings are IfcCovering with PredefinedType=CEILING.

IFC PredefinedType canonical_type attributes.separator_slab_type
FLOOR, LANDING, PAVING, … SeparatorSlab.floor floor
ROOF SeparatorSlab.roof roof
BASESLAB, TRACKSLAB SeparatorSlab.baseslab baseslab
USERDEFINED, NOTDEFINED SeparatorSlab.floor (default) floor

IfcCovering PredefinedType split

Per IfcCoveringTypeEnum. Maps to PBS Boundary (schema exact mapping: ifcowl:IfcCovering).

IFC PredefinedType canonical_type attributes.boundary_type
CEILING Boundary.ceiling ceiling
FLOORING, SKIRTINGBOARD, TOPPING Boundary.flooring flooring
ROOFING Boundary.roofing roofing
CLADDING, INSULATION, … Boundary.cladding cladding

IFC schema cross-check notes

Mappings are validated against IFC 4.3 entity and enumeration definitions (buildingSMART IFC 4.3 docs). Key corrections:

Topic IFC fact Mapping rule
Ceiling IfcCoveringTypeEnum.CEILING on IfcCovering; slabs are structural only IfcCovering → Boundary; not on IfcSlab
IfcRoof Assembly container aggregating slabs/beams PhysicalElement, not SeparatorSlab.roof
IfcSlab types FLOOR, ROOF, BASESLAB, LANDING, + civil types — no CEILING Full enum in entities/architectural.yaml
Pipe segment type IfcPipeSegmentTypeEnum: RIGIDSEGMENT, FLEXIBLESEGMENT, … — not GAS/STEAM transport_medium inferred from IfcDistributionSystem
System PredefinedType IfcDistributionSystemEnum: DOMESTICHOTWATER, DOMESTICCOLDWATER, … Fixed invalid _ spellings; no SANITARY — use SEWAGE/WASTEWATER

Known schema gaps

Documented limitations where IFC semantics exceed current PBS schema coverage:

Gap Mapping approach
INSULATION, MEMBRANE, and other non-roof IfcCoveringTypeEnum values Map to nearest BoundaryType (cladding or flooring); insulation substance uses optional MAT-INS* or subsystem parent product
No fitting enum on ConnectionPhysicalType IfcDuctFitting, IfcPipeFitting → network_other
No structural member class IfcBeam, IfcColumn → ConnectionPhysical (connection_physical_type beam / column, functional type load_transfer, transport medium structural_load): members connect elements by carrying loads
No stair/ramp class IfcStair, IfcRamp → abstract PhysicalElement; enrich via classifications[]
IfcCurtainWall Mapped to SeparatorWall (closest wall-based separator)
IfcRoof Mapped to PhysicalElement (assembly container; roof faces are IfcSlab/IfcCovering parts)
IsExternal has no envelope domain ThermalProperty with key is_external (envelope membership drives thermal rules)

These are intentional pragmatic mappings pending schema extension.


Extending for a new source system

  1. Add a key under each relevant source_system_overrides block in pset_fallbacks (or per-entity fields.code_or_number).
  2. Place tool-specific psets before shared IFC standard psets.
  3. Set source_system on ingest to match the override key (lowercase, e.g. solibri if adding QA tool exports).
  4. Document the new overrides in this README.

Example:

source_system_overrides:
  mytool:
    - pset: MyTool_Identity
      property: ElementCode

Adding a new IFC class

  1. Identify the nearest PBS class in entity_physical_schema.yaml or entity_virtual_schema.yaml.
  2. Add an entities.IfcNewClass block with content_kind, canonical_type, required type slots, and geometry.
  3. Copy fields and attributes patterns from a similar entity; only use slot names that exist on the target PBS class (plus Entity base slots).
  4. List applicable IFC relationships under relations.
  5. Add entity-specific pset fallbacks to pset_fallbacks if standard lists are insufficient.
  6. If the entity shares a template with others, add a templates.* entry and reference it with inherits.

inherits and templates

Some entities declare inherits: IfcHvacEquipmentBase or inherits: IfcWall. The adapter merges the referenced templates.* or entities.* block before applying entity-specific overrides. Keys on the entity take precedence.

HVAC equipment sharing IfcHvacEquipmentBase: IfcPump, IfcFan, IfcCompressor, IfcBoiler, IfcChiller, IfcCoolingTower, IfcHeatExchanger.