Subject: CGAL users discussion list
List archive
- From: gupta61 <>
- To:
- Subject: [cgal-discuss] Bug in Segment Triangle intersection
- Date: Tue, 24 Apr 2012 12:39:23 -0700 (PDT)
Hi,
We just encountered another bug in CGAL in segment triangle intersection. I
am trying to find out intersection between the segment and a triangle.
The segment is defined by
CGALSegment3 segment_query( CGALPoint3(2.1, 2, 0.5),
CGALPoint3(3.23135, 2, 0.5) );
and the triangle by
CGALTriangle3 triangle( CGALPoint3(2.18182, 1.81818, 0.666667) /* vertex
0*/,
CGALPoint3(2.18182, 2, 0.5) /* vertex 2*/,
CGALPoint3(2.09091, 1.90909, 0.5833335) /* vertex
3*/
We are using exact predicates and inexact constructions.
The output we are getting is as follows:
Segment query: 2.1 2 0.5 3.23135 2 0.5
Triangle: 2.18182 1.81818 0.666667 2.18182 2 0.5 2.09091 1.90909 0.5833335
CGAL::do_intersect (0/1) = 1
Encountered intersection object is a point (for the segment)
2.1 2 0.5
Encountered intersection object_oppos is a point (for segment.opposite())
1.89801666666667 2 0.5
If we use exact constructions we get the right result. Let me know if I am
missing anything here.
BTW, the correct result is
Segment query: 2.1 2 0.5 3.23135 2 0.5
Triangle: 2.18182 1.81818 0.666667 2.18182 2 0.5 2.09091 1.90909 0.5833335
CGAL::do_intersect (0/1) = 1
Encountered intersection object is a point
2.18182 2 0.5
Encountered intersection object_oppos is a point
2.18182 2 0.5
-----
Piyush Gupta
UIUC
--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/Bug-in-Segment-Triangle-intersection-tp4584602p4584602.html
Sent from the cgal-discuss mailing list archive at Nabble.com.
- [cgal-discuss] Bug in Segment Triangle intersection, gupta61, 04/24/2012
- Re: [cgal-discuss] Bug in Segment Triangle intersection, Sebastien Loriot (GeometryFactory), 04/25/2012
- [cgal-discuss] Re: Bug in Segment Triangle intersection, gupta61, 04/25/2012
- Re: [cgal-discuss] Re: Bug in Segment Triangle intersection, Sebastien Loriot (GeometryFactory), 04/25/2012
- [cgal-discuss] Re: Bug in Segment Triangle intersection, gupta61, 04/25/2012
- Re: [cgal-discuss] Re: Bug in Segment Triangle intersection, Sebastien Loriot (GeometryFactory), 04/25/2012
- [cgal-discuss] Re: Bug in Segment Triangle intersection, gupta61, 04/25/2012
- Re: [cgal-discuss] Bug in Segment Triangle intersection, Sebastien Loriot (GeometryFactory), 04/25/2012
Archive powered by MHonArc 2.6.16.