Skip to content

ADDED self-intersecting polygon decomposition#5

Open
pshtif wants to merge 1 commit into
azrafe7:masterfrom
pshtif:patch-2
Open

ADDED self-intersecting polygon decomposition#5
pshtif wants to merge 1 commit into
azrafe7:masterfrom
pshtif:patch-2

Conversation

@pshtif
Copy link
Copy Markdown
Contributor

@pshtif pshtif commented Jul 15, 2014

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.

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.
@azrafe7
Copy link
Copy Markdown
Owner

azrafe7 commented Jul 16, 2014

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).

@pshtif
Copy link
Copy Markdown
Contributor Author

pshtif commented Jul 16, 2014

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.

@azrafe7 azrafe7 force-pushed the master branch 5 times, most recently from 1cd0234 to 3c44bb8 Compare May 29, 2015 11:41
@azrafe7 azrafe7 force-pushed the master branch 3 times, most recently from c600cf3 to 23cd173 Compare October 18, 2015 03:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants