Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Circle Line Intersection

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Circle Line Intersection


Chronological Thread 
  • From:
  • To:
  • Subject: Re: [cgal-discuss] Circle Line Intersection
  • Date: Wed, 19 Dec 2007 09:39:58 +0100

well, I really answered too quickly... (I mixed up Circular_arc_2 and Circular_arc_point_2)
Again, the problem comes from the fact that we forgot the case Line_2/Circle_2 in functor Intersect_2 that gives the interface for users, so, waiting for the fix, let's try to find a reasonable workaround. I have a few proposals:

1- Is it possible for you to clip your Line_2 into a Segment_2, just for computing the intersection?
If you can do this, then the simplest workaround is probably to use
CircularKernel::Intersect_2 for a Line_arc_2 and a Circle_2,
because Line_arc_2 can be constructed from Segment_2.

2- The intersection between Line_2 and Circle_2 is in fact coded internally in
include/CGAL/Circular_kernel_2/internal_functions_on_line_2.h
So, if you want to hack a little bit, you can probably use it.

3- You can also probably first construct a Circular_arc_2 from the circle and two identical lines equal to your line, I guess it should work, then ask for the endpoints of the circular arc.

I hope one of these workarounds can help.

陳 柏宏 wrote:
hi,
thanks for replying. i am still not sure how to use it
to find the intersection of a circle and line though..



Archive powered by MHonArc 2.6.16.

Top of Page