pub fn solid_signed_volume_for_sign(
solid: &BrepSolid,
bar: f64,
) -> Result<f64, String>Expand description
solid_signed_volume read for its SIGN against bar, as the boolean’s
assembly reads it (volume <= tolerance³ refuses an inverted shell).
The exact integration spends most of a trimmed wall’s time on the sliver
correction behind every chord of its rim pcurves; where such a pcurve is a
straight line in uv (a bore’s rims, 85 % of the plate case’s 105 ms check:
256 chords per wall half, 442 368 correction stations in all) the sliver
has no area and the correction is zero to rounding, so this reading skips
it (trimmed::with_straight_corrections_skipped). Face volume and vector
area terms are integrated together and retained by content, then evaluated
about the same shell reference as solid_signed_volume.
Native two-sphere supports with the certified trim scope can return a
positive lower bound; BREP_SPHERE_SIGN_BOUND=0|off keeps the old path. Only a
comparison against bar is meaningful for that result; it is never stored
in the full mass cache. If the bound cannot prove > bar, the old path runs.
The verdict is the exact check’s: when the reading sits within
SIGN_READING_MARGIN of the magnitudes of the bar, the exact value is
returned instead, bit for bit. Callers compare the result with bar.