Boost logo

Boost Users :

Subject: [Boost-users] Help needed for boost polygon get trapezoid
From: Lei Yin (leoyin_at_[hidden])
Date: 2016-11-15 13:14:14

Hello all,

I recently moved to use boost.polygon for doing non-manhattan shape boolean operation, and I'm using get_trapezoids() function to convert output polygons to trapezoids. There're two problems I'm facing and couldn't overcome:

  1. Somehow boost.polygon not always give me the largest polygon as possible. In the result, frequently I saw there are two trapezoids are neighboring each other, and they can be perfectly combined into one big trapezoid, but for some reason, boost.polygon give me separated two instead of one.
  2. It maybe due to floating point snapping issue (I'm operating on integer base), for some special cases, I got very slim trapezoid like 1 db unit in width. Preferably, this trapezoid

Any suggestion to solve above issues would be much appreciated!

Thanks in advance.


Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at