[SOLVED] Connectors chirality / isomers

Hi,
sorry if this was already discussed (it was probably…), but I found no answer due to my poor vocabulary (reason why I use chemistry/physics words to descibe the “problem”).

Consider a socket header. For example “PinSocket_1x04_P2.54mm_Horizontal”. The footprint shows the sockets oriented to the left. This is coherent with the corresponding pin header (pins are on the right) : this way we have a correct board to board connection, with consistant numbering.

But if for some reason, while designing, footprint has to be oriented the other way (let’s say we want the connector on the other side), this means that pin 1 will become pin 4, pin 2 becomes pin 3, and so on… and the symbols have also to be moved in the schematics.

I didn’t find a mirror function in Pcbnew (and in most cases it doesn’t really make sense to mirror a footprint).

But I could do this by opening the footprint from within Pcbnew, and mirroring it in the footprint editor. Is this the wright way to do this ? Is this the reason why there are no left / right pin / socket headers ?

There is no “mirror” function for Footprints in Pcbnew. Real physical parts can also not be “mirrored” instantly. Mirrors just generate illusions.

What you want is to flip the part to the other side of the PCB. You can do this with the f shortcut key while hovering over a Footprint. Or with the Right Mouse Button, and select it from the context menu.

I fear you read the question a bit too quickly… What I want is NOT flipping (I wrote it). I don’t want the part to go on the other side.

I’m talking about mirroring horizontal through hole pin/socket headers and keeping pin numbers untouched. I can do it at local level by editing the footprint (mirroring), without altering the library. I’m just asking if there’s another/better way to do it. I’d also want to be 100% sure there’s no risk for the original libraries, because I don’t 100% understand the local/global library logic behind their management.

I can’t post pictures (why ???). If I could, you’d understand instantaneously what I mean !

BTW, I created 3D libraries for 1x and 2x 2.54mm horizontal pin and socket headers, 1 to 40 pins, that make things easier when playing with assemblies and coordinate systems in CAD. (a bit cumbersome, maybe I could avoid this !)

[EDIT] If it’s still unclear, I could shhot a short video and upload it on YT.

The mirror image of such connectors can make indeed sense. However, only for such connectors (or components in general) that don’t have a defined orientation for the mating side and only if there are no markings on the connector. The pin headers might really be the only things where this is even an option.

I am therefore convinced that a direct mirror function in KiCad does not make sense (would lead to many possible mistakes at very low amount of added viable usecases).
So for me the only option would be to make mirrored footprints for this usecase. (Adding them to the official lib might be an option but consider that we already get complaints by users that there are too many footprints for pin headers as is. I however suspect that nobody would reject them being added either, but you can’t really expect others to do it for you.)

2 Likes

I understand the original use case well. However, I agree with Rene: it wouldn’t make much sense to add pin header/socket footprints for all numbering alternatives to the official library. Instead, it doesn’t take much work to edit an individual footprint, and if there’s need to reuse it, to add it to a personal library.

1 Like

Pin numbering for pin headers is really kind of fixed. After all they are often connected to flat cables so the odd even numbering for dual row is a given (and single row really only has one option)

Bending direction for angled versions is however a different story (so for these the mirrored option could also be thought of as the one where it bends -90° instead of +90) which is why i can kind of see a viability here.

This what I “discovered” (after spending hours creating mirrored footprints and 3D models, with “left” and “right” suffixes) :
(these automatic smilies are the plague !!!)

  • drop a footprint on the board
  • open it in the foot print editor
  • apply the mirror function

the “left” becomes 'right"
the “right” becomes “left”
no numbering change !

Works a treat. But is there some side effect ? I didn’t find any : libraries seems to remain the same. I mean : after I mirror a footprint, if I drop the same footprint on the board, I get the original one, not the mirrored one. This is just fine. But is this the expected behaviour ? Is it just a workaround ? Could this behaviour change in the future ? Is it a quirk or the feaure that makes no need for isomeric pin headers ?

