Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Ask:is there a bug in the intersection function

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Ask:is there a bug in the intersection function


Chronological Thread 
  • From: "梓桥" <>
  • To: "cgal-discuss" <>
  • Subject: Re: [cgal-discuss] Ask:is there a bug in the intersection function
  • Date: Fri, 12 Mar 2010 17:12:06 +0800

thanks for your timely and effective reply!
 
 
------------------ Original ------------------
Date:  Fri, Mar 12, 2010 04:42 PM
To:  "cgal-discuss"<>;
Subject:  Re: [cgal-discuss] Ask:is there a bug in the intersection function
 
梓桥 wrote:
> Hello!
> Every one,is there a bug in the intersection function? why the following
> code result in "no intersection"? actually the two line intersects.
>
> best regards!

Please have a look at this FAQ entry:
http://www.cgal.org/FAQ.html#inexact_NT

S.

>
>   
> CGAL::Point_2<Kernel> point;
>     CGAL::Segment_2<Kernel> seg;
>     Segment_2 iseg(Point_2(106.38,90.94),Point_2(106.38,91.12));
>     K::Vector_2 v=K::Vector_2(Point_2(69.72,82.12),Point_2(150.26,117.86));
>     Ray_2 parelleline(Point_2(86.4848,82.12),v);
>
>     CGAL::Object o=intersection (iseg, parelleline);
>     if (CGAL::assign(seg, o)){
>         std::cout<<"the intersection is a segment";                  
>         
>     }else if(CGAL::assign(point, o))    {
>         std::cout<<"the intersection is a point: "<<point.x()<<"
> "<<point.y();
>     }else
>     {
>         std::cout<<"no intersection";
>     }


--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://lists-sop.inria.fr/wws/info/cgal-discuss




Archive powered by MHonArc 2.6.16.

Top of Page