A via fence generator plugin for pcbnew

Hi everyone,
@jsreynaud: Yes you are correct! However I personally think that it is more obvious to instantiate in the init function since this is the entry function. Otherwise the register() call might be too well hidden amongst all of the additional .py files.

I worked on the KiCad integration. Now there is a mostly functional fancy dialog, when you run the plugin from Pcbnew.
The generation of vias in Pcbnew is however still missing. I am unsure whether I should wait until the connectivity algorithm is merged into the master and then use free via placement instead of placing modules with pads inside.

What I also plan to do is to “filter” the generated Vias. I.e. test if they collide with a different net or test whether they are located within a zone of a specific net and remove the corresponding vias.

If you have the common problem for pyclipper with KiCad

✘ ERROR Missing KiCAD ‘pyclipper’ python module:
please install it using pip
in your KiCAD python environment.
[You may need administrative rights]

It seems that KiCad is not recognizing the pyclipper module you’ve installed. This is a common issue with some plugins, especially on macOS, due to how Python environments are managed.

use this command in the Mac terminal to fix the issue
/Applications/KiCad/KiCad.app/Contents/Frameworks/Python.framework/Versions/Current/bin/python3 -m pip install pyclipper --break-system-packages

Very old thread.