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