IPC-7351 Footprint Wizard

Hi

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.

Best regards
Daniel

3 Likes

I will try to have a look at this, which IPC7351 version is used?
This is an interesting paper on where IPC is going
http://www.ipc.org/committee/drafts/1-13_d_7351CGoals.pdf

2 Likes

I think I translated how to install it, but have not found how to use it or any sign of the plugin (Linux Nightly installation)

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. ;(

Where the .pdf help sheet goes is not so clear .

4 Likes

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
_

And a search for the missing plugin leads me to a 404 deadend

https://www.google.com/search?client=ubuntu&channel=fs&q=HelpfulFootprintWizardPlugin&ie=utf-8&oe=utf-8

Found it in the stable source base:

1 Like

@John_Pateman explanation of plug-in operation should be in the pcbnew help file

1 Like

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?

1 Like

Yes I’ve forgotten some infos - sorry about that.

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:


MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX="
${MINGW_PREFIX}/bin/cmake.exe
-G"MSYS Makefiles"
-DCMAKE_PREFIX_PATH=${MINGW_PREFIX}
-DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX}
-DDEFAULT_INSTALL_PATH=${MINGW_PREFIX}
-DOPENSSL_ROOT_DIR=${MINGW_PREFIX}
-DKICAD_SKIP_BOOST=ON
-DKICAD_SCRIPTING=ON
-DKICAD_SCRIPTING_MODULES=ON
-DKICAD_SCRIPTING_WXPYTHON=ON
-DPYTHON_EXECUTABLE=${MINGW_PREFIX}/bin/python2.exe
…/${_realname}

make


So this was for a build about 1 year ago. I hope today it’s still the same.

IPC-7351B (June 2010)
IEC 61188-7:2009

1 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

1 Like

I know, but your explanation of how to run any of these scripting plugins is the best I have seen so far and missing from the help system

1 Like

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

When I open the Footprint Wizard the only one I see is the BGA. It along with many others are in …\KiCad\share\kicad\scripting\plugins\

What do I need to do to see them all?

Here is IPC-7351B-Hints.pdf in english:

IPC-7351B-Hints-English.pdf (518.2 KB)

1 Like

What version of KiCad are you using?

Version 4.0.6 Release Build

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.

1 Like

Got some time to take a look and found the bad file. It would be nice if it would tell which file caused the error.

Thanks!

There is an optional trace, see my posts earlier in this thread