The README says that the output exterior paths are supposed to be CCW and holes CW. But that doesn't seem to be the case.
Here's an example:
Intersecter#calculate outputs the segments ordered by their end events. That would be [AB, AC, BC] in this case. SegmentChainer then looks at myFill.above of the first segment (AB) and determines that the polygon is not filled so it erroneously outputs it clockwise. Note that if B were to the right of C then the first segment would be AC and SegmentChainer would treat the polygon as filled.
I'm trying to understand the intentions here: is Intersecter#calculate supposed to output the segments in a different order so that AC would be processed first?; or is SegmentChainer supposed to look at the direction of segments and use the correct fill flag?
The README says that the output exterior paths are supposed to be CCW and holes CW. But that doesn't seem to be the case.
Here's an example:
Intersecter#calculateoutputs the segments ordered by their end events. That would be[AB, AC, BC]in this case.SegmentChainerthen looks atmyFill.aboveof the first segment (AB) and determines that the polygon is not filled so it erroneously outputs it clockwise. Note that ifBwere to the right ofCthen the first segment would beACandSegmentChainerwould treat the polygon as filled.I'm trying to understand the intentions here: is
Intersecter#calculatesupposed to output the segments in a different order so thatACwould be processed first?; or isSegmentChainersupposed to look at the direction of segments and use the correct fill flag?