pcb-rnd knowledge pool
padstack by Tibor 'Igor2' Palinkas on 2017-11-04
Tags: announcement, padstack, via, pin, hole, pad
Abstract: An introduction to padstacks.
1. What is a padstack?
A padstack is an optional hole (plated or unplated) and a list of layertype-shape pairs for the pads. Layertype includes not only copper, but any layer type.
What can a padstack do?
It is the replacement object for vias, pins and smd pads. It is universal enough that it's easy to describe all three cases. It removes almost every limitation in those objects that ever got mentioned on the mailing list. It's so universal that it can make perfect fiducials and align markers.
How does it make a PCB designer's life easier?
It introduces the following features, which will be described in separate announcements to keep things shorter:
- almost arbitrary pad shapes for pins, vias and smd pads (e.g. oblong pads, asymmetric circles or octagons, hexagons, pentagons, arbitrary convex polygons)
- different pad shape on various layers (e.g. smaller pad on inner copper layer vs. larger pad on outer copper layer)
- possibility for explicit, user defined shapes even on mask and paste layers
- blind/buried via
- cache/library of matching padstacks - possibility to change one and affect all instances, but also possibility to take out a single padstack from the group to deviate
- thermal on anything - there's no difference between smd pad or pin
How does it make the coder's life easier?
- a single, unified object instead of 3 different objects (via, pin, pad)
- shape is not a flag anymore - no more square or octagon flag, but a clean API that returns the actual shape on the given layer
- pcb-rnd has extensive IO capability to other file formats (kicad, eagle, hyperlinks, etc.); with padstacks it's much easier to reproduce their pads
Next steps, what to expect
First, we are getting padstack related bugs and missing features fixed in trunk/ as our users are starting to test it. Then the next release, scheduled to the end of 2017, will feature a hopefully 100% stable, production quality padstack support.
We will then start rewriting the IO plugins to support padstacks instead of vias, pins and pads. This includes the .pcb plugin too - it will convert old data to padstacks on load and padstacks to old data on save, transparently.
Finally, when no code uses the old data model anymore, we will remove a lot more code than we had to add for padstacks and subcircuits. We will remove pads, pins, vias, elements, element lines and element arcs. This will probably happen some time in 2018.
pad stacks can be created similar to elements and subcircuits: draw objects on various layers, then select them and convert the selection to padstack using a menu. Or select them, copy to buffer, and convert the buffer.
There will be soon a padstack breakup function too, again similar to what elements and subcircuits have these days. And of course, some time later there might be a way to save and load padstacks, just like footprints, and then pcb-rnd will be able to open the padstack files directly for editing, just like when we edit elements or subcircuits. We may even end up having a library selection system for them, similar to the footprint lib's.
Another UI feature is a new dialog box (supported by all gtk and lesstif HIDs!) that presents two tabs: one for the specific padstack reference the user clicked on and one for the prototype. This dialog allows the user to change the basic parameters, like clearance and hole properties, including plating and bbvia aspects.
Later on this dialog will offer shortcuts for copying and transforming shapes, per layer type, e.g. it will be easy to do things like "copy top copper shape to top mask, bloat it up by 5%".
Another TODO for the near future is that the routing style should have a padstack prototype for each style, instead of via parameters. And there should be a very simple dialog that can create a "classic via" prototype using only the hole diameter, ring diameter and clearance.