Tuning skew of traces with non-zero pad-to-die-length produces wrong results

Description

I'm trying to tune the skew of a differential trace pair where the connected pads have non-zero pad-to-die length. The tuning tool appears to be trying to match the total length (including pad-to-die length) of the tuned trace against the routed length (excluding pad-to-die length) of the other trace.

Steps to reproduce

  1. Choose a footprint with non-zero pad-to-die lengths and place on PCB
  2. Assign those pads to differential net
  3. Route any differential track
  4. Compare total lengths, calculate difference
  5. Use skew tuning tool on shorter track
  6. It should show exactly the difference from step 4, but instead the difference is off by the pad-to-die length of the longer trace.

Sample project: dptest.zip

KiCad Version

Application: KiCad PCB Editor

Version: 6.0.1-79c1e3a40b~116~ubuntu21.04.1, release build

Libraries:
	wxWidgets 3.0.5
	libcurl/7.74.0 OpenSSL/1.1.1j zlib/1.2.11 brotli/1.0.9 libidn2/2.3.0 libpsl/0.21.0 (+libidn2/2.3.0) libssh/0.9.5/openssl/zlib nghttp2/1.43.0 librtmp/2.3

Platform: Linux 5.11.0-49-generic x86_64, 64 bit, Little endian, wxGTK, , x11

Build Info:
	Date: Jan 15 2022 20:28:15
	wxWidgets: 3.0.5 (wchar_t,wx containers,compatible with 2.8) GTK+ 3.24
	Boost: 1.74.0
	OCC: 7.5.2
	Curl: 7.81.0
	ngspice: 34
	Compiler: GCC 10.3.0 with C++ ABI 1014

Build settings:
	KICAD_USE_OCC=ON
	KICAD_SPICE=ON
Edited by Kjell Braden