How to set grid origin on center of pad in 4.0 RC 1?

On some 2013 version when I wanted to put grid origin, cursor was snapped to che center of pad or track. In 4.0 it is snapped only to the current grid crossings. It is still possible in 4.0?

1 Like

today I had the same problem

how can I center the grid to a pad? I cant find how to do this…

Have a nice day

‘pad’ implies either pcbnew or the footprint editor… which one is it?
Also what is the purpose of ‘centering the grid to a pad’?

[quote=“Joan_Sparky, post:3, topic:1612, full:true”]Also what is the purpose of ‘centering the grid to a pad’?[/quote]In my case, I use to feature to put another footprint on PCB with specific distance from this pad. Using “space” feature will work, however it is really hard to put another component in exact distance like 0.1 or 0.254 mm, because there is no “magnetizing atraction” to the grid crossing.

Are those ‘different’ footprints which don’t have the same pads? Why is that?
Footprints snap with their ‘center’ to the grid - which is defined by the origin in the footprint editor. In pcbnew this center is a barely visible blue cross (by standard, can be changed).
So it’s possible to have footprints snap to whatever grid you want and get a distance between them, but not for single pads, unless you kept the grid/spacing of the pads within the footprint on a similar spacing… sorry, hard to explain.
Why do these pads need to have a certain distance?

The more you explain to people what you aim for the easier it is to understand your goal and find a solution/workaround… sorry if those questions sound like I question your overall goal.

I am not siting in front of kicard right now, not remember in what condition I have started this topic.
Imagine following situation. There is a matrix of 16 element (LEDs or configuration resistors) which must be put in 4x4 block. I put first element, then would like to setup grid origin on this element (footpad origin), and then using grid place remaining 15 components spaced every 2mm.
I was previously using Protel for many years and there was two option for doing this:

  1. set global origin point on first component, put all componentanywhere on pcb, then type manually their position like 2, 4, 6, etc
  2. set grid size 2mm, put grid origin on first component, then put manually all components on grid “nets”
    Option 1 is impossible in KiCAD since lack of function to set global origin point
    Option 2 is impossible in KiCAD 4.0 since lack of possibility to put grid origin on component pad or footpad origin.
    I am still using option 2 on KiCAD 3.xxx

You could use the user-grid for that purpose… it will be really cumbersome and not easy, but should be doable.
You can adjust it’s origin to the pad of the base footprint (needs coordinates of footprint center AND relative coordintates of the pad you want the origin based off of).
Then just set the spacing how you need and off you go?

[quote=“Joan_Sparky, post:7, topic:1612, full:true”]You could use the user-grid for that purpose… it will be really cumbersome and not easy, but should be doable.[/quote]I think it will require 2 mouse quick if it will be possible. Not sure right now, like I was writing before, I do not remember condition what raised this problem.

[quote=“Joan_Sparky, post:7, topic:1612, full:true”]You can adjust it’s origin to the pad of the base footprint (needs coordinates of footprint center AND relative coordintates of the pad you want the origin based off of).
Then just set the spacing how you need and off you go?[/quote]I do not understand this idea, maybe we are going to far from my problem.Do you mean I should read coordinates and do some math and then type the numbers manually?

I am still wondering why I want to put grid origin on center of pad. I might have another idea why. If I put a footprint this way that center of pad is out of grid and I start drawing track, kicad will try to bend track to adjust it to grid, so the track will look bad (in a place when track exits a pad). I cannot describe why I am feeling this looks bad, maybe when I will be at home in front of KiCad i can do some printscreens.

I come from altium, and settting up the grid origin to relevant points is a common task and a great feature for fast design. I guess that previus altium users that are used to do it, would miss this workflow.

I find specially useful when your PCB borders uses millimeters, and you are placing things on the 100mil grid (like pin headers, etc)

On this particular issue, I imported a pcb from protel ascii, but it is very hard for me to align the pads of the board to the 100mil grid. It would be easier if I simply setup the origin of the grid to a particular point and then I continue working.

I use it a lot to layout headers on the board. For example, I have a row of 8 pins on some random position on the board, and I want to place a second row that will match the 100mil grid. I could place the origin on the first pad, setup the grid to 100 mil, and place the second row of pins.

