KiCad StepUp: The Sketcher for Footprint generation

  1. your fp has Pads_TH_SMD with a polyline included
  2. your polyline has arcs inside
  3. your polyline miss the circle reference pad (as it is in kicad polylines)

I’ve updated your FC file:

  1. added a Pads_Poly sketch (copying from Pads_TH_SMD sketch)
  2. removed the ‘arcs’ in poly substituting them with lines
  3. removed polylines from TH_SMD sketch and rectangles from Poly sketch
  4. added a reference circular Pad to Polyline sketch

(You can open the example footprint-template-roundrect-polylines.FCStd in the Demo Menu to have a look in which way Poly are generated)

ATM StepUp doesn’t support ‘custom’ pads with primitive geometry as in latest updates … polyline pads accept only line segments.

Attached the FC file with the correction and the fp for Kicad.
You would need to play with pad numbering and clearance.
SKY13323-378LF.kicad_mod (2.9 KB)
SKY13323-378LF-Lines.fcstd (21.3 KB)

you need to enable the view of ‘Report panel’ in FC through the FC View menu.

Maurice

1 Like

After finally getting a hang of FreeCAD so I can make my own gorgeous 3D models, I’ve been trying to play around with KiCad StepUp to generate footprints in FreeCAD aswell because, to be honest, doing the geometry in KiCad is just a pain when you’re used to the constraints-based sketcher in FreeCAD.

Anyway - when I try to convert a simple fully constrained sketch for a SMD resistor (consisting of two rectangles, with symmetry and appropriate dimensions applied) to a footprint, the footprint pad sizes generated via KiCad StepUp are incorrect.

The footprint shows the following for the pads:

