clipperlib

Clipper Library Union Function Error


I am trying to perform "Union" of two polygons in Clipper Library. The problem is there is a 2mm gap between the two closest egdes of the two polygons. So the result is still two polygons. Is there a way to remove gap between polygons if it is less than, say, 5mm?

Thanks in advance.


Solution

  • Before performing Union, I offsetted all the polygons by 5 and then again by -5. After this, the Union function worked correctly, even for polygons with gaps between them. I got what I needed, but does anyone know the reason for this?