3MFConsortium / lib3mf

lib3mf is an implementation of the 3D Manufacturing Format file standard
http://3mf.io
BSD 2-Clause "Simplified" License
228 stars 92 forks source link

ASCII STL to 3MF conversion fails #344

Open vijaiaeroastro opened 7 months ago

vijaiaeroastro commented 7 months ago

I tried reading a simple ASCII stl file with Converter.cpp example The geometry is just a simple box. The example fails with the following error

------------------------------------------------------------------
3MF Model Converter
lib3mf version = 2.2.0
------------------------------------------------------------------
reading /home/vijai/Documents/Geometries/stl_box_ascii.stl...
Lib3MF Error 5 (Reading from a stream was not possible)

Binary version of same file works. I have attached the ascii stl here. I am not sure if lib3mf is only designed to read binary STL's. In that case, just let me know and I will close the issue.

stl_box_ascii.zip

martinweismann commented 6 months ago

It's a missing feature... the current implementation only reads binary STL: https://github.com/3MFConsortium/lib3mf/blob/30d5c2e0e8ed7febb5c10a84dc2db9d53fee6d05/Source/Common/MeshImport/NMR_MeshImporter_STL.cpp#L132

It would be nice to also have ASCII-reading, yes.

vijaiaeroastro commented 1 month ago

Include the ASCII stl reader from https://github.com/3MFConsortium/lib3mf/issues/364 into lib3mf.