Opened 5 years ago

Closed 5 years ago

#8254 closed Bugs (fixed)

Faulty intersection calculation

Reported by: sascha.knell@… Owned by: Barend Gehrels
Milestone: To Be Determined Component: geometry
Version: Boost 1.53.0 Severity: Showstopper
Keywords: Cc:


I encountered a (supposed) bug in the boost::geometry::intersection functionality.

The calculation of the intersection of a tiny triangle lying in a considerably bigger trapezoid where one edge of the triangle lies (within floating point precision) on one edge of the trapezoid results in an intersection which consists of the original trapezoid with one additional node on one of its sides.

The geometry is given in a C test routine attached to this ticked. The actual call of the intersection functionality is conducted in a C++ wrapper routine, which is also attached. The bug occurred on Mountain Lion with the llvm-gcc-4.2 compiler.

Attachments (1) (2.1 KB) - added by anonymous 5 years ago.

Download all attachments as: .zip

Change History (3)

Changed 5 years ago by anonymous

Attachment: added

comment:1 Changed 5 years ago by Barend Gehrels

I reproduce this. Using MSVC the output is correct, according to the input. Using gcc (I'm using 4.4.5) I get similar output as you give.

I will have a closer look, but I will have to debug differently because it's not occuring in MSVC.

comment:2 Changed 5 years ago by Barend Gehrels

Resolution: fixed
Status: newclosed

Fixed. The underlying sections (used for performance) were too small in rare cases. Made them a tiny bit larger, such that intersections are not missed by this. By change this was also necessary for one of my own testcases, for multi-point buffers.

Fixed in trunk, will be released in Boost 1.54

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Barend Gehrels.
The resolution will be deleted.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.