Module project_locator

Module project_locator 

Source
Expand description

The one IFCPROJECT locator (XCUT-6, CORE-3, PROC-AL-12), whose search also finds the model’s IFCSITEs ([find_site_ids]).

Every reader that needs “the project” starts here: a SIMD keyword search plus a record-boundary check, never a full crate::EntityScanner walk. find_project_ids returns EVERY project id in file order (a federated file declares several, and per-owner unit contexts need all of them); find_project_id is its first element, the model’s project. crate::EntityDecoder::project_id caches that answer per decoder.

A scan that already visits every entity for another reason may keep noting the first IFCPROJECT it walks past: same policy (first in file order), no extra pass.

Functions§

find_project_id
The model’s project: the first IFCPROJECT in file order, or None when the file has none. Stops at the first hit, so it costs no more than the distance to it. Reports a refused id like find_project_ids.
find_project_ids
Every IFCPROJECT express id in file order.