Subject: CGAL users discussion list
List archive
- From: Monique Teillaud <>
- To:
- Subject: Re: [cgal-discuss] Converting data under one kernel to another
- Date: Fri, 10 Oct 2008 12:06:05 +0200
Hi Amit
I let experts of Arrangement_2 answer about the segment type of the arrangement traits, I focus on your last question:
I face the same problem whenever I want to convert points from one kernel to another like *Exact_predicates_inexact_**constructions_kernel::Point_2 to Exact_circular_kernel_2::**Point_2*. I have to go all the way down upto the x,y coordinate level. And then you are bound to lose the precision then, isnt it? Am I missing something here?
The circular kernel derives from and extends the CGAL Cartesian Kernel. The Point_2 of Circular_kernel_2 is taken from the base cartesian kernel, it is exactly the _same_ point type, so you can use all the functionality of the Cartesian kernel on the Circular_kernel_2::Point_2.
Actually things are a little bit more complicated for Exact_circular_kernel_2 and Exact_predicates_inexact_constructions_kernel than this simplified presentation, because both are using some additional filtering to speed up computations on their objects.
See the CircularKernel concept in the ref manual
http://www.cgal.org/Manual/3.3/doc_html/cgal_manual/Circular_kernel_2_ref/Concept_CircularKernel.html#Cross_link_anchor_444
CircularKernel::Point_2 Model of Kernel::Point_2.
But note that in any case the functionality of the Cartesian kernel will _not_ work on Exact_circular_kernel_2::Circular_arc_point_2 because these points have different coordinate types. You can use only the functionality provided by the circular kernel on this type of points. And if you really want to "convert" them into Point_2, you will get only an approximation.
best
Monique Teillaud
- [cgal-discuss] Converting data under one kernel to another, Amit Pendharkar, 10/10/2008
- Re: [cgal-discuss] Converting data under one kernel to another, Monique Teillaud, 10/10/2008
Archive powered by MHonArc 2.6.16.