in reply to Merging Polygons

Assuming you're wanting to join two polygons that both share a common line i.e. two subsequent vertices of exactly the same points and not worry about intersecting polygons it would not be that hard to do.
A bit or pseudo-code on my thoughts...

# assuming polygon is 1-2-3-(4=1 implied) for a square #Get both shapes going in the same direction # to make things simpler later Order array of shape 1 so that its a clockwise closed shape Order array of shape 2 so that its a clockwise closed shape foreach line in shape 1 { foreach line in shape 2 { are line1 and line two the same { store which line this is. } } } splice into array of shape1 at point of common line all of shape 2 rem +oving the common line.

Regards Paul