Issue #78 "union does not produce expected result when used with
difference" occurs because difference is returning loops that wind the
opposite direction from what is expected. The solution is to enforce
that the outermost loops wind counterclockwise to be consistent with the
direction that the shape functions provided by diagrams-lib wind. A more
precise solution would be to match the winding of the outermost loops to
that of the input loops they are constructed from, but the intersection
functions in diagrams-lib do not currently support finding the
intersections between segments that overlap, which prevents us from
determining which input loops correspond to the outermost output loops.
Issue #78 "union does not produce expected result when used with difference" occurs because difference is returning loops that wind the opposite direction from what is expected. The solution is to enforce that the outermost loops wind counterclockwise to be consistent with the direction that the shape functions provided by diagrams-lib wind. A more precise solution would be to match the winding of the outermost loops to that of the input loops they are constructed from, but the intersection functions in diagrams-lib do not currently support finding the intersections between segments that overlap, which prevents us from determining which input loops correspond to the outermost output loops.