pub const LARGE_COORD_THRESHOLD_METERS: f64 = 1000.0;Expand description
The large-coordinate threshold (metres): a world coordinate whose magnitude exceeds this needs RTC re-basing before it is cast to f32, or the model renders with vertex jitter.
Shared because every crate that decides “is this model far from the
origin” must draw the line in the same place: a copy that drifts fails
silently (one side re-bases, the other does not, and the two frames differ
by the whole offset). It lives in ifc_lite_core because core’s own
placement-bounds scan needs it and cannot import from above;
ifc_lite_geometry re-exports it under the same name.
Prefer coord_is_large to comparing against this directly, so the
comparison (strictly greater, any axis, absolute value) also has one home.
§Why 1 km and not 10 km (#4934)
The line is precision-derived, not distance-derived: it is the point past
which the f32 store the mesh path casts into loses more than a BIM
tolerance. f32 has a 24-bit mantissa, so its ULP near x is
2^(exponent(x) - 23); at 1 km that is ~0.061 mm, and at the old 10 km
line it is ~0.5-1 mm — comparable to the flush-face tolerances authoring
tools actually hit, so two faces meant to be coincident round to
different f32 lattice nodes and z-fight (#4934’s report: 6.3 km survey
coordinates, ~0.26 mm ULP, visible speckle over every join). 1 km keeps
worst-case quantization at a fraction of a millimetre while matching the
existing NEAR_ORIGIN band in rust/geometry/src/router/rtc_offset.rs,
so a model just inside the line and the detector’s own “already near the
origin” judgment agree.