Custom DRC rules - add simple plausibility check to DRC
Description
The custom drc-rules are very mighty, but at the same time offer the possibility to create many mistakes at writing the rules. I could imagine to include simple plausibility-tests for the rules into the DRC-check.
possible tests:
- netclasses in custom rules which are not defined in the board-setup
- two custom rules with same condition-line
- layer-clause with undefined layers
reasoning: for 1): Could happen as result of copy/pasting custom rules from one project to another. Or with simple spelling-mistake at typing the rules. See example-project below. for 2): Could also happen as result of copy/paste error.
Steps to reproduce
The project shows a example for mentioned case 1 - undefined netclass
- open attached project, open schematic+board: DRC_custom_rules_netclasses.zip
- open board-setup: examine netclasses & custom rules:
- netclasses: Default / netclass_01 / netclass_02
- custom rules: there are custom rules to implement a sort of clearance-matrix.
- The last rule shows a simple and obviously spelling mistake (netclass_03 instead of _02). Therefore the goal of a complete clearance-matrix (with custom clearance-values between all available netclasses) is not achieved.
KiCad Version
Application: KiCad PCB Editor x64 on x64
Version: (7.0.0-rc1-70-g9298defd3f), release build
Libraries:
wxWidgets 3.2.1
FreeType 2.12.1
HarfBuzz 5.0.1
FontConfig 2.14.1
Platform: Windows 10 (build 19044), 64-bit edition, 64 bit, Little endian, wxMSW
wxWidgets: 3.2.1 (wchar_t,wx containers)
Boost: 1.80.0
OCC: 7.6.2
Curl: 7.86.0-DEV
ngspice: 38
Compiler: Visual C++ 1934 without C++ ABI
Build settings:
KICAD_SPICE=ON
Edited by Maik Freitag