Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Help needed

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Help needed


Chronological Thread 
  • From: Efi Fogel <>
  • To:
  • Subject: Re: [cgal-discuss] Help needed
  • Date: Sat, 2 Apr 2016 11:02:21 +0300
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=Pass ; spf=None
  • Ironport-phdr: 9a23:JagPmRA/62gNlHzs4vstUyQJP3N1i/DPJgcQr6AfoPdwSP74oMbcNUDSrc9gkEXOFd2CrakU26yN6Ou5AzBIyK3CmU5BWaQEbwUCh8QSkl5oK+++Imq/EsTXaTcnFt9JTl5v8iLzG0FUHMHjew+a+SXqvnYsExnyfTB4Ov7yUtaLyZ/nh6bpoNaKOVkArQH+SI0xBS3+lR/WuMgSjNkqAYcK4TyNnEF1ff9Lz3hjP1OZkkW0zM6x+Jl+73YY4Kp5pIYTGZn9Kq83RLgdADU9OH0u/+XqswPCRE2B/CgySGITxzdGAkDr6x73Wt+lvyX7uO1y1S2yMsj/TLRyUjOnufQ4ACT0gTsKYmZquFrcjdZ92fpW

There is no equality operator for Polygon_with_holes_2 nor General_polygon_with_holes_2.
However, you can compute their symmetric difference.

If you care about performance, you can compare the outer boundaries (if exists); then, obtain, say the left vertex of every hole of both polygons with holes and place them in two sequences, sort, and compare, respectively.

If you care a lot about performance, you can precede the full comparisons with comparisons of the bounding boxes.

Notice, that Polygon_2 though has an equality ('=='), left(), and bbox() operators.

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



On Fri, Apr 1, 2016 at 3:21 AM, Bulls Eye <> wrote:

How to check for equality of two polygons with holes in CGAL?


I am completely new to the CGAL. I am sure there is something in the library that I could use to compare two polygons with holes but I couldn`t find any. Please help with how should I proceed with it. Also, is there any demo available online or any source, I can read.

Thanks.




Archive powered by MHonArc 2.6.18.

Top of Page