Skip to content

Instantly share code, notes, and snippets.

@projectgus
Last active February 10, 2021 05:18
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save projectgus/6014a79cdc0fe859b3f2 to your computer and use it in GitHub Desktop.
Save projectgus/6014a79cdc0fe859b3f2 to your computer and use it in GitHub Desktop.
Length matching scripts for KiCad
This script now has its own proper repo thanks to @mithro:
https://github.com/mithro/kicad-length-matching-checks
@ekolker
Copy link

ekolker commented Jan 26, 2015

First of all, many thanks for this snippet. It has made my life much easier.

Second (and please forgive my unfamiliarity with the pcbnew module) how hard would it be to account for vias? To first order, could you add 1.6mm * [number of vias in the net] to the sum you do on line 106, or is getting the net's vias a major pain?

@projectgus
Copy link
Author

Hi!

Sorry, I somehow missed your question when you posted it last year.

FWIW, I think this would be possible and I'm 99% sure you can get to the vias via the Python API. Originally my thinking was that vias constitute an impedance irregularity that's significant nearly any time you're length matching - so once I'm at the situation where I care about 1.6mm length differences then I already need to be paying close attention to via placement, trying to keep them uniform across signals, etc. Once I'm doing that then I can mostly disregard them from a length matching perspective, because they're going to be mostly symmetrical changes.

That said - did you ever add via counting support to the script?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment