It recently hit me, that having an actual number as the width of a trace is not a good idea. Same thing for via sizes and differential pairs parameters.
They should have a name/label. When I go to the Board Setup, Tracks & Vias, the entries in the “Pre-defined tack and via dimensions” should have:
- For tracks: Name, Width
- For vias: Name, Size, Drill
- For diff pairs: Name, Width, Gap, Via Gap
And then, the pull-down list in the “main” pcbnew work window to select track width should show the widths by their name. For example:
Track: Data-bus (0.15 mm / 5.9 mils)
Track: Control-line (0.2 mm / 7.87 mils)
etc.
Maybe the user could/should have the ability to omit the name, in which case it sort of falls back to the current functionality. The width is just a “hardcoded” numeric value)
An essential part of this feature is that if I go to the Board Setup dialog again and edit one of those, and for example change the Data-bus
track width to 0.12 mm, all of the traces with Data-bus
width will immediately change from 0.15 mm to 0.12 mm — yes, with the risk that if increasing, it can cause DRC violations; after all, this happens whenever one manually edits the width of a track or tracks the user can deal with that; and it’s not a critical problem: DRC violations do not stay there silently, assuming that one does run the DRC checker, either periodically, or at least before finalizing the board.
The feature also includes the aspect that the .kicad_pcb
file should use the names. For example, the lines in the .kicad_pcb
file would look like this:
(segment (start 10.0 10.0) (end 20.0 20.0) (width Data-bus) (layer F.Cu) (net 0))
(segment (start 30.0 30.0) (end 40.0 40.0) (width Control-line) (layer F.Cu) (net 1))
(via (at 40.0 40.0) (size Control-line-via) (layers F.Cu B.Cu) (net 1))
While we’re at it, if you indulge me on a tangential rant / additional suggestion: it is also a horrible idea to put the net number in those lines; if net 1 is GND, that last line should be:
(via (at 40.0 40.0) (size Control-line-via) (layers F.Cu B.Cu) (net GND))
[End tangential rant]
And of course, the user_trace_width
and user_via
lines in the setup
section at the beginning of the .kicad_pcb
file would be adjusted accordingly.
Notice that although this has some overlap with the functionality provided by net classes, it is not the same (I mean, putting aside the detail that net classes have such poor functionality that they are an almost-useless feature; I hope this will improve in KiCAD 6).
Who’s with me on this one? (I’m sure David Wheeler, if he was alive and cared about KiCAD at all, he would be with me on this one: “Every problem in computer science can be solved by an additional level of indirection” )