Skip to Content.
Sympa Menu

cgal-discuss - [cgal-discuss] Issue on CGAL Polygon_2 Intersection

Subject: CGAL users discussion list

List archive

[cgal-discuss] Issue on CGAL Polygon_2 Intersection


Chronological Thread 
  • From: kyewong <>
  • To:
  • Subject: [cgal-discuss] Issue on CGAL Polygon_2 Intersection
  • Date: Thu, 6 Oct 2011 01:24:47 -0700 (PDT)

Hi, I've met an issue(probably a numerical issue) in CGAL::intersection.
When I let the data type of vertex coordinates of Polygon_2 to be "double",
and there may be more than 6 digits after the decimal point (eg,
2666.666748), calling CGAL::intersection would cause an error in the "sweep"
function in the Basic_sweep_line_2.h file.
However if I reduce the precision (eg, 2666.67), CGAL::intersection works
very well.
The kernel I use is CGAL::Cartesian<double>.
I'm wondering if it is caused by numerical issue of the "double" type. If
yes, how could I rapidly modify the kernal? Shall I use the
CGAL::Exact_predicates_exact_constructions_kernel or change "double" to
"float" ? Since my program relies on CGAL very much and is of relatively big
size, I would like to minimize the changes to related definitions of the
variables.
Could anyone help me please? Thanks very much!


--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/Issue-on-CGAL-Polygon-2-Intersection-tp3877407p3877407.html
Sent from the cgal-discuss mailing list archive at Nabble.com.



Archive powered by MHonArc 2.6.16.

Top of Page