|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r80993 - trunk/boost/geometry/algorithms/detail/overlay
From: barend.gehrels_at_[hidden]
Date: 2012-10-15 17:12:26
Author: barendgehrels
Date: 2012-10-15 17:12:25 EDT (Mon, 15 Oct 2012)
New Revision: 80993
URL: http://svn.boost.org/trac/boost/changeset/80993
Log:
[geometry] Bugfix: difference problem reported by H2 at Boost.Geometry list at 2012-09-14 and 2012-10-11
Text files modified:
trunk/boost/geometry/algorithms/detail/overlay/handle_tangencies.hpp | 33 ++++++++++++++++++++++++++++++++-
1 files changed, 32 insertions(+), 1 deletions(-)
Modified: trunk/boost/geometry/algorithms/detail/overlay/handle_tangencies.hpp
==============================================================================
--- trunk/boost/geometry/algorithms/detail/overlay/handle_tangencies.hpp (original)
+++ trunk/boost/geometry/algorithms/detail/overlay/handle_tangencies.hpp 2012-10-15 17:12:25 EDT (Mon, 15 Oct 2012)
@@ -252,6 +252,32 @@
: order == 1;
}
+ inline bool consider_ix_ix(Indexed const& left, Indexed const& right
+ , std::string const& // header
+ ) const
+ {
+ // Take first intersection, then blocked.
+ if (left.subject.operation == operation_intersection
+ && right.subject.operation == operation_blocked)
+ {
+ return true;
+ }
+ else if (left.subject.operation == operation_blocked
+ && right.subject.operation == operation_intersection)
+ {
+ return false;
+ }
+
+ // Default case, should not occur
+
+#ifdef BOOST_GEOMETRY_DEBUG_ENRICH
+ std::cout << "ix/ix unhandled" << std::endl;
+#endif
+ //debug_consider(0, left, right, header, false, "-> return", ret);
+
+ return left.index < right.index;
+ }
+
inline bool consider_iu_iu(Indexed const& left, Indexed const& right,
std::string const& header) const
@@ -446,6 +472,11 @@
{
return consider_iu_iu(left, right, "iu/iu");
}
+ else if (m_turn_points[left.index].combination(operation_intersection, operation_blocked)
+ && m_turn_points[right.index].combination(operation_intersection, operation_blocked))
+ {
+ return consider_ix_ix(left, right, "ix/ix");
+ }
else if (m_turn_points[left.index].both(operation_intersection)
&& m_turn_points[right.index].both(operation_intersection))
{
@@ -493,7 +524,7 @@
<< "/" << operation_char(m_turn_points[right.index].operations[0].operation)
<< operation_char(m_turn_points[right.index].operations[1].operation)
<< " " << " Take " << left.index << " < " << right.index
- << std::cout;
+ << std::endl;
#endif
return default_order;
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk