Skip to main content

branches

Function branches 

Source
pub fn branches(
    a: &SurfaceGeometry,
    b: &SurfaceGeometry,
    options: Marching,
    tol: Tolerances,
) -> OgeomResult<Vec<Traced>>
Expand description

Every branch of the intersection: seed, trace each, and keep the distinct ones.

A branch crossing many sampling cells produces many seeds, and tracing from any of them gives the same curve. So a seed already lying on something traced is dropped rather than followed again, which is what makes the number of branches returned meaningful, and it is the number a boolean will act on.

Where the surfaces stand within the confusion distance ε of each other across a band rather than along a curve, the section is that band to tolerance. Two curves of it in one band, with nowhere between them that the surfaces part by more than ε, may come back as one: each sample lies on both surfaces within ε, and each point of the curve left out joins one returned by a straight way that does too. A branch is placed across the section only to within ε over the sine of the angle the surfaces cross at, so where they cross shallowly its samples may zigzag within that band and its length exceed the curve’s.

§Errors

OgeomError::Construction if the settings are unusable.