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
I have a relatively simple polygon shown in this plot:
It has slightly angled corners, but no self-intersection, concavity or other odd behavior. When I add padding of 4.8 it succeeds (and is now a simple polygon with 4 sides) but when this increase to 4.9 or higher it fails. However, if I add 4 padding and then add 1 padding to the created polygon, it works and appears to correctly create a polygon with an effective padding of 5.
Here is the code to reproduce:
let Offset = require('polygon-offset')
let offset = new Offset()
let a = [[0.5298861641722039,723.3616754870759],[87.9120549728682,723.0000176351272],[87.91417247478793,722.0000198770368],[89.4375266032173,2.590654049084369],[88.02779525598075,2.0021133264491264],[2.6958948009635018,2.0310984560503553],[2.0250343895624585,3.3632278972327185],[2.022957794804972,4.363225741107499],[0.5298861641722039,723.3616754870759]]
offset.data(a).padding(4.8) // works
offset.data(a).padding(4.9) // fails
The logging specifies that it has switched to brute force at 4.9, and then either fails with:
Or it returns 2 polygons (which does not make sense as this is perfectly convex polygon).
I have experienced the issue of the algorithm incorrectly returning 2 polygons instead of one with other point sets, but this was the simplest polygon yet that still ran into issues with the polygon.
Thank you!
The text was updated successfully, but these errors were encountered:
I have a relatively simple polygon shown in this plot:
It has slightly angled corners, but no self-intersection, concavity or other odd behavior. When I add padding of
4.8
it succeeds (and is now a simple polygon with 4 sides) but when this increase to4.9
or higher it fails. However, if I add4
padding and then add1
padding to the created polygon, it works and appears to correctly create a polygon with an effective padding of5
.Here is the code to reproduce:
The logging specifies that it has switched to brute force at 4.9, and then either fails with:
Or it returns 2 polygons (which does not make sense as this is perfectly convex polygon).
I have experienced the issue of the algorithm incorrectly returning 2 polygons instead of one with other point sets, but this was the simplest polygon yet that still ran into issues with the polygon.
Thank you!
The text was updated successfully, but these errors were encountered: