qdrives , 10-08-2023, 02:17 PM
1. The language itself is not case sensitive. However, if you use string compare (or selection), that may be case sensitive.
2a. No. Clearance is a distance between two objects. So you must be able to specify those two objects. However, >60% of clearance rules will just have one specified and the other set to all.
2b. It is true that you can add the object type (track, pad, etc.) in the selection, but that would create many more rules. In old version of Altium there was no table, so I had to create many rules. With the table the number of rules could perhaps be half.
If you take the IPC-2221 rules for clearance, you have the various condition like B4 (solder resist over tracks) and A6 (uncoated component lead). B4 is lower than A6.
Now you can translate A6 to SMD and TH pads and perhaps even via's (if they are not guaranteed covered by solder resist, ie filled and covered). Most other objects (like track, arcs, polygons, copper) will probably be covered with solder resist and fall in the B4 category.
Now lets assume you have a 24V net on your board. IPC states that A6 needs to be at least 0.25mm and A4 at least 0.05mm. For fabrication you need at least 0.1mm.
This will create a rule "InNetClass('24V') - All" and have SMD and TH pads set to 0.25mm and copper (simple) set to 0.1mm.
If you set the solder mask expansion for via's to 0.05mm from the hole, 0.2mm hole size and 0.5mm pad size, that wil give you 0.1mm covered from the outer edge.
In this case, the covered part and 0.1mm will give you 0.2mm. To another B4 object that would not be a problem, but if it is a A6 object (pad), the clearance needs to be 0.15mm in order to meet the 0.25mm between bare copper elements.
That gives you 3 different distances for a single netclass.
Now for a list of (old) rules that I created over the years. I highlighted some where both the scopes were used.
There the clearance for 110V (150V IPC) A6 would be 0.8mm, or as I had set them to 1.6mm (IEC 60664). That did not allow me to use a 0603 gate resistor for the MOSFETs. However, as the voltage difference between those nets would be low (22 ohm resistor), I created these multiple netclasses (110V, 110A and 110B) that would allow me to do so without violations.
3. I was told that KiCad has something like rules, but not as fancy as Altium. This was a couple of years ago, so things may have changed.
Eagle has the ability to use netclasses with a single clearance. The table like clearance is only for the general set.