9
\$\begingroup\$

Is it possible to automatically position parts in Kicad, relative to each other?

I'm making a board that plugs into an Arduino Nano, and I'm finding it difficult to position the straight headers at the exact 17.76 mm span to match the space between Nano's pin rows. If necessary, I can do this manually, but is there any built-in tool where I can select two parts and tell it to space them by a specific amount along a specific axis?

Is it also possible to center a part relative to the "Edge.Cuts" layer? I'd like to center these headers, and again, using the mouse while looking at the coordinates is very tedious and error prone.

\$\endgroup\$
  • 1
    \$\begingroup\$ Change to imperial (inch) coordinates, and you should have no problem spacing the headers 0.7 inches apart. \$\endgroup\$ – Peter Bennett Aug 12 '17 at 22:56
  • 1
    \$\begingroup\$ Or use a custom grid. Also pick a point and press the spacebar - this sets the "local origin" and moving the mouse from that spot shows a delta x/y in the bottom right relative from that point. \$\endgroup\$ – rdtsc Aug 12 '17 at 23:11
  • 1
    \$\begingroup\$ @rdtsc, Yeah, I was using the spacebar to zero-out the local origin, but it's still very difficult to use the mouse to get the position exactly right. You can set a part's absolute position via the right-click menu, but that's only in absolute coordinates. Even changing the global origin in Grid Properties doesn't change that. \$\endgroup\$ – Cerin Aug 13 '17 at 12:46
10
\$\begingroup\$

The easiest way is to use the "Position Relative To" command. On a Mac, it is ⌘-R, under Linux, it is Ctrl-R. Or, you can access it using the right-click on a part or group.

Position Relative

Once you have selected this, you can choose an object for the reference

Position Relative Dialog

You will need to be running version 5 or higher for this function.

\$\endgroup\$
  • \$\begingroup\$ Is the "position relative" feature only in the nightly release? I'm using 4.0.7 and I don't see that option in the right-click menu. \$\endgroup\$ – Cerin Aug 13 '17 at 12:43
  • 1
    \$\begingroup\$ Yes, it's only in the nighties for now (see end of my answer. :). But the nighties are pretty stable and really the way to go, feature-wise for now \$\endgroup\$ – Seth Aug 13 '17 at 21:40
  • 1
    \$\begingroup\$ I'm using Version: 5.0.0-rc2-dev-unknown-73b9a5~65~ubuntu14.04.1, release build and this option appears to be broken. I can click "Position Relative To..." in the right-click menu, but nothing happens. No pop-up window like you show here. \$\endgroup\$ – Gabriel Staples Jun 25 '18 at 6:13
  • \$\begingroup\$ @GabrielStaples Please report this as a bug. It should be working as described although the window will look a bit different than it did back in August. \$\endgroup\$ – Seth Jun 25 '18 at 18:27
  • \$\begingroup\$ Done! bugs.launchpad.net/kicad/+bug/1778624 \$\endgroup\$ – Gabriel Staples Jun 26 '18 at 3:30
1
\$\begingroup\$

In KiCad 5, on Windows, not automatically but ...

In properties set the x,y of your first pin header, e.g. 100,100.

enter image description here

Do alt-v, s to specify the grid origin, giving the same x,y coordinates.

enter image description here

The pin header footprint now looks like this.

enter image description here

Place the second pin header and enter it's relative x,y coordinates, e.g. 117.76,100, (or ctrl-m on the parts to move exactly, setting the radio button "relative to grid origin").

enter image description here

Ending up with the two headers aligned the correct distance apart.

enter image description here

In your case you'd set the edge cut as the grid origin and position the two headers relative to there.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.