Hi all!
I just came across something I did not expect. I assumed, as wildcards are supported within the custom rule constraint regexs would also be evaluated. I do have a number of netclasses Cell0 to Cell16 which I want to be matched vs. each other. Something like this, regex would be very helpful, but does not work:
(rule "Clearance: All cell inputs vs. everything (outer layers)"
(layer outer)
(constraint clearance (min 0.6mm))
(condition "A.NetClass == '^Cell_{([0-9]|1[0-6])}'"))
(rule "Clearance: Cell input 5 vs. close potentials (outer layers)"
(layer outer)
(constraint clearance (min 0.2mm))
(condition "A.NetClass == 'Cell_{5}' && (B.NetClass == '^Cell_{[1-9]}')"))
I thought this might be a problem with my regex-abilites.
But then I checked the clearance resolution for a simpler rule. Wildcards are accepted:
- Layer F.Cu
- Zone [/C_{E09}] on F.Cu [netclass Cell_{0}]
- Zone [/CVTIN1/D] on F.Cu - B.Cu [netclass Cell_{1}]
Checking rule condition “A.NetClass == ‘Cell_{*}’”.
Rule applied; overrides previous constraints.
The same rule with regular expression does not seem to be recognized:
Checking rule condition “A.NetClass == ‘^Cell_{([0-9]|1[0-6])}’”.
Condition not satisfied; rule ignored.
A simpler “Cell_{[0-9]*}” does not work either. Is that the way it is supposed to work at the moment? Do i make any mistake?
Thank you in advance!
Application: KiCad PCB Editor x86_64 on x86_64
Version: 7.99.0-1.20230620git21f2f98.fc38, release build
Libraries:
wxWidgets 3.2.1
FreeType 2.13.0
HarfBuzz 7.1.0
FontConfig 2.14.2
libcurl/8.0.1 OpenSSL/3.0.9 zlib/1.2.13 brotli/1.0.9 libidn2/2.3.4 libpsl/0.21.2 (+libidn2/2.3.4) libssh/0.10.5/openssl/zlib nghttp2/1.52.0
Platform: Fedora release 38 (Thirty Eight), 64 bit, Little endian, wxGTK, gnome, wayland
Build Info:
Date: Jun 20 2023 17:16:34
wxWidgets: 3.2.1 (wchar_t,wx containers) GTK+ 3.24
Boost: 1.78.0
OCC: 7.6.3
Curl: 8.0.1
ngspice: 40
Compiler: GCC 13.1.1 with C++ ABI 1018
Build settings: