Expand description
OVL7 — buffer: grow a geometry outward by a fixed distance.
Mirrors boost/geometry/algorithms/buffer.hpp and the buffer
strategies under strategies/buffer/. A buffer offsets every part of
the input outward by distance, rounding or mitering the corners,
and unions the offset pieces into an output polygon.
v1 scope: positive distance buffers of a point (→ a circle) and a
convex polygon (→ the polygon grown with rounded corners). The
general non-convex / negative-distance buffer, which needs the full
offset-and-self-union machinery, is deferred — it builds on the same
overlay union this module already uses.
Join / end / point strategies are modelled as small enums
(JoinStrategy, PointStrategy) mirroring Boost’s
join_round / join_miter and point_circle / point_square
strategy types.
Enums§
- Join
Strategy - How to fill the wedge at a convex corner of the offset boundary.
- Point
Strategy - How to approximate a buffered point.
Functions§
- buffer_
convex_ polygon - Buffer a convex polygon outward by a positive
distance, rounding the corners perjoin. - buffer_
point - Buffer a point by
distance, producing the disc (or square) approximation.