5.99 - adding more grids to PCB/footprint editor

Hi,

Is it possible to add grids to PCB/footprint editor? if yes how can I do it, apart from the user grid.

The list of grid sizes is read from a file (I think JSON format) in KiCad’s configuration directory. I once modified that file to reduce the amounts of available grid sizes.

And then lost those changes again after a re-install of KiCad :slight_smile:

If it is OK to say; I am curious as to what grid sizes you would want to add? I am not in a position to provide direct help with this discussion…

Do you know what would be the limitations of trying to add sizes to that file?

Have a look at:

~/.config/kicad/5.99/pcbnew.json

(Or whatever the equivalent on your OS)
It has a few lists of grid sizes such as the one below for different sub programs in KiCad.

As far as I can see it’s just a list that gets interpreted on startup and read into some GUI dropdown list. I see no reason for there to be any significant limitation. Your first limit is probably what fits on your monitor or is comfortable to work with.

  "window": {
    "cursor": {
      "always_show_cursor": true,
      "fullscreen_cursor": false
    },
    "display": 0,
    "footprint_text_shown_columns": "0 1 2 3 4 5 6",
    "grid": {
      "axes_enabled": false,
      "fast_grid_1": 1,
      "fast_grid_2": 2,
      "last_size": 5,
      "line_width": 1.0,
      "min_spacing": 10.0,
      "show": false,
      "sizes": [
        "1000 mil",
        "500 mil",
        "250 mil",
        "200 mil",
        "100 mil",
        "50 mil",
        "25 mil",
        "20 mil",
        "10 mil",
        "5 mil",
        "2 mil",
        "1 mil",
        "5.0 mm",
        "2.5 mm",
        "1.0 mm",
        "0.5 mm",
        "0.25 mm",
        "0.2 mm",
        "0.1 mm",
        "0.05 mm",
        "0.025 mm",
        "0.01 mm"
      ],
      "snap": 0,
      "style": 0,
      "user_grid_x": "10 mil",
      "user_grid_y": "10 mil"
    },

Thank you Paul,

For windows locations seems to be: C:\Users\elekgeek\AppData\Roaming\kicad\5.99

I tried this list, it doesn’t seem to be affecting the footprint editor. On the other hand it works for PCB editor. I also found footprint_viewer and footprint_wizard, I added a grid to each one of them, but it did not appear in the footprint editor.

I was curious but unable to find it based upon that information.

Of course! Shouldn’t that be intuitively obvious? I am always roaming when I am sitting at my home computer. :crazy_face: So it appears to work:

image

How did I ever get by before now without a 17 mil grid?

One more episode in the saga of trying to crash my computer by screwing around with program files…

1 Like

were you able to add grids to footprint editor?

Edit: Now some smart ass will pop up and ask, why do you need 17 mils for :smiley:

1 Like

I had not tried that, but now I did the same to fpedit.json and yes I have the wonderful 17 mil grid now. My next move was to add a line for “pi mils” but that seems to be interpreted as 0 mils:

image

I am not sure if I want to see how that works. I copied the original .json files before these silly experiments so I will now delete my modified files and restore the originals before I get myself into added trouble…

excellent! This one works for me too.

Anybody knows what “footprint_viewer” and “footprint_wizard” are for?

The footprint viewer is for viewing footprints :slight_smile:

I thought for a bit it may be the “Footprint chooser”. Pcbnew / “o” shortcut key but that does not have a dropdown box for a grid:

Maybe it is the “Footprint Library Browser”:
In Eeschema, hover over a schematic symbol, then press f and then press the “bookcase” symbol to change the footprint.

image
That does have a drop-down box for selecting a grid:

The “Footprint Wizards” are python scripts for creating new footprints. You can find them in: Footprint Editor / File / Create Footprint
In the screenshot below I used such a script for generating a BGA footprint with 13 columns and 3 rows:

But I can’t see a drop down box for a grid there though.

There are some 15 footprint wizards, Including for S-Dip, BGA’s QFP’s, QFN’s, circular pad arrays, Touch sliders, bar codes.

1 Like

Paul,

Thank you, you are always nailing questions.

If you righ-click you can see the Grid in the context menu and see your new grids in the footprint wizard:

Ah, is that where they’ve hidden it.
I can’t know them all :slight_smile:

What’s more important in the footprint wizards is to realize that on the far left, there are two “tab pages” in the parameter settings with Pads and Package
image

These let you enter different parts of the parameters for a footprint.
If you put for example too many pads in that BGA (or make the spacing too big) then no pads are shown at all, unless you also make the package itself bigger so the pads fit within the package.

I have not used the wizards. But when I think of “wizard” I think of Merlin. I am a passive fan of the version of Merlin, with 12 cylinders and making loud noise as it propels airplanes of the 1940’s.


But while I am off on tangents I have a really dumb question of which I was reminded by another post. When someone in a post has a link that says something like “@janedoe” what are they doing and how? When I see the @ symbol I think of Twitter but I am not there and our forum is not either…

@BobZ Placing an @ in front of an existing user name pings that user. It’s a built-in forum function. As soon as you type a few characters after the “@” then the forum software starts generating a selection menu with user names it knows.

This motor is bigger:


(But it was a bit late for the war effort).

Do you have any Idea how many airplanes were built in WW2?
Make a guess before you peek. :slight_smile:

@paulvdh

Thanks! Well I know that the most produced planes were approximately in the 10,000 - 20,000 range. So I will guess 150,000.

I will resist the temptation to take this further into the topic of WW2 aircraft…

Wow I was off by 5x - 6x.

An inventive near neighbour of mine repurposed a Merlin engine in a car. I forget how many gallons per mile it does.

In the air it was about a gallon a minute if you were pushing, so said a colleague of my fathers many, many, years ago.
So at 300 mph that is 5 mpg. (we will let these new-age metric people do their own conversions :slightly_smiling_face:)
Would have to be at least double, probably triple that, if you were only playing in two dimensions.

Imagine the torque! The gearbox would be interesting… this is forward, this is neutral and this is backward :slightly_smiling_face:

You don’t have to Imagine it - this is from the Brooklands Hill Climb. Seems a bit heavy on tyres too! :grin: Sorry this is waaayy off topic now.:neutral_face:

I should rename this topic to “adding more grids/engines” :smiley:

1 Like

That thing is a moving coffin.
I already suspected it would not be able to have much grip on the road when I saw those narrow wheels, but from that last movie clip it’s looks even much worse then I first suspected. It’s got all the weight in the front and rear wheel drive, and even with spinning wheels it barely accelerates.
And on top of that it does not even have a roll-cage.