Worst 3D Printer – back at it

I finally got frustrated with a blocking build issue I have no control over today, so I switched over and dusted off the Worst 3D Printer code.

I don’t quite remember where I left off so I just ran it from Pycharm. The debugger told me I had a list de-refference error on an empty list. I traced it back to a bit of sloppiness. I set the number of slices I intend to render, but when I scale the model I make it fit between the bounding defined limits, so unless the aspect ratio of the model happens to be a match to the defined ratio there could be empty slices at the top of the result. A quick check in the rendering method for empty slices fixed that, though I should eventually take it further and trim any pages that only have empty slices.

I was then able to render slices from a .dae file (Collada). But seeing the output made it apparent that I have some errors in rendering. My naive approach from the VRML output worked with models that only use triangles. But Collada allows for polygon shapes which could result in obtuse angles in my rendering. So next I’ll have to dig in to that.

I don’t plan on putting too much more work in to this version 2, Collada support. At the recent internal company conference I learned about 3MF, and so my plan is that version 3 will support .3mf and .stl. Should be fun, if I get the cycles.

Link for reference = http://3mf.io