Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Polygon Set Symmetric Difference gives wrong results

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Polygon Set Symmetric Difference gives wrong results


Chronological Thread 
  • From: Efi Fogel <>
  • To:
  • Subject: Re: [cgal-discuss] Polygon Set Symmetric Difference gives wrong results
  • Date: Sat, 25 Aug 2007 20:28:34 +0200

This is intentional. The operation performed is regularized. That is, the result is the closure of the non-regularized operation. So in your words you may think of the vertices of the hole in the resulting polygon as being "epsilon" distance from the outer boundary.


wrote:
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.

--
____ _ ____ _
/_____/_) o /__________ __ //
(____ ( ( ( (_/ (_/-(-'_(/
_/





Archive powered by MHonArc 2.6.16.

Top of Page