Rounded Tracks Reloaded ... again: RF Tools for KiCad

Did you use pip of the same python that is used by kicad? (py3 vs py2, kicad packaged vs system, …)

1 Like

Hi @Anool
the code is just fine.
Please check if your pcbnew python console is using py3 or py2.
Then if it is using py3, just do as following:
Close pcbnew and launch
killall pcbnew

and then install pyclipper for py3
sudo apt install python3-pip
pip3 install pyclipper

That should be enough.

1 Like

One can run pip from within python by spawning a subprocess on python itself with -m option and pip as the parameter. See Using pip from your program

Example for getting the list of installed programms (run pip list)

subprocess.check_output([sys.executable, '-m', 'pip', 'list'])

And the example for installing something:

if subprocess.call([sys.executable, '-m', 'pip', 'install', pkg]) != 0:
        #either pkg not available for install or pip is not found.
        raise Exception('{} installation failed'.format(pkg)) 

I seem to remember there was an option to include either pip or some other package installer as a binary string in case it is not installed on the system. But i could not find the explanation of it in the time i was prepared to invest searching for it.

It’s a bit confusing and complicated for new and old people like me.

PERFECT !
Works great now.
Except, I’m unable to resize the dialog box, so am missing out some settings that seem hidden.

Hi maui,
If you don’t mind we can move the original action via fence plugin repository to your account, since I don’t use KiCad at the moment and foreseeable future.

Best Regards
Simon (skuep)

A third party can not move a repo. (That would be questionable at best)

However if you are the owner of the original repo then you can transfer ownership of it to somebody else. (I do not know what happens if that other person has a fork of the same repo, might be something to look up in the github documentation. In reality nothing bad can happen as @maui will have a local clone anyways, meaning one can restore from that state at any time.)

Moving the repo is no problem for me, I am the owner of the original via fence plugin. However I don’t know if he is willing to put up the support (i.e. issues and pull requests) for it, that is the reason I am asking. :slight_smile:

@Simon_K (skuep)
thank you for your offer and for your fencing repo. I think it is a very useful tool for KiCad.
It is a pity you are not involved in using KiCad anymore, because I see you are involved in many RF interesting studying.
KiCad would need more University guys joining the game :smiley:

Anyway, if you are not willing to maintain this repo at this time, I think the easier way would be keeping the original repo; then I will start a new repo with a similar name, adapting and maintaining the code based on your original repo.
This way your original repo will be kept with its original founder but via fencing plugin will be updated to kicad v5.

@Simon_K please let me know your opinion and I will do as requested :smiley:

That would be fine with me, is that the easiest solution?
Maybe in that case I should add a note to my repo to show it is out-of-date.

Unfortunately since I started my PhD some years ago and recently joined a startup of a colleague I don’t have any time left to work on these things anymore :frowning:

Ok then, I’m going to add a fencing tool as a part of my RF-tools-KiCAD citing your repo as initial source of the code.
You may add a note to your repo linking to mine.
Thanks again for your contribution.

I wish you all the best for your new business venture!
… and hoping to see you here maybe for spare time contributing to KiCad :wink:

Done!

Thanks :slight_smile: I hope all turns out well.

Just to clarify (after messing around for a while :slight_smile: and for anyone else trying to get this to work). Python 2 version of the pyclipper shared object file pyclipper.so works when installed into the action_viafence directory in macOS as described by @maui. On my system, pip seems to be linked to python3 however and when pip installing pyclipper I was only getting pyclipper.cpython-37m-darwin.so which will not work. Using pip2 seemed to do the trick and installs the pyclipper.so object which can be copied across.

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.

1 Like

Thank to all…
I’m going to merge all info up and public a new plugin asap.
@Anool I’m going to make all dialog resizable.

would you please mind to test as following:

  1. open a command prompt in Administrator mode (Run as Administrator)
  2. cd "C:\Program Files\KiCad\bin"
  3. pip install pyclipper

Tried and failed with the same error, ending:

DistutilsPlatformError: VC 6.0 is not supported by this module

which seems to be a well known MSYS2 MinGW and Python 2.7 issue
eg https://github.com/pypa/setuptools/issues/1118

I ended with the same error installing kicad on a clean pc…
Anyway, a temporary solution would be:

  1. download this pyclipper zipped lib pyclipper.zip (98.0 KB)
    (this is the one I installed on my kicad winbuilder environment)
  2. extract from the zip file the pyclipper.pyd lib
  3. cd to the folder
    "%APPDATA%\Roaming\kicad"
    (in your system should be: C:\Users\David\AppData\Roaming\kicad)
  4. if not already existing add the following directories:
    scripting and inside plugins (but you should already have this structure, having already installed plugins)
  5. cd to "%APPDATA%\Roaming\kicad\plugins"
  6. copy the extracted lib file pyclipper.pyd to this folder
  7. Check if pcbnew is not running (with task manager) and rerun pcbnew and test if Via Fencing is working …

Ok, a first release of Via Fence included in the RF-tools-KiCAD is now available.
Please remove the old via fence plugin and update the RF-tools-KiCAD suite.
I’m going to update the README file too.
@Anool I’ve allowed dialog resizing… the size issue should be related to DPI scaling…

I think I should change all the tools to allow the main dialog resizing.

Excellent, now working on Windows.
This will be the plugin I use most, I use coplanar waveguides and stripline for directional couplers

I’m not using any of these plugins currently… no RF designs at work/personal projects… but it the thread was interesting read…

Just wanted to say this temporary solution should be mentioned somewhere in the repo :stuck_out_tongue:
not everyone will search the forum for explanation…

i may probably use the taper plugin in my next micro-controller project…

1 Like