dabreegster / polygon-width

https://dabreegster.github.io/polygon-width/
Apache License 2.0
2 stars 0 forks source link

Perpendicular lines missing on thick polygons #1

Open dabreegster opened 3 months ago

dabreegster commented 3 months ago

image It's due to https://github.com/dabreegster/polygon-width/blob/251633663e4523c3b121ab235b9fffb5c33134f2/widths/src/lib.rs#L105. When the polygon is farther than 10m from the center line, the perpendicular line doesn't reach. I amped up this value but then hit problems in https://github.com/dabreegster/polygon-width/blob/251633663e4523c3b121ab235b9fffb5c33134f2/widths/src/lib.rs#L143; on some of the test inputs, a very long perpendicular line will intersect the input polygon in more than 2 places. Need to find the two hits closest to the original point on the center line

dabreegster commented 3 months ago

Just noting some issues with the incoming fix image image