-
Notifications
You must be signed in to change notification settings - Fork 4
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
Add testcases from https://github.com/21re/rust-geo-booleanop and fix fatal2 test #2
Add testcases from https://github.com/21re/rust-geo-booleanop and fix fatal2 test #2
Conversation
@JimBobSquarePants i will have a look if I can fix more testcases over the weekend. |
@stefannikolei Thanks mate. I've pushed some significant refactoring's to the code to pull it closer to the JS version but I'm not confident in my … I’ve updated that method. Bug must be elsewhere |
I've added my new I'm currently testing fatal2.geojson which appears to initially queue already but yields 1 less (314 vs 315) sorted events than the JavaScript. reference, my assumption is that there might be differences in the intersection counting code. |
48f3017
to
5de4bb2
Compare
@JimBobSquarePants Yeah I also looked into that. But for me it seems, that the problem is a precision problem. This comparison failed when it shouldn't if ((operation == BooleanOperation.Intersection && sweepEvent.Point.X > minMaxX) || I saw, that after the Intersection Code ran, that the Vertexes in the events differed from the JS version |
Ah, that might be why the bound box dimensions are calculated in the loop. We include all the segments, they only include the ones that pass when processing the polygon. I'll make the changes now in main..... Done. |
What do you think about the testdata that can not be deserialized by geojson? |
Should we copy geojson into the testcode and remove the check of the 4 coordinates? |
5de4bb2
to
f8311ab
Compare
I was hoping the library I’m using to deserialise them had a less strict mode. |
That’s interesting. JavaScript Number types are double precision floating point values the same as our |
I fixed the fatal2 test Removing the SnapToSegment calls fixed it. I also added some calls to Vertex.Cross instead of multiplying it manually |
First thing that popped into my head when I woke up this morning was Do all the tests you've added so far pass now or are there any I should look at? |
23 are still failing. Some have the deserialization problem. Some have a precision problem. I have not looked further. |
I have sorted the test files, those who fail are now in a separate directory. we now have 25 green |
I wonder if we should merge what we have so far? |
I would say so. Makes it easier to verify what fixes what 😅 Should I add the build scripts from the ImageSharp repo? |
Just for tests, no packages yet until the kinks are ironed out and I’ve added some benchmarking to compare to Clipper2 |
fc6facb
to
a150612
Compare
No description provided.