Skip to content

editor / roundedContour

Function: roundedContour() ​

roundedContour(corners): readonly ContourPiece[]

Defined in: geometry/rounded-contour.ts:25

Evaluated contour of a shape with corner radii: a closed sequence of segments and arcs.

Radii are first clamped (DERIV-local-radius-clamp); each corner gets its fillet arc; each edge becomes the segment between the arcs of its two corners. The sequence starts at the end of the first corner's arc and closes with that arc (DERIV-fillet-arc step 7); pieces without length are dropped. Vertices that turn back on themselves (spikes, τ = ±π) are outside the derivation (Q16: such a spike is consumed by its fillet).

Parameters ​

corners ​

readonly Corner[]

vertices with their requested radii, clockwise from the top-left vertex (Q11)

Returns ​

readonly ContourPiece[]

segments and arcs in drawing order, each starting where the previous one ends, within EPSILON

Kind ​

geometry

See ​

DERIV-fillet-arc