Open lemmih opened 5 years ago
If two points are separated by one unit of tolerance on the Y-axis then 'union' will both consider them to be separate (in the X struct) /and/ overlapping. This leads to malformed curves in the output structure and the final output is an empty list.
lhs,rhs :: ClosedPath Double lhc = ClosedPath [(Point 2 0,JoinLine) ,(Point 4 3,JoinLine) ,(Point 0 3,JoinLine)] rhs = ClosedPath [(Point 2 0.1,JoinLine) ,(Point 6 1,JoinLine) ,(Point 6 3,JoinLine) ] *Geom2D.CubicBezier.Overlap> union [lhs,rhs] NonZero 0.1 []
lhs,rhs :: ClosedPath Double lhc = ClosedPath [(Point 2 0,JoinLine) ,(Point 4 3,JoinLine) ,(Point 0 3,JoinLine)] rhs = ClosedPath [(Point 2 0.1,JoinLine) ,(Point 6 1,JoinLine) ,(Point 6 3,JoinLine) ]
*Geom2D.CubicBezier.Overlap> union [lhs,rhs] NonZero 0.1 []
This can be fixed by using (tolerance*2) when creating the X structure.
A better solution might be to use 'tol/2' when calling 'loopEvents' and then reducing the precision of the generated output curves.
If two points are separated by one unit of tolerance on the Y-axis then 'union' will both consider them to be separate (in the X struct) /and/ overlapping. This leads to malformed curves in the output structure and the final output is an empty list.
This can be fixed by using (tolerance*2) when creating the X structure.