KiCad StepUp: The Sketcher for Footprint generation

@martin123
ksu needs full circles to create pads…
solidworks converts cylindrical objects to half circles edges when exporting in step format…

  1. can you export from solidworks in dxf format? may be that could give you full circle shapes…
  2. an other option is to convert your half circles sketch to full circles, using the half circles as construction edges to create the sketch… after a first via, you can simply clone the others inside the sketch
    I have attached a partial conversion sketch in FC
    via-v2.FCStd (105.4 KB)

@maui

did see that the cicles was made up of two segments, thought that it might be the problem, but didt not try to export from another software :man_facepalming:
Managed to import the step file to fusion and then export it as step again, this created full circles.

dxf from solidworks created segmented circles.

Thansk again for your help

1 Like

Hi kicad master !
I used kicad and stepup with succes to create specific shape to my project. But i have a problem for create a footprint with a specific hole inside (like a polygon). Is it possible ?

Regards.

Ps : i think is like the problem @josexavier

@lidiriel
you need to use a pad with an edgecut inside… better if using kv5.99
complex-pad.FCStd (82.8 KB)
fp-complex-pad-adjusted-kv6.kicad_mod (4.9 KB)
complex-pad-kv6.kicad_pcb (7.1 KB)

1 Like

Thanks @Maui. I did a mistake in my explanation (sorry for my english). I wanted an area (polygon) with no copper inside the pad : not a hole. At this time i have found a work around with split my initial pad/part in two parts to generate two pads.
It is work. But if there is another solution it will great.!
Below my two pad in kicad footprint

I don’t think there is a solution with a single pad even in kv5.99

I think this workaround is the only available

I’m trying to create a large footprint with a single, complex pad outline, but with many separate solder paste outlines.
I created a dxf of just the solder shapes and imported into FC, but when trying to generate the footprint with StepUp, I get the following error:

16:52:32 Running the Python command ‘ksuToolsFootprintGen’ failed:
Traceback (most recent call last):
File “C:\Users\Ed\AppData\Roaming\FreeCAD\Mod\kicadStepUpMod\kicadStepUpCMD.py”, line 994, in Activated

File “C:\Users\Ed\AppData\Roaming\FreeCAD\Mod\kicadStepUpMod\kicadStepUptools.py”, line 16621, in PushFootprint
export_footprint(name)
File “C:\Users\Ed\AppData\Roaming\FreeCAD\Mod\kicadStepUpMod\kicadStepUptools.py”, line 17248, in export_footprint
drl_found=collect_drl(pth_ordered)
File “C:\Users\Ed\AppData\Roaming\FreeCAD\Mod\kicadStepUpMod\kicadStepUptools.py”, line 17855, in collect_drl
px=(p[0][1]+p[0][3])/2;py=(p[1][2]+p[1][4])/2;

list index out of range[‘REF**’]
16:52:59 ['Value ']

It does appear to find lots of “2d closed path” before the error.
I’m just trying to create the solder mask shapes for now, so the whole pad shape isn’t in there - I already have that on the PCB.

I hope you can help.
BusBarPart1.FCStd (176.6 KB)

1 Like

to create poligon and convert them to pads for kicad_mod format, you need a closed curve in sketcher with a small circle in the center. This will be reconized as a pad by the python code to be converted to a pad for kicad module.
Please have a look at the demos in the StepUp menus.
BusBarPart1-test.FCStd (17.9 KB) fp-solder-paste-test.kicad_mod (14.5 KB)

1 Like

Thanks for your reply Maui, and for creating this tool.
I missed the point about the circles, but the problem seemed to be some ‘too short’ lines in the polygons, which were ironically created from a KiCAD DXF export.
It is now working as near as I need it, and I managed to get a soldermask footprint from the geometry.

1 Like

I’m having a really strange problem with my footprint generation. I have a Hairpin filter which is designed in CST. I export a dxf file, bring it into freecad and clean the sketch slightly. I insert circles in all enclosed polygons and attempt to export. I don’t get any errors but it seems to fail to detect the reference circles for the poly pad. Anyone have an idea about what I’m doing wrong? The exported footprint is empty except for the ref and val text. HairpinExportTest.FCStd (53.1 KB)

