yaqwsx / KiKit

Automation tools for KiCAD
https://yaqwsx.github.io/KiKit
MIT License
1.49k stars 200 forks source link

kikit separate: net renaming breaks substitution vars like ${SHORT_NET_NAME(n)} #687

Open dlitz opened 3 months ago

dlitz commented 3 months ago

Prerequisites

KiKit version

1.5.1+11.g56f018a

KiCAD version

8.0.2

Operating system

Debian bookworm (flatpak)

Description

kikit separate adds prefixes to all netnames (e.g. "Board_0-GND"), which garbles use of substitution vars like ${SHORT_NET_NAME(1)} in footprints when they refer to global netnames.

Modifying netnames might be necessary when panelizing, but there should be no need for it when simply splitting up a PCB, and it breaks footprints that put netnames on the silkscreen layer.

Before using kikit separate

image

After using kikit separate:

Note how the GND and VDD labels are made illegible on J1:

X1 X2
image Screenshot_20240514_002122

Schematics

Root

Screenshot_20240514_001146

subckt.kicad_sch

Screenshot_20240514_001213

Steps to Reproduce

yaqwsx commented 1 month ago

Thank you for noting this. I wasn't aware you are able to reference net names in labels in KiCAD. Ideally, we should bake the net names for panelization, however, this seems a little more involved than I expected.

Therefore I disabled net renaming in board separation in 5fe407f as it should solve most of the problem we observe. The "ultimate" fix will take some time to implement and test properly.