BrunoLevy / geogram

a programming library with geometric algorithms

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Inconsistent triangle vertex ordering

manas-avi opened this issue · comments

Hi Bruno,

In the connect_triangles function here at https://github.com/BrunoLevy/geogram/blob/main/src/lib/geogram/voronoi/convex_cell.cpp#L1348

The index ordering used in the two for loops: [1378:1380] and [1389:1391] seems to be inconsistent leading to unexpected assert failures.

Best,
Manas

Hi Manas,
They are not inconsistent:

  • [1378:1380] fills vv2t for a triangle t, and indicates that the three oriented edges (i,j), (j,k), (k,i) are adjacent to t
  • [1389:1391] gets the three triangles connected to the three edges of triangle t, these three neighboring triangles are obtained from vv2t for the inverted edges (j,i),(k,j),(i,k)

I've just added some comments in convex_cell.cpp() to explain that here and here

Hope this helps,
Best,
--Bruno