mirror of
https://github.com/storytold/effectcraft.git
synced 2026-11-11 16:31:42 +00:00
* Auto-trace: bound the nesting, simplification and fitting work Many separate regions made the nesting depth test every pair of contours, Douglas-Peucker could rescan a span once per point (and recurse as deep as the loop is long), and the curve fit searched the raw contour from its start for every simplified vertex. - Depth: each loop's bounding box goes into a coarse grid; a loop's first point is tested only against loops whose box holds it. Same depths as testing every pair. - Douglas-Peucker: spans wait on an explicit stack, with a budget of 64 distance evaluations per point; spans still waiting when it runs out keep all their points, so the outline stays exact. - Fitting: uses the raw indices the simplifier kept instead of searching. * cargo fmt; clippy manual_is_multiple_of * address review: keep wide contour boxes out of the nesting grid