It all started the other day when I had to stay home with my kids on a school snow day.  Seemed like half the neighborhood ended up at our house!  Anyway, was a real good excuse for my to learn something new that day.

This instructable will show you how to make a stacked Plexiglas enclosure using OpenSCAD.  The enclosures I've built so far have used three pieces of 3/16" Plexiglas for the core slices.  The two cover pieces were made out of 1/8" Plexiglas.  Once assembled, the enclosure is really really rugged and tough.  Could run over the darn thing with a truck!

OpenSCAD is a kinda strange, in that, the model is built using a Python like language.  Kinda like Python but not really.  There are a bunch of strange restrictions like all variables are defined at compile-time.  Seemed strange to me.  There is no provision to edit the model using a GUI interface.  The GUI interface is just for viewing the model after it has been generated.

On the upside, OpenSCAD lets you whip around models by changing variables in your script.  Once variables have been updated, just save the file and OpenSCAD will regenerate the new model.  Basically, parametric modeling on steroids.

Once the model's source code parameters have been adjusted to your liking, OpenSCAD can be used to make a 2D "projection" of each piece onto the X/Y plane.  With the 2D projection done, a menu option can be used to save the 2D part outline to a DXF file.  Once saved as DXF, the DXF part file can be used on a laser cutter to actually cut the part.

Step 1: Generating an Enclosure with OpenSCAD

In this step I'm going to assume you have OpenSCAD installed on your machine.  If not, you can visit OpenSCAD.org and download and install the software.

Attached below is a Zip file with two files inside that are needed to generate a Stacked Plexiglas Enclosure.  Unzip both files into a directory.  Next, start OpenSCAD and read in the file "Stacked_Box.scad".  Note, at the beginning of the Stacked_Box.scad is an include statement that reads the other needed file "utils.scad".  As soon as Stacked_Box.scad is read into OpenSCAD the GUI side of OpenSCAD should display the model within a second, or two.  No other library files are needed for this model.

With the model displayed within OpenSCAD, use your mouse to spin the model around on the screen.  The mouse wheel zooms in, and out, while the right mouse button lets you pan the model.  For some reason, kids really get a kick out of spin the model.

Below is just a bunch of different images taken using the OpenSCAD menu option "Design/Export as image...".  The export image menu option generates a PNG type image.  When the export image dialog box opens, make sure you tact a ".png" on the end of your filename otherwise you will get a PNG image without a ".PNG" extension on the filename.

About This Instructable


27 favorites


Bio: Founder of Powerhouse Electronics. For more info goto: www.ph-elec.com
More by jimk3038: Easy ESP8266 WiFi Debugging with Python Raspberry Pi Internet Weather Station Make Your Own Laser Cut Standoffs for Electronic Projects
Add instructable to: