Skip to Content.
Sympa Menu

cgal-discuss - Polygon Set Symmetric Difference gives wrong results

Subject: CGAL users discussion list

List archive

Polygon Set Symmetric Difference gives wrong results


Chronological Thread 
  • From:
  • To:
  • Subject: Polygon Set Symmetric Difference gives wrong results
  • Date: Sat, 25 Aug 2007 18:49:49 +0200

Hello,

CGAL symmetric difference seems to give wrong results on this input:

polygon 1: (axis aligned square)

0 0
10 0
10 10
0 10

Polygon 2: (45 degrees aligned square that touches the edges of polygon 1)

5 0
10 5
5 10
0 5

The proper symmetric difference is four triangles, but the result given by
the symmetric_difference() operation gives polygon 1 as the outer boundary,
and polygon 2 as its inner holes, as if there is an "epsilon" difference
between the vertices of polygon 2 and the edges of polygon 1. Am I doing it
wrong, or is this intentional?

Thanks in advance,
Amir Vaxman.



Archive powered by MHonArc 2.6.16.

Top of Page