Gimp-Forum.net
Grid does not align with ruler. - Printable Version

+- Gimp-Forum.net (https://www.gimp-forum.net)
+-- Forum: GIMP (https://www.gimp-forum.net/Forum-GIMP)
+--- Forum: General questions (https://www.gimp-forum.net/Forum-General-questions)
+--- Thread: Grid does not align with ruler. (/Thread-Grid-does-not-align-with-ruler)



Grid does not align with ruler. - Tenderfoot - 11-11-2017

I'm using the grid feature for the first time and I find the grid and ruler do not match up.
e.g. I create a new canvas 12cm by 12cm, then set the grid spacing to 5mm in both directions. The ruler shows the canvas to be the correct size, but the grid doesn't line up with the 5mm spacing. It prints incorrectly too. It's the same if I use inch measurements.
Is this a known problem or am I doing something wrong?


RE: Grid does not align with ruler. - Blighty - 11-11-2017

(11-11-2017, 05:40 PM)Tenderfoot Wrote: I'm using the grid feature for the first time and I find the grid and ruler do not match up.
e.g. I create a new canvas 12cm by 12cm, then set the grid spacing to 5mm in both directions. The ruler shows the canvas to be the correct size, but the grid doesn't line up with the 5mm spacing. It prints incorrectly too. It's the same if I use inch measurements.
Is this a known problem or am I doing something wrong?

It is not understanding the way Gimp works.
Gimp works in pixels, not physical units like mm or inches. And there can only be whole pixels, not fractions of a pixel.

Take a look at the image attached below.
I am attempting to create an image 120mm x 120mm @ 100 dpi.
Gimp calculates the number of whole pixels and displays it on the screen (472x472)
It then calculates the size in mm from this (119.89mm). So you don't get exactly 120mm.

The same happens with the grid.
If you set a grid of 5mm, Gimp converts to the closest whole pixels. This is not exactly 5mm, which is why you get the mis-match.

Much better if you think in pixels and set everything in pixels. Then things work as expected.


RE: Grid does not align with ruler. - rich2005 - 11-11-2017

To add to Blighty's post

If you want to print a grid, in centmetres, at reasonable quality, use an equivalent metric resolution when creating a canvas.

something like this screenshot: https://i.imgur.com/oGwC0QM.jpg

Then when you use the render -> grid filter suitable settings as https://i.imgur.com/8qLHJdi.jpg should work.

But if it is just to set up a blank image to print off a few sheets of graph paper then this what I use

https://incompetech.com/graphpaper/square.html

oops, had to quickly shut down netbook due to low battery, however the same is applicable to the Gimp grid which would look like this https://i.imgur.com/lDk0QJS.jpg


RE: Grid does not align with ruler. - Tenderfoot - 11-11-2017

Many thanks for your quick and helpful replies.
I had never noticed the Advanced Options in the Create New Image Drop down, nor had I realised that the number of pixels per inch made a difference to what I see on screen. Why does it default to a low number when 'bigger is better' ?   Is it just a memory issue?

To explain what I'm trying to do:
I'm wondering if GIMP can be used to design small electronics circuit boards quickly and easily. Many components pins are based on a 1/10 inch grid. By using the GIMP grid set to 0.1 and 'snap to grid' it looks like it might work well enough if I set a high-ish pixels/inch.

Thanks again for your help.


RE: Grid does not align with ruler. - rich2005 - 11-12-2017

(11-11-2017, 10:16 PM)Tenderfoot Wrote: Many thanks for your quick and helpful replies.
I had never noticed the Advanced Options in the Create New Image Drop down, nor had I realised that the number of pixels per inch made a difference to what I see on screen. Why does it default to a low number when 'bigger is better' ?   Is it just a memory issue?

Traditionally, it is 72 pixels-per-inch ppi (aka dots-per-inch dpi) And that dates back to CRT monitors where that was the scan resolution. Fine for Web Graphics, not so good for printing. If you look at the default templates 'A' series, USletter, these are 300 ppi, generally rule-of-thumb for photo-quality 300 ppi. PPI (dpi) is also the traditional units for printers, so I suggest 254 just on the basis it is mm-to-inch conversion, and that will print ok

Quote:To explain what I'm trying to do:
I'm wondering if GIMP can be used to design small electronics circuit boards quickly and easily. Many components pins are based on a 1/10 inch grid. By using the GIMP grid set to 0.1 and 'snap to grid' it looks like it might work well enough if I set a high-ish pixels/inch.

When it comes to your project. Gimp not really the best tool. I would go for a CAD application, maybe LibreCAD which is free followed by maybe Inkscape, a vector drawing application.

"quickly and easily" using Gimp - ouch, Probably need to design your own brushes which can be used as a 'stamp' Can be sized and rotated. But it is going to be tedious.

example: (I am civ-eng, not electrical Wink ) oops, had to change the screenshot, not a schematic, a circuit. That might be a little easier. Still need to make some brushes.

[attachment=945]