Plugin announcement: Hide/Show lines in ratsnest

Hi everyone,

I was working on a new pcb and on functionality I was missing as an eagle veteran was the ability to show and hide nets in the ratsnest. I wrote a little Plugin that basically removes the connections from the netlists to hide them in the ratsnest and insert them back to show them again.
the plugin can be found here: https://github.com/alterratz/ShowHideNets

Also the net selection to hide nets always shows a list of all nets (except for the nets already hidden). I wanted the net selection based on the nets which contribute to the ratsnest but I could not manage to do so. If you know how to get a list of theese nets in python, please let me know.

It is my first plugin so be nice or I will cry like a 5 year old girl who’s doll lost its head :wink:

Best Regards,
Bernhard

2 Likes

I didn’t read code too thoroughly but it seems to me that there is risk of netlist data corruption if user changes netlist between plugin runs via “update pcb from schematic” or other means.
You should think through these scenarios and if possible build protection against it or provide clear warnings at minimum.

Also looks like you have to activate plugin every time you launch pcbnew to get the buttons. Maybe make it a config option to have them activated automatically. But be careful with how it’s done, there are threading and init sequence gotchas when you manipulate wx toolbars directly.

4 Likes

Expect native ratsnest colors/visibility settings for v6.

qu1ck, thank you for your feedback.

Well, its my first plugin, and I wrote it because I hate routing with GND and VCC ratnest turned on. However, I noticed some problems when closing KiCad (process noet exiting) which I now connect to threading problems in my plugin. However, I can wait till V6 comes out, which eelik wrote below. However I think I should extend the description to mention this problems.

Netlists do not seem to be an Issue, at least this part seems to work. However, the netlist is manipulated, as you noticed, and the file is saved before showing the hidden part again, the netlist in the safefile is incorrect, also something for the docs. However, you can always re-import the netlist from the schematic.

Best regards,
Bernhard

eelik,
that is good to know. I’ll only add a few words to the docs regarding possible problems of my plugin. Looking forward to this feature.

Best Regards,
Bernhard

Here’s the roadmap item: https://gitlab.com/kicad/code/kicad/-/wikis/KiCad-6.0-Roadmap#ratsnest-improvements.

And the issue: https://gitlab.com/kicad/code/kicad/-/issues/1951.

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