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: Efraim Fogel <>
  • To:
  • Subject: Re: [cgal-discuss] Circular Arrangements inexact?
  • Date: Tue, 24 Mar 2009 17:54:19 +0200

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
What operations are you missing?
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.
Also, a related problem is the compuatation of the intersection point of
one edge E of a face of the arrangement with a line L. Line L is defined
by two points of type Traits::Point_2 and Edge E is represented as
X_monotone_curve using a number type Traits::CoordNT. Now, the
intersection functor requires two lines of the same type. Thus I have to
represent line L as X_monotone_curve. Unfortunately, there is no way to
contruct one of two points of type Traits::Point_2, only of type
Kernel::Point_2.
The traits supports curves that are either circular arcs or segments the coefficients of which are rational, and it contains a functor that computes the intersection between any pairs of curves supported by the traits. Intersections between segments the coefficients of which are not rational is not supported, at least not by the traits class.
Is there another (obvious) transformation I am missing, or are the
Traits::Point_2 the "end of the road" with regards to the reusability in
further calculations?

bye
Dennis
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.

--
____ _ ____ _
/_____/_) o /__________ __ //
(____ ( ( ( (_/ (_/-(-'_(/
_/




Archive powered by MHonArc 2.6.16.

Top of Page