Netclass definition

May be a trivial question:
How I can define a netclass where traces distance can be for example 0,2mm but traces from GND plane must be 0,7mm
If I define distance 0,7mm this apply not only to trace to plane distance but also between traces.

A net class has a few settings. One for the width of a track, and one for the clearance around a trac, but those settings are for the whole net.

At the moment there is no real solution for this, the closest in KiCad is to work with a “net tie”. The idea is that you draw some “Net-Tie” in the schematic, which looks like a piece of wire to split the net in 2. Then in Pcbnew the nettie is a short piece of copper.

The end result is that the ends of the net-ties belong to different nets, and you put those nets in different net-classes.

These are for example also used when building motor controllers. You need thick tracks for high current, but the feedback wire for measuring currens / voltages often must be thin to be able to connect them to SMD IC’s.

If GND has this larger clearence to all nets then set that clearance in the GND netclass and use the normal smaller clearance for the other net.

More complex clearance settings would require a clearance matrix to be implemented. This is planned for some future kicad release (I seem to remember there where talks that this is one of the goals for v6.)

Thanks for pointing out that feature. :+1:

However, it would be very useful if the highlight net function in eeschema and pcbnew would also highlight the entire net across net ties. Currently each net connected via a net tie needs to be highlighted separately.

Duh!
The sole purpose of a net tie is to split a single net in 2.
I would also like to have an auto router that can do a better job then a human, even though I find optimizing PCB routing sometimes a meditative and weirdly nice way to spend my time.

That’s correct from a virtuel point of view. The nets tied together though still stand for one physically/electrically sonnected strand. The thought here is to highlight the entire physical connection.

A usable ‘workaround’ would be the ablility (?) to highlight more than one net at time.

A more consistant solution is to expand the highlight functionallity whereby a click on a net-tie itself will highlight ALL that this tie is connected to.

At the moment the “net-tie” is a complete hacked in feature by putting some symbols and footprints in KiCad’s libraries, and without a single line of code written by the few KiCad developers.

The highlight function is also a pretty dumb and single minded feature at the moment.
Being able to highlight groups of nets (For example a multi strand databus, or all tracks originating from a single component) would be a usefull addon to KiCad…
At the moment I do not even find it particularly usefull. I just click a track and press “i” to select it as a “highlight” feature. (Apostrofe works as shortcut for the current highlight feature).

For a future KiCad version there are plans to make busses smarter. With smarter busses there may also come a feature to highlight those busses someday…

Any pointer as to where to find the internal KiCad data structures?

What sort of data structures are you looking for?

The obvious answer is that KiCad is an Open Source project. All source code is on github and available to study, compile, fork, etc.

Due to concentration problems I do not really dare to dive into it, but if you want to add (small (or big)) features you should start with reading up a bit on git.

Git is a source code managment system. The idea is that you make a copy of all KiCad’s soure for your own use, then you can add a feature to it and test it. Then Git can keep track of the changes you’ve made, and then you can submit a “pull request” to ask another developer to “merge” your new feature into the official KiCad repository.

Modern Open Source development would not have been nearly what it is today without Git. If you have interest in this direction you should probably start with:
http://www.kicad.org/contribute/developers/

If you want to write C++ you might be interested in a KiCon talk “From User to Developer: How to Start Hacking on KiCad” by Jon Evans.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.