You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is in a local build with latest master branch and then pr #58, #60, #64, #66, and #67 merged in. (Should be reproducible without #66 and #67 and maybe others--I'm just being complete.)
param Edge cases #2 intersects param Images #1's first polygon. (either entirely or partially inside of the first polygon).
EDIT Feb-16: Widened the repro case above after some more testing.
The return from diff() calculates a new inner ring for the return shape that would be correct except that the outer ring is added to the first polygon of the return shape instead of the second.
var param1 = [
[[[-89.489886, 40.482217],[-89.489714, 40.482022],[-89.489836, 40.482146],[-89.489886, 40.482217]]], // polygon #1
[[[-89.491551, 40.483208],[-89.486778, 40.487262],[-89.487045, 40.485142],[-89.491551, 40.483208]]] // polygon #2
];
var param2 = [[[-89.48925, 40.484891],[-89.488996, 40.484309],[-89.48821, 40.484919],[-89.48925, 40.484891]]]; // A triangle that is contained by polygon #1 and has no intersection with polygon #2.
var d = diff(param1, param2);
console.log(JSON.stringify(d));
Console output from above with my added comments:
[
[ (polygon #1)
[[-89.491551,40.483208],[-89.487045,40.485142],[-89.486778,40.487262],[-89.491551,40.483208]]
],[ (polygon #2)
[[-89.489886,40.482217],[-89.489836,40.482146],[-89.489714,40.482022],[-89.489886,40.482217]],
(inner ring that is not contained by the outer ring. If this inner ring were under polygon #1 instead of the polygon #2, it would be correct.)
[[-89.48925,40.484891],[-89.488996,40.484309],[-89.48821,40.484919],[-89.48925,40.484891]]
]
]
The rendered output of the return shape. It's a little weird-looking because it's simplified points from a real-world set of shapes. But the big triangle is polygon #1. The tiny line at the bottom (actually a triangle) is the outer ring of polygon #2. And the dark triangle is the inner ring of the polygon #2 which you can see is not inside of the outer ring of polygon #2.
The text was updated successfully, but these errors were encountered:
This is in a local build with latest master branch and then pr #58, #60, #64, #66, and #67 merged in. (Should be reproducible without #66 and #67 and maybe others--I'm just being complete.)
The key factors of the case seem to be:
EDIT Feb-16: Widened the repro case above after some more testing.
The return from diff() calculates a new inner ring for the return shape that would be correct except that the outer ring is added to the first polygon of the return shape instead of the second.
Console output from above with my added comments:
The rendered output of the return shape. It's a little weird-looking because it's simplified points from a real-world set of shapes. But the big triangle is polygon #1. The tiny line at the bottom (actually a triangle) is the outer ring of polygon #2. And the dark triangle is the inner ring of the polygon #2 which you can see is not inside of the outer ring of polygon #2.
The text was updated successfully, but these errors were encountered: