Don't put stacked pins in the same net if there is a NC symbol on the pin

Description

Right now, our connection logic ensures that stacked pins in a symbol always go to the same net.

It would be useful to change this logic so that if stacked pins have a NC symbol, each pin goes in its own net.

This is useful e.g. in connectors with stacked shield pins:

image

Right now, this schematic generates a ratsnest between all pins:

image

In my opinion, the intent of the NC symbol is to indicate no connection, and the most obvious way to interpret a NC symbol on a stack of pins is that none of the pins in the stack should be connected -- to anything, including to each other.

If connection is desired between the stacked pins and nowhere else, this can be done by just leaving the pin floating (or by giving it a label to set the net name, if desired). As long as the pins are an electrical type that does not require a driver, no ERC warning will be shown for a single-pin net because the connectivity code still sees multiple pins even though they are all in the same graphical location on the symbol.

KiCad Version

Application: KiCad Schematic Editor

Version: (5.99.0-9734-g644f546363-dirty), debug build

Libraries:
	wxWidgets 3.0.6

Platform: Linux 5.4.0-66-generic x86_64, 64 bit, Little endian, wxGTK, ubuntu, x11

	wxWidgets: 3.0.6 (wchar_t,wx containers,compatible with 2.8) GTK+ 3.24
	Boost: 1.71.0
	OCE: 6.9.1
	Curl: 7.68.0
	ngspice: 31
	Compiler: GCC 9.3.0 with C++ ABI 1013

Build settings:
	KICAD_SCRIPTING=ON
	KICAD_SCRIPTING_MODULES=ON
	KICAD_SCRIPTING_PYTHON3=ON
	KICAD_SCRIPTING_WXPYTHON=ON
	KICAD_SCRIPTING_WXPYTHON_PHOENIX=ON
	KICAD_SCRIPTING_ACTION_MENU=ON
	KICAD_USE_OCE=ON
	KICAD_SPICE=ON
	KICAD_STDLIB_DEBUG=OFF
	KICAD_STDLIB_LIGHT_DEBUG=OFF
	KICAD_SANITIZE=OFF