Subject: CGAL users discussion list
List archive
- From: Thomas Zangl <>
- To:
- Subject: Converting from Circular to Exact Kernel (once again) ...
- Date: Thu, 14 Jun 2007 12:37:32 +0200
Dear List,
typeconverting in CGAL keeps me struggeling. I now have these types defined:
(NO GMP in use here!)
typedef CGAL::Exact_predicates_exact_constructions_kernel K;
typedef K::Vector_2 Vector;
typedef K::Ray_2 Ray;
typedef K::Line_2 Line;
typedef CGAL::Point_2<K> Point;
typedef CGAL::Polygon_2<K> Polygon_2;
typedef CGAL::Quotient<CGAL::MP_Float> NT;
typedef CGAL::Cartesian<NT> Linear_k;
typedef CGAL::Algebraic_kernel_for_circles_2_2<NT> Algebraic_k;
typedef CGAL::Circular_kernel_2<Linear_k,Algebraic_k> Circular_k;
//typedef CGAL::Exact_circular_kernel_2 Circular_k;
typedef Circular_k::Circular_arc_point_2 Circular_Arc_Point;
How to convert from Circular_Arc_Point to Point and vice versa as
loss-less as possible?
E.g. I get an Circular_Arc_Point as the result of an intersection using
the Circular_Kernel. Now I want to check if the Point is inside or
outside of an Polygon_2 (defined by K):
Circular_ArcPointContainer::iterator toCheck;
for( toCheck = pointsToCheck.begin(); toCheck != pointsToCheck.end();
toCheck++ ) {
...
myClosedPolygon.bounded_side(*toCheck) // here is the error shown below
...
}
gcc tells me that the types do not match:
src/myTest.cpp:385: Fehler: keine passende Funktion für Aufruf von
»CGAL::Polygon_2<CGAL::Lazy_kernel<CGAL::Simple_cartesian<CGAL::Quotient<CGAL::MP_Float>
>, CGAL::Simple_cartesian<CGAL::Interval_nt<false> >,
CGAL::Cartesian_converter<CGAL::Simple_cartesian<CGAL::Quotient<CGAL::MP_Float>
>, CGAL::Simple_cartesian<CGAL::Interval_nt<false> >,
CGAL::To_interval<CGAL::Quotient<CGAL::MP_Float> > > >,
std::vector<CGAL::Point_2<CGAL::Lazy_kernel<CGAL::Simple_cartesian<CGAL::Quotient<CGAL::MP_Float>
>, CGAL::Simple_cartesian<CGAL::Interval_nt<false> >,
CGAL::Cartesian_converter<CGAL::Simple_cartesian<CGAL::Quotient<CGAL::MP_Float>
>, CGAL::Simple_cartesian<CGAL::Interval_nt<false> >,
CGAL::To_interval<CGAL::Quotient<CGAL::MP_Float> > > > >,
std::allocator<CGAL::Point_2<CGAL::Lazy_kernel<CGAL::Simple_cartesian<CGAL::Quotient<CGAL::MP_Float>
>, CGAL::Simple_cartesian<CGAL::Interval_nt<false> >,
CGAL::Cartesian_converter<CGAL::Simple_cartesian<CGAL::Quotient<CGAL::MP_Float>
>, CGAL::Simple_cartesian<CGAL::Interval_nt<false> >,
CGAL::To_interval<CGAL::Quotient<CGAL::MP_Float> > > > > > >
>::bounded_side(CGAL::Circular_arc_point_2<CGAL::Circular_kernel_2<CGAL::Cartesian<CGAL::Quotient<CGAL::MP_Float>
>, CGAL::Algebraic_kernel_for_circles_2_2<CGAL::Quotient<CGAL::MP_Float>
> > >&)«
/home/tzi/CGAL-3.3/include/CGAL/Polygon_2.h:225: Anmerkung: Kandidaten
sind: CGAL::Bounded_side CGAL::Polygon_2<Traits_,
Container_>::bounded_side(const typename Traits_P::Point_2&) const [with
Traits_P =
CGAL::Lazy_kernel<CGAL::Simple_cartesian<CGAL::Quotient<CGAL::MP_Float>
>, CGAL::Simple_cartesian<CGAL::Interval_nt<false> >,
CGAL::Cartesian_converter<CGAL::Simple_cartesian<CGAL::Quotient<CGAL::MP_Float>
>, CGAL::Simple_cartesian<CGAL::Interval_nt<false> >,
CGAL::To_interval<CGAL::Quotient<CGAL::MP_Float> > > >, Container_P =
std::vector<CGAL::Point_2<CGAL::Lazy_kernel<CGAL::Simple_cartesian<CGAL::Quotient<CGAL::MP_Float>
>, CGAL::Simple_cartesian<CGAL::Interval_nt<false> >,
CGAL::Cartesian_converter<CGAL::Simple_cartesian<CGAL::Quotient<CGAL::MP_Float>
>, CGAL::Simple_cartesian<CGAL::Interval_nt<false> >,
CGAL::To_interval<CGAL::Quotient<CGAL::MP_Float> > > > >,
std::allocator<CGAL::Point_2<CGAL::Lazy_kernel<CGAL::Simple_cartesian<CGAL::Quotient<CGAL::MP_Float>
>, CGAL::Simple_cartesian<CGAL::Interval_nt<false> >,
CGAL::Cartesian_converter<CGAL::Simple_cartesian<CGAL::Quotient<CGAL::MP_Float>
>, CGAL::Simple_cartesian<CGAL::Interval_nt<false> >,
CGAL::To_interval<CGAL::Quotient<CGAL::MP_Float> > > > > > >]
make: *** [src/myTest.o] Fehler 1
Any ideas? Please explain as simple as possible as I am still a newbie
in CGAL :-)
Best regards,
--
----------------------------------------------------------------
,yours Thomas Zangl, Bakk.rer.soc.oec. -
-
- Freelancer - IT Consulting & Software Development -
- Student of Software Development-Economy (Master) -
- Converting from Circular to Exact Kernel (once again) ..., Thomas Zangl, 06/14/2007
- Re: [cgal-discuss] Converting from Circular to Exact Kernel (once again) ..., Monique . Teillaud, 06/14/2007
Archive powered by MHonArc 2.6.16.