Skip to main content

Module model

Module model 

Source
Expand description

The entity graph — storage, lookup, and nothing else.

§What this type deliberately does NOT do

Model has no idea what a cost item, a task, a wall, or a material is. It stores entities and answers structural questions about them. Every domain meaning lives in a separate crate that borrows a &Model and interprets it.

That is not a stylistic preference, it is what makes two things possible:

  1. Thin builds. An app that only reads geometry compiles no cost, schedule, or structural code, because those crates are optional features rather than parts of the model.
  2. Lossless round-trips of data we do not understand. Since the model stores entities structurally, a cost entity survives parse and re-export byte-for-byte in content even when ifc-cost is not compiled in. If the model instead held a CostItem struct, dropping the feature would drop the data.

The rule to preserve: no if type_name == "IFCWALL" in this crate.

Structs§

Model
A parsed IFC file: header, entities, and indices over them.