Because sometimes you have pads in millimeters and inches, even on the same footprint, doing the math is quite painful with respect to the footprint origin.

Hope this can helps.

1 Like

Footprints have a center (blue) and pads have relative centers (green) to that center:

If you put the footprint onto a grid and know the relative distance of your desired base pad to that grid point, you can adjust the user grid to center on that particular pad.

?!?
The track will snap to the center of the pad (if you haven’t deselected that option in general preferences) under the rules in general preferences and the parts of the track put down before will stay on the grid…?!
If you don’t like how it snaps or lays, just hit [/] during track laying.

Are you saying you ‘build’ connector headers out of single pins or rows of pins?

As for multi header board-to-board connection alignment… the first I would do is to get my header footprints checked over (or made) and then probably work within the limitations of KiCAD - center of header 1 vs center of header 2 would be the way to go - as long as user grids can’t be snapped to pad centers.
Have no other idea for you guys, sorry.

well, I was talking about altium and how i usually work. You can move the footprint not only from the origin, but from the pad, so, you align the pad to the grid, and all the whole footprint move to that position.

but anyway, thank you for your time.

1 Like

I have tried to recreate this problem under KiCAD, I have image file, resistor at the right of IC cannot be aligned to the IC pad with using grid. It can be done by manualy typing coordinates or disabling grid. In case of second solution, it is almost impossible to set both elements in line with maximum precision.

I did understand that, no worries. One can do that in KiCAD too… open the footprint in the editor and move the whole lot, so the footprint center aligns with one of the pads. Neither very convenient or universal though as you would need one footprint per position… meh.

Have you checked launchpad if there is a wishlist entry/bugreport about this where you can lend some support?

And your beef there is with the kink in the track or what is the real problem?
I mean, we’re talking hundredths or thousands of a millimeter in miss-alignment here… the pads won’t be made so exactly by the fab house - and even then the solder mask will have miss-alignments of 2-3 mills.

To get the kink out of the track:
If you start laying the track, start it from the left/oval TP1-74 pad… move to the right and let it snap to the resistors TP1-2 pad… hit the dash key [/] to get the other variant for the track pose (where the kink will happen within the resistors pad) and then end the track - voila done. It helps to switch the filling of pads OFF in pcbnew while doing tracks like this, makes you see a lot more.
The track won’t enter the resistors pad exactly in the center there - true - but why would that be needed? - as long as the track between the pads is straight (which you make sure of by using some smarts and moving the kink into a pad area).

[quote=“Joan_Sparky, post:13, topic:1612, full:true”]

I did understand that, no worries. One can do that in KiCAD too… open the footprint in the editor and move the whole lot, so the footprint center aligns with one of the pads. Neither very convenient or universal though as you would need one footprint per position… meh.

Have you checked launchpad if there is a wishlist entry/bugreport about this where you can lend some support?
https://bugs.launchpad.net/kicad[/quote]Derethor, you have my voice if you would like to request this feature. I really miss that one from old Protel.

[quote=“Joan_Sparky, post:13, topic:1612, full:true”]And your beef there is with the kink in the track or what is the real problem?[/quote]Yes, my “problem” is this design pattern looks bad and in my point of view it shows some lack of “art” of PCB design. It is very rare to see such things in proffesional design, but is common in hobby projects.

If it is straight track fab will not make this track more wavy. Any missalignments between holes, tracks, soldermask or silkscreen has usually common “offsets”, and does not looks like this.

[quote=“Joan_Sparky, post:13, topic:1612, full:true”]The track won’t enter the resistors pad exactly in the center there - true - but why would that be needed? - as long as the track between the pads is straight[/quote]This is not a solution, does also make project looking hobby. If the track will be to much close to the corner and if soldermask will be poor quality exposing some part of track, the “corner” between pad and track may “suck” some of the solder making poor connection between component and pad. This effect has some special name but it slipped my mind.

So, it’s a taste thing… got it. Do what you have to do. I’ve seen plenty of professional designs which have the track come in at all kinds of positions and just talked with my co workers and they all agree it’s personal opinion stuff - unless we’re talking RF here, but then KiCAD might not be the best weapon in the arsenal for that anyway.

