[Jon] a.k.a. [Pedantite] recently added small-scale laser cutting to his business and thought about using that laser cutter to add some value to some of the many project designs he creates. Yes, this means custom laser cut enclosures, but how to go about it? [Jon] loves automation, and that can only mean automated design of laser cut enclosures by reading the board files from his project library.
The idea of automating the design of plastic enclosures was to read the design files, figure out the dimensions of the board and where the mounting holes go, and generate a file for the laser cutter. The weapon of choice was OpenSCAD, a design language that can be highly parameterized, read external design files, and spit out proper DXF files for laser cutting.
[Jon] set up his toolchain as a Python script that reads design files, sends parameters off to a .SCAD file, and generates a DXF for the laser cutter. There’s also a bit that generates enough data for Blender to render a 3D image of the finished product, all only from gerbers, a drill file, and a few user variables.
The source for these files haven’t been released yet, but that’s only because it’s in a proof-of-concept stage right now. You can check out an example of a render of one of the cases below.