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