Fancy Pads from DXF

I would like to create a footprint that creates two interlocking copper traces that are bridged by a graphite button.

Capture_SW

Now I thought I would be clever and create a DXF of the pattern with the hope I could convert to pads but I cannot get this to work.

TouchPad.dxf (7.9 KB)

Is this because my DXF somehow is incompatible with the selected shapes to pad feature?

This is pretty much nonsensical for KiCad. I actually donā€™t know how this dxf footprint pad import should work, but I can say for sure that KiCad canā€™t interpret that kind of bunch of lines. A polygon in KiCad must be an unambiguous continuous outline.

IMO this would be easier to create directly in KiCad as a custom pad using straight graphic lines.

This is drawn roughly on top of the imported dxf:

image

1 Like

There are a couple of construction lines; I deleted those before trying to convert. Your drawing approach is fineā€¦ how did you do it? Did you change the pad shape or just add filled regions on the F.Cu plane?

OKā€¦ not giving up just yetā€¦ so I extruded my shape(s) in Fusion 360 and exported as a STEP file. Iā€™m hoping that somehow I can then go back from the STEP to pads using FreeCAD and the StepUp plugin.TouchPad v13.step (54.5 KB)

you can get a fp from polyline pads:
TouchPad-fp.FCStd (17.0 KB)
TouchPad-fp.kicad_mod (4.5 KB)

1 Like

Hi

I donā€™t know anything about FreeCAD (yet)ā€¦ so you convert in FreeCAD to a poly line?

have a look at

1 Like

ā€¦it seems to me, what you want is a Footprint

Verrry easy to do in Kicad

  1. Click the Footprint Editor Icon
  2. Create New Footrpint (two Icons at top left, use the First Icon)
  3. Draw your lines on the Silk layer with the Graphic Line tool (could do on other layers, too)
  4. When the lines are done, Edit each (double-click, or hover and ā€˜Eā€™ for edit)
    Change the Width and select Desired Layer (most likely Top Layer)
  5. Add Pads (icon in tool strip) Could make them Square, Rect, Round, Oval, Custom)
  6. Draw Lines/Shape on Silk and other desired layers

Save it and Use itā€¦ (I did not dial-in specific details but, you get the idea.
Did Not use DXF, FreeCad or anything other than Kicad.




2 Likes

They shouldnā€™t be done like that because then they are not pads. Steps 1ā€¦5 are good, but the graphics and the pad which belong together should be combined to one custom pad. It happens by selecting them and using RMB menu -> Create Pad from Selected Shapes.

1 Like

I do it both ways - I make my PCBā€™s so, I often donā€™t bother going beyond the minimal I need. And, that should serve as a starting point for othersā€¦ Generally, I only do the Pads from graphics if neededā€¦ itā€™s an excellent feature!

Unless you need to make a number of different configurations Iā€™ve found its easier to calculate (excel, libracalc) the end points then just put them in by hand.

Not too long ago KiCad did not have the capability to DRC checks on graphics placed on a copper layer, and a hackish way of adding some graphics on a copper layer did work. For some time though (about a year?) KiCad generates DRC violations for track segments and pads that overlap with graphics on a copper layer.

You are of course free to do so in your own projects, but I do not like it if you teach sloppy methods to others.
Combining the graphic shapes with the pads as eelik mentioned is a very small extra step, and without that step KiCad wonā€™t let you draw a track to the pad, because that would violate DRC.

To OP:
Drawing some graphics, then moving it to F.Cu and combining it with a pad such as described earlier does work. Your graphics are also very simple straight lines, so there is no use in being cleverer then needed, and drawing some lies in KiCad itself is just fine. No need for DXF, or even dragging in 3D.STEP files for this.

An alternative method is to just use a few SMT pads and then overlap them in the Footrpint editor to make a bigger and more complex pad.

If you put graphics on a copper layer, then it will be covered by solder mask, and this is ā€¦ not recommended for switches :open_mouth:
If you combine multiple SMT pads, then the pads have cutouts in the solder mask, but also in the paste layer, which is also probably not what you want, so you have to disable the paste layer for those pads.

The photograph has a single big square cutout in the solder mask. The recommended way to do this in KiCad is with an ā€œaperture padā€. An aperture pad is nothing special, it is just a regular pad, but with the copper layers disabled, and also with the pad number removed. Because it has no pad number, You canā€™t connect a track to it, and you can use use it for custom shapes on the solder mask and/or solder paste layers. Search KiCads footprint libraries for ā€œThermalā€ to get examples of this.

1 Like

Your graphics are also very simple straight lines
They are not; they have rounded ends.

The photograph has a single big square cutout in the solder mask. The recommended way to do this in KiCad is with an ā€œaperture padā€.
Thatā€™s interesting. I was assuming that I would draw a square on the solder mask layer.

Iā€™m going to try and do a crash course in FreeCAD. The ability to generate a pad shape from a DXF (or STEP) would be useful for me as I am familar with Fusion 360 for drawing.

All copper tracks have rounded ends in KiCad, so as far as KiCad is concerned they are just straight lines (copper tracks).

My attempt at FreeCAD stepup didnā€™t work out well.

I think I will have to approximate with lines for now

have a look at the FreeCAD file I have attached above

Thatā€™s better. Is there some magic going on thereā€¦ naming convention Pads_Poly_ā€¦ and the circle for the reference point?

there is not a full howto, but there are examples on StepUp Demo menu from where an user can get some tipā€¦

I have also a cheat-sheet document, but it is not fully exhaustive

and the topic at the forum here

1 Like

Thanks all. I think I have learnt quite a few things.

I put a square of F.Mask over the pads to open up the area (I couldnā€™t see how to use Aperture)

I think I have something workable so will move on as I have a design to finish but I think I will return to Kicad StepUp when I have my next fancy requirement.

1 Like

I managed to get quite a long way with the use of KiCad StepUp. Thanks!

The only thing I could not establish is the relationship between the KiCad origins and FreeCad origins when taking sketches from different sources and then exporting them to layers back in the PCBā€¦ but close enough.

Thanks for the workbench plug-in!

2 Likes