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

Fails Simple Union / Intersection #45

Closed
srt19170 opened this issue Sep 26, 2017 · 4 comments
Closed

Fails Simple Union / Intersection #45

srt19170 opened this issue Sep 26, 2017 · 4 comments

Comments

@srt19170
Copy link

        let poly1 = [[0, 0],[22.75, -12],[22.75, 0]];
	let poly2 = [[-2.42, 0],[-2.42, -5.45],[2, 0]];
        let result = Martinez.intersection([poly1], [poly2]);
        // result == null

Union also fails, returning the two original polygons.

@w8r
Copy link
Owner

w8r commented Sep 26, 2017

It's programmed behaviour for a trivial case. Probably very easy to fix.

@srt19170
Copy link
Author

I guess that's good to hear :-) Is there any workaround or anything I can do in the meantime? This isn't really my wheelhouse, but if you can point me at the right bit of code maybe I can figure it out.

For what it's worth, it works correctly if the polygons are closed off. But I find in general that the code works poorly if polygons are closed off, so I assume it expects them to be open?

@w8r
Copy link
Owner

w8r commented Sep 26, 2017 via email

@w8r
Copy link
Owner

w8r commented Dec 20, 2017

works in master, will be fixed after #42

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