(pad # smd rect (at -0.7250002654420882 -2.2880947525560913e-08) (size 0.6499999307480184 0.900000006403322) (layers F.Cu F.Paste F.Mask))

(pad # smd rect (at 1.0499997586708563 -0.4500001526022491) (size 8.514926053138083e-08 3.952026736975256e-07) (layers F.Cu F.Paste F.Mask))

Not only are the coordinates ‘rounded’, but some are also simply too small - I could only see one pad in the footprint viewer.

Can anyone shed some light on this? I was hoping to have a productive library day :smiley:

Panasonic ERJ Footprint.FCStd (4.6 KB)

That’s true. The first iteration is often pretty easy, but when you have to modify something, you have to move and edit several graphic items instead of just one item or one value. However, this may change in the future - the graphics system will probably be changed for 6.0 and will have some kind of constraints.

That said, FreeCAD will always be better for complicated designs, and StepUp is a fantastic help.

1 Like

Which release of FC are you using?
Which release of StepUp?

What I get from your FC file is:
Panasonic_ERJ-3EKF.kicad_mod (944 Bytes)

  (pad # smd rect (at -0.7249999999999999 -0.0) (size 0.6499999999999998 0.9)  (layers F.Cu F.Paste F.Mask))
  (pad # smd rect (at 0.7249999999999999 -0.0) (size 0.6499999999999998 0.9)  (layers F.Cu F.Paste F.Mask))

which is pretty correct and can be checked importing it back in FC

1 Like

Sorry about that lack of info, I should’ve known better… I will try some other simple shapes and sketches to see if I can pinpoint it a little bit.

EDIT- I remember noticing I was 1 commit behind on StepUp, let me update that aswell…

Application: kicad
Version: (5.1.2)-2, release build
Libraries:
wxWidgets 3.0.4
libcurl/7.61.1 OpenSSL/1.1.1 (WinSSL) zlib/1.2.11 brotli/1.0.6 libidn2/2.0.5 libpsl/0.20.2 (+libidn2/2.0.5) nghttp2/1.34.0
Platform: Windows 8 (build 9200), 64-bit edition, 64 bit, Little endian, wxMSW
Build Info:
wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8)
Boost: 1.68.0
OpenCASCADE Community Edition: 6.9.1
Curl: 7.61.1
Compiler: GCC 8.2.0 with C++ ABI 1013

Build settings:
USE_WX_GRAPHICS_CONTEXT=OFF
USE_WX_OVERLAY=OFF
KICAD_SCRIPTING=ON
KICAD_SCRIPTING_MODULES=ON
KICAD_SCRIPTING_PYTHON3=OFF
KICAD_SCRIPTING_WXPYTHON=ON
KICAD_SCRIPTING_WXPYTHON_PHOENIX=OFF
KICAD_SCRIPTING_ACTION_MENU=ON
BUILD_GITHUB_PLUGIN=ON
KICAD_USE_OCE=ON
KICAD_USE_OCC=OFF
KICAD_SPICE=ON

OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.16945 (Git)
Build type: Release
Branch: master
Hash: d818a9638424a934bd9da74d187a1af4cb773f05
Python version: 3.6.8
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/United States (en_US)

EDIT 2 - Guess I have to fix something else first, bloody windows…

PermissionError: [WinError 5] Access is denied: ‘C:\Users\jules\AppData\Roaming\FreeCAD\\Mod\kicadStepUpMod’ -> ‘C:\Users\jules\AppData\Roaming\FreeCAD\\Mod\kicadStepUpMod.bak’

This sometimes may happen using the FC Addons Tool…
Just close FreeCAD and manually delete the folders:
C:\Users\jules\AppData\Roaming\FreeCAD\\Mod\kicadStepUpMod
and
C:\Users\jules\AppData\Roaming\FreeCAD\Mod\kicadStepUpMod.bak
Then open FC ad install StepUp WB as usual

2 Likes

Hi, i’m new to the StepUp-Tools and for the start i want to modify existing footprint.
Unfortunately I get an error message during import and the footprint is not displayed correctly.

My FC Version:
OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.4 (GitTag)
Build type: Release
Branch: releases/FreeCAD-0-18
Hash: 980bf9060e28555fecd9e3462f68ca74007b70f8
Python version: 3.6.6
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: German/Germany (de_DE)

The error message:
kicad StepUp version 9.1.0.7
tolerance on vertex applied
KISYS3DMOD=C:\Program Files\KiCad\share\kicad\modules\packages3d
module_3D_dir=C:\Program Files\KiCad\share\kicad\modules\packages3d/…/
FC Version 018
VBO status False
FootPrint Loader C:/Program Files/KiCad/share/kicad/modules/LED_THT.pretty/LED_D1.8mm_W3.3mm_H2.4mm.kicad_mod
LED_D1_8mm_W3_3mm_H2_4mm_fp
Unhandled Base::Exception caught in GUIApplication::notify.
The error message is: Access violation
Unhandled Base::Exception caught in GUIApplication::notify.
The error message is: Access violation

Does anyone have any idea why?

Best regards
Juergen

Unhandled Base::Exception caught in GUIApplication::notify.

This seems an error on your graphic drivers as reported on FC forum

But it also depends how good the graphic driver works and supports the offered OpenGL version. I think it’s worth to check if there are updates available for your graphic driver.

An other option would be to use the FC 0.19 dev release to handle this task.

Thank you for your immediate response. On my other computer it works.
I’l check the drivers on my first computer.

Best regards
Juergen

Updating the graphics card drivers didn’t solve the problem.
After installation of the 32Bit FC 0.18.4 Version it works.

Thanks for reporting…
That is definitely a Qt5 or driver issue …
FC0.18.4 32b is based on Qt4

OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 32-bit
Version: 0.18.4 (GitTag)
Build type: Release
Branch: releases/FreeCAD-0-18
Hash: 980bf9060e28555fecd9e3462f68ca74007b70f8
Python version: 2.7.14
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.2.0

Hi @maui I can confirm the error seen by JSt, after updating to the last version I receive it too:

Working version:

PoM not present
using 'Part' container
FC Version 018-16131
kicad StepUp version 9.0.2.5
tolerance on vertex applied
applying Materials to Shapes
your home path is ++++++++
export to STEP False
Tabified done !
done!
KISYS3DMOD=/
module_3D_dir=//../
FC Version 018
VBO status False
FootPrint Loader D:/Program Files/KiCad_v5_1_4/share/kicad/modules/Inductor_SMD.pretty/L_Taiyo-Yuden_NR-50xx.kicad_mod
L_Taiyo_Yuden_NR_50xx_fp 

Version after update (in another computer, before the update it was working correctly):

PoM not present
using 'Part' container
FC Version 018-4
kicad StepUp version 9.1.0.7
tolerance on vertex applied
applying Materials to Shapes
your home path is 
export to STEP False
Tabified done !
done!
KISYS3DMOD=/
module_3D_dir=//../
FC Version 018
VBO status False
FootPrint Loader C:/Program Files/KiCad_5_1_4/share/kicad/modules/Inductor_SMD.pretty/L_6.3x6.3_H3.kicad_mod
L_6_3x6_3_H3_fp
Unhandled Base::Exception caught in GUIApplication::notify.
The error message is: Access violation
Unhandled Base::Exception caught in GUIApplication::notify.

I hope this help, i was in the process of registering in GitHub to report this.

1 Like

This should be reported to FC forum, related to Qt5 & driver issues… it is not related to KSU code, but to pc drivers & Qt5 compatibilities.
I don’t know what has changed between FC 0.18.3 and 0.18.4, but on my PCs StepUp does work correctly with both releases.
Even FC0.19 is fine too.

duckduckgo search for ‘Unhandled Base::Exception caught in GUIApplication::notify.’

Both installations were working correctly with the previous StepUp version, only when I updated (today) to the latest version of StepUp in this computer, i started getting this error, I haven’t updated FreeCAD in the last weeks.

I’m copying StepUp from the MOD directory of FreeCAD of my other PC (v9.0.2.5) to downgrade in my current PC (v9.1.0.7 -> v9.0.2.5).

I will keep you post it.

Let me know if I can somehow help.

Did you update also the PC drivers?

Thanks, yes it does help…
It should be an issue on drivers, but I will investigate if I trigger something that is not handled fine by Qt on my recent changes…

Well, bummer, downgrading didn’t help:

PoM not present
using 'Part' container
FC Version 018-4
kicad StepUp version 9.0.2.5
tolerance on vertex applied
applying Materials to Shapes
your home path is 
export to STEP False
Tabified done !
done!
KISYS3DMOD=/
module_3D_dir=//../
FC Version 018
VBO status False
FootPrint Loader C:/Program Files/KiCad_5_1_4/share/kicad/modules/Inductor_SMD.pretty/L_Taiyo-Yuden_NR-50xx.kicad_mod
L_Taiyo_Yuden_NR_50xx_fp
Unhandled Base::Exception caught in GUIApplication::notify.
The error message is: Access violation
Unhandled Base::Exception caught in GUIApplication::notify.
The error message is: Access violation
Unhandled Base::Exception caught in GUIApplication::notify.
The error message is: Access violation
Unhandled Base::Exception caught in GUIApplication::notify.
The error message is: Access violation
Unhandled Base::Exception caught in GUIApplication::notify.
The error message is: Access violation
Unhandled Base::Exception caught in GUIApplication::notify.
The error message is: Access violation

EDIT:
No visible driver update:

then probably your pc updated its video drivers (silently) or a win update messed up the driver installation, and now your issue is jumping in…
Please try to re-install your video drivers (a clean installation would be the best option, cleaning the previous settings)… I remember that often a win 10 update messed up my home mobile pc at an annoying level that I moved it to Linux :smiley:
No more issues now :wink::crossed_fingers: :smiley:
At least no annoying updates.

@der.ule
you may consider to have a try with FC0.19
It is using Qt5.12 instead of Qt5.6 used in FC0.18
This seemed to have helped many users… btw be aware that FC0.19 is still a bit in the phase of being ready to stable release.

Thanks Maui I’ll give it a try.

So far, running the 32-Bit Version works like a charm:

PoM not present
using 'Part' container
FC Version 018-4
kicad StepUp version 9.0.2.5
tolerance on vertex applied
applying Materials to Shapes
your home path is 
export to STEP False
Tabified done !
done!
KISYS3DMOD=/
module_3D_dir=//../
FC Version 018
VBO status False
FootPrint Loader C:/Program Files/KiCad_5_1_4/share/kicad/modules/Inductor_SMD.pretty/L_Taiyo-Yuden_NR-50xx.kicad_mod
L_Taiyo_Yuden_NR_50xx_fp

As does the v0.19:

PoM not present
using 'Part' container
FC Version 019-18760
kicad StepUp version 9.0.2.5
tolerance on vertex applied
applying Materials to Shapes
your home path is 
export to STEP False
Tabified done !
done!
KISYS3DMOD=/
module_3D_dir=//../
FC Version 019
VBO status False
FootPrint Loader C:/Program Files/KiCad_5_1_4/share/kicad/modules/Inductor_SMD.pretty/L_Taiyo-Yuden_NR-50xx.kicad_mod
L_Taiyo_Yuden_NR_50xx_fp

I haven’t got the chance to nuke my graphic card drivers … but I may move to v0.19 and won’t need to do it, even of it is development version, I use FreeCAD almost exclusively because StepUp.

BTW: Opening FreeCAD projects, STEP files, Sketcher files, etc. works ok with the v0.18 X64…

EDIT: Tested with FCv0.17 x64 and all works as expected …

PoM not present
using 'Part' container
FC Version 017-13387
kicad StepUp version 9.0.2.5
tolerance on vertex applied
applying Materials to Shapes
your home path is:
export to STEP False
Tabified done !
done!
KISYS3DMOD=/
module_3D_dir=//../
FC Version 017
VBO status False
FootPrint Loader C:/Program Files/KiCad_5_1_4/share/kicad/modules/Inductor_SMD.pretty/L_Taiyo-Yuden_NR-50xx.kicad_mod
L_Taiyo_Yuden_NR_50xx_fp

I have experienced the same error on my old Win7-64bit machine when i upgraded from FreeCad17 to 18. It wasn’t even related to StepUp, but showed up when any of the parts had the transparency set to value different than 0. I was looking around for a solution, but it seemed it was a graphic card driver issue/incompatibility with the new FreeCad. No chances for a new drives, since it’s an older card.
Windows was making too many problems and as Maui i’ve switched to Linux. Everything works fine and to my surprise, KiCad works so much faster and stable now.