Library for enclosures, cases, boxes footprints


You’re obviously way more proficient at this than I am - hats off to you :wink: I’m going to retreat for now and come up with a new workflow so I can make them as neat and correct in at least less than double the time it took you to do this. I guess I’ll take the easy way out and try to script it, even though I’m looking at only 3 enclosures.

Thanks for donating some of your precious time and thoughts on this!


I like that even more, as you can give it the dimensions of all similar enclosures and have the script pop out ready footprints to share with others :slight_smile:


That would be the most versatile solution indeed, but I’m running into problems there.

The 1590A enclosure has a bit of an oddball dimension: the inner width of 76.65. In the ‘long run’, this causes an 0.025 mm mismatch between the calculated arc coordinates and the calculated outer line segment coordinates. One end of the arc lines up, but the other is always 0.025 mm off. I guess that’s what you’ve encountered with your footprint aswell - though I’m guessing you’ve manually connected the arcs with the lines with little line segments. At the moment I can’t think of any way to account for that programmatically though because the calculations give me numbers that don’t line up. Damn you Hammond!

The script spits out numbers that align correctly for the 1590B and 1590BB enclosures, so that’s a good thing :slight_smile:

I would upload the script, but I’m afraid it’ll give you or anyone else headaches trying to get your head around this, so I’ll save you the trouble for now :wink:

---------- Lots of hours later --------------

Allright, I’ve fixed that annoying mismatch by shaving off the 76.65 mm to 76.60 mm (I dare anyone to make it work with the value from the datasheet), and now everything fits together for 1590A, 1590B and 1590BB. I wanted to do outlines for the 1590D and 1590DD aswell but they have additional screw holes that need to be accounted for. That’s something for another day.

PCB Outline modules are attached (no 3D models, get them from the Hammond website, scale to 1/2.54 and voila), and I’ll attach the scripts along with a how-to-use tomorrow (it’s 5:35 AM where I live now), but here are some beautiful previews for now :). I’m off to bed!

Hammond_1590A_2mm_python.kicad_mod (1.7 KB)
Hammond_1590B_2mm_python.kicad_mod (1.7 KB)
Hammond_1590BB_2mm_python.kicad_mod (1.7 KB)


I like the idea of having common enclosures defined in the KiCAD libraries.

I’ve made a start with the Hamond 1551 series -

I have not put the outline of the PCB on layer Edge.Cuts to allow for greater flexibility.


Because @Joan_Sparky resurrected the thread…

I did modules for Hammond 1553B, and 1553BBAT

The datasheet calls for several arcs which I found very tricky to draw in Kicad, while keeping both pcbnew and freerouter export happy with the outline. I discovered that if segments are too small, they get incorrectly joined and Kicad throws an error. This can happen with arcs that have a small radius. An error is also thrown if there is a gap that is too big.

In order to avoid these problems, I used a standalone program to generate the modules, in this case it is really useful to have edge cuts in a module.

RMC_hammond.mod (21.5 KB)


why not use step-up and provided inner panel?
I did two model using Maui method.