I’ve tried to do a bit of coding in python and the result are two little footprint wizards.
Included are some basic calculations based on IPC-7351B and IEC 61188-7.
The files are loadable here: https://elnet.ch/downloads/IPC7351-Footprint-Wizard.zip
There is an explanation file in german (my foreign language).
I hope someone will take it and do some improvements, maybe a script to generate 3D-bodies …
It would be glad, if it could be taken to the standard KiCad package.
Install the scripts (in linux) in /usr/share/kicad/scripting/plugins. Then use the ‘New footprint using footprint wizard’. Select which wizard to run. (This is also how to access a variety of plugins - like barcodes, capacitative tracks and other footprint wizards. Not sure where it goes in windows - and my OS X version on a nightly build seems to have just lost Python scripting which was in the 4.0.6 build., but I presume will be in the standard Mac pathway. ;(
I only see QR code etc, 13 in all
I tried making the IPC plugins chmod +x like the others and now get an error
File “/usr/share/kicad/scripting/plugins/IPC_discrete.py”, line 27, in
import HelpfulFootprintWizardPlugin
ImportError: No module named HelpfulFootprintWizardPlugin
File “/usr/share/kicad/scripting/plugins/IPC_leaded_SMD_IC.py”, line 27, in
import HelpfulFootprintWizardPlugin
ImportError: No module named HelpfulFootprintWizardPlugin
_
Not my plugin - I was just confirming that it ran and the steps that I used to run it. FPWizardDrawingAids and HelpfulFootprintWizardPlugin were in my stock 4.0.6 Ubuntu install (and installed on macOS using 4.0.6 but NOT installed in the nightly builds - as Python scripting is not available in latest macOS nightly). Not sure if the lack of scripting might have some bearing on linux nightlies too?
The plugin files *.py should be copied to the KiCad-subfolder:
KiCad\share\kicad\scripting\plugins.
The PDF should be copied to the KiCad main folder. It will be started over the Hints section of the wizard.
Since it is in german it makes only sense for german speaking users. If I’ve got the time I will translate it to english too.
I’m using KiCad Version 4.0.4-stable Build 9200 on Windows 10 64 bit.
I know there are some nightly builds without scripting.
If you build it self, scripting must be enabled in the PKGBUILD configuration.
Something like:
Google translate worked well with the install information.
Scripting is on and the existing plugins work.
Right now the issue is the missing
HelpfulFootprintWizardPlugin.py in the Ubuntu PPA nightly
Under Windows Nightly, which has the HelpfulFootprint… script, I get the following trace
File “C:\Program Files\KiCad\share\kicad\scripting\plugins/IPC_discrete.py”, line 594, in
MyWizard().register()
File “C:\Program Files\KiCad\share\kicad\scripting\plugins/HelpfulFootprintWizardPlugin.py”, line 242, in init
FootprintWizardParameterManager.init(self)
File “C:\Program Files\KiCad\share\kicad\scripting\plugins/HelpfulFootprintWizardPlugin.py”, line 32, in init
self.parameters = {}
AttributeError: can’t set attribute
File “C:\Program Files\KiCad\share\kicad\scripting\plugins/IPC_leaded_SMD_IC.py”, line 779, in
MyWizard().register()
File “C:\Program Files\KiCad\share\kicad\scripting\plugins/HelpfulFootprintWizardPlugin.py”, line 242, in init
FootprintWizardParameterManager.init(self)
File “C:\Program Files\KiCad\share\kicad\scripting\plugins/HelpfulFootprintWizardPlugin.py”, line 32, in init
self.parameters = {}
AttributeError: can’t set attribute
edit
The scripts are working with 4.0.6 Ubuntu PPA build
edit
Same fail under Ubuntu Nightly as Windows Nightly after adding two missing scripts.
I think an API has changed
If there is an error in a python script it stops listing the modules, also if a required package like math is not available.
Close KiCad, move the scripts in a different directory, expect one, then restart.
Check the modules.
Close Kicad again, then move the files back, one by one, with restarting and checking after each, until you find the script that causes the error.
Well, many thanks for the PDF-translation. It looks great.