Boost C++ Libraries: Ticket #10843: polygon / voronoi: points on line segments yield errors https://svn.boost.org/trac10/ticket/10843 <p> <a href="http://www.boost.org/doc/libs/1_57_0/libs/polygon/doc/voronoi_main.htm">http://www.boost.org/doc/libs/1_57_0/libs/polygon/doc/voronoi_main.htm</a> says: "input segments should not overlap except their endpoints" </p> <p> 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: </p> <ul><li>One point, at (1, 0) </li><li>One line segment, from (0, 0) to (2, 0) </li></ul><p> The output has only one vertex, with invalid x and y coordinates. </p> <p> Fortunately, I can easily work around the issue: </p> <ul><li>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. </li><li>Since intersect_segments discards zero-length segments, I still pass the points separately, as I did before. </li></ul><p> Could you please either update the documentation or resolve the issue otherwise? </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/10843 Trac 1.4.3 Andrii Sydorchuk Wed, 17 Dec 2014 20:35:54 GMT owner, version changed https://svn.boost.org/trac10/ticket/10843#comment:1 https://svn.boost.org/trac10/ticket/10843#comment:1 <ul> <li><strong>owner</strong> changed from <span class="trac-author">Lucanus Simonson</span> to <span class="trac-author">Andrii Sydorchuk</span> </li> <li><strong>version</strong> <span class="trac-field-old">Boost 1.57.0</span> → <span class="trac-field-new">Boost 1.58.0</span> </li> </ul> <p> Hi Maik, </p> <p> Thank you for the report! </p> <p> You are right, the documentation is not complete. Input geometries should not intersect except their endpoints. I updated the docs in the development branch and they should be merged in 1.58 release. </p> Ticket Andrii Sydorchuk Wed, 17 Dec 2014 20:48:20 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/10843#comment:2 https://svn.boost.org/trac10/ticket/10843#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> The change was merged to the master branch. You can either start using new documentation from the github repo: <a class="ext-link" href="https://github.com/boostorg/polygon"><span class="icon">​</span>https://github.com/boostorg/polygon</a> or wait for the Boost 1.58 release. </p> Ticket