Skip to main content

Module curve_surface

Module curve_surface 

Source
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 S = 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_{S,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§

curve_surface_crossings
All (t, (u, v)) with curve(t) = surface(u, v), as paired parameter boxes (curve_surface.md), for a curve with no arc lying on the surface — see curve_surface_intersect for the wrapper that handles that. The same search as curve_curve::curve_curve_crossings, over (curve segment, patch) pairs with three parameter directions: AABB and [clip] rejection, convergence once both objects’ extents are within min_subdivision_size ([crate::fat_line::converged]), a pinned parameter handed down one dimension ([solve_pinned]), and otherwise restriction or fair bisection per [crate::fat_line::plan].
curve_surface_intersect
Points where curve crosses — or, lying on it along an arc, coincides with — surface: the drop-in counterpart of super::curve_surface_bisect::curve_surface_intersect, with the same signature and Intersections contract.
refine_crossing
Polish one isolated (t, uv) — as returned by curve_surface_intersect — by Newton on C(t) - S(u, v) = 0, three equations in the three unknowns t, u, v.