The core issue is that aiProcess_JoinIdenticalVertices does not work well if the stl has normals because JoinIdenticalVertices considers the normals value as vertex normals while assimp STLLoader loads triangle normals. According to https://github.com/assimp/assimp/issues/407 , we need to remove normals component during import.
https://www.dropbox.com/s/7f0g474xf9nb5wm/teapot.stl
without my patch:
with my patch:
this causes two issues:
The core issue is that aiProcess_JoinIdenticalVertices does not work well if the stl has normals because JoinIdenticalVertices considers the normals value as vertex normals while assimp STLLoader loads triangle normals. According to https://github.com/assimp/assimp/issues/407 , we need to remove normals component during import.