ifc-occurrence 0.3.0

Built element and distribution occurrence classes and their type pairing.
Documentation

ifc-occurrence

Authoring for the concrete built-element and distribution occurrence classes, with the schema's occurrence-to-type pairing enforced: a pump typed by a valve type is refused rather than written. The catalogue is generated from the IFC4X3 ADD2 schema.

cargo add ifc-occurrence

The openbim-ifc facade also provides it behind its occurrence feature.

Design notes

  • A class is left out of the catalogue only when another crate authors it (the generic distribution classes, which ifc-systems owns). Test fixtures and doc examples elsewhere never count as authoring a class, which is why common classes such as IfcWall are generated here.
  • The catalogue names the classes; the model's declared release lays each record out. create and create_with_owner_history take slots, the PredefinedType enumeration and required attributes from that release's table, so a class IFC4 lacks is refused in an IFC4 model, and IFC2X3, which requires IfcRoot.OwnerHistory, needs the owner-history variant.
  • The type pairing is the declared release's own: the IFC4X3 and IFC4 CorrectTypeAssigned rules, and IFC2X3's documented pairing, which types an IfcDoor by an IfcDoorStyle. The catalogue records one column per release, generated from each release's EXPRESS source.
  • OccurrenceDraft is #[non_exhaustive]: build it with new() and the setters named after its fields. It carries what IFC2X3 requires of a few classes (ShapeType, the reinforcement bar measures, BarRole).