18:21:08  exporting new footprint
18:21:08  saving to D:/testerle.kicad_mod
18:21:08  Sketch
18:21:08  Group
18:21:08  Text
18:21:08  Text001
18:21:08  2d closed path
18:21:08  2d closed path
18:21:08  2d closed path
18:21:08  2d closed path
18:21:08  2d closed path
18:21:08  2d closed path
18:21:08  2d closed path
18:21:08  normalized Poly
18:21:08  circle drill
18:21:08  circle drill
18:21:08  circle drill
18:21:08  circle drill
18:21:08  circle drill
18:21:08  circle drill
18:21:08  circle drill
18:21:08  circle drill
18:21:08  circle drill
18:21:08  collected poly pads centers and positions
18:21:08  running time: 0.102sec
18:21:08  new Footprint pushed to kicad footprint!
file saved to D:/testerle.kicad_mod

Hi,
the first polyline has an internal hole; this is not supported ATM in kicad neither in ksu.
I would try without the holes in first and last polylines. You can add lately a TH pad
here a Fc and kicad_mod file
HairpinExportTest.FCStd (67.4 KB)
hairpin.kicad_mod (11.0 KB)

1 Like

@maui thanks so much! Can you elaborate on what you mean with “internal hole”? This structure should be completely planar and have no through holes. Can you also elaborate on how you fixed the issue? When I export from your attached file I get the following looking footprint:
image

I selected the folder “thefp” and all its contents and clicked the “Footprint editor and exporter” button. I’d also be happy to write a little tutorial / do a video for you to help with documenting how to do this design flow from EM Simulation software to a clean Kicad footprint. I just first need to understand myself how to do it… :slight_smile:

I’m on the latest StepUp from the Addon Manager with Kicad 5.1.5

1 Like

When I changed the sketch name of your file from Pads-Poly to Pads_Poly the export works. Now I’m simply baffled by why it works with the sketch in your file and not in the one I had initially. It would be immensely helpful to me if you described the steps you did to arrive at the result you posted from the file I posted. Thank so much for your help, great tool!

  1. in your sketch there were 2 circles inside the first and last poly (I deleted one in each)
  2. my tool has a very simple algo to check connected poly, so I used a trick to create a sketch with consecutive edge segments…
    a) I ‘simple copied’ the sketch to a shape (there is a button in ksu;
    b) I converted the shape to a sketck (an other button in ksu) and renamed the sketch as Pads_Poly

I’d be glad to add your docs to my wb. I know I’m lacking in documentation. :smiley:

you may also consider to have a look at thomaslepoix/Qucs-RFlayout

1 Like

I believe that I put those circles into the sketch… I thought they were needed so that pads poly works? I know this is a lot of work to help a random internet stranger, but could you post a screenshot showing which holes you are referring to?

As per QucsRFLayout, yeah I’ve used that quite a bit. But as I currently have CST I’m trying to make use of it before I go back to the struggles of the open source world :slight_smile:

in your original sketch, you placed two circles in first and last poly… only one must be placed each polyline to convert it to a fp (the other polylines were fine)
I just thought your cirlcles at the left and right were intended to be drills.

would you mind to post some samples of your models generated by CST?
Does it generates DXF files?
Is that CST studio suite?

1 Like

Wow that was a total oversight on my part. I meant to only put the one… thanks for pointing it out! Sure I can post some samples. Yes it is CST Studio Suite. You can export to a variety of formats including dxf and step. What would you like? I have several hairpin and notch filters, some wilkinson dividers and a 77 GHz antenna (but it still needs a little optimization).

DXF and STEP are both fine.
From your hairpin file there is a sample generated by CST as a group of contiguous shapes. Is it possible to export a boundary contour instead? That would help in converting the pads to kicad.

the shapes in the example:
shapes

desired shapes:
contour

Unfortunately, this is not possible as far as I know. The export options are very limited and would produce this result as far as I can tell. It should be relatively easy to perform this is FreeCAD though, correct? Though I would not know how other than deleting the elements in the sketch directly.

Ok, I’ve found a good way to do this: https://wiki.freecadweb.org/Part_RefineShape/en