Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Wrong inexact intersection between 3D triangles

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Wrong inexact intersection between 3D triangles


Chronological Thread 
  • From: "Sebastien Loriot (GeometryFactory)" <>
  • To:
  • Subject: Re: [cgal-discuss] Wrong inexact intersection between 3D triangles
  • Date: Tue, 06 Oct 2015 08:51:50 +0200
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=Pass ; spf=None
  • Ironport-phdr: 9a23:87LpXxR9Uc5aiTSFM9fMYkQzUdpsv+yvbD5Q0YIujvd0So/mwa64YhKN2/xhgRfzUJnB7Loc0qyN4/ymBz1LuM/b+Fk5M7VyFDY9wf0MmAIhBMPXQWbaF9XNKxIAIcJZSVV+9Gu6O0UGUOz3ZlnVv2HgpWVKQka3CwN5K6zPF5LIiIzvjqbpq8GVPVQD3WPnKZpJbzyI7izp/vEMhoVjLqtjgjDomVBvP9ps+GVzOFiIlAz97MrjtLRq8iBXpu5zv5UYCfayLOwESulTAz0idmw0/8b2rgLrTA2V53JaXH9FvABPBl2P1xzwV4ztsyb8/s56wiidIYW2Yr0zXDm+9bZFQRT0jz0WdnRxpHrTjdZxi74dpRaJqBl2woqSa4aQYqktNpjBdM8XEDISFv1aUDZMV9ux
  • Organization: GeometryFactory

On 10/05/2015 09:47 PM, Thiago Milanetto Schlittler wrote:

On 05 Oct 2015, at 21:31, Olivier Devillers
<>
wrote:

Le 05/10/15 16:59, Thiago Milanetto Schlittler a écrit :
Hello!

I'm having a really weird bug when trying to intersect two triangles
inside a 3D space while using the
`CGAL::Exact_predicates_inexact_constructions_kernel` kernel. Essentially, I
have two triangles that should not intersect. The function
`CGAL::do_intersect` returns always `false` when testing them, but the
function `CGAL::intersection` builds an intersection, depending on the order
of the vertices of the triangles.

The bug disappears when I use the
`CGAL::Exact_predicates_exact_constructions_kernel` kernel, but I can't
afford to use it in the real case scenario.
So, it does not look like a bug.
If you use inexact constructions, constructions are inexact....

While this is true, the triangles are sufficiently far away from each other to do
not create an intersection due to an rounding number error associated to the
inexact constructions (or at least I think so, correct me if I’m wrong …). I’ve
attached a figure and a gmsh .geo file with both triangles. The triangle A is
formed by vertices 1, 2 and 3, B is formed by vertices 11, 12, 13, and the
“intersection" found is formed by the segment 21 - 22 (which is co-planar to
the triangle A).

Thanks in advance,
Thiago Milanetto Schlittler



The intersection computation function for two triangles is naively
implemented and uses intermediate constructions. The problem
you observe is due to the usage of an kernel with inexact
constructions.

See also this comment:
https://github.com/CGAL/cgal/issues/304#issuecomment-136634696

Sebastien.




Archive powered by MHonArc 2.6.18.

Top of Page