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:
MappingOriginon the representation map – where the source geometry sits in its own definition space;MappingTargeton 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§
- Mapped
Instance - One resolved mapped item: everything needed to place the reused geometry.
- Mapped
Item - A borrowed view of an
IfcMappedItem. - Mapping
Walker - Walks mapped-item nesting, detecting cycles and excessive depth.
- Representation
Map - A borrowed view of an
IfcRepresentationMap.