Skip to content

Commit

Permalink
recognize STL files starting with "solid binary" as binary files
Browse files Browse the repository at this point in the history
  • Loading branch information
akohlmey committed Sep 22, 2023
1 parent bb462b9 commit ce75654
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/create_atoms.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit ce75654

Please sign in to comment.