# Library for enclosures, cases, boxes footprints

You’re obviously way more proficient at this than I am - hats off to you 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

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

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

---------- 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!

2 Likes

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

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

2 Likes

I did modules for Hammond 1553B, and 1553BBAT http://www.hammondmfg.com/1553.htm

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)

2 Likes

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

1 Like

Hi Jules,

Thanks

This might be of interest - I had some Hammond boxes so I made this video/tut…

So do I and as these were forum hosted, they should still be there

I don’t know if it is a ‘level’ thing so I bumped the user up one. @fepino Please try again.

Thanks but I still get e.g.