Opened 8 years ago

Closed 8 years ago

#10636 closed Bugs (fixed)

Incorrect output from get_trapezoids(..., HORIZONTAL)

Reported by: "Patrick J. LoPresti" <lopresti@…> 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)

polytest.cc (1.8 KB ) - added by "Patrick J. LoPresti" <lopresti@…> 8 years ago.
Simple test case demonstrating get_trapezoids failure

Download all attachments as: .zip

Change History (5)

by "Patrick J. LoPresti" <lopresti@…>, 8 years ago

Attachment: polytest.cc added

Simple test case demonstrating get_trapezoids failure

comment:1 by "Patrick J. LoPresti" <lopresti@…>, 8 years ago

Version: Boost 1.54.0Boost 1.56.0

comment:2 by stefac30@…, 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 Andrii Sydorchuk, 8 years ago

Owner: changed from Lucanus Simonson to Andrii Sydorchuk

comment:4 by Andrii Sydorchuk, 8 years ago

Resolution: fixed
Status: newclosed
Version: Boost 1.56.0Boost 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.

Note: See TracTickets for help on using tickets.