Using v0.46 on Windows.
I have set a grid in centimetres, spacing X and Y of 1.
I have also set my page deault units to be cm.
I create a rectangle, then adjust the height to be 10cm using the tools control bar.
The rectangle does not match the grid! What am I doing wrong?
I expect the rectangle to range from grid ref (x, 25) to (x, 15) but it ranges from (x, 25) to (x, 15.56) or thereabouts, i.e. it's smaller than 10cm. Why?
Ben
Object scaling vs page grid scale
Re: Object scaling vs page grid scale
Hi Ben,
Welcome aboard!
This was one of the 1st questions I asked when I 1st joined too. So I know the answer, but still, it's difficult for me to explain. (So I welcome other members clarity, if necessary
)
The reason is because Inkscape being a vector type graphics program, none of the measurements strictly relate to pixels on the screen, like is the case in raster type programs. In raster programs, a pixel in the editor corelates directly to a pixel on the screen. And as well, all the other units of measure relate directly to the screen pixels. But in vector programs like Inkscape, the measurements are more there just for reference; an Inkscape pixel is not equal to a screen pixel.
You might also notice that if you zoom in by a large amount, your object may even stray further from the grid, than how it looks at a lower or zero zoom (and vice versa). The same thing happens with Guides, and the Rulers as well. I remember testing this by drawing a simple square at very high zoom, and even snapped the corners to a grid, to make sure they were exactly where I wanted them. Then I zoome out, and 2 of the sides no longer aligned with the grid
So if the size of things matter in your image, it's best to use the dimensions in the controls toolbar, than to rely on guides, grids or rulers. The dimensions have no relation to screen pixels either, but using them eliminates the visual confusion when you see things not conform to grid, guides or rulers.
I know it's confusing, but I hope this helps
Welcome aboard!
This was one of the 1st questions I asked when I 1st joined too. So I know the answer, but still, it's difficult for me to explain. (So I welcome other members clarity, if necessary

The reason is because Inkscape being a vector type graphics program, none of the measurements strictly relate to pixels on the screen, like is the case in raster type programs. In raster programs, a pixel in the editor corelates directly to a pixel on the screen. And as well, all the other units of measure relate directly to the screen pixels. But in vector programs like Inkscape, the measurements are more there just for reference; an Inkscape pixel is not equal to a screen pixel.
You might also notice that if you zoom in by a large amount, your object may even stray further from the grid, than how it looks at a lower or zero zoom (and vice versa). The same thing happens with Guides, and the Rulers as well. I remember testing this by drawing a simple square at very high zoom, and even snapped the corners to a grid, to make sure they were exactly where I wanted them. Then I zoome out, and 2 of the sides no longer aligned with the grid

So if the size of things matter in your image, it's best to use the dimensions in the controls toolbar, than to rely on guides, grids or rulers. The dimensions have no relation to screen pixels either, but using them eliminates the visual confusion when you see things not conform to grid, guides or rulers.
I know it's confusing, but I hope this helps

