Boost logo

Boost Users :

Subject: Re: [Boost-users] [Boost.Polygon] support for polygons with holes
From: Simonson, Lucanus J (lucanus.j.simonson_at_[hidden])
Date: 2011-09-02 14:40:40


Bjorn,

All functionality is supported for the polygon_with_holes concept. I consider it to be the normal case. All you need to do is create a list or vector of polygon_with_holes_data<int> and use that instead of polygon_data<int> when you get the result out of polygon_set p.

Regards,
Luke
________________________________

From: boost-users-bounces_at_[hidden] [mailto:boost-users-bounces_at_[hidden]] On Behalf Of Björn Piltz
Sent: Friday, September 02, 2011 1:39 AM
To: boost-users_at_[hidden]
Subject: [Boost-users] [Boost.Polygon] support for polygons with holes

I'm playing around with Boost.Polygon and I'm wondering what functionality is supported for the polygon_with_holes concept. Specifically the boolean operators.

For example, can I create a polygon_set with polygon_with_holes.
I would like to punch a hole in a polygon and get a polygon with a hole as supposed to a key holed contour. Similarily, when combining the following rectangles:

p += rectangle_data<int>(0, 0, 100, 10);
p += rectangle_data<int>(90, 0, 100, 100);
p += rectangle_data<int>(0, 90, 100, 100);
p += rectangle_data<int>(0, 0, 10, 100);

I would like to end up with
+-----+
| |
| +-+ |
| | | |
| +-+ |
| |
+-----+
as opposed to
+-----+
| |
| +-+ |
| | | |
| +-+ |
| | |
+---+-+


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