Fill footprint polygon

I’m trying to build this footprint in version 5.1.2-2:

Stencil

Embarrassingly, I’m about 3 hours into trying to do this and I just can’t seem to find the correct way to draw/build filled polygons in the footprint editor. I’ve tried creating a DXF in Inkscape and importing it into the editor, but it imports as a line drawing with no fill. My current attempt is to use a rectangle ‘anchor’, and build the remainder of the shape off the anchor and then convert it to a pad (see below). Again, the rectangle anchor is filled, but the remainder of the shape is just a line drawing; how does one create arbitrary filled shapes in the footprint editor?

Note: I briefly installed the FreeCAD StepUp extension, but figured a footprint as trivial as this surely doesn’t require the complexity of StepUp.

by any chance is that a Wuerth terminal?
there is a mounting_wuerth official library and also generation scripts. Have a look at them

2 Likes

Amazing.

Yes it is absolutely a Wuerth terminal, part number 97730306330R. Thank you for pointing that out, I’ve successfully added and used the Mounting_Wuerth footprint :slight_smile:

np :slight_smile:
the style of the footprint and the stensil screams Wuerth and I recently used one of their terminals and struggled to figure out how to do it as well until it was pointed out to me such parts are in the library

1 Like

First V5.1.2 is pretty old, maybe consider an update?
Second I Like KiCad very much, but it sucks at circles, or anything round.
Third Let those first two points sink in for a while…

Then I had a go at it.
I set the grid to 0.05mm because that grid fits with the resolution of the footprint you want.
My goal is to fist make a collection of simple primitives that can be drawn in KiCad itself, and then turn that collection into a custom pad.

I first created a "rounded Rectangle SMD pad, with these parameters:

That covers most of the area. I used a “corner size” of 30% to prevent the sharp corner form sticking out of the circle.

Second step was to create an arc with the parameters in the screenshot.
This is beginning to look like one of your pads now:

Third step is to add some more lines on the Silk.Screen layer (or whatever other layer, it does not matter much)
Note that I changed the line width from 0.12mm to 0.1mm. This fits nicely with the grid. The edge of the two straight line segments is now 0.15mm from the blue origin point of the footprint.
[Edit:] Using a polygon instead of the two lines as BlackCoffee suggested later is indeed a better option. With the polygon you can completely fill the area between the pad and the arc.

Note that there still are some gaps between the lines and the pad. I am too lazy to fix it, but you have to fill those gaps with some kind of graphic primitive.

Next step is the important one.
Drag a box around all your graphics to select it:

Then right click with the mouse on the drawing area, and select: “Create pad from selected shapes”. This turns all the selected shapes red and makes a single pad out of it. Such a pad must always have at least one “real” pad, because it uses that as the attachment point of tracks to the pad.

Next step, press [Ctrl + C] to copy , select a reference point, and then press [Ctrl + V] to insert 3 more copies of your Quarter round pad:
image

  • Click one of the pads to select it.

  • Press M to move the pad (this attaches it to the cursor)

  • Press R to rotate the pad.

  • Move the mouse cursor to get the pad on the right location.

  • Click to put the pad on that location.

  • Repeat two more times.

  • Click on each of the pads,

  • Press e for Edit.

  • Change the pad number.

  • Repeat.
    Now it looks like:
    image

From this point forward should be straight forward. Add some silk screen, place texts etc.

Note that you can also go backward. If you discovered you made a mistake, then you can select one of the pad, right click on it and select: “Explode pad to graphic shapes” and this transforms your complex pad again in a simple pad and some other graphics items, so you can modifications and redo it.

This took me about half an hour, maybe more, but almost all of the time was for making screenshots, posting them, writing the text, and redo some stuff because I also made some silly mistakes.

3 Likes

Thank you @paulvdh that’s brilliant.

I actually had the latest version of KiCad installed, but was having all sorts of issues with the Edge.Cuts layer (I recall a bug where you couldn’t route traces within the confines of the Edge.Cuts boundary) so reverted to the last known working version (for my project) which is 5.1.2-2.

Thanks again for posting your process, it’s certainly helped me understand the primitives better, your efforts are greatly appreciated!

My experience with bugs in the latest stable KiCad version is that if a bug report is made with a good description and it is reproducible, then it usually get fixed within a few days (and users get the fix with the next point release).

Did you discover the problems with those tracks yourself, or was it already listed as a known bug?

A minor tweak to @paulvdh approach…

In the Footprint editor on a new footprint):

  1. Draw a section of it using the Graphic Polygon tool (draw segments of the Curve)
  2. Right-Click it, Array (set H & V 2,1)
  3. Window-Box them, Copy, Rotate, Mirror
  4. Double-Click each and change layers as desired
  5. Add 4 Pads, Double-Click, change to SMD. One over each section
  6. Window-Box one section (to select it) Right-Click, Make Pad From Shape. Repeat for each one
  7. Draw a Silk circle around it

~Done~

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.