PCBnew dimensional woes


I’m designing a CAD housing for a PCB and need footprint positions relative to the PCB center point. Up until now I’ve manually calculated for basic footprint positioning using the edges co-ords but it’s a nightmare.

I thought it i’d set the PCB grid origin (as shown) that would do it, but alas not.

Is there a way?


1 Like

Position the cursor at the PCB center and press space. This sets the relative coordinate origin, the relative coordinate is displayed in the status bar.

OK but that only gives a postiion for the mouse pointer, it’s not accurate for giving the postion of a component relative to the center?

1 Like

Isn’t it? Oh well never mind.

Personally I would write a script.

1 Like

Perhaps move the PCB to be centered at 0.0 in PCBNew?

but why don’t you just export your board to STEP to design in a MCAD the housing?


While @bobc’s suggestion is certainly accurate enough you could also use the dimension tool to add dimensions on a separate layer.

1 Like

Why set the origin to the center of the board?
It seems more logical to set the origin to a corner of the board or the center of a mounting hole or maybe even a fiducial as a reference point.

You can also export the whole board (including 3D components).
(Is this “step up” or was “step up” the other way around).
Then you can simply design the housing around your board in the CAD package.

1 Like

Perhaps because the op has mentioned several times that he/she wants measurements relative to the center of the board?

Yes, most of us would likely reference a mounting hole if there was one, otherwise a board corner as this more directly translates to the mechanical design of an enclosure. But that’s not what the op asked.

The rest of your post is just a repeat of what has already been said.

That’s it, for example I want the exact centre point of the USB port so I can get the enclosure that goes over it correct in CAD. I could export the mock as you say but it’s not ideal for accuracy.

I’d be happy to set the origin to the edge of the board, any means to avoid running calculations based on the edges. I can’t forsee a means to do this, it appears measures are always relative to the page corner.

Recently I wrote a script to get positions for all components, since a forum user expressed a requirement. You can find it here

If you set the “origin for drill and place files” then it will give positions relative to that point. The component position depends on the center of the component is defined.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.