-
Notifications
You must be signed in to change notification settings - Fork 90
Open
Description
With the below polygons, subtracting S from T creates a degenerate result polygon: Instead of splitting the result into two polygons at vertex 3, it creates a single polygon with vertex 3 sitting on the edge connecting vertex 0 and 1.
I'm not sure if this is intended behavior? With other vertex-on-edge scenarios, result polygons always get split up correctly, so I think this is probably a bug.
var polybooljs = require("polybooljs")
const T = {
inverted: false,
regions: [[
[ 3.1827730120236866, -14.647299060696893 ],
[ 3.292779172743269, -14.709442780204576 ],
[ 3.2790977409099513, -15.096879410975502 ]
]]
};
const S = {
inverted: false,
regions: [[
[ 3.3984917402267456, -14.277922392125454 ],
[ 3.3984917402267456, -14.919993494289331 ],
[ 3.2411990917407074, -14.919993494289326 ]
]]
};
polybooljs.difference(T,S) // { regions: [[
// [ 3.1827730120236866, -14.647299060696893 ],
// [ 3.2790977409099513, -15.096879410975502 ],
// [ 3.2853440594539682, -14.919993494289328 ],
// [ 3.2411990917407074, -14.919993494289326 ],
// [ 3.292779172743269, -14.709442780204576]
// ]],
// inverted: false }
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
