Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r76780 - in trunk/boost/geometry/extensions: algorithms/buffer strategies
From: barend.gehrels_at_[hidden]
Date: 2012-01-29 16:26:21


Author: barendgehrels
Date: 2012-01-29 16:26:20 EST (Sun, 29 Jan 2012)
New Revision: 76780
URL: http://svn.boost.org/trac/boost/changeset/76780

Log:
Now correctly select starting/end point and middle-point-of-round
Text files modified:
   trunk/boost/geometry/extensions/algorithms/buffer/range_buffer.hpp | 25 ++++++++++---------------
   trunk/boost/geometry/extensions/strategies/buffer.hpp | 1 +
   2 files changed, 11 insertions(+), 15 deletions(-)

Modified: trunk/boost/geometry/extensions/algorithms/buffer/range_buffer.hpp
==============================================================================
--- trunk/boost/geometry/extensions/algorithms/buffer/range_buffer.hpp (original)
+++ trunk/boost/geometry/extensions/algorithms/buffer/range_buffer.hpp 2012-01-29 16:26:20 EST (Sun, 29 Jan 2012)
@@ -135,11 +135,11 @@
 
 #ifdef BOOST_GEOMETRY_DEBUG_WITH_MAPPER
                         {
- mapper.map(p, "fill:rgb(0,0,0);", 3);
+ //mapper.map(p, "fill:rgb(0,0,0);", 3);
 
- std::ostringstream out;
- out << index++;
- mapper.text(p, out.str(), "fill:rgb(0,0,0);font-family='Arial';", 5, 5);
+ //std::ostringstream out;
+ //out << index++;
+ //mapper.text(p, out.str(), "fill:rgb(0,0,0);font-family='Arial';", 5, 5);
                         }
 #endif
                     }
@@ -150,11 +150,7 @@
                     first_p1 = p1;
                     first_p2 = p2;
 
- // Might be replaced by specialization
- if(boost::is_same<Tag, linestring_tag>::value)
- {
- appender.append(p1);
- }
+ appender.append(p1);
                 }
 
                 previous_p1 = p1;
@@ -180,15 +176,14 @@
                 distance.apply(*(end - 1), *begin, side),
                 appender);
 
- // Close the generated buffer (NOT FOR OPEN POLYGONS - TODO)
- appender.append(first_p1);
+ // Buffer is closed automatically by last closing corner (NOT FOR OPEN POLYGONS - TODO)
 
 #ifdef BOOST_GEOMETRY_DEBUG_WITH_MAPPER
             {
- mapper.map(p, "fill:rgb(0,0,0);", 3);
- std::ostringstream out;
- out << index++;
- mapper.text(p, out.str(), "fill:rgb(0,0,0);font-family='Arial';", 5, 5);
+ //mapper.map(p, "fill:rgb(0,0,0);", 3);
+ //std::ostringstream out;
+ //out << index++;
+ //mapper.text(p, out.str(), "fill:rgb(0,0,0);font-family='Arial';", 5, 5);
             }
 #endif
         }

Modified: trunk/boost/geometry/extensions/strategies/buffer.hpp
==============================================================================
--- trunk/boost/geometry/extensions/strategies/buffer.hpp (original)
+++ trunk/boost/geometry/extensions/strategies/buffer.hpp 2012-01-29 16:26:20 EST (Sun, 29 Jan 2012)
@@ -334,6 +334,7 @@
             else
             {
                 mid_points(vertex, perp1, bp, bd, appender);
+ appender.append(bp);
                 mid_points(vertex, bp, perp2, bd, appender);
             }
             appender.append_end_join(perp2);


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