Subject: Re: [Boost-bugs] [Boost C++ Libraries] #8652: boost::geometry::intersection fails for triangle-triangle intersection
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-08-27 20:57:06
#8652: boost::geometry::intersection fails for triangle-triangle intersection
-------------------------------+---------------------------
Reporter: flo@⦠| Owner: barendgehrels
Type: Bugs | Status: closed
Milestone: To Be Determined | Component: geometry
Version: Boost 1.53.0 | Severity: Problem
Resolution: fixed | Keywords:
-------------------------------+---------------------------
Changes (by barendgehrels):
* status: new => closed
* resolution: => fixed
Comment:
The boundaries of double are reached by using coordinates as specified.
This results in rounding errors and imprecise results.
The extra point which was generated is fixed in commit 85451 (will be
released in Boost 1.55).
The output was:
POLYGON((0.05 0.02,0.05 -2.77556e-17,0.02 -2.77556e-17,0.05 0.02))
Area: 0.0003
The new output is:
POLYGON((0.05 0.02,0.05 0,0.02 -2.77556e-17,0.05 0.02))
Area: 0.0003
So still not as your expectation but it comes close.
If you use "long double" (better suited for cases like this), the output
is correct:The computed intersection is:
POLYGON((0.05 0.02,0.05 0,0.02 0,0.05 0.02))
Area: 0.0003
(I changed output to WKT and added area in your testprogram).
I will add a testcase for this ticket to avoid future regressions.
SQL Server gives:
POLYGON ((0.019999999552965164 0, 0.049999999813735485 0,
0.049999999813735485 0.019999999552965164, 0.019999999552965164 0))
Area: 0.000299999995902181
I did not check your integer-sample, if that is a separate problem, please
create a separate ticket.
Thanks for your report.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/8652#comment:4> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:14 UTC