Indices for vertices of each face. If loaded with triangulate_faces, each face in the mesh is a triangle, [...]
This is not true. Even with triangulate_faces the mesh may still contain (degenerate) faces with two points (type Line).
And then the length in the buffer for those is 2, not 3.
So that the indices for face n in the buffer do not start at n * 3 in this case.
I suggest blowing up such faces into degenerate triangles when triangulate_faces is on and making the resp. index in an Option. I will include this change in my fork so you can have a look.
I saw this in the docs:
This is not true. Even with
triangulate_faces
the mesh may still contain (degenerate) faces with two points (typeLine
). And then the length in the buffer for those is2
, not3
. So that the indices for facen
in the buffer do not start atn * 3
in this case.I suggest blowing up such faces into degenerate triangles when
triangulate_faces
is on and making the resp. index in anOption
. I will include this change in my fork so you can have a look.