[BUG] Writing STL to buffer fails
wayofsamu opened this issue · comments
Hey,
Thank you for your awesome tool.
A small bug occurred, when I tried to write a stl file to buffer.
--> [254](https://file+.vscode-resource.vscode-cdn.net/run/media/samuels/Volume/TracOptic%20Progress/UNOTT_CSI/venv310/lib/python3.10/site-packages/meshio/stl/_stl.py:254) a.tofile(fh)
UnsupportedOperation: fileno
I would change
Line 254 in 0138cc8
to
if is_buffer(filename, "wb"):
fh.write(a.tobytes())
else:
a.tofile(fh)