#10747 closed Bugs (fixed)
Integer Intersection Error
| Reported by: | 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 , 8 years ago
| Status: | new → assigned |
|---|
comment:2 by , 8 years ago
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |
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 , 7 years ago
| Milestone: | To Be Determined → Boost 1.58.0 |
|---|

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