CORE - Algebraic to Rational

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

CORE - Algebraic to Rational

Paul Neugebauer
Hi List,

I want to compute the exact offset of a Polygon like this:

#include <CGAL/CORE_algebraic_number_traits.h>
#include <CGAL/Arr_conic_traits_2.h>
#include <CGAL/offset_polygon_2.h>

typedef CGAL::CORE_algebraic_number_traits     Nt_traits;
typedef Nt_traits::Rational                    Rational;
typedef Nt_traits::Algebraic                   Algebraic;

typedef CGAL::Cartesian            Rat_kernel;
typedef CGAL::Cartesian            Alg_kernel;
typedef CGAL::Arr_conic_traits_2<Rat_kernel,
                                 Nt_traits>    Conic_traits_2;


offset = offset_polygon_2  (P, radius, traits);

My Problem is, that P must be a Polygon with Rational points but my
input file has Algebraic points, like:
p -4.5 -4.75
p 4.5 -4.75
So my question is, how can I convert Algebraic to Rational points ?

Thank you very much in advance,
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to