mirror of
https://github.com/storytold/figcraft.git
synced 2026-11-13 13:52:34 +00:00
kurbo's simplify_bezpath, which smooths Pencil samples and runs Simplify path, fitted two common shapes with a curve that ran far off the path: a stroke that goes out and back to the very point it left (kurbo keeps a reversal as a smooth join) and nearly collinear samples (kurbo measures its error across the path, not along it). figcraft_geom::simplify_path cuts the path where it turns back by more than a right angle, simplifies each run with kurbo, and keeps a run as it was when its fit strays more than twice the accuracy from it. The Pencil and vector.simplify use it.