Function fillet_polygon_corners

Source
pub fn fillet_polygon_corners(
    ring: &[DVec2],
    fillets: &[(usize, f64)],
    depth: f64,
) -> Result<ExactBRep, GeomError>
Expand description

Fillet several corners of a polygon profile in one solid.

Each entry is a (corner index, radius) pair. Corners are solved independently – a blend depends only on its own corner and the two adjacent vertices – and every replacement is applied in one pass.

§Why the pairwise check exists

Independence holds only while no two blends overlap. Two filleted corners sharing an edge each consume r / tan(theta/2) of it, so the pair fits only when the SUM of their setbacks is under the edge length. Checking each corner alone against the whole edge would admit a pair that individually fits and jointly self-intersects.