Instead, if a comparison of equality of vertices is done in way when we compare sets of coordinates directly, doesn't cause this collision
Since there are no specific tests for a mesh.remove_duplicate_vertices() function, I'd assume that it's reasonable to modify it a bit. If needed, I'd be happy to contribute.
[(1.624855, 4.584075, 3.408143), (1.624855, 4.470224, 3.4), (1.624855, 4.470224, 3.4)]
[(1.624855, 4.470224, 3.4), (1.624855, 4.470224, 3.8), (1.624855, 4.52715, 3.804071)]
[(1.624855, 4.866152, 4.143074), (1.624855, 4.870224, 4.2), (1.624855, 5.270224, 4.2)]
[(1.624855, 5.270224, 4.2), (1.624855, 5.262081, 4.086148), (1.624855, 5.237818, 3.974614)]
[(1.624855, 5.237818, 3.974614), (1.624855, 5.197929, 3.867668), (1.624855, 5.143226, 3.767487)]
[(1.624855, 5.143226, 3.767487), (1.624855, 5.074823, 3.676111), (1.624855, 4.994112, 3.5954)]
[(1.624855, 4.994112, 3.5954), (1.624855, 4.902736, 3.526997), (1.624855, 4.802556, 3.472294)]
[(1.624855, 4.802556, 3.472294), (1.624855, 4.69561, 3.432406), (1.624855, 4.584075, 3.408143)]
[(1.624855, 4.584075, 3.408143), (1.624855, 4.470224, 3.4), (1.624855, 4.52715, 3.804071)]
[(1.624855, 4.854021, 4.087307), (1.624855, 4.866152, 4.143074), (1.624855, 5.270224, 4.2)]
[(1.624855, 5.270224, 4.2), (1.624855, 5.237818, 3.974614), (1.624855, 5.143226, 3.767487)]
[(1.624855, 5.143226, 3.767487), (1.624855, 4.994112, 3.5954), (1.624855, 4.802556, 3.472294)]
[(1.624855, 4.802556, 3.472294), (1.624855, 4.584075, 3.408143), (1.624855, 4.52715, 3.804071)]
[(1.624855, 4.834076, 4.033834), (1.624855, 4.854021, 4.087307), (1.624855, 5.270224, 4.2)]
[(1.624855, 5.270224, 4.2), (1.624855, 5.143226, 3.767487), (1.624855, 4.802556, 3.472294)]
[(1.624855, 4.802556, 3.472294), (1.624855, 4.52715, 3.804071), (1.624855, 4.582917, 3.816203)]
[(1.624855, 4.806725, 3.983744), (1.624855, 4.834076, 4.033834), (1.624855, 5.270224, 4.2)]
[(1.624855, 4.802556, 3.472294), (1.624855, 4.582917, 3.816203), (1.624855, 4.63639, 3.836147)]
[(1.624855, 4.772523, 3.938056), (1.624855, 4.806725, 3.983744), (1.624855, 5.270224, 4.2)]
[(1.624855, 4.802556, 3.472294), (1.624855, 4.63639, 3.836147), (1.624855, 4.68648, 3.863499)]
[(1.624855, 4.732168, 3.8977), (1.624855, 4.772523, 3.938056), (1.624855, 5.270224, 4.2)]
[(1.624855, 5.270224, 4.2), (1.624855, 4.802556, 3.472294), (1.624855, 4.68648, 3.863499)]
[(1.624855, 4.68648, 3.863499), (1.624855, 4.732168, 3.8977), (1.624855, 5.270224, 4.2)]
[(2.024855, 4.584075, 3.408143), (2.024855, 4.470224, 3.4), (2.024855, 4.470224, 3.4)]
[(2.024855, 4.470224, 3.4), (2.024855, 4.52715, 3.804071), (2.024855, 4.470224, 3.8)]
[(2.024855, 4.866152, 4.143074), (2.024855, 5.270224, 4.2), (2.024855, 4.870224, 4.2)]
[(2.024855, 5.270224, 4.2), (2.024855, 5.237818, 3.974614), (2.024855, 5.262081, 4.086148)]
[(2.024855, 5.237818, 3.974614), (2.024855, 5.143226, 3.767487), (2.024855, 5.197929, 3.867668)]
[(2.024855, 5.143226, 3.767487), (2.024855, 4.994112, 3.5954), (2.024855, 5.074823, 3.676111)]
[(2.024855, 4.994112, 3.5954), (2.024855, 4.802556, 3.472294), (2.024855, 4.902736, 3.526997)]
[(2.024855, 4.802556, 3.472294), (2.024855, 4.584075, 3.408143), (2.024855, 4.69561, 3.432406)]
[(2.024855, 4.584075, 3.408143), (2.024855, 4.52715, 3.804071), (2.024855, 4.470224, 3.4)]
[(2.024855, 4.854021, 4.087307), (2.024855, 5.270224, 4.2), (2.024855, 4.866152, 4.143074)]
[(2.024855, 5.270224, 4.2), (2.024855, 5.143226, 3.767487), (2.024855, 5.237818, 3.974614)]
[(2.024855, 5.143226, 3.767487), (2.024855, 4.802556, 3.472294), (2.024855, 4.994112, 3.5954)]
[(2.024855, 4.802556, 3.472294), (2.024855, 4.52715, 3.804071), (2.024855, 4.584075, 3.408143)]
[(2.024855, 4.834076, 4.033834), (2.024855, 5.270224, 4.2), (2.024855, 4.854021, 4.087307)]
[(2.024855, 5.270224, 4.2), (2.024855, 4.802556, 3.472294), (2.024855, 5.143226, 3.767487)]
[(2.024855, 4.802556, 3.472294), (2.024855, 4.582917, 3.816203), (2.024855, 4.52715, 3.804071)]
[(2.024855, 4.806725, 3.983744), (2.024855, 5.270224, 4.2), (2.024855, 4.834076, 4.033834)]
[(2.024855, 4.802556, 3.472294), (2.024855, 4.63639, 3.836147), (2.024855, 4.582917, 3.816203)]
[(2.024855, 4.772523, 3.938056), (2.024855, 5.270224, 4.2), (2.024855, 4.806725, 3.983744)]
[(2.024855, 4.802556, 3.472294), (2.024855, 4.68648, 3.863499), (2.024855, 4.63639, 3.836147)]
[(2.024855, 4.732168, 3.8977), (2.024855, 5.270224, 4.2), (2.024855, 4.772523, 3.938056)]
[(2.024855, 5.270224, 4.2), (2.024855, 4.68648, 3.863499), (2.024855, 4.802556, 3.472294)]
[(2.024855, 4.68648, 3.863499), (2.024855, 5.270224, 4.2), (2.024855, 4.732168, 3.8977)]
[(2.024855, 4.470224, 3.4), (1.624855, 4.470224, 3.8), (1.624855, 4.470224, 3.4)]
[(2.024855, 4.470224, 3.4), (2.024855, 4.470224, 3.8), (1.624855, 4.470224, 3.8)]
[(2.024855, 4.470224, 3.8), (1.624855, 4.52715, 3.804071), (1.624855, 4.470224, 3.8)]
[(2.024855, 4.470224, 3.8), (2.024855, 4.52715, 3.804071), (1.624855, 4.52715, 3.804071)]
[(2.024855, 4.52715, 3.804071), (1.624855, 4.582917, 3.816203), (1.624855, 4.52715, 3.804071)]
[(2.024855, 4.52715, 3.804071), (2.024855, 4.582917, 3.816203), (1.624855, 4.582917, 3.816203)]
[(2.024855, 4.582917, 3.816203), (1.624855, 4.63639, 3.836147), (1.624855, 4.582917, 3.816203)]
[(2.024855, 4.582917, 3.816203), (2.024855, 4.63639, 3.836147), (1.624855, 4.63639, 3.836147)]
[(2.024855, 4.63639, 3.836147), (1.624855, 4.68648, 3.863499), (1.624855, 4.63639, 3.836147)]
[(2.024855, 4.63639, 3.836147), (2.024855, 4.68648, 3.863499), (1.624855, 4.68648, 3.863499)]
[(2.024855, 4.68648, 3.863499), (1.624855, 4.732168, 3.8977), (1.624855, 4.68648, 3.863499)]
[(2.024855, 4.68648, 3.863499), (2.024855, 4.732168, 3.8977), (1.624855, 4.732168, 3.8977)]
[(2.024855, 4.732168, 3.8977), (1.624855, 4.772523, 3.938056), (1.624855, 4.732168, 3.8977)]
[(2.024855, 4.732168, 3.8977), (2.024855, 4.772523, 3.938056), (1.624855, 4.772523, 3.938056)]
[(2.024855, 4.772523, 3.938056), (1.624855, 4.806725, 3.983744), (1.624855, 4.772523, 3.938056)]
[(2.024855, 4.772523, 3.938056), (2.024855, 4.806725, 3.983744), (1.624855, 4.806725, 3.983744)]
[(2.024855, 4.806725, 3.983744), (1.624855, 4.834076, 4.033834), (1.624855, 4.806725, 3.983744)]
[(2.024855, 4.806725, 3.983744), (2.024855, 4.834076, 4.033834), (1.624855, 4.834076, 4.033834)]
[(2.024855, 4.834076, 4.033834), (1.624855, 4.854021, 4.087307), (1.624855, 4.834076, 4.033834)]
[(2.024855, 4.834076, 4.033834), (2.024855, 4.854021, 4.087307), (1.624855, 4.854021, 4.087307)]
[(2.024855, 4.854021, 4.087307), (1.624855, 4.866152, 4.143074), (1.624855, 4.854021, 4.087307)]
[(2.024855, 4.854021, 4.087307), (2.024855, 4.866152, 4.143074), (1.624855, 4.866152, 4.143074)]
[(2.024855, 4.866152, 4.143074), (1.624855, 4.870224, 4.2), (1.624855, 4.866152, 4.143074)]
[(2.024855, 4.866152, 4.143074), (2.024855, 4.870224, 4.2), (1.624855, 4.870224, 4.2)]
[(2.024855, 4.870224, 4.2), (1.624855, 5.270224, 4.2), (1.624855, 4.870224, 4.2)]
[(2.024855, 4.870224, 4.2), (2.024855, 5.270224, 4.2), (1.624855, 5.270224, 4.2)]
[(2.024855, 5.270224, 4.2), (1.624855, 5.262081, 4.086148), (1.624855, 5.270224, 4.2)]
[(2.024855, 5.270224, 4.2), (2.024855, 5.262081, 4.086148), (1.624855, 5.262081, 4.086148)]
[(2.024855, 5.262081, 4.086148), (1.624855, 5.237818, 3.974614), (1.624855, 5.262081, 4.086148)]
[(2.024855, 5.262081, 4.086148), (2.024855, 5.237818, 3.974614), (1.624855, 5.237818, 3.974614)]
[(2.024855, 5.237818, 3.974614), (1.624855, 5.197929, 3.867668), (1.624855, 5.237818, 3.974614)]
[(2.024855, 5.237818, 3.974614), (2.024855, 5.197929, 3.867668), (1.624855, 5.197929, 3.867668)]
[(2.024855, 5.197929, 3.867668), (1.624855, 5.143226, 3.767487), (1.624855, 5.197929, 3.867668)]
[(2.024855, 5.197929, 3.867668), (2.024855, 5.143226, 3.767487), (1.624855, 5.143226, 3.767487)]
[(2.024855, 5.143226, 3.767487), (1.624855, 5.074823, 3.676111), (1.624855, 5.143226, 3.767487)]
[(2.024855, 5.143226, 3.767487), (2.024855, 5.074823, 3.676111), (1.624855, 5.074823, 3.676111)]
[(2.024855, 5.074823, 3.676111), (1.624855, 4.994112, 3.5954), (1.624855, 5.074823, 3.676111)]
[(2.024855, 5.074823, 3.676111), (2.024855, 4.994112, 3.5954), (1.624855, 4.994112, 3.5954)]
[(2.024855, 4.994112, 3.5954), (1.624855, 4.902736, 3.526997), (1.624855, 4.994112, 3.5954)]
[(2.024855, 4.994112, 3.5954), (2.024855, 4.902736, 3.526997), (1.624855, 4.902736, 3.526997)]
[(2.024855, 4.902736, 3.526997), (1.624855, 4.802556, 3.472294), (1.624855, 4.902736, 3.526997)]
[(2.024855, 4.902736, 3.526997), (2.024855, 4.802556, 3.472294), (1.624855, 4.802556, 3.472294)]
[(2.024855, 4.802556, 3.472294), (1.624855, 4.69561, 3.432406), (1.624855, 4.802556, 3.472294)]
[(2.024855, 4.802556, 3.472294), (2.024855, 4.69561, 3.432406), (1.624855, 4.69561, 3.432406)]
[(2.024855, 4.69561, 3.432406), (1.624855, 4.584075, 3.408143), (1.624855, 4.69561, 3.432406)]
[(2.024855, 4.69561, 3.432406), (2.024855, 4.584075, 3.408143), (1.624855, 4.584075, 3.408143)]
[(2.024855, 4.584075, 3.408143), (1.624855, 4.470224, 3.4), (1.624855, 4.584075, 3.408143)]
[(2.024855, 4.584075, 3.408143), (2.024855, 4.470224, 3.4), (1.624855, 4.470224, 3.4)]
Describe the bug
Given: The mesh is received from Speckle as a list of vertices and faces, but some of the vertices are duplicated.
The mesh was constructed and the following checks were performed:
After the usage of a method, the results are following
Instead, if a comparison of equality of vertices is done in way when we compare sets of coordinates directly, doesn't cause this collision
The result
Since there are no specific tests for a mesh.remove_duplicate_vertices() function, I'd assume that it's reasonable to modify it a bit. If needed, I'd be happy to contribute.
To Reproduce
Steps to reproduce the behavior:
Mesh itself
Viewer fails to visualize because trimesh structure is broken
Screenshots
Desktop (please complete the following information):