recognize STL files starting with "solid binary" as binary files

This commit is contained in:
Axel Kohlmeyer
2023-09-22 07:51:58 -04:00
parent 12acd346b7
commit afa8501d20

View File

@ -1055,6 +1055,9 @@ void CreateAtoms::add_mesh(const char *filename)
throw TokenizerException("Invalid STL mesh file format", "");
line += 6;
if (utils::strmatch(line, "^binary"))
throw TokenizerException("Invalid STL mesh file format", "");
if (comm->me == 0)
utils::logmesg(lmp, "Reading STL object {} from text file {}\n", utils::trim(line), filename);