Skip to main content

lifted_gap

Function lifted_gap 

Source
pub fn lifted_gap(
    (curve, range): (&Curve, (f64, f64)),
    (pcurve, pcurve_range): (&PlanarCurve, (f64, f64)),
    surface: &SurfaceGeometry,
    paced: bool,
    tol: Tolerances,
) -> OgeomResult<f64>
Expand description

How far pcurve, lifted through surface, stands from curve, each over its range and read at the same fraction along it.

This is the width an edge carrying both must state: the curve sitting off the surface (an exact pcurve is the curve’s projection, and a file’s line can lie microns off its plane) and a fit straying between the samples it was fitted through both show here. The lifted point is compared with the curve’s point at the same fraction; unless paced (an edge claiming same parameter is held to its claim), where that misses by more than the confusion tolerance it is compared with the nearest point of the curve within one sample’s step, so a pcurve paced a little differently is not charged for its pace. Samples the surface cannot evaluate (past a pole) are passed over.

A fit strays most where its chart runs fast, as a curve passing close by a sphere’s pole sweeps across the chart in a few thousandths of its length, and a stray that narrow falls between even samples. So the widest few local peaks of the samples, and the two ends where a fit’s trace is seeded, are each searched for their summit between the samples either side. Unless paced, the peaks are those of the lifted point’s distance square off the curve’s tangent, which is the nearest-point gap to first order: a pcurve paced a little differently strays along the curve most where it strays across it least, and the peaks of the paced distance stand away from those of the gap stated.

§Errors

Propagates a failure to evaluate the curve or the pcurve over its range.