Pcbnew: Net class clearance setting has no effect on zones
Description
The net class clearance setting has no effect on zones. Instead, zone clearance is set to 0.2 mm, or to the value directly in the zone properties, whichever is greater.
Expected behavior is for the zone to follow net class setting when it is greater than the zone property. In other words, clearance=0 in the zone makes it always follow the net class setting.
It is also expected to use the net class of the actually connected net, and not always the 'Default'.
Steps to reproduce
-
Create or open a board with at least one copper zone in it.
-
Board Setup -> Design Rules/Constraints -> Minimum clearance: set to 0.1 mm
-
Board Setup -> Project/Net Classes -> 'Default' netclass/clearance column: set to 0.1 mm
-
Select a copper zone, check the 'Min clearance:' shown at the bottom of the screen.
It either reads "0.200 mm (from netclass 'Default')" or some greater value e.g. "0.508 mm (from zone)"
Clearance cannot be smaller than 0.2 mm even when we just set the board minimums to 0.1 mm.
KiCad Version
Application: Pcbnew
Version: (5.99.0-3536-g078366963), release build
Libraries:
wxWidgets 3.0.5
libcurl/7.71.0 OpenSSL/1.1.1g (Schannel) zlib/1.2.11 brotli/1.0.7 libidn2/2.3.0 libpsl/0.21.0 (+libidn2/2.3.0) libssh2/1.9.0 nghttp2/1.41.0
Platform: Windows 8 (build 9200), 64-bit edition, 64 bit, Little endian, wxMSW
Build Info:
Date: Sep 25 2020 09:06:14
wxWidgets: 3.0.5 (wchar_t,wx containers,compatible with 2.8)
Boost: 1.73.0
OCE: 6.9.1
Curl: 7.71.0
ngspice: 32
Compiler: GCC 10.2.0 with C++ ABI 1014
Build settings:
KICAD_SCRIPTING=ON
KICAD_SCRIPTING_MODULES=ON
KICAD_SCRIPTING_PYTHON3=OFF
KICAD_SCRIPTING_WXPYTHON=ON
KICAD_SCRIPTING_WXPYTHON_PHOENIX=OFF
KICAD_SCRIPTING_ACTION_MENU=ON
BUILD_GITHUB_PLUGIN=ON
KICAD_USE_OCE=ON
KICAD_SPICE=ON