Use OpenSCAD to generate DXF from a slice of a STL.

Modify the scad source file with a translate([x,y,z]) with the z value
moving for each step. It should do an import of the STL file. This is
an alternative approach but probably not what I'll end up doing, since
this requires that OpenSCAD be available on the Raspberry Pi, and besides
this is slower.

/Applications/OpenSCAD.app/Contents/MacOS/OpenSCAD foo.scad -o foo.dxf
./dxf2ps.py --s=0.2 --x=12 --y=12 -f foo.dxf > foo.ps
convert <appropriate arguments> foo.ps foo.png