/bitmap2stl

Command-line script that takes a bitmap shape and converts it into a 3D printable .STL file

Primary LanguageShellMIT LicenseMIT

bitmap2stl

Command-line script that takes a bitmap file and converts it into a 3D printable .STL file, suitable for most 3D printers.

Requirements

  • potrace - PotraceTM is a tool for tracing bitmap graphics and outputting them as an encapsulated PostScript file (EPS)
  • pstoedit - translates PostScript and PDF files into vector formats
  • OpenSCAD - creates 3D solid CAD objects
  • Operating system based on Linux

If you are a Homebrew user you can also install porace and pstoedit via the package manager.

Making the script executable

By default not every file on your computer is executable. This is a very good security feature but requires modifucations to the permissions to run the script from the command line. From within the context of the directory housing the script type the following command:

chmod u+x bitmap2stl

Using the script

Execute the script against a file by calling it like so:

./my_shell_script /path/to/file.bmp