Hey! I am having some trouble creating a custom mesh from txt files. In the playground linked at the bottom of this post you will see that I load in two txt files, one containing vertices of the mesh and the other containing the indices of the faces which each vertex belongs to. We are able to load the txt files into Blender, where it looks correct, and export it as an stl file, which I have also loaded into the playground. The stl file loads as expected and this is how we want the mesh to look when created using the txt files.
As you can see there are two obvious problems:
- The first is that vertices are arranged in a different pattern than the stl file. They might be loading in in the wrong order, but I am not sure about that. This also might be causing the second issue.
- The second is that the meshes are not complete. We believe it might be a problem with the material but are not too sure how to go about fixing this.
Also, we believe that the coordinates of the txt file vertices are correct, and it is possible that the stl file coordinates are flipped in some way. (ex: xzy instead of xyz).
Any help would be greatly appreciated, thanks so much!
Edit: the playground now has two stl files. The first (which is uncommented) is an stl file created using numpy-stl · PyPI
The second (which is currently commented) was created by exporting from Blender.
This is what the mesh looks like in Blender: