Skip to main content

Module branch

Module branch 

Source
Expand description

The branch where two surfaces meet, followed from point to point: a corrector that brings a predicted point onto both surfaces at once (predictor_corrector_step), and a curve fitted through points of a branch that encloses the branch between them too (fit_branch).

Where the branch runs and where it ends is the caller’s to decide: the booleans march from a piercing point to the vertex they reach (geop-lib-booleans’ trace_one_side); a shell knows both ends, the moved vertices, and the edge whose inner copy the branch is.

Functions§

fit_branch
The curve of a traced branch whose shape nothing names: a cubic through the marched points (each on both surfaces at its uvs), widened to enclose the branch between them.
predictor_corrector_step
One predictor-corrector step from point (with known (u_a, v_a) / (u_b, v_b) on surf_a/surf_b) along dir: predicts point + dir * step_size, then solves for the point that lies on both surfaces at once by damped Newton, returning the union of the two surfaces’ enclosures of it plus each surface’s own resulting (u, v).

Type Aliases§

OnBoth
Where a point of an intersection branch is on both surfaces: (u_a, v_a, u_b, v_b).