fix: a lenient parameter boundary found across a seam is not used; record seed 81 (#1003)

#970's lenient retry of a face's parameter boundary searches the whole surface as a last resort; on robustness seed 20 it found an edge's points across a cylinder's seam, half a turn apart, and the Cut failed. A lenient boundary whose points jump half the parameter range or more is refused, and the face is left undivided as before (#970's elbows step at most a fifth of the range). Seed 81's volume moved by 0.1 mm3 with #952's hole direction; recorded.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
bherbruckandClaude Opus 5.5 authored and GitHub committed 2026-10-14 04:56:39 -04:00
1 parent cf9d7772f1
commit dfbf7dd6a8
3 files changed
+25 -2

No files matched your search

@@ -71,6 +71,18 @@ where
vec.append(&mut add?);
Some(vec)
})?;
// SolidCraft: a lenient boundary whose points jump half the parameter range or more has been
// found across a periodic surface's seam by the whole-surface search (on a cylinder the
// points of one edge landed at both ends of its angle): it would divide the face wrongly, so
// the face is left undivided as before.
if lenient {
let (u, v) = surface.try_range_tuple();
let half = |r: Option<(f64, f64)>| r.map_or(f64::INFINITY, |(a, b)| (b - a).abs() / 2.0);
let (hu, hv) = (half(u), half(v));
if vec.windows(2).any(|w| (w[1].x - w[0].x).abs() >= hu || (w[1].y - w[0].y).abs() >= hv) {
return None;
}
}
Some(PolylineCurve(vec))
}