def _same_mesh(vertices1, faces1, vertices2, faces2):
faces1 = [sorted(f) for f in faces1]
faces2 = [sorted(f) for f in faces2]
triangles1 = vertices1[np.array(faces1)]
triangles2 = vertices2[np.array(faces2)]
triang1 = set([tuple(t.flat) for t in triangles1])
triang2 = set([tuple(t.flat) for t in triangles2])
return triang1 == triang2
After Change
triangles2 = vertices2[np.array(faces2)]
triang1 = [np.concatenate(sorted(t, key=lambda x:tuple(x))) for t in triangles1]
triang1 = set([tuple([rounder(i) for i in t]) for t in triang1])
triang2 = [np.concatenate(sorted(t, key=lambda x:tuple(x))) for t in triangles2]
triang2 = set([tuple([rounder(i) for i in t]) for t in triang2])
return triang1 == triang2
def test_both_algs_same_result_donut():