Skip to main content

fit_network_chained

Function fit_network_chained 

Source
pub fn fit_network_chained(
    model: &mut Model,
    patches: &[ChainedPatch],
    curves: &[CurveDef],
    points: &PointIndex,
    options: &NetworkOptions,
    corrections: usize,
    tol: Tolerances,
) -> OgeomResult<Network>
Expand description

fit_network over patches whose sides may be chains of curves, a curve ending on the middle of another’s side at a T-junction, with parameter correction.

Every curve of a chained side is shared pole for pole as a whole side is, and a T-junction is held tangent as the module documentation describes; a curve that runs between two junctions whose ratios differ is left near tangent, its angle measured into Network::worst_tangent.

Once refinement ends, every point’s parameters move to its nearest point on its patch and the patches are fitted again at the same spans, up to corrections times. A fit is kept only where its root mean square distance to the points is below the one before, and, where every point was within the tolerance, every point stays within it; the first that is not ends the corrections. fit_network corrects none. A correction fits the points, not the shape they sample: where the points leave a pole unsettled (the point a three-sided patch shrinks its missing side to, which only the points round it place), it can move that pole as freely as the seed’s parameters did.

§Errors

As fit_network, and OgeomError::Construction if two opposite sides of a patch, one of them split, cross different numbers of strips, the split sides carry their junctions round a loop back to themselves, or the curves of a split side meet one another, or the patch’s corners, other than at their junctions.