Closed lionel-wilhelm closed 1 year ago
A "multi" STL file is just a bunch of ASCII (text) STL files concatenated so you can write them by appending multiple meshes to the same file descriptor.
Your version is combining the meshes together into a single file so the names are lost.
To write the meshes separately to the same file this should work:
with open('combined.stl', 'w') as combined_mesh_fh:
for stl_mesh in stl_meshes:
stl_mesh.save(fh=combined_mesh_fh)
Great ! Thanks a lot. I was afraid this would write a header multiple times but reading carefully the source code indicated that :
Is this correct ? Thanks again for the super fast answer.
That's completely correct :)
I'm not sure which libraries support the multi STL format to be honest... I haven't seen it that much in the wild so far.
Hello @wolph , First of all, thanks a lot for this great package. In the same way multi-part stls can be loaded one by one with the
mesh.Mesh.from_multi_file
method but I didn't find a way to save multiple meshes as named parts.I used the following :
but when loading it back with :
I don't get my names list back.
Is this something which is supposed to be supported or not ? Thanks in advance
version :