Skip to Content.
Sympa Menu

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

Subject: CGAL users discussion list

List archive

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


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

Thanks Seb.
However, using CGAL::Exact_predicates_exact_constructions_kernel would require me to add CGAL::to_double when converting a "double" type data to a corresponding data type in cgal data types, which is mentioned in https://lists-sop.inria.fr/sympa/arc/cgal-discuss/2009-05/msg00165.html.
That way, I'll have to do a lot of modifications to my project...Is there any other smart way to avoid the problem please? Thanks!

On Thu, Oct 6, 2011 at 4:39 PM, Sebastien Loriot (GeometryFactory) [via cgal-discuss] <[hidden email]> wrote:
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.
>


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




If you reply to this email, your message will be added to the discussion below:
http://cgal-discuss.949826.n4.nabble.com/Issue-on-CGAL-Polygon-2-Intersection-tp3877407p3877441.html
To unsubscribe from Issue on CGAL Polygon_2 Intersection, click here.



--
Kai WANG



View this message in context: Re: Issue on CGAL Polygon_2 Intersection
Sent from the cgal-discuss mailing list archive at Nabble.com.



Archive powered by MHonArc 2.6.16.

Top of Page