Function reduce_degree2

pub fn reduce_degree2(
    curve: &BSplineCurve<DVec2>,
    tolerance: f64,
) -> Result<BoundedResult<BSplineCurve<DVec2>>, GeomError>
Expand description

Lower a planar curve’s degree by one, or refuse.

Lossy in general: only a curve that was already representable at the lower degree reduces cleanly. An elevated curve is the clean case, and reduction recovers what it started from.

Same discipline as knot removal: compute, measure, and refuse when the deviation exceeds tolerance, rather than trusting the reduction formula on a curve that genuinely needs its degree.