Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Unexpected Polygon_2 do_intersect() Behavior?

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Unexpected Polygon_2 do_intersect() Behavior?


Chronological Thread 
  • From: Efi Fogel <>
  • To:
  • Subject: Re: [cgal-discuss] Unexpected Polygon_2 do_intersect() Behavior?
  • Date: Mon, 12 Sep 2016 13:00:29 +0300
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=Pass ; spf=None
  • Ironport-phdr: 9a23:BocYex33yb2FNdHCsmDT+DRfVm0co7zxezQtwd8ZsegTKfad9pjvdHbS+e9qxAeQG96KsrQa26GP7OigATVGusfZ9ihaMdRlbFwssY0uhQsuAcqIWwXQDcXBSGgEJvlET0Jv5HqhMEJYS47UblzWpWCuv3ZJQk2sfTR8Kum9IIPOlcP/j7n0oMyKJVsYz2PiKfMqdVPt/F2X7pFXyaJZaY8JgiPTpXVJf+kEjUhJHnm02yjG28Gr4ZR4+D5Rsf9yv+RJUKH9YrhqBecAVGduYCgJ45jguhDHCAeO/XABSX4+kxxSAgGD4gupcI32t37XuOs19i6VMMm+Gb06WDql4KpvYBDtgSYDcTU+9TeE2YRLkKtHrUf59FREyInObdTNOQ==

It would easier if you just send the code and the input polygon.
This way we can quickly try to reproduce the problem.

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



On Mon, Sep 12, 2016 at 1:03 AM, Christopher Mitchell <> wrote:
Thanks for the quick response. The code is sufficiently trivial (ie, a single if (CGAL::do_intersect(poly1, poly2)) { ... }) that I'm not sure it would help. I'm using a simple loop to convert a set of non-CGAL points into a Polygon_2, making sure to not duplicate the starting point, as you can see from the image attached to the first post. My polygons are CGAL::Polygon_2<CGAL_Kernel>, where CGAL_Kernel is CGAL::Exact_predicates_inexact_constructions_kernel. I hope this helps. Thanks!

On Sat, Sep 10, 2016 at 6:25 PM, Efi Fogel <> wrote:

What number type are you using?  Better yet, could you share the code?


On Sep 10, 2016 18:31, "Christopher Mitchell" <> wrote:
I'm attempting to determine if two Polygon_2s overlap in anyway, ie, share any portion of their interiors, including one being entirely contained by the other. In most cases this works, but for a few polygon pairs, do_intersect() returns false unexpectedly. I make sure (1) all polygons are simple (2) all polygons are not oriented CGAL::CLOCKWISE (I call .reverse_orientation() on the polys if they are CGAL::CLOCKWISE), and (3) that the starting vertex is not duplicated. I have attached an example of a polygon pair for which do_intersect() returns false. Thanks in advance for any insight; I'd be happy to provide additional information as necessary.





Archive powered by MHonArc 2.6.18.

Top of Page