Function fillet_polygon_corner

Source
pub fn fillet_polygon_corner(
    ring: &[Point2],
    corner: usize,
    radius: Scalar,
    depth: Scalar,
) -> GeomResult<ExactBRep>
Expand description

Fillet one corner of an arbitrary closed polygon profile.

§Why this exists next to fillet_extruded_profile

The profile-based entry point takes a Profile::Rectangle and so can only ever round a four-corner box. This one takes the ring directly, so an L-shape, a hexagon, or any polygon a boolean produced can be filleted. Corners are addressed by index into ring, which is stable under a rebuild in a way an arena id is not.

§What is still refused

  • A radius whose setback does not fit on either adjacent edge. Trimming past a neighbouring corner would silently delete that corner.
  • A degenerate corner: collinear or folded edges have no bisector.
  • A reflex corner. The blend there is a fillet on the outside of the material, which is a different surface and is not derived here.