Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Proper way to convert between Plane_3<Kernel>

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Proper way to convert between Plane_3<Kernel>


Chronological Thread 
  • From: Frankie Li <>
  • To:
  • Subject: Re: [cgal-discuss] Proper way to convert between Plane_3<Kernel>
  • Date: Mon, 24 Jan 2011 09:52:51 -0500

Thanks!

Frankie

Sebastien Loriot (GeometryFactory) wrote:
Frankie Li wrote:
Hi All,

I'm trying to convert from CGAL::Plane_3 with two different kernels. Specifically, I'd like to convert from:

Plane_3<CGAL::Filtered_kernel<CGAL::Simple_cartesian<double> > >

to

CGAL::Plane_3<CGAL::Simple_cartesian<double> >

But I can't quite figure out how to do that from the manual or the code other than manually selecting points from the the first plane and construct a plane of the second kernel with these points... Is there a better way of doing this?


Any advice would be welcomed...

Thanks,

Frankie

Have a look here:
http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Kernel_23_ref/Class_Cartesian_converter.html

You can use it like this:

typedef CGAL::Filtered_kernel<CGAL::Simple_cartesian<double> > K1;
typedef CGAL::Simple_cartesian<double> K2;


CGAL::Cartesian_converter<K1,K2> converter;
K1::Plane_3 p1;
K2::Plane_3 p2 = converter(p1);

S.





Archive powered by MHonArc 2.6.16.

Top of Page