← Back to team overview

kicad-developers team mailing list archive

Re: DRC rules


Hi Mark,

That’s expected.  The effective clearance is the largest specified in all rules that match.  Since both selectors match in the same-net case, the effective clearance is 1.3mm.

There is a “relaxed” token to address this, which allows a higher-priority rule to relax a constraint.

So try:

(version 1)
(selector (priority 150) (match_netclass "Net-(C1-Pad1)") (match_netclass "Net-(C1-Pad1)") (rule "0.2mm"))
(selector (priority 100) (match_netclass "Net-(C1-Pad1)") (rule "1.3mm"))
(rule "1.3mm" (clearance 1.3))
(rule "0.2mm" (clearance relaxed 0.2))

It’s worth noting that we’re not very happy with this syntax and are working on some other ways to address it.


> On 21 May 2020, at 19:55, mdoesbur@xxxxxxxxx wrote:
> Hello Jeff,
> I've tried to get the big board working, but I'm unable to set a default
> clearance on a netclass. What I want to achieve is that a certain netclass
> has a small clearance (0.2mm) with itself, but a large clearance to
> other netclasses, for example 5.5mm. For some netclasses I would like
> to set a smaller clearance. I've tried the following approach (with and without
> priority, and in reverse priority). But in this case it always uses the 1.3mm,
> also within the netclass itself. I've attached the test project.
> --------------------------------------------------------------------------------
> (version 1)
> (selector (priority 100) (match_netclass "Net-(C1-Pad1)") (match_netclass "Net-(C1-Pad1)") (rule "0.2mm"))
> (selector (priority 150) (match_netclass "Net-(C1-Pad1)") (rule "1.3mm"))
> (rule "1.3mm" (clearance 1.3))
> (rule "0.2mm" (clearance 0.2))
> --------------------------------------------------------------------------------
> regards,
> Mark.
> <drc.zip>

Follow ups