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)

2 Likes

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

I’ve made a start with the Hamond 1551 series - https://github.com/SchrodingersGat/Enclosures.pretty

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

2 Likes

Because @Joan_Sparky resurrected the thread…

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,

are the downloads still available? I get an access denied message.
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.
AccessDeniedAccess Denied4AYZVKYAJ970WNR5BjV+L+hztS2eZ1Hvwr1+n4cmZUjmABElYnTjAOBw+f77XI7RC5GbmjXVTQVu7cMjpfSH3GKXp7mX9Du3jyIjSA==

I am a moderator and cannot access them, so I guess @mgyger is correct and they got left behind in a migration

Ok, thanks. Then I have to create them on my own. I’m so lazy :slight_smile:

@Jules is still active on this forum. Maybe he still has his original script generated files?

Hi Jules, Can you re-upload these footprints? Thanks!

I’ll try and get to this in a couple of days, see what I still have.

1 Like