Main News Doc Support People Events & timeline pcb-rnd [pcb-rnd logo]

pcb-rnd - the [square] patch

Most of my PCBs end up in toner transfer. There are a lot of tricks around prototyping at home. One of the problems I often face is small rings peeling off during rework (and rework tend to happen on the first prototypes). The solution for this is increasing ring size - which is not suitable if traces are passing between pins. Another solution is to increase the area of the pin: [demo showing DIP with different pin shapes]

The patch takes an octagon pin and stretches points in various directions. There are 4 bits (for left, right, up and down) to indicate in which directions the stretch applies. Pressing 'q' on a pin cycles thru round pin, square pin, 16 stretched octagons and the original octagon.

The code is also patched to handle clearances, shorts and connections (find.c).

Thermals are not fully working for funny shaped pins, but it has low priority: they still work fine for rounded and square pins and if there is a poly around the pin, I wouldn't use shaped pins anyway.

save/load and compatibility

This patch introduces a new pin flag called shape(n), where n is an integer selecting the shape of the pin when the square flag is also set:
Pin[40000 60000 6000 3000 6600 2800 "8" "8" "square,shape(3)"]
Mainline PCB will load the design ignoring the custom shape and will use a square pin. As long a traces end in the center point of the pin, this should not break connections.

Mainline PCB doesn't save shape() - once the design is loaded and saved with mainline PCB pin shape info is lost.


In the original code there are separate code paths for round, octagonal and square pins. The separation repeats for at least: In most cases a set of hardwired constants are written in the C code. A notable exception was the octagon pin draw function, that had x and y offsets in a const table for 8 points and a loop to create the poly (or line segments in thin draw).

The [square] feature is a good base for cleaning up the code a bit and for moving toward a generic pin shape patch: