Opened 8 years ago
Closed 8 years ago
#10636 closed Bugs (fixed)
Incorrect output from get_trapezoids(..., HORIZONTAL)
| Reported by: | Owned by: | Andrii Sydorchuk | |
|---|---|---|---|
| Milestone: | To Be Determined | Component: | polygon |
| Version: | Boost 1.58.0 | Severity: | Problem |
| Keywords: | Cc: |
Description
The attached program uses boost::polygon to slice up a figure (with a "hole" cut out of it) into horizontal trapezoids. The output I get is: Output: polygon (4 3) (4 0) (0 0) (0 3) (4 3) ...which is clearly wrong. I am pretty sure my code is correct, because if I replace bg::HORIZONTAL with bg::VERTICAL, I get the correct output of a bunch of vertical trapezoids.
Attachments (1)
Change History (5)
by , 8 years ago
| Attachment: | polytest.cc added |
|---|
comment:1 by , 8 years ago
| Version: | Boost 1.54.0 → Boost 1.56.0 |
|---|
comment:2 by , 8 years ago
Hi,
I have got the same problem on my side. Is there any plan for a fix in a future release? Also, is there any workaround? Since the vertical behavior is not broken I was thinking to transform the input point array and call the get_trapezoids API in vertical on it... Not very smart but it should do the job :-).
Thanks, Stephane
comment:3 by , 8 years ago
| Owner: | changed from to |
|---|
comment:4 by , 8 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
| Version: | Boost 1.56.0 → Boost 1.58.0 |
Hi Patrick,
Thank you for your report. The issue was fixed as part of ticket #10976 . I added your example as another unittest. The fix was merged into master and develop branches and will be part of the Boost 1.58 release.

Simple test case demonstrating get_trapezoids failure