Debugging Boolean Operations on Polygons
I replaced the algorithm which calculates the line intersections. The next class of errors are cases where dividing a line would place it somewhere else within the sweep line buffer. Currently the line's flags are calculated, then the line is divided and because the division might have changed the position of some lines in the sweep line buffer, the flags are recalculated for some known cases.
I found one case where this didn't happen and it seems that there are more.
A more reliable approach might be to reevaluate the order within the sweep line buffer and act accordingly. From there I could even brute force a list of all cases where the flags need to be recalculated.