fix segment endpoint handling for intersections

This commit is contained in:
Adrian Mariano
2021-10-07 23:20:46 -04:00
parent 7580b85877
commit 9670fc0e68
4 changed files with 17 additions and 12 deletions

View File

@@ -251,9 +251,11 @@ function _path_region_intersections(path, region, closed=true, eps=EPSILON) =
isect = _general_line_intersection([a1,a2],[b1,b2],eps=eps)
)
if ( isect
&& isect[1]> (si==0 && !closed? -eps: 0)
// && isect[1]> (si==0 && !closed? -eps: 0)
&& isect[1]>= -eps
&& isect[1]<= 1+eps
&& isect[2]> 0
// && isect[2]> 0
&& isect[2]>= -eps
&& isect[2]<= 1+eps )
[si,isect[1]]
]);