If it is intended to work this way, there’s no need for a mirror function in pcbnew, and no need to create right/left libraries, and it is great ! As great as the abiliy to change individual pads on the PCB (unlike Eagle)

I have a different way of working.
I do not see a big benefit of this “mirroring” of footprints.

As an intermediate:
In Eeschema you can easily mirror schematic symbols.
Hover over a schematic symbol, then press m for “move”, which detached it from all wires and attaches it to the cursor.
Then press either x or y to mirror your schematic component in those axis, and place it back in it’s original location.

Note that when somebody is searching for faults on a board, then intermixed “left” and “right” variants of connectors is a nuisance. while in the schematic it really does not matter if connector pins are numbered from top to bottom or from bottom to top. Left to right or Right to Left. Pin numbering for schematic symbols for IC’s is and such is all over the place, as these are generally drawn in logical clusters instead of physical pin locations.

About your last post:
If you: “drop a footprint on the board” then that is a copy from somewhere else (probably a library). If you then: “open it in the foot print editor”, you are editing that particular instance of the Footprint. This is intended and by design.

If you want to make your “Left” and “Right” versions, then you have to export or save them in a custom library, and direct Eeschema to use the footprints from your own custom library, instead of the default libraries.

Spending hours for making whole libraries of “Left” and “Right” variants of connectors seems like a waste of time to me.

The mirrored version makes sense if you connect your current pcb to an extern component that defines pin numbers such that you need the mirrored version on your pcb to have it agree with the external.

@paulvdh Ok, so no problem mirroring a footprint ! Fine. The two buttons in properties : “Edit footprint” and “Edit library footprint”. Spotted !

BUT :

In 3D viewer, the pads, silkscreen, etc. are mirrored, NOT the 3D model ! Huge disapointment ! :sob: Unless somewhere there’s a option I’m not aware of, and that allows mirroring a specific 3D model component in pcbnew when the footprint is.

[I’m editing while posting and testing] : BUT #2 : in the footprint editor, for this specific footprint, we can rotate + offset and get a pseudo-mirrored horizontal header : WE CAN REORIENT THE 3D MODEL FOR THE MIRRORED FOOTPRINT ! :star_struck: Amazing !

(couldn’t do a video capture with OBS, it tells me there’s a problem with my video drivers - no luck today !)

I suspect that many users don’t bother with 3D models. On my side, it is one of the 3 main reasons why I switched from Eagle to KiCad, after failing with Altium (learning curve…). I need these 3D models for mechanical design, and because I make models for all these little chinese modules that we all use (displays, DC/DC converters, arduino Nano’s and Pro Mini’s, Blue and Black Pills, etc.).

I had already created exactly 650 3D models for 2.54mm headers, sockets, pins, PC104 connectors, 1xNN and 2xNN, vertical, horizontal, right, left, long, short… Most of them are now useless, but not all of them.

Maybe not the majority, but many of us 3D models are very useful or even necessary.

1 Like

You know what ? I just forgot that -1.0000 scaling is… MIRRORING !!! (it’s been 20+ years since the last time I played with transformation matrices…)

So, mirroring an horizontal pin header with vertically aligned pads is done by setting X scaling to -1 . Done !

And therefore, problem solved.

Still need to solve the problem with OBS and my video drivers so I can shoot a video.

[EDIT] problem with OBS = solved. I prepare a short video and will upload it on YT ASAP.

“There are no problems, there are only solutions”

A video is online : https://youtu.be/iIffExcJXHA

Unfortunately there’s a bug in KiCad : negative scaling factors mess up the 3D model. They shouldn’t. Matrix calculations are matrix calculations, transformations are transformations, mathematics are mathematics…

This bug has to be fixed, or negative scaling factors have to be rejected.

But there’s a workaround that gives a pseudo-mirroring (rotation + transalation) for the 3D model.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.