The basic idea is this: the SLA DLP 3D printer (which I'm building on the side) uses a standard computer projector to solidify subsequent layers of light-curable resin. The result is a physical object. So my program needs to take as input an STL file, which represents a 3D mesh of triangles. It then needs to calculate the cross section of the file at each layer height (of which there are many - objects 4" high with 0.1mm accuracy take 1000 layers) and send a corresponding image to the projector. At the same time, it should connect via serial communication to a microcontroller which moves a build platform to change layers.
My focus this week was the basics - just read in and process a binary STL file. I began by downloading some sample files here. Here's a 3D model of part of a pump:
![]() | ||
| An example STL file. |
![]() |
| Result of reading in aforementioned example. |
Having succeeded with my goal for the week, I started to learn Qt, the popular "cross-platform application framework" that should let me easily create a GUI for my project. It's amazingly user-friendly, so I was able to do this with a few hours of work:
As yet, this little window has a fully functional menu ("New", "Open", "Save", "Exit", etc.), a text output panel on the left, and a graphical display panel on the right. The plan is to open an STL file, display its 2D shadow on the right, allow the user to place it anywhere on the printer build platform, and then, well, print. Each of those green square represents a different STL file - I can drag them around. Next up is translating my STL-reading code to Qt language so I can combine the two.
All in all, not a bad week's work!


