Open SebKuzminsky opened 6 years ago
Another bug, found false intersection for Arc is in the file: https://github.com/sstefanov/svgpathtools/blob/master/test/zip1bp.svg
PR #110 fixes this issue for me.
PR #110 also fixes the false intersection reported by @sstefanov:
In [1]: import svgpathtools
In [2]: paths, attributes, svg_attributes = svgpathtools.svg2paths2("zip1bp.svg")
In [3]: a0 = paths[0][0]
In [4]: a0
Out[4]: Arc(start=(67.281289+259.94689j), radius=(6.0799361+6.0799361j), rotation=0.0, large_arc=False, sweep=False, end=(65.432307+259.23479j))
In [5]: a1 = paths[0][2]
In [6]: a1
Out[6]: Arc(start=(65.432307+249.47878999999998j), radius=(15.762796+15.762796j), rotation=0.0, large_arc=False, sweep=True, end=(74.212133+253.01604999999998j))
In [7]: a0.intersect(a1)
Out[7]: []
In [8]: a1.intersect(a0)
Out[8]: []
I've run in to a couple of bugs with Arc.intersect(Arc).
I've documented/reproduced the bugs here: https://github.com/SebKuzminsky/svgpathtools/commits/arc-arc-intersect
I don't currently have a fix for this.