Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#10049 closed Bugs (duplicate)

Error in polygon set shrink

Reported by: Jakob Schou Jensen <jakob.schou.jensen@…> Owned by: Andrii Sydorchuk
Milestone: To Be Determined Component: polygon
Version: Boost 1.55.0 Severity: Problem
Keywords: Cc:

Description

I have a case where shrinking a four vertex polygon (polygon set) gives a wrong result. The input vertices are

(4000, 0)
(2500, 500)
(0, 3000)
(0, 0)

This is shrunken by an amount of 1000. The result should be a triangle but it is not. See attached image where the input polygon is red and the result is green.

Attachments (2)

shrink.png (10.2 KB ) - added by Jakob Schou Jensen <jakob.schou.jensen@…> 8 years ago.
red=input, green=result (shrink by 1000)
shrink.cpp (802 bytes ) - added by Jakob Schou Jensen <jakob.schou.jensen@…> 8 years ago.

Download all attachments as: .zip

Change History (11)

by Jakob Schou Jensen <jakob.schou.jensen@…>, 8 years ago

Attachment: shrink.png added

red=input, green=result (shrink by 1000)

by Jakob Schou Jensen <jakob.schou.jensen@…>, 8 years ago

Attachment: shrink.cpp added

comment:1 by Jakob Schou Jensen <jakob.schou.jensen@…>, 8 years ago

I compile the attached code with:

clang++ -I <path to boost>/boost_1_55_0 -std=c++11 shrink.cpp

on mac osx maverics.

comment:2 by Jakob Schou Jensen <jakob.schou.jensen@…>, 8 years ago

Correction: The attach example should not give a triangle as the shrink result - rather an empty result. However, reducing the shrink to 750 instead of should give a triangle but it produces a result similar to the attached image. Both cases are wrong (unless I am violating some input constraint that I am unaware of).

comment:3 by Andrii Sydorchuk, 8 years ago

Owner: changed from Lucanus Simonson to Andrii Sydorchuk

comment:4 by Andrii Sydorchuk, 8 years ago

Hi Jakob,

Thank you for your report and the attached image. I am going to investigate the issue.

comment:5 by Andrii Sydorchuk, 8 years ago

Resolution: duplicate
Status: newclosed

Jakob,

The resizing (bloat, shrink) operation implementation is seriously broken. This is a known issue and am going to mark this as duplicate of "Ticket #6063". There is no explicit timeline for the issue to be fixed at the moment.

comment:6 by Jakob Schou Jensen <jakob.schou.jensen@…>, 8 years ago

If these functions are known to be "seriously broken" would it not be better to remove them? Or mention the issue in the documentation?

comment:7 by Jakob Schou Jensen <jakob.schou.jensen@…>, 8 years ago

(by the way boost::polygon is extremely cool and amazing!)

comment:8 by Andrii Sydorchuk, 8 years ago

Thanks!

comment:9 by Andrii Sydorchuk, 8 years ago

I will update documentation accordingly.

Note: See TracTickets for help on using tickets.