Inkscape.org
Beyond the Basics How to restore previous grid snapping behaviour?
  1. #1
    LizzyCove LizzyCove @LizzyCove

    Hi,

    I recently installed Inkscape 1.3 (0e150ed6c4, 2023-07-21) and I'm finding that the snap to grid option available from the snapping dropdown is making Inkscape predominantly snap to arbitrary points on my grid lines rather than preferring to snap to only the intersection points between two grid lines. I'm not sure if my problem is related to having recently updated to a newer version of Inkscape but the change is recent and I don't recall changing any settings. Previously Inkscape would definitively snap to the grid points themselves and never or rarely snap to other points along a grid line and this is the behaviour I would like to get back please if there's a configuration setting somewhere which will do that for me. I searched the web and there were some answers on sites like Stack Overflow where people mentioned in relation to ancient versions of Inkscape a tab called Snap which appeared inside the Document Properties dialog and this apparently contained exactly the option that I'm looking for, but unfortunately this tab does not appear on my version of Inkscape.

     

    Thanks.

     

    Operating system: Windows 10 version 22H2

    File: new document created in Inkscape

    Inkscape installation: upgraded from v1.2.2_2022_12_09

    Installation method: MSI file

    Special hardware or software: none

     

  2. #2
    Polygon Polygon @Polygon🌶

    Doesn´t contain what you´re looking for?

     

  3. #3
    LizzyCove LizzyCove @LizzyCove

    I have used that menu and I have the Grids option selected but sometimes it's snapping to places on the grid that I don't want it to snap to (on a grid line but not where two grid lines meet) and other times it's not snapping to anywhere on the grid because it decides the mouse pointer is too far away from a grid line for its liking.

     

    Diagram of what I'm trying to achieve

    Screenshot of tab that existed in 2015 but I don't see (including an "Always snap" setting for grids, irrespective of distance from the mouse pointer)

    Stack Exchange question where said tab is mentioned

     

  4. #4
    David248 David248 @David248
    *

    I'm not in front of my pc but I haven't the feeling that snapping to grids leads to snapping to grid lines : only to grid intersections. Did you enable the alignment options : they could confuse you and give you this impression.

    Remember that  snapping options apply to two things : what must snap to what. If you over- tick all snapping options, everything snap to everything. I you haven't already tried, try to just enable the two only options you need (grid + the thing you want to snap, ie a rotation center).

  5. #5
    LizzyCove LizzyCove @LizzyCove

    Thank you for your carefully thought out response David. Good to be reminded that both the source and the target need to be ticked and that either can be detected from among any of the options which have been ticked. I don't currently have anything ticked from inside the Alignment section nor the Alignment section heading itself. It's definitely snapping to grid lines. I only see one item available from the snapping menu pertaining to grids but when Inkscape performs a snap to either a grid intersection or to a grid line I see one of two different pop up information tips. So internally at least Inkscape seems to draw a semantic distinction between the two things. Does the same option turn both things on or off together so that they're always in sync with each other? I only want to snap to grid intersections and I'm looking for a way to turn off snapping to other points along a grid line.

     

    At the moment it's behaving as though every grid line were a Guide. I tried turning off snapping to Guide lines to see if that would help but that setting only seems to apply to actual Guides, which makes sense.

     

    Inkscape performing a snap to grid *line* (with pop up description)

     

    Inkscape performing a snap to grid *intersection* (different target description)

     

  6. #6
    LizzyCove LizzyCove @LizzyCove

    The other aspect of my problem is that it's not snapping at all unless the mouse pointer is less than about 10% across the width of a grid cell or more than about 90% across (and likewise in the vertical direction). I want it to behave so that when I'm drawing a rectangle then as I'm dragging out the second corner the corner will lie on a grid intersection at all times and when I let go of my touchpad the rectangle will always be a whole number of grid units wide and a whole number of grid units tall irrespective where the pointer is located when the equivalent to a mouse button release happens.

    This is precisely what it was doing when I used it a few weeks ago and it seems to be precisely what that setting was for, the one inside the Document Properties dialog which people were talking about in older versions of Inkscape. But I don't see any Snap tab in my Document Properties dialog any longer, although apparently the missing (or moved?) "Always snap" setting was the default so I never had to mess with it at the time.

     

    The problems I'm experiencing probably rarely occur when the grid is finer and the zoom level is lower. So perhaps the behaviour has been off for a while and I didn't notice. Obviously I zoomed in heavily to take the screenshots but I'm able to get the occasional rectangle which is unintentionally off grid even at 300% zoom and 2.5mm grid spacing, which I don't think are excessive.

  7. #7
    LizzyCove LizzyCove @LizzyCove

    I also have the snapping delay set to 0.0 seconds in the Preferences -> Behaviour -> Snapping section. Not sure if that's the default value, but in case anyone was thinking if a non-zero delay time might be a cause of the kind of problem I'm experiencing. 

  8. #8
    David248 David248 @David248
    *

    So, you found the snapping options of global inkscape preferences.

    I did never modify them, as far as I can remember (I'm using inkscape since at least 2007, I realized a few month ago I was probably using it since it's beginning, as Inkscape celebrated its 20th anniversary) :

    I have a :

    • snap indicator persistance of 2 secs
    • a weight factor of 0.5
    • no delayed snap

    I tried this morning, and actually, you can have a snapping to either intersections and lines of grids (inkscape 1.3) : you're right.

    Many ideas :

    • be wise when you design grids, to exactly adapt the grid to your purpose : you dont need a 1 mm grid if any your shapes are to be snapped every 10 mm.
    • inkscape xml editor allows you rename your grids, as described there by Guy * so you can have many grids for a document and switch from one to another, depending on your needs.
    • in grids properties of the document, you can use enable to only visible grid, that way, depending on your zoom level, you can switch from snapping to minor or major grid, without having to change your grid.
    • if you don't want to snap to grid lines, simply enable in grids properties of the document the option : "Show dots instead of lines"

     

     

    * quick translation of Guy:

    There's a very simple way to do this.

    • Create your grid via the "Document Properties -> Grid" tool (or Guides) and create the desired grid type. You get a grid name like "Grid2357". But which grid does this correspond to in my design?
    • Activate the "XML Editor" in inkscape (ctrl + shift + X)
    • It shows you something like the first image Inkscape_XML_Grille00.png.
    • The line we're interested in is this one: <sodipodi:namedview id="namedview1234"> : Click on the little arrow in front of this name and its contents are displayed. You'll see the second image.
    • A click on this line shows the parameters of this grid in the XML panel on the right. A parameter called "id" and to its right the grid name "Grid1234".
    • Clicking on this name opens the input field, where you can change this arbitrary name to something more explicit => first image.
    • Then close the XML window : your grid has been renamed.
  9. #9
    LizzyCove LizzyCove @LizzyCove

    Hi,

     

    My global preferences were and are configured to the same values, which is useful to know. Some useful further food for thought there.

     

    But I'm still getting, "Handle to grid line", appear even when the, "Show dots instead of lines", option is checked. The behaviour is unchanged on my system and it will still snap to a point on a grid line that's not an intersection point even though the line that it's talking about is invisible apart from the dots at the points of intersection. By the way, I'm drawing with the rectangle tool and trying to snap nodes to grids, not bounding boxes as the snap source (which I think is the default snapping option), although these things are positioned in identical or almost identical locations in the case of a rectangle.

     

    Yes, setting a widely spaced grid certainly has its uses and not only in relation to using different grids at different zoom levels. Different designs have different use cases and may require coarse or fine grids or both. But I'm still encountering problems where when the mouse pointer isn't sufficiently close to any gridline then no snapping happens at all, according to Inkscape's own definition of "sufficiently close" which doesn't seem to be adjustable anywhere (any longer)? For the thing I want to work on at the moment I either want it to snap strongly onto a widely-ish spaced grid ("sufficient close" in the context of this particular drawing should mean including if the mouse pointer is practically smack bang in the middle of a grid square) or not at all (when and only when snapping to grid is unchecked or grids are hidden). Do you get what I mean? I want everything to be absolutely rigidly locked to the grid unless I say otherwise.

     

    Useful to know how to rename grids, so I can do that now if I need to, because I have used multiple grids before. I was doing something yesterday where I was swapping back and forth between different grids because some elements needed a 1:3 ratio between grid and subgrid but other elements had a 1:4 or 1:5 ratio. Better to have three grids I can toggle than to mess around with a 1:60 ratio, so it's pretty sweet that Inkscape can do that. I can edit XML or SVG code when I need to (Is that something many users do much of? Seems like a very advanced use case for a graphics package.) although the built-in editor is no Chromium or Mozilla devtools. Really makes you appreciate the thought that those peeps put into their devtools UI design with the little niceties like being able to double click on an attribute to edit it in place and incrementing or decrementing numbers using the arrow keys. However, I would have thought that most Inkscape users are not coders and that double clicking on the name of grid directly inside the Document Properties dialog would be a much more intuitive way of initiating a name change. 

  10. #10
    Tyler Durden Tyler Durden @TylerDurden

    Feel free to share an example file.

Inkscape Inkscape.org Inkscape Forum Beyond the Basics How to restore previous grid snapping behaviour?