Convert freePCB footprints to Kicad footprints

I have a whole bunch of footprints created in freePCB which I have been using for the last ten years or so. Now I am gradually migrating to Kicad I would like to transfer these footprints. Many of them are of unusual components like rotary switches which are a real pain to recreate because of the geometry involved in working out pad positions. So it would be really nice if there was some automated method of making the transfer. Before I go delving deep into the file formats of freePCB and Kicad footprints I thought I would ask here in case someone has done this already.

Cheers

Ian

A simple search for ‘freepcb kicad’ turned up this tool.

LOL. I searched for “convert freePCB footprint to Kicad footprint” and got nothing. Thanks for the link.

Cheers

Ian

I just tried your ‘freeepcb kicad’ search and that turned up nothing as well. Which search engine are you using?

Cheers

Ian

It’s a mystery how you can’t get results. Any search engine will do.
Even with three e the same results show up regardless if hyphened or not.
The suggested link shows up first every time. Just for kicks

We strongly recommend designing complex footprints like rotary switches in FreeCAD and using the StepUp tool. It is so much easier to work in polar geometry on a parametric CAD tool than trying to figure out XY coordinates.

1 Like

Turns out to be because I had the UK switch on. Turning it off included the results you got.

I have now spent some time with the tool but unfortunately it has problems. First it only works in mm and pukes on footprints defined in MIL. Secondly it insists on the source footprint being indented the way the IPC ones are. However, freePCB created footprints do not have this indentation nor is it required. Thirdly it will not accept test in a footprint other than ref and value which freePCB has no problem with.

Too much like hard work to fix. But thanks for the link anyway.

Cheers

Ian

Who is ‘we’?

It is certainly not easier to design complex footprints in FreeCAD and StepUp if you have never used either. I am an electronics engineer not a draftsman and I find 2D CAD hard enough to get my head around as it is.

Cheers

ian

I used the old google ‘sketchup’ for a few simple projects years ago. The ‘nice thing’ about it was it was mouse interactive. You could start a shape, let’s say a square, and then pull the surface to get a cube/bar. The best part was you could see what dimensions were changing in real time so you knew what was what and could then go hard enter the correct numbers. I see the same concepts in FreeCad but knowing where to go in which menu for what would take more time and effort than I have interest for at the moment.

The time spent for searches and tests would have been suffcient to actually create that footprint anew in KiCad.

FreeCad can be useful with some learning curve, though I doubt your case is complex enough for that.

If I only had one footprint to do I would agree with you. But I have nearly 200 footprints in my personal freePCb library that I need to convert and I think you would agree exploring an automated way of achieving this is not a waste of time.

Cheers

Ian

Agreed, though sometimes guttae cavat lapidem seems the only way even when painful.

If those problems were fixed would you find the tool useful?

Same line of thought here. It might be worthwhile to get that tool up to par.

Yes, if the tool worked then I would definitely use it. I thought I might have a go myself so the first thing I did was try to find the file format for Kicad footprints. Unfortunately it is listed as 'a ‘work in progress’ and I cannot find any details of it.

Cheers

Ian

The kicad side is easy: https://github.com/pointhi/kicad-footprint-generator The KicadModTree class takes care of everything. All you need to write is the part that reads your other format and creates the apropriate modtree objects.

I think I can fix up freepcb2pretty fairly easily, the parser will need to change a bit. I have the opposite problem though, I know the KiCad file format but couldn’t find a document describing the freepcb file format. I found some source repos, eg. https://github.com/jpt13653903/FreePCB, not sure if there is a definitive version anywhere.

It would be useful to have some test files to work on.

If you could that thit I would be very grateful. The freePCB file formats are detailed in the user guide which you can find at freepcb.com. I think this is the relevant section:

[footprints]
name:
{author: }
{source: }
{description: }
units: <units: “NM”, “MM” or “MIL”>
sel_rect:
ref_text:
{text: }
…
{outline_polyline:
next_corner:
next_corner:
…
close_polyline: <if closed polyline, last side style>}
…
n_pins:
pin: <hole_diameter>
top_pad: <length/2> <length/2>
inner_pad: <length/2> <length/2>
bottom_pad: <length/2> <length/2>
pin: <hole_diameter>
top_pad: <length/2> <length/2>
inner_pad: <length/2> <length/2>
bottom_pad: <length/2> <length/2>
…
pin: <hole_diameter>
top_pad: <length/2> <length/2>
inner_pad: <length/2> <length/2>
bottom_pad: <length/2> <length/2>

I could not find the file format for Kicad footprints. Did you find it?

Cheers

Ian

I have extracted some of my footprints for test purposes but I cannot find a way to upload them to the forum. Where is the files section??

Cheers

Ian

The closest reference is probably file_formats although that is probably a little out of date.

There is no file section, you should be able to attach a zip to a post. If not, ping an admin to extend your privileges.