Hmm, that title got a little long…
When I decided to take the challenge to program the worst, yet functional, 3D printer, I wanted it to be as simple as possible. With 4 kids and a full time job, I just don’t have much time for side projects. So wherever I could cut a corner or use an existing tool, I looked for it.
First, I needed a source for a 3D model. I already had SketchUp installed on my laptop and had played with it a little, so it was available and ready. I even had a model I’d already created, so that was a simple choice.
As I wanted to print the sliced images, I needed something that could deal with printer drivers easily. But really, why bother with hardware interfacing at all when there are so many tools that can print a variety of image files easily. So I decided to use the built in Windows image printing tool, which can be configured to not clip the image and scale it to fit on a sheet of paper. I wasn’t worried about getting an exact scale as long as the scale is consistent across all the printed sheets.
The Python Image Library makes creating a bitmap image very easy, so I decided to use .PNG files as they compress well and I planned to just use simple colors.
Now back to the input format. I took a look at what formats I could get SketchUp to export. There was a long list of formats I was not familiar with (I didn’t realize I had a Pro trial set up, but more on that later). From some quick research I knew that .stl was a common text format for 3D models and widely supported by 3D printers. That sounded great, but I couldn’t get the STL plugin to load correctly in SketchUp. Disappointed, I looked for another simple text format. One of my coworkers had been playing with VRML, so that stood out on the export list. My test at exporting a .wrl file (the VRML file format) was human readable and with a little digging it started to make sense. I quickly found some settings in the SketchUp export that took out some details (texture, color, etc) and simplified the file to just the vertexes and edge data that I wanted.
So with inputs and outputs defined, I felt like I was ready to start experimenting with code.