jzbrooks / vgo

vector graphic optimization
MIT License
43 stars 2 forks source link

Avoid inserting grouping commas into large numbers #78

Closed jzbrooks closed 2 months ago

jzbrooks commented 2 months ago

Fixes #60.

The problem was obvious after isolating the command where the paths diverged.

a3,940.09,3,940.09,0,0,0,-24.55,-0.461

The issue wasn't obvious because differences of relative command coordinates usually aren't big, but the radius of an arc is a magnitude, so it isn't relative to anything. This seemed like a bug with the convert curves to arc optimization because it is the most likely place for this command printing bug to have surfaced. Not only that, but the optimization also needs to select the arc with a huge radius over the bezier curve, which makes surfacing this bug even less likely.