Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] 4.3 : Triangle_3_Triangle_3 intersection

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] 4.3 : Triangle_3_Triangle_3 intersection


Chronological Thread 
  • From: "Sebastien Loriot (GeometryFactory)" <>
  • To:
  • Subject: Re: [cgal-discuss] 4.3 : Triangle_3_Triangle_3 intersection
  • Date: Thu, 28 Nov 2013 16:35:10 +0100
  • Organization: GeometryFactory

I can reproduce it. I investigate and let you know.

Sebastien.

On 11/28/2013 03:13 PM, Hugo Mercier wrote:
Hi,

The behaviour of CGAL::intersection( Triangle_3, Triangle_3 ) changes in
4.3.

With these two triangles :

CGAL::Triangle_3<K> tri1( CGAL::Point_3<K>( 0, 0, 0 ),
CGAL::Point_3<K>( 0, 1, 1 ),
CGAL::Point_3<K>( 0, 1, 0 ) );
CGAL::Triangle_3<K> tri2( CGAL::Point_3<K>( -1, -1, 0 ),
CGAL::Point_3<K>( 0, -1, 0 ),
CGAL::Point_3<K>( -1, 0, 0 ) );

it returns the point (0, -1, 0). Which is wrong, the two triangles do
not intersect.

If I understand Triangle_3_Triangle_3_intersection.h correctly, the
intersection between the two supporting planes is computed (here a line)
and then the intersection of each triangle with this line (here a
segment for tri1 and a point for tri2). Then ... the point is returned.
I think the point should only be returned if it intersects the other
segment (which is not the case here).

Do you reproduce / agree ?





Archive powered by MHonArc 2.6.18.

Top of Page