Skip to main content

Module traced

Module traced 

Source
Expand description

Curves fitted through a trace at its own parameters and held to their tolerance between the samples.

A fit’s own error is measured at the points it was fitted through. A trace with more detail than the samples (a many-span spline, a polyline with more corners than samples) leaves a fit that meets its target at every sample and misses the trace between them. These fits sample a source curve at its own breaks, check each interval between samples at its eighths, split the intervals that miss, and report the worst distance measured anywhere, not the worst at the samples. The fits are ogeom_geom::fit::fit_curve_sampled and its planar twin; this module chooses where they start.

Functions§

corners_2d
Where a planar spline over range turns a corner: its interior knots of multiplicity at least its degree, inside range.
fit_traced
A space curve fitted to trace at its own parameters, starting from the samples at stations (strictly increasing): the open case of ogeom_geom::fit::fit_curve_sampled. Each interval is measured at its eighths as well as at the samples, and the intervals that miss tolerance are split until it holds everywhere measured or the samples reach ogeom_geom::fit::SAMPLED_SPANS intervals. The best fit either way, its error the worst distance measured and met whether that is within tolerance.
fit_traced_2d
As fit_traced, in the plane: a chart image fitted at the parameters of the curve it annotates. The distances are in the trace’s own units.
joined
Polynomial splines of one degree, each clamped and each starting where the one before ends in parameter, joined end to end into one spline that is continuous at the joins and no smoother. Each join takes the middle of the two ends that meet there; the second value is how far that moved either end.
stations
The parameters to start a fit of curve over range from: each span of the curve (between its distinct knots) cut in degree + 1 pieces, and at least at_least pieces overall.
stations_2d
As stations, for a planar curve.
stations_between
As stations, for a range cut at breaks into pieces of degree: a patch’s direction between its distinct knots, say.