How to draw quite complex footprints

I need to draw the OSRAM OSCONIQ P 3030 footprint. I didn’t find a Kicad library for this package so I’m going to draw it by myself.

I read several tutorials and of course I drew many other footprints.
I understand it’s not very complex, but the only ways I’m aware of are:

  1. playing with grid changing the origin and intervals every time
  2. draw a line and then open the property window and change the end points manually

As far as I know the Kicad programmers didn’t want to add the usual command line prompt like almost every CAD, nor a parametric feature to add constraints to items.

Do you confirm there are no other ways to input precise coordinates?

1 Like

It’s a bit difficult to know how you understand the footprint editor works. The datasheet has only recommended pads and copper areas. You don’t draw lines for that. I also don’t know why you think you should change the grid.

Why do you think they didn’t want to do this or that? KiCad has a Python API which resembles a “command line prompt”. There has been talk about adding some kind of constraint system, but because the developers are mostly volunteers doing this in their free time, they have to prioritize, and a new editing system isn’t trivial to design and program.

I’m pretty sure I didn’t fully understand how the editor works!
Just an example, to draw the outline:

  1. open the grid settings (there’s no shortcut for it, so at least two mouse click) and set 1,5 mm
  2. select front silkscreen and draw the square paying attention at the coordinates displayed at the bottom
  3. open the grid settings and set 2.73 / 2
  4. draw the circle
  5. change layer to front fabrication
  6. open the grid settings and set 1.6 mm (otherwise you don’t see the silkscreen - I see most footprints are drawn in this way)
  7. draw the square
  8. open the grid settings and set 2.83 / 2
  9. draw the circle
  10. select the front courtyard layer
  11. open the grid settings and set 2 mm
  12. draw the square

This is just to clarify why I had to change the grid.

I see. Grid can be used like that, but it’s not the recommended or common workflow. Typically you select a grid which is fine pitched enough to represent all used coordinates and then just translate the datasheet values to coordinates in one way or another and draw items. Editing items happens WYSIWYG by grabbing and dragging their points afterwards, or editing their property values.

This is not very difficult, everyone does it like that and gets used to it. There are some “invisible” features to help editing, like hitting spacebar to set the “local origin” and see relative coordinates in the bottom of the view, and using shift, alt and control keys while drawing (I don’t remember right now what does what, they have been changed for the unstable development version 5.99 which I have used more recently).

As for constraints, they would be really useful; see Constraint based component placement.

1 Like

Finding a grid which is fine enough to represent all used coordinates it’s very hard! It becomes too fine in a while.

The “grid workflow” is explained in the official tutorial here.

Anyway, I’m going to study the Python integration to try a basic feature: create a fast way to change grid settings without open and manually fill in the X and Y fields.

Not really, for example if you see numbers like 2.73 you can choose 0.01 for grid.

Not really, if you use other possibilities of KiCad. I mentioned a few; zooming in and out with mouse wheel is also useful.

For example, I would draw the Fab layer (the exact outline and important features of the component) like this:

  1. Choose 0.5 mm grid.
  2. Zoom with the scrollwheel so that it’s easy to find the first grid point, for example -1.5 mm / -1.5 mm.
  3. Start drawing a line.
  4. Press and hold Ctrl while drawing.
  5. Go to the next corner, for example 1.5 / -1.5.
  6. Click.
  7. Continue to the next corner etc.
  8. Press Esc when it’s ready.
  9. Change to the Circle tool.
  10. Draw any kind of circle, maybe starting from 0, 0.
  11. Open the circle Properties (select it and press e).
  12. Write 2.73/2 to the Radius field. (Also change X and Y to 0, 0 if not already.)
  13. Accept the dialog.

Using customized grid values (instead of choosing from the predefined grids) is a good workflow if you need to place several items at once which fit into that grid. It’s not fluent for normal drawing.

(BTW, articles in this forum aren’t “official”, they are mostly written by us users. Only the documentation which you can find from the is “official”. This doesn’t mean our articles wouldn’t be good, but they aren’t official.)

