Subject: [Boost-bugs] [Boost C++ Libraries] #10843: polygon / voronoi: points on line segments yield errors
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-12-03 13:59:44
#10843: polygon / voronoi: points on line segments yield errors
------------------------------+----------------------
Reporter: maik.nijhuis@⦠| Owner: ljsimons
Type: Bugs | Status: new
Milestone: To Be Determined | Component: polygon
Version: Boost 1.57.0 | Severity: Problem
Keywords: |
------------------------------+----------------------
http://www.boost.org/doc/libs/1_57_0/libs/polygon/doc/voronoi_main.htm
says:
"input segments should not overlap except their endpoints"
Their is no restriction on input *points*, though, so I conclude that
points may lie on line segments. However, construct_voronoi fails with the
following input:
- One point, at (1, 0)
- One line segment, from (0, 0) to (2, 0)
The output has only one vertex, with invalid x and y coordinates.
Fortunately, I can easily work around the issue:
- Before calling construct_voronoi, I was already using intersect_segments
for creating proper input segments. When I add the points as zero-length
segments in the input for intersect_segments, intersect_segments will cut
segments when there is a point at the segment.
- Since intersect_segments discards zero-length segments, I still pass the
points separately, as I did before.
Could you please either update the documentation or resolve the issue
otherwise?
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/10843> 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:17 UTC