Lately I've been working toward better methods of designing custom cases to fit arbitrary objects, including circuit boards. My original intended use case, user group, or potential market, is for open source hardware -- anything from assembled printed circuit boards (PCBs) to bare PCBs to PCB designs.
Starting from the Gerber files and bill of materials for the "Inmojo Digital Dimmer v.2," (of which I'd bought parts for 6 and for which I wanted 6 cases) I used OpenSCAD to define the 3D models, first of the PCB itself (especially its connectors) and then of the case. Initially I was planning to 3D print the case, until I saw that it would take 7.5 hours to print on one of the 3D printers at Xerocraft. I was not looking forward to (6 x 7.5) = 45 hours of 3D printing. Plus, if you press me, I have to admit that I am not in love with plastic. It's expedient when it's cheap, but 45 hours is not cheap if machine time is worth anything.
On the Shark, I was able to rout the top half of one of my cases in much less time than 7.5 hours. (The finishing pass took 27 minutes, the roughing pass about the same I think. These times could be reduced with faster feed rates if I were to use cleaner bits, since at least the 1/4" bit is carbide, which does not really dull.) I then drew on what I'd learned to write Xerocraft's wiki entry on the Shark.
The "Cover Photo" is my first case top. It was the same design I'd created for 3D printing. Later I defined the design as a solid block, minus the volume of its contents (where the contents are the PCB, wires, and strain reliefs), cut in half.
Please note the wooden case should be oiled immediately after routing to prevent warping as the newly exposed inner material exchanges moisture with the air.
To amortize setup time, I defined an array: two pairs of case bottom and top, with a "frame" around it for clamping. This array is designed to be cut apart by tablesaw or chop saw. Between each two pieces is a waste piece the width of a saw blade's kerf. There's also a thick area in the very middle in which a brass screw could be set, to aid in fixturing.
Cut3D estimates this 2x2 array would take about 1 hour 15 minutes per side with 1/8" round/ball nose bit, at the feed rate I selected. Probably I could increase the feed rate if I were to add a previous roughing step with a 1/8" end mill. The end mill can run with 50% stepover and thus work much faster than the round/ball nose, which requires a very small stepover (maybe 15%) due avoid leaving ridges between the paths of the apex of the nose. Aspire can generate a much more efficient toolpath that doesn't require 100% raster coverage, as this one does.
The routing time comes out to 1 hour 15 minutes per case, which is longer than I'd hoped but much faster than the 7.5 hours estimated for a 3D print.