Rule Areas (Zones) for interactive routing

Hi All,

I have defined a Rule Area (Zone) and Custom Rule to constraint track width passing through this Zone.
When Routing interactively, how can I force the track with to obey my Custom Rule ?

Would it make sense it picks the Track width from the Custom Rule automatically ?

I know my Custom Rule is working, because if I route with a different track width than what is specified in my Custom Rule, DRC will report it.

I don’t even have a choice to pick from Custom Rule

Similar topic: Rule area not applied

Ok, then the custom rule is not looked at when interactively routing, but only at DRC.

It is looked at (for single tracks, rather than diff pairs) when starting each routing segment. However the router won’t bisect a rule area boundary to find a change in track width mid-track-segement.

Then I must be doing something wrong. When starting the route at a footprint pin, it is not using the track width from the Custom Rule.

Make sure this button isn’t enabled:

Does’n make a difference, still not working …

There may be a stub of another track hiding in the pad you’re selecting. Window select just that pad and see what shows up.

Only the footprint and the Rule Area shows up. No tracks …

You’re going to need to give more information than that to get any help. Can you post the project? Or at least a screen shot of the issue, and the rules you have configured.

(version 1)
(rule Zone1
(condition "A.intersectsArea('Zone1')")
(constraint track_width (min 10mil) (max 10mil))
)

I can not send the datbase over, but I can build a small PCB to reproduce the issue.

Test-2.kicad_pcb (21.0 KB)

Ah - try using an (opt 10mil) clause in the rules.

Ahhhhhhhhhhhhh … solved … Thank you.

… but why is min and max not working ?

Maybe the engine just isn’t that intelligent that it would deduct min == max => opt == min == max? After all, you can’t select, say, non-random width for a track if min < max. There’s no “must be this value” or “exactly” rule, it’s “optimal”. Although I understand why “optimal” doesn’t sound like “I want it to be exactly this, not less or more”.

min and max are used as DRC limits. Opt is used to inform the router of what to use by default (it can be overridden manually).

See the manual here:

Constraint Clauses

The constraint clause of the rule defines the behavior of the rule on the objects that are matched by the condition. Each constraint clause has a constraint type and one or more arguments that set the behavior of the constraint. A single rule may have multiple constraint clauses, in order to set multiple constraints (for example, clearance and track_width) for objects that match the same rule conditions.

Many constraints take arguments that specify a physical measurement or quantity. These constraints support minimum, optimal, and maximum value specification (abbreviated “min/opt/max”). The minimum and maximum values are used for design rule checking: if the actual value is less than the minimum or is greater than the maximum value in the constraint, a DRC error is created. The optimal value is only used for some constraints, and informs KiCad of a “best” value to use by default. For example, the optimal diff_pair_gap is used by the router when placing new differential pairs. No errors will be created if the differential pair is later modified such that the gap between the pair is different from the optimal value, as long as the gap is between the minimum and maximum values (if these are specified). In all cases where a min/opt/max value is accepted, any or all of the minimum, optimal, and maximum value can be specified.