Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r76436 - in trunk: boost/geometry/algorithms/detail/overlay libs/geometry/test/algorithms/overlay
From: barend.gehrels_at_[hidden]
Date: 2012-01-12 13:59:09


Author: barendgehrels
Date: 2012-01-12 13:59:08 EST (Thu, 12 Jan 2012)
New Revision: 76436
URL: http://svn.boost.org/trac/boost/changeset/76436

Log:
Fixes w.r.t. self_intersection_points
Text files modified:
   trunk/boost/geometry/algorithms/detail/overlay/self_turn_points.hpp | 16 ++++++++++++++++
   trunk/libs/geometry/test/algorithms/overlay/ccw_traverse.cpp | 1 +
   trunk/libs/geometry/test/algorithms/overlay/self_intersection_points.cpp | 10 ++++++----
   3 files changed, 23 insertions(+), 4 deletions(-)

Modified: trunk/boost/geometry/algorithms/detail/overlay/self_turn_points.hpp
==============================================================================
--- trunk/boost/geometry/algorithms/detail/overlay/self_turn_points.hpp (original)
+++ trunk/boost/geometry/algorithms/detail/overlay/self_turn_points.hpp 2012-01-12 13:59:08 EST (Thu, 12 Jan 2012)
@@ -32,6 +32,22 @@
 namespace detail { namespace self_get_turn_points
 {
 
+struct no_interrupt_policy
+{
+ static bool const enabled = false;
+ static bool const has_intersections = false;
+
+
+ template <typename Range>
+ static inline bool apply(Range const&)
+ {
+ return false;
+ }
+};
+
+
+
+
 class self_ip_exception : public geometry::exception {};
 
 template

Modified: trunk/libs/geometry/test/algorithms/overlay/ccw_traverse.cpp
==============================================================================
--- trunk/libs/geometry/test/algorithms/overlay/ccw_traverse.cpp (original)
+++ trunk/libs/geometry/test/algorithms/overlay/ccw_traverse.cpp 2012-01-12 13:59:08 EST (Thu, 12 Jan 2012)
@@ -17,6 +17,7 @@
 
 #include <boost/geometry/geometry.hpp>
 #include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/polygon.hpp>
 #include <boost/geometry/io/wkt/wkt.hpp>
 
 #if defined(TEST_WITH_SVG)

Modified: trunk/libs/geometry/test/algorithms/overlay/self_intersection_points.cpp
==============================================================================
--- trunk/libs/geometry/test/algorithms/overlay/self_intersection_points.cpp (original)
+++ trunk/libs/geometry/test/algorithms/overlay/self_intersection_points.cpp 2012-01-12 13:59:08 EST (Thu, 12 Jan 2012)
@@ -25,12 +25,14 @@
 #include <boost/geometry/algorithms/detail/overlay/self_turn_points.hpp>
 
 #include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/polygon.hpp>
 
 #include <boost/geometry/strategies/strategies.hpp>
 
 #include <boost/geometry/io/wkt/read.hpp>
 #include <boost/geometry/io/wkt/write.hpp>
 
+#include <algorithms/overlay/overlay_cases.hpp>
 
 
 #if defined(TEST_WITH_SVG)
@@ -54,7 +56,7 @@
 
         ///bg::get_intersection_points(geometry, turns);
 
- bg::detail::get_turns::no_interrupt_policy policy;
+ bg::detail::self_get_turn_points::no_interrupt_policy policy;
         bg::self_turns
             <
                 bg::detail::overlay::assign_null_policy
@@ -190,18 +192,18 @@
 
     // Hole: interior tangent to exterior
 
- test_self_overlay<polygon>("h1", boost::make_tuple(2, 2, 4),
+ test_self_overlay<polygon>("h1", boost::make_tuple(1, 2, 4),
             "POLYGON((0 0,0 4,4 4,4 0,0 0),(1 2,2 4,3 2,1 2))");
 
 
     // Hole: interior intersecting exterior
 
- test_self_overlay<polygon>("h2", boost::make_tuple(4, 4, 3.5),
+ test_self_overlay<polygon>("h2", boost::make_tuple(2, 4, 3.5),
             "POLYGON((0 0,0 4,4 4,4 0,0 0),(1 1,1 3,5 4,1 1))");
 
 
     // Hole: two intersecting holes
- test_self_overlay<polygon>("h3", boost::make_tuple(4, 2.5, 2.5),
+ test_self_overlay<polygon>("h3", boost::make_tuple(2, 2.5, 2.5),
             "POLYGON((0 0,0 4,4 4,4 0,0 0),(1 1,1 3,3 3,3 1,1 1),(2 2,2 3.5,3.5 3.5,3.5 2,2 2))");
 
     // Hole: self-intersecting hole


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