Boost logo

Boost Users :

Subject: Re: [Boost-users] Connect holes in polygon
From: Barend Gehrels (barend_at_[hidden])
Date: 2010-06-16 09:59:12


Hi Dan,

Macumber, Daniel wrote:
> Does anyone know how to use boost Polygon or boost GGL to take a convert a polygon with holes to a polygon with no holes? I am looking for functionality similar to this http://www.cgal.org/Manual/3.3/doc_html/cgal_manual/Boolean_set_operations_2_ref/Function_connect_holes.html. I have already found a way to extract trapezoids using boost Polygon but I was hoping there was a method more similar to connect_holes.
>
As also described on the GGL-mailing list:
> No, Boost.Geometry does not (yet) provide conversion from polygons
> with holes to so-called key-holed polygons as you describe. Normally
> this is necessary or useful for graphic user interfaces. The algorithm
> is not that difficult, visiting the outer polygon and after that the
> inner rings, while pushing the first point of the outer polygon
> between all inner rings, is normally enough. This can be done by
> normal iterators.

Regards, Barend


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net