fabanc / pyvoronoi

Python wrapper for Boost voronoi diagram implementation.
27 stars 7 forks source link

Can pyvoronoi work with polygon? #14

Closed minmingzhao closed 5 years ago

minmingzhao commented 5 years ago

Can it works with polygon? Such as middle of the image below https://www.boost.org/doc/libs/1_68_0/libs/polygon/doc/images/voronoi3.png The voronoi vertices seems not correct. I put one segment as [[x0,y0],[x1,y1],[x2,y2],[x3,y3],..[xn,yn],[x0,y0]] Thanks!

fabanc commented 5 years ago

Hi Minming,

It does not work with polygon as such, but it is possible to break down the polygons into simple lines (only two nodes), and send them to the Voronoi library. Does it work if you try that?

minmingzhao commented 5 years ago

Hi Fabanc, Actually it works. I should have tried that before posting. :)