The Humanity icon theme for Ubuntu does not have an icon for STL files and other 3D modeling files, so I decided to create one. Using the default empty file icon, I added a cube with gradient fill and the letters “stl” underneath with LibreOffice Draw.
Then, I went to /usr/share/mime/types to find out what mimetype STL files are — they are of type “model/stl”, so I created a new theme (instructions here), named the icon “model-stl”, and put the icon there.
Here is the LibreOffice Draw file if you want to edit the icon or make a similar icon for other 3D modeling files: stl_icon.odg