Skip to Content.
Sympa Menu

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

Subject: CGAL users discussion list

List archive

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


Chronological Thread 
  • From: "Sebastien Loriot (GeometryFactory)" <>
  • To:
  • Subject: Re: [cgal-discuss] Issue on CGAL Polygon_2 Intersection
  • Date: Thu, 06 Oct 2011 10:39:23 +0200

See:

http://www.cgal.org/FAQ.html#inexact_NT

You should try with CGAL::Exact_predicates_exact_constructions_kernel.

Sebastien.


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