If you count on the fab to make the copper as per your drawings and they then screw up the soldermask… no idea what shop that should be?!
As for sucking solder away, that’s a problem with vias too close to a pad, so one should take care of it, but short lengths of bare tracks? Never heard of it.
Would be nice if you could find some info on it though - don’t want to die too dumb :wink:

I found this request:

maybe it can help? I think that a checkbox with “snap to nearest object” woudl be great, and that will affect to the grid cursor as well.

If not, we can create a new feature request.

Hi Joan, I may be a bit late on the topic here, but thought it may prove helpful to put my 2 cents worth in here too. This evening I have been using Kicad and as a new user, the lack of ability to snap to pad center (as well as tracks or lines of any sort for a given layer) is a definite drawback. I too come from a Tango/Protel99/Altium PCB design background, and worked in a major corporation for many years with a team of engineers. I have to agree that laying out tracks with tiny “dithers” in them albeit ultra small geometries, is nevertheless unprofessional. The reason is not limited to whether or not the Fab house is going to be bothered with such tiny variations, but also PCB artwork rapid prototyping, being prone to errors and future maintainability. If a track is being placed between two off grid pads only microns apart, a non-snap solution is going to yield a track of multiple segments (as discussed). Later you (or somebody else) comes along, deletes part of the track, not realizing they have left a tiny segment on the board. This copper debris becomes a hazard, especially at high voltage (I come from a power engineering background) if overlooked.

Further to this, in the interest of rapid board development, the tool (IE KiCad) should be doing as much of the thinking as possible. If a person has to manually calculate pad/footprint centers all the time, this is tedious and prone to errors. Instead, as is the case with Protel and Altium, being able to snap to pad or via, or any track/line (depending on which layer I am currently working on) is an extremely powerful function. Likewise, having a shortcut key so you can avoid snapping to anything is useful at times too, but really 99.9% of the time, snapping is left on and for good reason.

Finally, I will add that over the years I have developed my own personal solutions for quickly marking the center of a component (for example) using the snap feature in Protel/Altium. Alternatively, X marks the spot, or more correctly, I place a dummy pad at a point where I want something to be exactly anchored or referenced to, align reference quickly (using the snappy functionality) and then delete the dummy pad. I will do this 100% spot on in seconds while a KiCad user is spending minutes making error prone calculations to determine co-ordinates to achieve the same result.

Not negative criticism, in fact I think the KiCad team have done a fantastic job with the product thus far, but please don’t ignore some exceedingly vital features for a professional electronics CAD package.

Hm… afaik if you start putting down a track it will snap to pad centers and then to the grid if you are not near the center of a pad.
Personally - to avoid lost bits of copper tracks - I do run with pads in outline mode when I lay down or delete tracks.

The thing I don’t understand is - if a footprint has the same pitch, then (usually) it’s possible to align pads with each other, probably needs the imperial grid then.
If the pitch is different, how many of those pads can you align that way… 1, 2… maybe 3?
What’s with the others?
I got maybe 100 footprints in my personal collection… most of them have different pitch. I don’t try to align the pads. I just align the centers of the footprints and the tracks will snap to the centers of them and otherwise to the (metric) grid.
So yeah, I don’t really see the usefulness of this for me, but YMMV naturally.

As for KiCAD not (yet) being able to align footprints via pad centers… talk to the Dev’s or find a programmer who will do it for you - the beauty of Open Source - I’m just here to help to the best of my abilities.
I’m not involved with the development of KiCAD :wink:

1 Like

I just recently discovered that in the new OpenGL canvas this should all be possible. Setting the grid origin to a pad center has always been easy. Select the track tool, which then magnetically snaps to your pad, hit ‘s’ to set the origin. And now, in the new canvas, hover over a pad while hitting ‘m’ and you should be able to pick the footprint up by the pad!

Actually another new thing is that the magnetic pads work while moving components as well. So you can even snap to the pad and hit ‘s’ while moving to set the origin.

1 Like

I was wrong =P In the old canvas you can magnetize to the the pad and hit ‘s’ (and use ‘z’ to reset the origin). I don’t know how to do this in the new canvas… In the new canvas the move by pad works. So as far as I know you’d need to swap between them.

1 Like