ADDED self-intersecting polygon decomposition#5
Open
pshtif wants to merge 1 commit into
Open
Conversation
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.
Owner
|
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). |
Contributor
Author
|
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. |
1cd0234 to
3c44bb8
Compare
c600cf3 to
23cd173
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.