2

I would like to merge a polygon with a set of polygons with Boost.polygon.

Merge A, B and C

For example merging the polygon C to the set (A, B) from the above picture would give the following result:

Result

How can I do that?

I thought about adding each polygons to a polygon set (polygon_set_data), and perform a XOR and an AND operation between the polygon set and the polygon to add.

The problem is that when I want to retrieve the result of my polygon set, all overlapping polygon are merged, resulting in a single polygon.

Paul R
  • 208,748
  • 37
  • 389
  • 560
arthur.sw
  • 11,052
  • 9
  • 47
  • 104
  • 1
    I think `intersect_segments()` of the [segment concept](http://www.boost.org/doc/libs/1_54_0/libs/polygon/doc/gtl_segment_concept.htm) does what I want, although I would have to reconstruct the polygons myself. Is there a good way to reconstruct the polygons? – arthur.sw Dec 17 '15 at 15:42
  • 1
    I talk about polygons in [Boost.polygon](http://www.boost.org/doc/libs/1_59_0/libs/polygon/doc/index.htm). – arthur.sw Dec 17 '15 at 18:13

0 Answers0