meerk40t / svgelements

SVG Parsing for Elements, Paths, and other SVG Objects.
MIT License
124 stars 28 forks source link

Path.npoint() can fail penultimate value #232

Closed tatarize closed 10 months ago

tatarize commented 1 year ago

The npoint() call in path will fill in individual lengths however with enough rounding error can lead to the final point at 1.0 not matching, but this also holds true for the second to the last point as well. And when that point fails there is no routine to correct for this oversight.

tatarize commented 1 year ago

Error turns out to be that if a segment didn't actually affect any of the sectional points it failed truncated and didn't do the calculations but also failed to add that segment to the length.