Kicad StepUp: The Sketcher for Footprint generation

thx for your positive feedback :smiley:

it is a bit different compared to other items
Editing Label (in Data Tab)

Editing Font Size (in View Tab)

(note: this is adapting font size only in FC, there are only two font size pushed to kicad ATM, but as you already noticed it isn’t a big deal :wink: )


Tech draw does not allow overlaying multiple sketches on top of each other. And dimension between them. (A lot of dimensions are between different kicad layers which all are different bodies when imported using stepup.)

At least i could not find a way to do it a year ago. When i dimension real drawings i use tech draw as it supports more features (like cutout drawings, …)

Should the text contend and the text size be transferred to the kicad footprint?

probably has been updated :smiley:

  • Text Content is transferred to Kicad footprint (the content transferred is the one in the above picture)
  • font size in FC is not a dimension in mm, so for the moment I just transfer 1mm or 0.3mm depending on FC font size. I could add a Dimension Size for Fonts at the end of the reference, as I do for Layers, if you consider this useful.

drawing dimensions is still faster as i can add multiple dimensions one after the other.
In tech draw i need to select both endpoints (unless i want to dimension a line) and then click on the dimension tool. And the select both endpoints step is very hard to pull off if one endpoint involves a center of a small arc.

Hm i do not seem to be able to increase the number of digits shown. For checking courtyard correctness i need at least 3 digits precision. (yes there is an input for number format but it does not seem to work.)

You might want to check the 0.3mm option. The font width might be too large in kicad. (it tells me that it reduced it automatically when i try to edit the field.)

I’m suggesting TechDraw because DrawingDimension is sort of ‘abandoned’ WB
All innovation goes to TD which is in FC main branch.

it should be enough to just zoom in the page

thx I will

I tried it, liked it! The video was a little hard to follow (goes really fast) so I drafted a text-and-photos document of my try at it. Feel free to use it, modify, etc.

Generating a KiCAD Model from 3D Step Data.odt (2.3 MB)


Thx a lot! I will include this at the main repo, so it will be in the Demo help. :smiley:
I really like this kind of support. I know I’m in lacking of documentation and this can help me and users too :smiley:

Hi @Rene_Poschl
I updated the WB adding REF and Value font size as suffix in the FC file

I should have also fixed the REF & Value text exporting to kicad fp …
please have a try

1 Like

With 1mm text size it might be better to set the text width to 0.15 (or in general text size * 0.15 rounded to two digits)

Also it would be really helpful to have the courtyard rounded to some grid. But to be honest i have no idea how the interface for that could look like. Does freecad support custom fields in sketches somehow? (Maybe a first step could be to round to 0.01mm grid by default.)

ATM it is text size * 0.2 but I can arrange it to 0.15

The origin for sketch is placed to the anchor of the fp … So if you constrain the sketch relatively to the center (0,0) you should be fine.

Great writeup. You are to be commended for your effort. Three comments:

  1. I think that Molex is one (the only?) manufacturer showing footprints in the STEP models. Many other manufacturers don’t.

  2. In order for the footprints to be visible (at least in the Molex-supplied STEP files), don’t you have to check “Enable STEP Compound merge,” accessed in Edit→Preferences→Import-Export→STEP?

  3. I think it may be a good idea, especially newbies, to mention that the footprint-3D alignment procedure, lucidly described after “1. The 3D model now,” applies regardless of how the footprint has been generated.

if the manufacturer will not offer footprint outline as STEP model, a DXF or a pdf should be available… then the route is a bit more complex, but similar.

I’ve added your doc to the Demo files of the latest update… Thx for your contribution :smiley:

1 Like

I get some python error when generating footprint. I have one complex pad and it seems that if I delete it footprint is generated, but with it, there is error. Could you look if I’m doing something wrong?
SKY13323-378LF.fcstd (10.9 KB)

Edit: I can’t get error text because it shows briefly in freecad window bottom line, and only part of it.

  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.


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
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:

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:
Then open FC ad install StepUp WB as usual


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
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
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