Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Convert Ray_2 (Filtered_kernel) to Line_arc_2 (Circular Kernel)

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Convert Ray_2 (Filtered_kernel) to Line_arc_2 (Circular Kernel)


Chronological Thread 
  • From:
  • To:
  • Subject: Re: [cgal-discuss] Convert Ray_2 (Filtered_kernel) to Line_arc_2 (Circular Kernel)
  • Date: Wed, 13 Jun 2007 14:48:44 +0200

Thomas Zangl wrote:

wrote:

How to convert a K::Ray_2 to a Circular_k::Line_arc_2?

It cannot work: rays go to infinity, while 'line arcs' have two finite
(possibly algebraic) endpoints.

You are right and the clipping of the ray makes them finite but, I was
also unable to convert a segment to a Line_Arc_2. I worked-a-round using
the << and >> operators and a tempfile (for debugging).
But this is inefficient and ugly :-)

This is my work-a-round code, maybe you can show my the right way to
cast the Segment into Line_Arc_2:

I see a constructor of Line_arc_2 fron Segment_2 documented in the manual:

http://www.cgal.org/Manual/3.3/doc_html/cgal_manual/Circular_kernel_2_ref/Class_Line_arc_2.html#Cross_link_anchor_452

Line_arc_2<CircularKernel> la ( CircularKernel::Segment_2 s);

Monique Teillaud



Archive powered by MHonArc 2.6.16.

Top of Page