boostorg / polygon

Boost.org polygon module
http://boost.org/libs/polygon
57 stars 70 forks source link

boost::polygon::detail::resize() gives wrong result when expanding a shape #69

Closed Elmi77 closed 3 years ago

Elmi77 commented 3 years ago

I have some polygons which are expanded by using function boost::polygon::detail::resize(). What I would expect to get is a result where the new outline of the shape is bigger than the old one and ecause of that never touches the new one:

https://i.ibb.co/BqDKGtd/clip-ok.png

Here the green oultine is the original while the yellow one is the expected result.

But what I get when I use the related boost function via a call to

boost::polygon::polygon_set_data<int> result; result.resize();

is something like that:

https://i.ibb.co/ftPNTCV/clip-boost.png

As one can see, the expanded shape follows the original one way too much and therefore results in a new shape, which overlaps the old one at some points.

Elmi77 commented 3 years ago

Duplicate of https://github.com/boostorg/polygon/issues/70