ifc_lite_geometry/profile_skip.rs
1// This Source Code Form is subject to the terms of the Mozilla Public
2// License, v. 2.0. If a copy of the MPL was not distributed with this
3// file, You can obtain one at https://mozilla.org/MPL/2.0/.
4
5//! [`SkippedProfile`] — split out of `profile_extractor.rs` to keep that
6//! module under its size ratchet.
7//!
8//! It is the production-reaching counterpart of the `diag_debug!` trace at
9//! each profile-extraction drop site in `profile_extractor.rs`: those macros
10//! compile to nothing unless the crate is built with `debug_geometry` or
11//! `observability` (neither is a default feature, and the shipped wasm build
12//! enables neither — see `scripts/build-wasm.sh`), so without this struct a
13//! real extraction failure was invisible end to end.
14
15/// A building element whose construction-projection profile was dropped —
16/// its `IfcExtrudedAreaSolid` (direct or via `IfcMappedItem`) is present but
17/// could not be turned into 2D drawing geometry, or the mapped-item chain
18/// was too deep. Never an element the extractor deliberately excludes (a
19/// non-`IfcExtrudedAreaSolid` representation, an `IfcFeatureElement`).
20#[derive(Debug, Clone)]
21pub struct SkippedProfile {
22 /// Express ID of the building element whose profile was dropped.
23 pub express_id: u32,
24 /// IFC type name (e.g., `"IfcWall"`).
25 pub ifc_type: String,
26 /// Short, stable reason string (not user-facing prose): the geometry
27 /// error text, or `"max mapped item depth exceeded"`.
28 pub reason: String,
29}