Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Circular Arrangements inexact?

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Circular Arrangements inexact?


Chronological Thread 
  • From: Monique Teillaud <>
  • To:
  • Subject: Re: [cgal-discuss] Circular Arrangements inexact?
  • Date: Wed, 25 Mar 2009 13:05:57 +0100

Efraim Fogel wrote:
Dennis Schieferdecker wrote:
Ophir Setter schrieb:
The problem is probably that 0.01 is not translated to 1/100 in an
exact manner.
You should construct 1/100 using a rational number constructor;
probably something like: Kernel::FT(1, 100).

Thanks that did the trick (and significantly decreased the number of
faces with my larger setup). Maybe you could help me with another type
problem later in my program?

After having computed the circular arrangement, I need to perform
several calculations with the vertices of the arrangement. Unfortunately
the points they represent are of type Traits::Point_2 instead od
Kernel::Point_2 and use a different numerical type ( Traits::CoordNT,
i.e. one_root_number< Kermel::FT >). Here, I run into a problem, since I
cannot perform the typical operations I can with type Kernel::Point_2
and by converting Traits::Point_2 to Kernel::Point_2 I losse my
exactness.

In principle I need to compute the point that lies in the
middle of two vertices and the orientation of three vertices.

There are two traits that support circular arcs and segments in the arrangement package, namely, Arr_circle_segment_traits_2 and Arr_circular_line_arc_traits_2. The latter may support more operations, as it is based on a CircularKernel.

Hi Dennis,

The Circular kernel does not provide the orientation of three Circular_arc_point_2's either. The coordinates of such 3 points are algebraic numbers of degree 2 that do not necessarily lie in the same extension.
We are thinking of adding new operations in the CGAL::Root_of_2 number type, to allow such computations, this will not be available in a close future.

What you might want to do is convert the Circular_arc_point_2's computed by the arrangement into Point_2< Cartesian< Core::Expr > >, then all functionalities of the cgal Kernel would be available on them.
I have not tried but I guess it would work (you probably have to do the conversion of coordinates "by hand"). I am afraid this would be rather slow, though.

Best
Monique Teillaud



Archive powered by MHonArc 2.6.16.

Top of Page