From 24fddebe8c1a8016e1a7ebf9f8a1fdf0281c3c19 Mon Sep 17 00:00:00 2001 From: Barend Gehrels Date: Mon, 9 Dec 2013 22:02:46 +0100 Subject: [PATCH] [geometry] handle unhandled iu/iu case --- .../algorithms/detail/overlay/handle_tangencies.hpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/include/boost/geometry/algorithms/detail/overlay/handle_tangencies.hpp b/include/boost/geometry/algorithms/detail/overlay/handle_tangencies.hpp index af8e98556..7e73701a7 100644 --- a/include/boost/geometry/algorithms/detail/overlay/handle_tangencies.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/handle_tangencies.hpp @@ -311,7 +311,7 @@ private : inline bool consider_iu_iu(Indexed const& left, Indexed const& right, - std::string const& header) const + std::string const& header, bool redo = false) const { //debug_consider(0, left, right, header); @@ -419,6 +419,13 @@ private : std::cout << " iu/iu unhandled" << std::endl; debug_consider(0, left, right, header, false, "unhandled", left.index < right.index); #endif + if (! redo) + { + // In some cases behaviour is not symmetrical. TODO: fix this properly + // OR: alternatively we might consider calling all these functions one-way anyway + return ! consider_iu_iu(right, left, header, true); + } + return left.index < right.index; }