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

Wrong result for a basic diff #124

Closed
jmtrivial opened this issue Mar 26, 2020 · 2 comments
Closed

Wrong result for a basic diff #124

jmtrivial opened this issue Mar 26, 2020 · 2 comments

Comments

@jmtrivial
Copy link

Dear w8r,

Thank you for your tool, it's very easy to use, I recently discovered it while I was developping svg-to-stl.

I found a bug I didn't yet explored, but with a very basic configuration : two rectangles, a small one and a large one. The small one should cut the large into two rectangles when applying a diff, but when edges are collinear, it produces incoherent shapes:

bug

I think that one edge should be part of the right rectangle, but has been integrated to the left rectangle.

If I'm not wrong (I only tested this configuration in Codepen, and write this example without testing it), here is an example:
{ "features": [ { "geometry": { "coordinates": [[[0,10],[0,-10],[30,-10],[30,10],[0,10]]], "type": "Polygon" }, "properties": {}, "type": "Feature" }, { "geometry": { "coordinates": [[[10,10], [10,-10],[20,-10],[20,10],[10,10]]], "type": "Polygon" }, "properties": {}, "type": "Feature" }, { "geometry": { "coordinates": [ [[[0,10],[0,-10],[10,-10],[10,10],[0,10]]], [[[20,10],[20,-10],[30,-10],[30,10],[20,10]]] ], "type": "MultiPolygon" }, "properties": {"operation": "diff"}, "type": "Feature" } ], "type": "FeatureCollection" }

@w8r
Copy link
Owner

w8r commented Mar 27, 2020

I have a strong feeling it could be connected to 21re/rust-geo-booleanop/pull/15

@bluenote10
Copy link
Collaborator

To me it looks more related to the fixes in 21re/rust-geo-booleanop/pull/13. It works in the Rust version -- I can have a quick look.

bluenote10 added a commit to bluenote10/martinez that referenced this issue Mar 28, 2020
@w8r w8r closed this as completed in 2954c4b Mar 2, 2022
w8r added a commit that referenced this issue Mar 2, 2022
w8r added a commit that referenced this issue Jul 18, 2022
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

3 participants