boostorg/geometry — pull request #152 by awulkiew (2014-10-01 16:51:44+00:00)
Title: Fix/convex hull

This PR fixes the number of Points outputted for open OutputGeometry when the output is valid Polygon (https://svn.boost.org/trac/boost/ticket/10562).

Unfortunately the ConvexHullStrategy Concept was modified in the process. The Strategy must somehow know not only about the order but also about the closure of the Output. For now I just added additional run-time parameter to the `Strategy`'s `result()` method because there was already `clockwise` parameter used the same way.

Since the Concept was changed maybe we could go further and modify it even more. E.g. why the algorithm is divided into the `apply()` and `result()` methods, plus some external state? Wouldn't it be more clear if just one method `apply()` was required?

I'm also wondering, wouldn't it be better to get rid of the `convex_hull_insert()` function which is not used anywhere internally nor officially released?

This would make simple another thing which could be done. The `OutputGeometry` could be directly passed into the `strategy::apply()`. Then the strategy could just internally check the order and closure. Keeping the support for non-Geometry parameters like output iterators could still be possible. This however complicates the Strategy as it moves the closure/order logic from the algorithm into the Strategy.

I'm open to other suggestions.