Skip to main content

meet

Function meet 

Source
pub fn meet(
    start: Vector3,
    offsets: &mut [Offset<'_>],
    planes: &[(Vector3, Vector3)],
) -> GeopResult<Vector3>
Expand description

The point nearest start that lies at every one of offsets and in every one of planes (a unit normal and a point each): Gauss-Newton. Each step measures how far off each condition the iterate is — along the normal at its foot point on each surface, along each plane’s normal — and takes the shortest step that corrects all of them at once, to first order. Between planes that is exact in one step; with fewer than three conditions the point slides along where they meet, by no more than it has to.

The iterates are seeds for the next step, so they are sharpened — but they are also the answer: where fewer than three conditions meet, the point is free to slide, and only the steps taken say how far it has. So the answer is carried alongside, unsharpened: start less every step, each with the width its own measurement gave it (keep two copies, see AGENTS.md). A caller that only needs a construction aid sharpens it, where it calls. A fixed point of the sharpened iteration ends it: every further step would start from the very same seed and only add its width again — not a tolerance, the seed is bit for bit unchanged.

The answer is checked against every condition at the end: a condition lost on the way — a foot point clamped to the edge of its patch, a projection that never moved — is an error here, naming the condition, not a wrong point found two steps later.