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.

Lei



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net