5
\$\begingroup\$

This was asked in 2015:

Precisely drawing component footprints in EAGLE

However, the accepted answer doesn't quite work for me. Here's what happens:

  • mov
  • click the part
  • mov (0 0)
  • the part returns to where it was before it was clicked

Here's something else I tried

  • mov
  • click the part
  • (0 0)
  • the place on the part that was clicked is now at the origin

How can I move a part or an SMD pad to be centered at an absolute position?

\$\endgroup\$
  • \$\begingroup\$ It's move, then click, then (0 0). Make sure the part isn't locked (45° rotated origin symbol). You can also use move PARTNUMBER (x y). \$\endgroup\$ – Janka Oct 30 '16 at 10:08
  • \$\begingroup\$ Simple SMDs should not exist in your board, they should belong to components or be a "test point" component themselves. \$\endgroup\$ – Janka Oct 30 '16 at 10:14
  • \$\begingroup\$ mov is an alias for move. Eagle will run the first command that matches the input string, so you can save keystrokes by typing only the first few letters of a command: ch for change, po for polygon, and so on. \$\endgroup\$ – fkoran Oct 30 '16 at 23:25
5
\$\begingroup\$

tldr:

  • mov
  • ctrl+click the part
  • (x y)
  • the part is now at absolute coordinates x, y

or

  • click the part

  • type: move (C0 0)

  • type: (x y)


The move command does move the part to absolute coordinates, but it also takes into account the position relative to where you clicked to select the part.

(If you want to move to relative coordinates you have to use (Rx y))

So, if you click the center of your part and move it using the second procedure you describe, it moves it to absolute coordinates. However, if you click outside of the part center, it will subtract the relative position of your mouse when you clicked the part you want to move (i.e. by grouping or just clicking close to it, not precisely at the center).

However, I have discovered that this cumbersome procedure "solves" the issue (and does not work with groups):

1 - click the part (with or without offset)

2 - type: move (C0 0)

(centers the part to your mouse)

3 - type: (x y)

(absolute coordinates)

Here's "proof":

1 - Part is initially at (0.2 0):

enter image description here

2A - I type "move" then click a bit to the right of the part and type (0.2 0.1):

It moves the "position I clicked" to absolute position (0.2 0.1) and the part to (0.15 0.1).

enter image description here

2B - I put the part back to (0.2 0) and do the same thing, but clicking the center of the part:

Now its at absolute position (0.2 0.1). I get the same result if I click out of the center but using "move (C0 0)" instead of "move". "C" stands for Ctrl, and Ctrl + click centers the part to your mouse. enter image description here

\$\endgroup\$
  • \$\begingroup\$ You can make it work for groups. Similar to how you did "C" for control-click, you can use ">" to indicate Right-Click instead. See my answer in thread. \$\endgroup\$ – andersop Feb 22 '17 at 20:21
2
\$\begingroup\$

As of Eagle 9 you can R-click a pad and edit its absolute position from the Properties window.

\$\endgroup\$
1
\$\begingroup\$

Understand that in EAGLE there's a strong correlation between CLI arguments and mouse clicks. Essentially you can think of CLI arguments as coordinates of mouse clicks. So using the mouse, MOVE is a two click operation: (a) pick up the object, (b) put it down.

MOVE command on CLI is the same way: first arg is the location of mouse click, second arg is the destination click.

So let's look at your command strings:

  • mov
  • click the part
  • mov (0 0)
  • the part returns to where it was before it was clicked

This is invalid because the "mov (0,0)" starts a new move command without finishing the first.

  • mov
  • click the part
  • (0 0)
  • the place on the part that was clicked is now at the origin

This is the expected result for that sequence: it's the same as Move, Click part, then click at origin.

So what is the proper way? Let's say you have an SMD centered at (1,1) and you want to move it to (3,3) (yes I know this is easy with grid but I'm keeping the numbers simple). You can just do

  • move (1 1) (3 3)

First arg simulates a click at 1,1 which is the part origin and then you're moving it to desired location.

What if you don't know the proper origin? Use C before the first param, to simulate control-click, and then type a location near the part:

  • move (C1 0) (3 3)

What about groups? This is a VERY HELPFUL trick. Often I end up with a bunch of SMD pads that are in the right places relative to one another but I want to move the entire line of them to a new location. In the GUI you'd do this with right-click. Use the same concept as "C" above, except use ">" to indicate right click.

So I have a group of pads which are all at Y = 2.65 and I want them to go to Y = 1.9. Instead of trying to mess with grid and all that, I just calculate I want them to move down by 0.75 units. So, assuming it's a bunch of pads centered at (0, 2.65), I will:

  • .. group the pads with the mouse ..
  • move (>0 2.65) (0 1.9)

What if I'm lazy about group centers? Neat thing about right-click is, since you can only have one group at a time, it'll automatically grab the group no matter where you click. So you can just fake the first click at the origin 0,0 and then enter a relative location, which will achieve the same effect: if I want to move it down 0.75 I can do

  • .. group the pads with the mouse ..
  • move (>0 0) (0 -0.75)

Took me a while to figure that out since it was buried in the "help move" text. There are very few things in EAGLE which I've found impossible to do by CLI, it's just not always obvious or well documented.

\$\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.