Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unstable union result #2

Open
ghost opened this issue Jan 23, 2019 · 4 comments
Open

Unstable union result #2

ghost opened this issue Jan 23, 2019 · 4 comments

Comments

@ghost
Copy link

ghost commented Jan 23, 2019

The expected result is this
image
but every now and then artifacts appear like this
image

The artifacts seem to depend on the order of the unified polygons. Spade's r-tree is used to union polygons in parallel.

For some reason applying union on these polygons sequentially:
image
causes this result:
image

@ghost
Copy link
Author

ghost commented Jan 23, 2019

Gathering more data, the union of red with blue causes these results:
image
image

image
image

@untoldwind
Copy link
Contributor

Have you checked with the javascript version (https://github.com/w8r/martinez)?

I.e. to figure out if it is a problem with the algorithm itself or the rust-port.

@bluenote10
Copy link
Contributor

@michaort Very interesting test cases. It has been a while, but do you happen to still have the raw data of these polygons? I'd be curious if we can make them work now.

@ghost
Copy link
Author

ghost commented Mar 13, 2020

Sorry I've just spotted this in my emails. I looked through my backups but couldn't find any dumps of the raw data. Though you could probably generate similar data. If you generate a maze made out of square polygons, increase their size to overlap each other, and then union them sequentially, you should get similar problems. One might have to sprinkle in randomly placed rectangles of various sizes and rotations if that doesn't do the trick.

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

No branches or pull requests

2 participants