Merge pull request #579 from revarbat/revarbat_dev

Bugfix for path_self_intersections() with closed paths.
This commit is contained in:
Revar Desmera 2021-06-21 00:38:21 -07:00 committed by GitHub
commit 4343629b58
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -682,6 +682,7 @@ function path_self_intersections(path, closed=true, eps=EPSILON) =
u = ((e.x*c.y)-(e.y*c.x)) / denom
) [a1+t*(a2-a1), t, u]
) if (
(!closed || i!=0 || j!=plen-1) &&
isect != undef &&
isect[1]>=-eps && isect[1]<=1+eps &&
isect[2]>=-eps && isect[2]<=1+eps