pub fn refine_crossing(
curve: &NurbCurve<4>,
surface: &NurbSurface<4>,
t: Scalar,
uv: Vector2,
) -> (Scalar, Vector2)Expand description
Polish one isolated (t, uv) — as returned by curve_surface_intersect
— by Newton on C(t) - Scalar(u, v) = 0, three equations in the three unknowns
t, u, v (newton::refine).
curve_surface_intersect deliberately does not apply this to
everything it returns — most callers only need to know where and how
many crossings there are, and refining changes results they already
agree with. Call it when the parameter is about to be used as a split
point, where the width genuinely matters: a point evaluated at a wide
crossing is just as wide, which is how it becomes a fat vertex and a fat
sub-curve.
The refined box must still be able to hold a crossing: the curve and the surface evaluated over it have to overlap. Newton only assumes an isolated, regular root; where that fails — a curve lying on the surface’s extension beyond the patch, so the iterate slides along it and gets clamped at the patch’s edge — it can return a narrow box that provably misses, and the honest incoming box is what is kept.