How to swap where traces go on a resistor on the PCB editor?

image
As you can see the traces make a sawtooth shape and it would be better if they were in a square wave shape.

Thank you!

You switch the ends of the resistors around in the schematic (eeschema assigns the pin numbers in order, so even passive components do have “polarity”). Just press R twice to rotate the part 180 degrees, then update the board from schematic.

1 Like

You have two options:

  • Rotate the footprint in the layout (hit R twice with the footprint selected). This will put pin 1 on the right side for some resistors, which makes no functional difference but may offend your sense of aesthetics.
  • Edit the schematic to swap which pin is connected to which net. You can do this by rotating the resistor 180deg in the schematic (hit R twice with the symbol selected), then Update PCB from Schematic.
2 Likes

Thanks for the help guys! Double pressing R on the PCB changes its effective location but rotating on the schematic is good. It looks much better now!

1 Like

IMO the KiCad official library convention of having the anchor of a THT footprint in the pin 1 is the worst decision ever. I just can’t see any single reason why it shouldn’t be in the geometric center of a symmetrical footprint.

7 Likes

Ah, I forgot that detail. That is true for through-hole footprints. SMT footprints have their origin at the pick-and-place location, which is generally the center of the footprint.

1 Like

All my personal footprints have the anchor in the centre of the footprint, even tht ones because of the rotations.

1 Like

I still wish there were a way to specify that the pins of a component are swappable. So any time a non polarized symmetrical resistor or capacitor is in a schematic, the pcb editor allows you to connect the footprint either way that is most convenient. Swapping ends of a resistor is not a big problem, but when added up it can sometimes become a significant waste of time.

1 Like

You swap pins. Then you have to propagate that info to PCB or to schematic.
Where is the advantage over simply rotating the footprint?
You rotate the footprint - done.

1 Like

That goes for a lot of other components as well. Abysmal.

The feature request for pin-/gate-swapping is 14 years old. Nothing substantial happend since…

That’s fine for resistors atl. How about other components? If you want to swap pins of a logic gate for routing reasons, rotation will not help a lot.

1 Like

I was speaking only about:

But now I see that the whole statement had a broader context which I didn’t noticed.

You are right, the OP’s issue is solved by rotating alright. I just took the opportunity to vent my pent-up frustration about the lack of gate/pin swap :grin:

1 Like

I suppose that as where you have simultaneously opened PCB and schematic some functions work cooperatively (like selections) then it would be possible to add some actions that could work only if both windows are opened (if you try to do it with one opened you should get warning window only).That way swapping of 2 input gate inputs could be possible without (complicated) defining the way of back propagation of any pin changes from PCB to schematic and specifying how to adopt them in schematic.
Being at PCB and swapping gate inputs will send info to schematic to mirror gate (schematic have to decide if along X or Y axes) and then run the Update PCB from schematic. The same cooperation could be used to swap gates (A,B,C,D) of one IC (or even between ICs). The functionality could be limited to only swap gates with no more complicated actions (A->C, C->B, B->A). User will have to do several swaps to reach it.
I think such limited solution could be implemented without lot of work and would solve most needs.

Well if it does not work to rotate a LM339 op amp, maybe it would help to turn the symbol inside out? (kidding)

Sometimes you have done a design but then you want to replace a bunch of resistors or capacitors on a schematic or pcb. After replacing, you find out that half of them have pins 1 and 2 swapped, It would be great if that did not matter in CAD, because it does not matter in hardware. Heck sometimes chip resistors have been poured into a cup like grains of rice.

That’s why I commented in Pins-swap and Gate-swap (lp:#593944) (#1950) · Issues · KiCad / KiCad Source Code / kicad · GitLab. IMO the pin/pad numbers in non-polar two-pin components create an artificial unnecessary restriction. The purpose of computers and software should be to automate things which can be automated, not create restrictions which don’t belong to the “business domain” (in this case abstract idea of schematics, physical PCB, physical components).

How this should be solved in the file formats and UI is a different matter. Maybe it’s not easy at all. At least one difficulty is that if you don’t know which pin is which, you don’t know the net it belongs to, and you don’t know how it can be routed, and what are the physical (DRC) rules for routing, so you can’t just start from the pin and start routing.

In an other CAD, pins could be defined swappable. Like inputs of a gate, pins of resistor and so on. There it didn’t matter which way a component was placed.

What does this mean? How it didn’t matter? Could you just start routing from either of the resistor pins and continue the trace to a pad which belonged to either of the nets?

Legacy thinking. Less important now I guess with finer grids and smaller packages, but the pads on a component were supposed to align with the grid. If the component origin was in the centre of the package this wouldn’t necessarily happen.