I am trying to set a net class trace width based on layer. I thought it would be possible with the custom rules feature that was added , but it looks like it just does a check when you run the DRC check, it doesn’t automatically use the trace widths you set in there.
Does anyone know of a way to do this, so that soon as you jump layers the track width will auto update to the proper width. Reason for this is if you are routing a 50 ohm signal and need to jump layers the width will change on an inner layer and manually doing this is very error prone. ( Now i can atleast double check i did it) but would be nice to do on its own.
What i am doing with my custom rules, maybe i am doing it wrong but the instructions say " Checks the width of track and arc segments. An error will be generated for each segment that has a width below the min value (if specified) or above the max value (if specified)."
In more that 50 yrs of Engineering, I still find it disappointing to see so many folks asking others, “Can I do this?” and “What if I want this?” and… well, you get the point.
Did you even try different Tools in Kicad? Did you try @craftyjon suggestion re ‘opt’ value?
I’ll finish my posting on this topic with the video - All Tracks are on the Same Net. Width change is based on Selection of Width but, I could have based it on Net and it would still be in correct layer…
Note: There are few moments of ‘Delay’ while the computer/Kicad does it thing…
ADDED: I don’t use DRC so can’t be too helpful about it but, in the Design Rules, Custom Panel, click the ‘Syntax Help’ (top right corner) to get Info and Examples. You may find what you want to do isn’t too difficult…
Crafty, it does not it still follows the net class rules.
The suggestion black coffee made is for post editing traces that are all routed, yet not sure what plugin he is using to do it but it looks like it will grab every trace on the layer and modify it. That’s a big hammer that will break things if you have power traces and other controlled impedance traces. ( He probably knows that since he’s been an engineer longer than i I’ve been alive).
Re: Individual or All tracks - you can select the one’s you want…
The Plugin is homemade and uses the ‘Simple Plugin’ structure per documentation.
New Plugins, in practice, should be per the New Plugin approach (not as simple… requires Meta file and other… Good news is, the older approach still works and that’s the one I use.
Thus, need only place the (your_code_file).py and (your_icon).png files into the Kicad’s Scripting>Plugins folder and Kicad will populate the menu with it (may need to click a Check box in PCB setup).
That said, and assuming a User just wants to use it without ‘Learning’ anything, well, the files are attached. Video shows selecting a single track (could select multiple, if wanted).
The .py code is hard-coded for changing track to 1.0mm but, you can change/edit that. And/or do some coding to prompt user for Input…
(Right-Click the png-icon image to Save it…)