geogram icon indicating copy to clipboard operation
geogram copied to clipboard

unexpected behaviour in triangle_intersection algorithm

Open Abenabbou opened this issue 3 years ago • 1 comments

I have the two triangles t0 and t1 below t0={p0, p1, p2}; with p0={1898.68 775 1158.48} , p1={2000 775 1166.7}, p2={1898.68 675 1148.6} t1={q0, q1, q2}; with q0={1966.41 675 1163.79}, q1={1971.63 675 1166.95}, q2={1967.56 684.554 1166.67}

When I call the api:
bool GEOGRAM_API triangles_intersections( const vec3& p0, const vec3& p1, const vec3& p2, const vec3& q0, const vec3& q1, const vec3& q2, vector<TriangleIsect>& result ); I got this error (run in windows): | o-[Assert ] Error: Control should not have reached this point. | | File: \Geogram\src\lib\geogram\mesh\triangle_intersection.cpp, | | Line: 475 |

I except to get no intersection as depicted in the attached image. Capture

Abenabbou avatar Jun 23 '22 13:06 Abenabbou

Thank you for notifying, I'll investigate...

BrunoLevy avatar Jun 23 '22 20:06 BrunoLevy

Pushed a completely revisited version (if you want to try), github repo is up to date.

BrunoLevy avatar Jan 25 '23 08:01 BrunoLevy

Double-checked with the following file:

v 1898.68 775 1158.48
v 2000 775 1166.7
v 1898.68 675 1148.6
f 1 2 3
v 1966.41 675 1163.79
v 1971.63 675 1166.95
v 1967.56 684.554 1166.67
f 4 5 6

Fixed in current version.

BrunoLevy avatar Feb 08 '23 21:02 BrunoLevy