Basics - Help menu > Tutorials
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Re: Object scaling vs page grid scale
Thanks for that brynn.
I think that's helped me partway at least.
The bit I didn't tell you is that I've imported a 'background' plot of some experimental data. This plot has real-world dimensions, and I need to create some real-world image alongside it (using Inkscape possibly).
I've transformed the plot so that 10m of it's scale bar are equal to 10m of the drawing units. Once I'd done that, I'd hoped to produce my overlay using that same relative dimension. This is quite hard to explain... an analogy in GIS software is called georeferencing.
What I think you're saying is that I can't do scaled drawings with metres as my units, using an imported scale bar? I can't even use pixels?
I think that's helped me partway at least.
The bit I didn't tell you is that I've imported a 'background' plot of some experimental data. This plot has real-world dimensions, and I need to create some real-world image alongside it (using Inkscape possibly).
I've transformed the plot so that 10m of it's scale bar are equal to 10m of the drawing units. Once I'd done that, I'd hoped to produce my overlay using that same relative dimension. This is quite hard to explain... an analogy in GIS software is called georeferencing.
What I think you're saying is that I can't do scaled drawings with metres as my units, using an imported scale bar? I can't even use pixels?
Re: Object scaling vs page grid scale
ottadini wrote:Using v0.46 on Windows.
I have set a grid in centimetres, spacing X and Y of 1.
I have also set my page deault units to be cm.
I create a rectangle, then adjust the height to be 10cm using the tools control bar.
The rectangle does not match the grid! What am I doing wrong?
I expect the rectangle to range from grid ref (x, 25) to (x, 15) but it ranges from (x, 25) to (x, 15.56) or thereabouts, i.e. it's smaller than 10cm. Why?
Ben
Ben,
I don't know what you (or Brynn) are doing wrong, but I have performed the action (I think) you've described, and got a fine 10cm rectangle perfectly aligned with the 1 cm grid right down to the highest zoom levels.
Re: Object scaling vs page grid scale
Are you sure that you selected cm on the toolbar and not pixels or something else? The toolbar units are independent of grid units.
just hand over the chocolate and nobody gets hurt
Inkscape Manual on Floss
Inkscape FAQ
very comprehensive Inkscape guide
Inkscape 0.48 Illustrator's Cookbook - 109 recipes to learn and explore Inkscape - with SVG examples to download
Inkscape Manual on Floss
Inkscape FAQ
very comprehensive Inkscape guide
Inkscape 0.48 Illustrator's Cookbook - 109 recipes to learn and explore Inkscape - with SVG examples to download
Re: Object scaling vs page grid scale
Inkscape knows two concepts of selection (see 'Preferences > Tools'):
Q: What snaps to the grid - the node or the outer corner of the stroke?
A: It depends how you re-size the object. Consider these different methods:
Tip: either use snap+grid or numerically enter position/dimension+guides, but not mix them.
Background: e.g. long technical discussion about “Rectangles do not snap accurately to grid” in Bug #174046
And don't forget: Inkscape's stronger features are in the arts sector - it is not (yet) a reliable technical drawing tool.
- visual bounding box: includes stroke width
- geometric bounding box: from node to node (axis of the path)
ottadini wrote:I create a rectangle, then adjust the height to be 10cm using the tools control bar.
The rectangle does not match the grid! What am I doing wrong?
Q: What snaps to the grid - the node or the outer corner of the stroke?
A: It depends how you re-size the object. Consider these different methods:
- dragging with the mouse: snaps the (visual/geometric) bounding box (outline/node) to the grid
- entering x,y coordinates on the select tool controls bar: snap disabled, moves bbox to x, y
- entering H, W on the select tool controls bar: snap disabled, changes the outer (including stroke) dimensions of the bounding box, not the object dimension (can be used for multiple selected objects or groups as well). this has changed in 0.47 AFAIK
- entering H, W on the rectangle tool controls bar: snap disabled, changes the object dimensions
- consider the influence of the option to re-scale stroke width: How and when do you recalculate the new visual bbox dimensions when (rescaling the object + rescaling the stroke)?
- …
Tip: either use snap+grid or numerically enter position/dimension+guides, but not mix them.
Background: e.g. long technical discussion about “Rectangles do not snap accurately to grid” in Bug #174046
And don't forget: Inkscape's stronger features are in the arts sector - it is not (yet) a reliable technical drawing tool.
Re: Object scaling vs page grid scale
Thanks for the details ~suv, I'd missed the significance of visual vs. geometric bounds. I believe I want geometric, but perhaps you or someone else could check this workflow below to advise on best way to handle it:
[As it happens I'm working from the top of the drawing page, down, creating a long column of rectangles, all of the same width, but differing heights.]
1a. Create rectangle, its nodes snapped to grid or guide, then re-dimension its height and width accordingly, and remove grid and guides for next step. It seems the top-left of the object remains fixed during transformation, but is this user-configurable? Is it always the top-left? Can I specify the coordinates of the origin of an object? How do I know where the origin is? OR
1b. Create rect, re-position x,y (is this top-left?) using 'select' tool control bar, re-dimension using height and width on tool control bar.
2. create new rectangle, snapped (or glued or whatever) to previous rectangle node to node (actually corners are what I want to snap, but I'm guessing there are nodes at corners of rectangles--how do I display nodes?), then re-dimension its height exactly using 'select' or 'rectangle' tool control bar (I need to set it exactly, so dragging is not useful). I don't care about strokes, and would prefer they are not involved in any snapping or scaling behaviour.
c. repeat (b) ad nauseum... see attached file for example.
So, here's how I think I have to play it:
I need to use geometric bounding boxes always.
I should start with snapping to grid / guides for the first rectangle, then turn them off for the remainder?
After the first I should have:
"What snaps?" == nodes only? Not bounding box corners?
"Snap to objects" == paths, and nodes? Plus I should have a large snap distance to make it easy.
In snap points I should have ?? I have no idea how those options affect my work.
The dimension of the column must relate eventually to real-world units, as I'm producing a scale drawing of a deep hole in the ground (a borehole), so it's obvious to me use metric page units (metres or cm). Seems this is not an issue?
cheers,
Ben
[As it happens I'm working from the top of the drawing page, down, creating a long column of rectangles, all of the same width, but differing heights.]
1a. Create rectangle, its nodes snapped to grid or guide, then re-dimension its height and width accordingly, and remove grid and guides for next step. It seems the top-left of the object remains fixed during transformation, but is this user-configurable? Is it always the top-left? Can I specify the coordinates of the origin of an object? How do I know where the origin is? OR
1b. Create rect, re-position x,y (is this top-left?) using 'select' tool control bar, re-dimension using height and width on tool control bar.
2. create new rectangle, snapped (or glued or whatever) to previous rectangle node to node (actually corners are what I want to snap, but I'm guessing there are nodes at corners of rectangles--how do I display nodes?), then re-dimension its height exactly using 'select' or 'rectangle' tool control bar (I need to set it exactly, so dragging is not useful). I don't care about strokes, and would prefer they are not involved in any snapping or scaling behaviour.
c. repeat (b) ad nauseum... see attached file for example.
So, here's how I think I have to play it:
I need to use geometric bounding boxes always.
I should start with snapping to grid / guides for the first rectangle, then turn them off for the remainder?
After the first I should have:
"What snaps?" == nodes only? Not bounding box corners?
"Snap to objects" == paths, and nodes? Plus I should have a large snap distance to make it easy.
In snap points I should have ?? I have no idea how those options affect my work.
The dimension of the column must relate eventually to real-world units, as I'm producing a scale drawing of a deep hole in the ground (a borehole), so it's obvious to me use metric page units (metres or cm). Seems this is not an issue?
cheers,
Ben
- Attachments
-
- column.svg
- (4.63 KiB) Downloaded 197 times
Re: Object scaling vs page grid scale
I decided to try out editing the XML directly as I've got a very simple set of shapes, using a conversion of 1 metre = 3543.30708 pixels (at 90 dpi). Spreadsheets are good for this sort of thing, and so I've now got a very simple worksheet formula to produce my hundreds of rectangles. Certainly takes away the pain of trying to work out which corner of the rect has a node, or what snaps to what! There was a bit of mental gymnastics to work out the internal coordinate axes, but you only have to do it once.
Now I just need to work out how to add text and change the fill.
Cheers,
Ben
Now I just need to work out how to add text and change the fill.
Cheers,
Ben