@skuep started to develop on 2017 this action via fence plugin
I have updated the plugin adding some features and let it work with kicad 5.1.4 and did a PR, but ATM it is not merged.
You can test my version downloading my forked repo here: Via Fence plugin
@maui: Wow, the via fence plugin works beautifully!
As for the via stitching of a zone, I had to do the following to a zone on an inner layer, declared to be GND:
Insert a couple of vias manually, and declare each of them to be part of the same net (GND); that enabled showing the whole zone filled and with the fillets at the corners.
Delete the manually-placed vias, still keeping the filled display of the zone.
Activate the via stitching tool, set the parameters, and then run it.
I think the crucial step was (1) above. Probably only one manually inserted via would have done it. Well, zones have always been quirky anyway. One more thing: The vias were not quite aligned (see pic). Could the grid settings have anything to do with that?
Is there any way to use a different step size along different directions?
Once more, thank you for your excellent work, which elevates the value of KiCAD!
@hermit: Thank you for the suggestions. I do have python3 installed in my system. In fact, I have Ubuntu 16.04’s version, the snap version (both system-wide, of course), the anaconda version (locally, so this should not matter)… And yes, ~/usr/bin/python is a link to python2.7. I think the lack of python3 scripting is a packaging issue and I need to contact the packager—if I only knew how. Otherwise, I need to bite the bullet and compile KiCAD from source, which I’d rather avoid at the moment.
Moreover track length feature is also available in kicad std menu (Route:Tune track length) , but I needed a very basic way to get the length without the risk to modify the track itself.
BTW I have to thank you for other code snippets
Particularly useful the hack for wxFormBuilder (which is generating incompatible dialog code for wxPython & python version 2) that I slightly modified.
The desired behavior would be not to place vias on not allowed places as via stitching plugin already does…
But yes, you can check DRC after invoking the fencing plugin and fix the issues.
So it is useful even if it is not complete …
But yes, you can check DRC after invoking the fencing plugin and fix the issues.
So it is useful even if it is not complete …
Great! In reality, via fencing will most probably take place far away from non-RF components and traces, so there should be little chance of forbidden stitching anyway.
Via fencing plugin requires ‘pyclipper’ to be available.
Unfortunately pyclipper is not deployed on KiCAD win installation.
You need to add it using ‘pip’… open a command prompt and digit:
cd C:\Program Files\KiCad\bin
pip install pyclipper
(assuming you have installed KiCad on ‘C:\Program Files\KiCad\bin’)
@davidsrsb Please let me know if this will solve your issue on your system.
There is a further complication in MacOS as Kicad uses a specific bundled version of Python found at /Applications/Kicad/kicad.app/Contents/Frameworks/Python.framework/Versions/Current/bin/python and does NOT use the system python. You can’t import pcbnew into the system python so you have to use the specific kicad version.
Unfortunately, the Kicad python version does not come bundled with pip or setup_tools.
If you try and run the Pyclipper setup.py using the Kicad version of python, this fails with Download error on https://pypi.org/simple/setuptools_scm_git_archive/: unknown url type: https -- Some packages may not be found! which is a bit strange.
So I next tried /Applications/Kicad/kicad.app/Contents/Frameworks/Python.framework/Versions/Current/bin/python /usr/local/bin/pip install pyclipper
This fails as the ssl module is not available - which possibly explains the failure of the https download.
Trying to install these dependancies is becoming too much of a rabbit hole! Is the pyclipper dependancy essential for the functionality of the plug in or is it only used for the graphical display? If so, could this be made an option?
WRT the rounded tracks & taper action plug-ins, these work really well, thank you!!
C:\Program Files\KiCad\bin>pip install pyclipper
Collecting pyclipper
Downloading https://files.pythonhosted.org/packages/20/a3/a60a7bad5246d66f3c54127b34b90e6d34b2cc006b84135bfcbfee4514b1/pyclipper-1.1.0.post1.zip (135kB)
100% |UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU| 143kB 728kB/s
Installing build dependencies … done
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File “”, line 1, in
File “c:\users\david\appdata\local\temp\pip-build-env-cwepg6\lib\python2.7\site-packages/setuptools/init.py”, line 228, in
monkey.patch_all()
File “c:\users\david\appdata\local\temp\pip-build-env-cwepg6\lib\python2.7\site-packages/setuptools/monkey.py”, line 101, in patch_all
patch_for_msvc_specialized_compiler()
File “c:\users\david\appdata\local\temp\pip-build-env-cwepg6\lib\python2.7\site-packages/setuptools/monkey.py”, line 164, in patch_for_msvc_specialized_compiler
patch_func(*msvc9(‘find_vcvarsall’))
File “c:\users\david\appdata\local\temp\pip-build-env-cwepg6\lib\python2.7\site-packages/setuptools/monkey.py”, line 151, in patch_params
mod = import_module(mod_name)
File “C:\Program Files\KiCad\lib\python2.7/importlib/init.py”, line 37, in import_module import(name)
File “C:\Program Files\KiCad\lib\python2.7/distutils/msvc9compiler.py”, line 306, in
raise DistutilsPlatformError(“VC %0.1f is not supported by this module” % VERSION)
distutils.errors.DistutilsPlatformError: VC 6.0 is not supported by this module
----------------------------------------
Command “python setup.py egg_info” failed with error code 1 in c:\users\david\appdata\local\temp\pip-install-ltz6bm\pyclipper\
Unfortunately it is essential to get the trace expansion path.
mathplot and numpy are instead needed only for debugging.
I did managed to use pyclipper in kicad just installing pyclipper on OSX using the os python and then I just copied the lib ‘pyclipper.so’ to the plugins path.
This is strange… I managed to install pyclipper from kicad pip directly… I will investigate further.
For round corner length, I would suggest to use the Round Tracks plugin, instead of the Arc wizard. The plugin is more flexible and the resulting track can be measured also with Track Length plugin.
Moreover there is a check inside the Round Track corner code to test the following rule of thumb:
If you use a radius greater than three times the line width, you will have a transmission line that is almost indistinguishable in impedance characteristics from a straight section.
@maui , Well, I’m running into the “No Module named pyclipper” error too. I’ve installed pyclipper and other dependencies via pip install. Other tools works well, including via stitching. What do I need to do to help you debug ?
Does it matter that your plugin folder is called action_viafence , while the main action file is called viafence_action ?