you may also have a look at Kicad StepUp: The Sketcher for Footprint generation

I don’t bother using the grid to draw a footprint like this. I sketch it on graph paper or some drawing program. I assign X,Y for each corner and simply draw lines from one to the next.
The thermal extensions would not be on my footprint, I would use filled areas when laying out the board.

1 Like

Ok, perhaps it’s just a matter of habits. For me it makes no sense to rely on visual aids (like grid or coordinates display) if I need to follow precise (X, Y) points. Anyway, if you all are happy with this approach perhaps I am the wrong one :slight_smile: I’ll try to get used to this different workflow.

I don’t think you’re wrong, I’d like to see constraints implemented (see But it’s not possible right now, so you just have to get used to what we have.

Actually I would prefer to draw a rectangle knowing width and height. Then place it where I want. My description is how I work with the current tools.

Watching this post… Perhaps I missed something as it seems to me what (I think) you want to do is be able to:

• Draw a Footprint shape of nearly any size and place it at any location without it snapping to the grid.

If that is correct - it’s simple. Just use a key-press to stop snapping. On my machine, it’s the alt/opt key.

Example below shows a tiny shape of 1.27mm wide. I copied it and pasted a second one without snapping (using the alt/opt key) - placed a tiny fraction away from grid-point.
The result is shown with it placed Not at a grid point.

Thus, no need to fuss with changing Grids. Also, I did not bother to change the width of the Silk’s line but, I imagine if drawing something this small, it would be a good idea…
And, of course, you can set the grid and place item with snapping on… Can also set line lengths in the editor… Use the Info strip at bottom of Window to see lengths & dim’s while dragging with Snapping off (so you can set refined dimensions… screenshot shows cursor at 0.000917. Can Zoom-In to further refine it down to a Gnats-Ass, as the expression goes…)

1 Like

Thanks for your hint. Actually, what I was trying to do is to avoid to use grid and mouse to draw objects. When I say “mouse” I mean without having to look at the coordinates and try to catch the right spot puzzling with zoom and pan…

Just a way to enter coordinates and/or lengths would be enough - and without opening and closing every time the property window :smile:

But it’s already clear that Kicad does not have this feature because most of the users don’t think is useful - they already have different workflow. When (and if…) I have some spare time I’m interested in learning how to add features with Python.

I’ll finish-up by saying, you can draw a shape without using any input box (for length and coord’s and angle) by using holding down the Shift and Opt/Alt key.

Example shows tiny shape with fractional lengths/dim’s and values are shown at bottom of panel. You can see fractional values change as I draw them.

Of course, commonsense should dictate realistic values (I mean, a user should know that 0.1mm = 0.0038” and machines making PCB’s and parts do have a limit on precision they can do…

Drawing in Footprint Editor and PCB Editor is the same process. And, can place a footprint without snapping to grid…

good luck

Oops! Forgot: You can draw the shape in your favorite drawing program, export as DXF and import it into Footrpint Editor and/or PCB Editor.


Oops! Forgot: You can draw the shape in your favorite drawing program, export as DXF and import it into Footrpint Editor and/or PCB Editor.

This could be a workflow I can definitely try!

It’s not quite as efficient as having Kicad read your mind but… Finally it dawned on me that what you want is (basically) already implemented. It’s just a matter of how to use it in an Efficient workflow manner… Select (via window-boxing) a line, click “E”. If you had a Plugin to do it, you’s still need to click or tab to the field to enter data then click an OK button…

Assuming you know the shape and line info - Just draw 4 lines off to the side and edit each line. The steps/effort is not much beyond clicking a custom plugin and entering the data…

As far as placing the final shape, just select the group of lines and press the M key to move the shape.

video below


1 Like

I thought for a minute I had a solution… enter the lines in R Φ . However the input box is still in X, Y coordinates :frowning:

It would be a acceptable if a click on other lines keeps the property window open (just like any “object inspection” panel). Of course your method works but I’ve already mentioned it before:

Just a way to enter coordinates and/or lengths would be enough - and without opening and closing every time the property window :smile:

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