meerk40t / svgelements

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

Numerical Instability in Arc Bulge Code #126

Closed tatarize closed 2 years ago

tatarize commented 2 years ago
        arc = Arc(start=Point(-35.61856796405604,-3.1190066784519077), end=(-37.881309663852996, -5.381748378248861), bulge=0.9999999999999999)
        self.assertLessEqual(arc.sweep, tau/2)

By definition, a bulge cannot produce a sweep greater than tau/2. It's a circular arc between two points.

Discovered in the wild by sven74, produced with a dxf file.

tatarize commented 2 years ago

This is corrected in 1.6.1