mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-24 18:32:23 +00:00
path.smoothRegion kept every changed result. A drag along the top of a clean ellipse split it from 4 to 5 anchors without smoothing it, took away its Live Shape and added an undo step, and a third drag left it with 7 anchors and about 20% more turning. Each subpath's result is now measured against the subpath at one spacing: how much it turns along its length, with each turn at an anchor counted twice, and how much it bends. The result is kept only when it turns no more than a thousandth more and has fewer anchors, turns less or bends less. Otherwise the subpath stays as it was; a path with no kept subpath keeps its Live Shape, is left out of ids and the counts, and a call that keeps nothing adds no undo step. The measure and the thresholds are VectorCraft's own. Three tests that dragged over a convex curve with nothing to smooth now drag over a sharp peak or crest, so they still test the reach search and a closed path of two anchors.