Rounded rectangle pad hole

I have a switch with rectangular pins and I want to make a footprint where the holes in the pads are rounded rectangles.

Linear slot results in the ends of the slot being semicircular, and the arbitrary slot doesn’t cope well with a path set in a rectangle, which should work but creates artifacts.

Is there any way to make rounded rectangle pad holes at the moment?

If I use linear slot then I have to make the overall pad width wider and then there’s no space between the pads to route connections!

I hope this shows what I’m trying to achieve with arbitrary slot - you see the artifacts!

How does the switch look exactly? Do you have a datasheet?

What you try to achieve is indeed not officially supported (yet). I even don’t know how PCB manufacturers would expect this to be represented in Gerber files (which is important to know to support this use-case in LibrePCB).

If they want normal slotted pads, your current approach should work. I think the rendering artifacts are just a problem of LibrePCB - could you check the exported Gerber files how it looks (e.g. with Gerbv)?

Another way could be to draw the hole with a polygon on the Board Cutouts layer. However, this is quite hacky as the layer is intended for non-plated cutouts and it’s up to the PCB manufacturer how they will handle it (may be as intended, may be non-plated, or they may complain).

The switch is an extremely common 3PDT footswitch very widely used in guitar effects pedals and made in the same size and shape by multiple manufactures

It looks like this:

Hmm OK, but to be honest for this kind of leads the normal approach is to just use normal slots :see_no_evil: The thickness of the leads is probably only around 0.5…0.8mm, so the slot only needs to be 0.25…0.4mm too long on each side, that’s no problem at all. The gaps will simply be filled with tin when soldering.

Rounded rect pad holes are something very very very unusual, basically never used. I’ve not seen any EDA tool which supports that in a clean way.

well I’ve finessed the sizes to make it work I hope.

for illustration here’s a PCB using the same switch that uses round rectangle holes (the maker is no connection to me, it’s just one of many examples of switch pcbs I’ve been looking at)

I’ve no idea what software they used to create this.

BTW it’s not the gap between the pin and the pad that concerns me at all, it’s keeping the overall size of the pad down to allow space for routing traces.

and here’s what I’ve ended up with in librePCB, I think it will work. I’m not sure how much switches from different manufactures will vary in pin size.

Usually people use some ugly workaround to achieve unusual things, i.e. often there are ways even if the software does not officially support it. I’m pretty sure your initial approach with LibrePCB would look correct in a Gerber viewer too (only the rendering in LibrePCB is wrong). But I’d still discourage from doing such unusual things since there’s always a risk that manufacturers misunderstand it and will do something wrong.

I think that looks reasonable :+1: