Opened 8 years ago

Closed 8 years ago

Last modified 7 years ago

#10747 closed Bugs (fixed)

Integer Intersection Error

Reported by: starinshak1@… Owned by: Barend Gehrels
Milestone: Boost 1.58.0 Component: geometry
Version: Boost 1.57.0 Severity: Problem
Keywords: Intersection, Integer Cc:

Description

I use boost.geometry to do arbitrary polygon-polygon intersections as part of a mesh generation tool. For robustness, I do all operations using int64_t coordinates.

Since upgrading from Boost 1.55.0 to 1.57.0, boost::geometry::intersection gives incorrect results.

A simple example involves intersecting a ring having coordinates (0, 33554432), (0, 0), (33554432, 0), (33554432, 33554432), (0, 33554432) with a polygon having coordinates (25165824, 25165824), (41943040, 25165824), (41943040, 41943040), (25165824, 41943040), (25165824, 25165824) The return type std::vector<BoostRingType> is empty.

Change History (3)

comment:1 by Barend Gehrels, 8 years ago

Status: newassigned

This is a rescaling problem. Will be fixed. Thanks for reporting and sorry for the inconvenience

comment:2 by Barend Gehrels, 8 years ago

Resolution: fixed
Status: assignedclosed

Fixed in 1.58 See this link if you want to patch: https://github.com/boostorg/geometry/commit/448040613d8a823201a3f48f89a5b2acf33bda11

You can, in your case, also define BOOST_GEOMETRY_NO_ROBUSTNESS, which avoids rescaling so avoids this bug

comment:3 by awulkiew, 7 years ago

Milestone: To Be DeterminedBoost 1.58.0
Note: See TracTickets for help on using tickets.