FACETED_BREP_DEDUP_FACE_LIMIT

Constant FACETED_BREP_DEDUP_FACE_LIMIT 

Source
pub const FACETED_BREP_DEDUP_FACE_LIMIT: usize = 20_000;
Expand description

Face-count threshold above which [faceted_brep_face_count] tells the caller to skip the structural signature walk entirely (#1909). The walk in [try_faceted_brep_signature] mirrors the mesher’s own traversal face-by-face, bound-by-bound, point-by-point — for dedup to pay off there must be at least one OTHER item sharing this exact signature. Tekla-style duplication (thousands of connection plates/bolts, the case this cache exists for) tops out at low hundreds of faces per part; a SINGLE huge faceted import — a terrain, a scanned mesh, one big BREP with no sibling — has none, so hashing every point is pure loss that DOUBLES the traversal cost of an already-expensive mesh with no possible payback. Set well above any plausible detail-part face count and well below the scale where a single giant mesh becomes measurably worse — a 2.5 M-triangle model reported ~30 s where web-ifc took ~2.85 s, traced to this hash.

pub (re-exported through router and the crate root — see lib.rs, same pattern as GEOMETRY_DIAGNOSTICS_SCHEMA_VERSION) rather than pub(super)/pub(crate), specifically so the #1909 regression test (tests/issue_1909_large_single_brep_dedup.rs, an external integration test crate that only sees this crate’s public API) reads the real threshold instead of hard-coding 20_000 a second time (PR #1977 review: that duplication is exactly the shape of the 341/88 checklist drift on #1963 — assertion and constant silently disagreeing).