Subject: CGAL users discussion list
List archive
- From: "Sebastien Loriot (GeometryFactory)" <>
- To:
- Subject: Re: [cgal-discuss] Ask:is there a bug in the intersection function
- Date: Fri, 12 Mar 2010 09:42:31 +0100
???? 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";
}
- [cgal-discuss] Ask:is there a bug in the intersection function, 梓桥, 03/12/2010
- Re: [cgal-discuss] Ask:is there a bug in the intersection function, Sebastien Loriot (GeometryFactory), 03/12/2010
- <Possible follow-up(s)>
- Re: [cgal-discuss] Ask:is there a bug in the intersection function, 梓桥, 03/12/2010
Archive powered by MHonArc 2.6.16.