Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Re: Error on Polygon_2 do_intersect method in CGAL 3.3

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Re: Error on Polygon_2 do_intersect method in CGAL 3.3


Chronological Thread 
  • From:
  • To:
  • Subject: Re: [cgal-discuss] Re: Error on Polygon_2 do_intersect method in CGAL 3.3
  • Date: Sun, 17 Apr 2011 13:33:22 +0300

Not only that the polygons must be valid, and this implies among the other that their boundaries must be counter clockwise, you should also use an exact-predicate and exact-construction kernel if you want to guarantee correct results. I've noticed that you fail to do this, and use 'double' number type instead. This last piece of information is repeatedly mentioned in the docs, lists, etc.

Quoting kyewong
<>:

Hi everyone, I think I've got the answer, though i still would like you guys
to confirm that.

I step into the "do_intersect" method when debugging and found that the two
2d polygons must be counter-clockwise before judging whether they intersect
or not.

So it should be compusory to make the two polygons CCW before using
""do_intersect"".

Unfortunately, i failed to find the related comments/explanation in the CGAL
document...

It is still welcome to confirm whether the answer is true such that we can
take care of it next time.

Thanks!

--
View this message in context: http://cgal-discuss.949826.n4.nabble.com/Error-on-Polygon-2-do-intersect-method-in-CGAL-3-3-tp3453700p3455194.html
Sent from the cgal-discuss mailing list archive at Nabble.com.

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://lists-sop.inria.fr/wws/info/cgal-discuss







Archive powered by MHonArc 2.6.16.

Top of Page