Skip to main content

fit_surface_grid

Function fit_surface_grid 

Source
pub fn fit_surface_grid(
    rows: &[Vec<Point>],
    degree: usize,
    tolerance: f64,
    tol: Tolerances,
) -> OgeomResult<Fitted<BSplineSurface>>
Expand description

Centripetal parameters over the points, on [0, 1]. Fit a rectangular grid of points with a tensor-product B-spline surface.

The deferred grid fit, kept honest the way the curve fit is: rows first, columns second, both passes at fixed parameters: a grid’s parameterization is shared property, and correcting it per row is how a grid stops being one. Each pass adapts one shared knot vector against the worst residual across its whole family, so every row rides the same basis, which is what makes the second pass a fit over control points rather than a guess. The reported error is measured at the end, surface against every input point, and met does not round up.

rows[j][i] runs i along u and j along v.

§Errors

OgeomError::Construction if the grid is not rectangular or is smaller than two by two, or the tolerance is not a distance.