BufferGeometryUtils.mergeVertices - seems not to merge all identical vertices

HI,
I seem to have a weird issues with BufferGeometryUtils.mergeVertices

I took a cube from a fiddle and performed the mergeVertices and it seems mergeVertices does not merge all vertices. See Edit fiddle - JSFiddle - Code Playground

E.g. the vertices given in the indexGeometry returned by mergeVertices are
Index 0 = (-1, -1, 1, )
index 1 = (1, -1, 1,)
index 2= (-1, 1, 1, )
index 3= (1, 1, 1,)
index 4= (1, -1, 1)

i.e. vertices at position 1 and 4 seem to be the same but shounlnt after mergeVertices to my understanding. I am pretty sure that I am missing sth. Can someone point me into the right direction?

Cheers
Tom

Answered here:

1 Like