How to Measure Distance Between Vias?

Does anyone know how to accurately measure the distance between vias or between a via and pad? It seems like the measure tool in pcbnew does not snap to the center or edge of vias, but maybe I am missing something or there’s a setting to enable the feature?

At least on my installation (v7.0.7) the “snap to via” works very well.

How is your snap-setting in global Preferences–>PCB Editor–>Editing options–>Magnetic Points? (I have all 3 set to “always”)

small note: adding the used kicad version to the opening question is highly recommended

It would be hard with existing tools to measure the minimum distance from the edge of a via (not its center) to an arbitrary other shape pad. But, one trick would be to create a custom design rule that selects for that via and pad, and constraints the minimum clearance to some really large number. This will fail DRC and also report the minimum distance.

I mostly use PCB Editor / Inspect / Measure Tool to measure things. You can quite easily get to a resolution of better then a micrometer, and that is good enough for me.

Another option for measuring is by resetting the “delta” coordinates in the bottom of the screen with the space bar, but I prefer the measure tool because it gives more visual feedback.

But why is the distance from the center of a via so important to you. What is it you actually want to measure? You can also select a via and then show (edit) it’s properties. This gives you the XY location of the via.

Not quite correct - not hard at all.

Simply use your Hot-Key (one assigned to Not Snap) and the Measure Tool…

Hard if you want to get an exact accurate number. You can’t snap to arbitrary points (even if you could, you could not easily tell by eye which are the closest points to snap to in some cases), and if you disable snapping, you will only get the distance as accurately as your grid resolution (and eyes) are.

@craftyjon can’t argue with those facts but, the word ‘Accurate/Accurately’ means different things to different people and for different projects…

I once had to ‘Accurately’ launch an MX Missile from California to (won’t say exactly what Island in the Pacific) and hit the marked Target on the Ocean. It hit within 15 meters. That’s deadly accurate.

A Human Hair is, on average, 0.15mm to 0.35mm. How accurate does a PCB’s Pad/other placement need to be? And, to save user time from pulling out/measuring own hair, screenshot below…

1 Like

How about blond hairs? There is apparently something special about those. :slight_smile:

That measure tool does not snap to via’s, nor to track ends, regardless of whether they are turned on or off in the Selection Filter in the lower right corner. I’m guessing that only tracks snap to via’s. Although it works reasonably well overall, there is some behavior of KiCad’s snapping system that is not really optimal.

Dy Dx tool snaps to Via centres.
Use Polar co-ords. and subtract the two radii of the vias will give an accurate result

Between an oval pad and via, draw a track (the thickness of a blond hair) between centres and use polar Dy Dx again, this time subtracting the distance from the pad centre to its edge intersect with the hair and the via radius.
A bit of arithmetic can give a very accurate result?

I underscore the point re: A particular project’s needs…

If working on a Medical implant, such as Catheter (I have Patent on electronic interface for one) those dimension requirements are far different from flying a 40 foot-long, 6 foot-diameter missile 4000 miles and hitting target.

We’re Engineers and can agree on that - it’s commonsense.

It’s also commonsense that the Equipment/Machines/Tooling to Mfg and Assemble PCB’s has it’s own Dimensional limitations/tolerances. What about the actual electronic parts? They also have dimension tolerances…

One company I managed designed/built placement machines for Chip mfg for Intel - those dimensions are far, far tighter than most anything a Kicad user will design.

If measuring distance by mm, inch and Pixels (can’t get any smaller than Pixels on a computer), I use an App I wrote. It’s posted here. It’s old now and may have Java issues with current technology but, still works for me. Screenshot below…

Mine does not have an option for “Snap to Via”

I only have “Snap to Pads,” “Snap to Tracks,” and “Snap to Graphics.”

You can use the ‘Interactive’ measuring tool (not the same as the Linear Dimension Tool).

The Interactive Tool yields resolutions of, well my old/jittery hand can get 0.002mm.

Screen Shot 2023-08-31 at 09.44.02

???

When you zoom in, you can easily get sub micrometer resolution:

But when you zoom in further, something really strange happens. The font is getting jaggedly, and the tick marks on the ruler also become weirdly slanted. Some kind of internal algorithm is apparently running out of resolution.

I can see the same jaggedy jagg with 7.99.

The interactive measuring tool snaps to grid unless you have certain settings, at least in 7.99.

Mine does not have an option for “Snap to Via”. I only have “Snap to Pads,” “Snap to Tracks,” and “Snap to Graphics.”

I have the same 3 settings.
My question remains: How is your snap-setting in global Preferences–>PCB Editor–>Editing options–>Magnetic Points?
As I said I have all 3 options set to “always” and get snapping to the via centre point.

To relieve you from experimenting yourself: It seems a via counts as part of tracks, so the setting for “Snap to tracks” influences the snapping to the via centre.

remark: I checked these things with kicad v7.0.7, we still don’t know the version used by the OP.

Ah yes, that works. (Duh, I should have known that!). When I set PCB Editor / Preferences / Preferences / PCB Editor / Editing Options / Magnetic Points / Snap to tracks: “Always” then I can create measurements or use the measurement tool while snapping to off-grid pads.

Notice the grid points (@5mm pitch) in between the via’s.

…And, of course where/who the PCB is made has an affect on the dimensions…

Screenshot of JCLPCB info…

Do you need to do a lot of these?
If you only need a couple, you could the math based on the coordinates of each and the radius of the pads.
I know it’s painful, especially if you have to measure a number of these.
I wish I was better with python, this sounds like a good idea for a plugin.

Looks like enough info has been posted to dial-in a useable solution.

But, I’ll add to the pile this:

Given OP’s interest in Snapping to Via/Pad Center and getting dimension, aside from the above posts, user can create a Plugin using my Tutorial (posted here - be sure to read the Info by clicking ‘…more’)

Screenshot of two vias with track. And, one via with track to Pad…

Copper Fill is set to Outlines for visual clarity… All connections are to Center of Via/Pad