Expand description
Curve–surface intersection by per-axis fat line clipping — the design is
curve_surface.md next to this file; it is curve_curve with one more
parameter.
For a curve C = H_C / W_C and a surface Scalar = H_S / W_S with positive
weights, C_k(t) = S_k(u, v) iff
g_k(t, u, v) = H_{C,k}(t) W_S(u, v) - W_C(t) H_{Scalar,k}(u, v) = 0, a
polynomial tensor-product spline in three independent parameters with
coefficients d_ijl = P_{i,k} Q_{jl,w} - P_{i,w} Q_{jl,k}. Its zeros are
clipped in all three directions ([clip_tensor]) — nine clips per box.
Assumes no arc of the curve lies on the surface (curve_surface.md): the
result is a list of paired (t, (u, v)) boxes, and reaching some count
of them means nothing. Works on the untrimmed patch.
Functions§
- crossing_
points - Every point where
curvecrossessurface, each refined (refine_crossing) and with where it is on the surface: what the curve and the surface give there intersected, both enclosures of one point — at a pole, where the collapsed parameter says nothing, the pole. A curve lying on the surface along an arc is refused: where it meets the surface is no point. - curve_
surface_ crossings - All
(t, (u, v))withcurve(t) = surface(u, v), as paired parameter boxes (curve_surface.md), for a curve with no arc lying on the surface — seecurve_surface_intersectfor the wrapper that handles that. The same search ascurve_curve::curve_curve_crossings, over (curve segment, patch) pairs with three parameter directions: AABB and [clip] rejection, a pinned parameter handed down one dimension ([solve_pinned]), restriction while the clip keeps shrinking the pair ([crate::fat_line::restriction]), and once it stalls, convergence when both objects’ extents are withinmin_subdivision_sizeor fair bisection otherwise ([crate::fat_line::stalled]). - curve_
surface_ intersect - Points where
curvecrosses — or, lying on it along an arc, coincides with —surface, under theIntersectionscontract. - curve_
surface_ overlaps - Every stretch of
curvelying onsurface(see [coincidence]), or — for areachabove zero — running withinreachof it along every axis, with the surface parameters as the partner (seecurve_curve::curve_curve_overlaps_and_crossingsonreach): the stretches lying on the surface widened byreach(NurbSurface::widen), its boundary curves with it. Candidates are the curve’s ends found on the surface, and where the curve meets the patch’s four boundary curves — throughcurve_curve::curve_curve_overlaps_and_crossings, so a curve running along a boundary contributes that stretch’s ends. A boundary that isn’t clamped (so its control row isn’t the surface there) contributes no candidates. - refine_
crossing - Polish one isolated
(t, uv)— as returned bycurve_surface_intersect— by Newton onC(t) - Scalar(u, v) = 0, three equations in the three unknownst,u,v(newton::refine).