PCBnew Grid origin


#1

(I tried to download latest KC build but is too big(800M) for my slow internet, managed to get a nightly build 100M (version detail below)

PCBnew:

  1. When I set grid origin, the origin marker is set but values displayed (bottom right of window) don’t change to the new origin position. (I see 2 sets of co-ordinate but both are same)
    I have a design starting with a symmetrical mechanical drawing 0.0 in center & the PCB is primarily the mechanical feature (MetalCore PCB with cover attached & terminals). Everything is positioned relataive to X0.Y0 in the center of the PCB.

Many Thanks


Application Info: pcbnew
Version: (5.0.0-rc2-dev-659-g1f5b575ea), release build
Libraries:
wxWidgets 3.0.3
libcurl/7.54.1 OpenSSL/1.0.2l zlib/1.2.11 libssh2/1.8.0 nghttp2/1.23.1 librtmp/2.3
Platform: Windows XP (build 2600, Service Pack 3), 32 bit, Little endian, wxMSW (Offline PC)
Build Info:
wxWidgets: 3.0.3 (wchar_t,wx containers,compatible with 2.8)
Boost: 1.60.0
Curl: 7.54.1
Compiler: GCC 7.1.0 with C++ ABI 1011

Build settings:
USE_WX_GRAPHICS_CONTEXT=OFF
USE_WX_OVERLAY=OFF
KICAD_SCRIPTING=ON
KICAD_SCRIPTING_MODULES=ON
KICAD_SCRIPTING_WXPYTHON=ON
KICAD_SCRIPTING_ACTION_MENU=ON
BUILD_GITHUB_PLUGIN=ON
KICAD_USE_OCE=ON
KICAD_SPICE=ON


#2

Grid origin is not coordinate origin. With grid origin you can do at least two things:

  1. When you set the grid origin, the grid (the points where the cursor is snapped to and where items are snapped to when they are moved with mouse or keyboard arrows) is moved or aligned so that one of the grid points is in the grid origin. If this wouldn’t be possible you couldn’t e.g. move an item to the point (0.5 , 0.5) in a grid where the points are 1.0 apart from each other. Originally the grid origin is in (0.0 , 0.0) and the next point would be in (1.0 , 1.0) etc.

  2. You can use it as zero point when you use “Move Exactly”.

There’s no way to set the actual coordinate zero which would be reflected e.g. in an item’s properties dialog. You can press the spacebar and set the “User origin” which is visible as relative coordinates in the bottom right.


#3

I just noticed it can’t be used with Move Exactly in 4.0.7, only in pre-5.0.


#4

This was one of the things I found most annoying about KiCad, so it’s not just you.

I developed some patches to v5 that changes the display coordinates to be relative to the Aux origin, which is user-settable. They seem to work pretty well in my personal use, but they’re not ready for general use and won’t be part of the v5 release this summer.


#5

I saw your message in the dev list and would vote for that feature. I believe, until proven otherwise, that most users are accustomed to bottom-left-zero (mathematical) coordinate system (did your patch do that? I don’t remember). Many would like to set the zero point to middle of the board or bottom-left of the board.

Somebody filed a bug report recently about the coordinate system, did you see that?


#6

As long as this is only a display change it is ok. But the file format should not change the coordinate system. That would result in all footprints and old projects suddenly being invalid.

The problem then is a disconnection between the coordinates shown to the user and the ones in the file. Which flies a bit against the core idea of the file format being user readable.


#7

My plan was to get it working with the new origin first, then flip the Y axis, and finally provide for user settings. I have the first part working, but between trying to lay out a hobby project board, providing feedback on the v5 release candidates, and working, I haven’t progressed farther than that yet.


#8

As long as this is only a display change it is ok. But the file format should not change the coordinate system. That would result in all footprints and old projects suddenly being invalid.

It’s a display-only change. I’m not stupid enough to tinker with established file formats this late in the game. :slight_smile:

The problem then is a disconnection between the coordinates shown to the user and the ones in the file. Which flies a bit against the core idea of the file format being user readable.

99% of KiCad users don’t care what’s in the board file. The displayed values already don’t match the board values if the display is in inches rather than millimeters, or (I believe) polar coordinates. We could store the board data in micro-furlongs and only a small number of people would even notice.

That said, I understand the benefit of being able to look at the board file and correlate that with what is displayed on the screen. If someone wants to view it that way, they’ll be able to change the display settings get exactly that.

I’m planning a board config menu similar to that offered on the “Move Exactly” feature, except persistent and global for the board. The user gets three sets of radio buttons. The first selects the origin point (page corner, aux origin, grid origin) while the other two select which way the x and y axes increase (x right or left; y up or down). This selection becomes a new board config option, and in the absence of such option in the board file you get the current defaults: page corner, x-right and y-down.

I think the vast majority of users would prefer if the default was aux origin, x-right and y-up when they create a new board. But I’m sure that will be the subject of a debate on the dev list.


#9

This should be good. I eagerly await… :smiley:

Q. So the object properties would display X Y values relative to the new origin as well ?

I grew up on protel autotrax in the 80’s & then DXP. I really got used to having a 0.0 origin somewhere on the board & it really helped a lot to ensure mechanical correlation (front panel & mounting holes, buttons etc…)

cheers


#10

I didn’t try it, but perhaps the sheet frame can be moved, so the origin is within the sheet?