Skip to main content

Module mapped

Module mapped 

Source
Expand description

IfcMappedItem and IfcRepresentationMap: geometry reuse by reference.

§What it means

A mapped item is IFC’s block/instance mechanism. One geometry definition (the RepresentationMap) is authored once, and every place it appears is an MappedItem that references it plus a transform. A file with 400 identical windows stores one window and 400 small records.

  IfcMappedItem ---- MappingSource ---> IfcRepresentationMap
        |                                      |
        |                                MappingOrigin (IfcAxis2Placement)
        +---- MappingTarget --->               |
              IfcCartesianTransformationOperator
                                         MappedRepresentation
                                               |
                                               v
                                     the actual geometry

§The trap: mapped items nest

The spec is explicit that “an IfcMappedItem can reuse other mapped items (ako nested blocks)”: the MappedRepresentation may itself contain mapped items. A naive resolver that assumes one level silently drops geometry, and one that recurses without a guard hangs on the cyclic files that real exporters have produced. The fixture corpus contains nested_mapped_item_cycle.ifc for exactly this reason.

§The full transform

Placing a mapped item is two transforms composed, not one:

  1. MappingOrigin on the representation map – where the source geometry sits in its own definition space;
  2. MappingTarget on the mapped item – where that space lands in the consuming representation.

Applying only the target is a common bug, and it is invisible whenever MappingOrigin happens to be the identity, which it usually is.

Structs§

MappedInstance
One resolved mapped item: everything needed to place the reused geometry.
MappedItem
A borrowed view of an IfcMappedItem.
MappingWalker
Walks mapped-item nesting, detecting cycles and excessive depth.
RepresentationMap
A borrowed view of an IfcRepresentationMap.