Combining multiple STL files
The operation you want is almost just cat'ing the files together. However you need to remove the 80 byte header from all but the first, and add up the 32-bit triangle count from each file immediately after that. Output should be:


Copy of first 80 bytes of file 1
Sum of int32 from offset 80 of each file.
Bytes 84-end from each file.


See https://en.m.wikipedia.org/wiki/STL_(file_format)