Open pshtif opened 10 years ago
Thanks for taking a crack at this. It would be really nice to have this feature.
From testing your initial impl. I can see that the resulting decomposing polys can sometimes overlap, which could be unwanted (you can try it with a star-shaped self-intersecting poly).
Yea I am well aware that results can overlap thats what I was after instead of substraction of such polys which is common behavior in some other poly renderers. Anyway this method has bugs and will not work when first/last segment intersect with something I already fixed that and will commit new.
Added a method decomposeSelfIntersecting which will decompose specified polygon into an array of simple polygons. Its just a first draft out of my mind with possible optimizations, I didn't use any source material.