snap a specific node to grid

Post questions on how to use or achieve an effect in Inkscape.
mistguy
Posts: 2
Joined: Tue Jan 17, 2017 11:36 pm

snap a specific node to grid

Postby mistguy » Wed Jan 18, 2017 1:45 am

Sometimes I want to scale a group of objects. However, I want only one node snap to grid since otherwise the nodes are too many to control. How can I specify a specific node of a specific object to snap to grid and ignore all other nodes during the scale process?

Raspi
Posts: 229
Joined: Fri Oct 21, 2016 12:51 am

Re: snap a specific node to grid

Postby Raspi » Wed Jan 18, 2017 3:35 am

There is an option in the Preferences under Behaviour, Snapping: "Only snap the node closest to the pointer".
Meaning only the node closest to the mousepointer will snap. It is also highlighted, when in this mode.

mistguy
Posts: 2
Joined: Tue Jan 17, 2017 11:36 pm

Re: snap a specific node to grid

Postby mistguy » Wed Jan 18, 2017 1:52 pm

But when I scale the group of objects, my mouse pointer has to control the handle of scaling. If the node I want to snap is not near the handle, I cannot snap it.

theozh
Posts: 437
Joined: Fri Mar 23, 2012 6:30 pm

Re: snap a specific node to grid

Postby theozh » Wed Jan 18, 2017 7:03 pm

If you have a lot of nodes in your group it will be difficult to let a specific node snap to a grid because one of the many points will somewhere snap to some grid point. So it's basically not practical.
I would suggest the following:
1) switch off all snapping, except grid and cusp nodes incl. rect corners
2) Draw a large rectangle of which you let one corner snap to the desired grid point
3) switch off snap to grid
4) scale your object with the handles such that the desired node snaps to the corner of the rectangle
5) delete the rectangle
Although this requires an extra helper object, I hope this is helpful.

edit: well, of course, between 3) and 4) depending on the type of node you want to snap to, you need to turn on snapping for this type.
Win7/64, Inkscape 0.92.2

tylerdurden
Posts: 2344
Joined: Sun Apr 14, 2013 12:04 pm
Location: Michigan, USA

Re: snap a specific node to grid

Postby tylerdurden » Wed Jan 18, 2017 11:08 pm

I'd try placing the rotation center on the desired node and using that to snap to the grid. (turn off node snapping after placing rotation center)
Have a nice day.

I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1

The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/

theozh
Posts: 437
Joined: Fri Mar 23, 2012 6:30 pm

Re: snap a specific node to grid

Postby theozh » Thu Jan 19, 2017 12:07 am

@tylerdurden
Cool trick without extra object ;)
I was just wondering in case later on you want/need the rotation center back in the center of the group, how to reset it? Well, ungroup the group and group it again.
Win7/64, Inkscape 0.92.2

tylerdurden
Posts: 2344
Joined: Sun Apr 14, 2013 12:04 pm
Location: Michigan, USA

Re: snap a specific node to grid

Postby tylerdurden » Thu Jan 19, 2017 12:11 am

theozh wrote:... in case later on you want/need the rotation center back in the center of the group, how to reset it? Well, ungroup the group and group it again.

Excellent tip!

:D
Have a nice day.

I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1

The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: snap a specific node to grid

Postby brynn » Thu Jan 19, 2017 1:53 am

mistguy wrote:But when I scale the group of objects, my mouse pointer has to control the handle of scaling. If the node I want to snap is not near the handle, I cannot snap it.


With the option to snap the node nearest to the pointer enabled, you need to grab the arrow which is closest to the node you want to snap. Most of the time, it works very well. But occassionally I have to use a different technique. It's hard to suggest something, without seeing your specific situation. But there are SO many snapping options now, it's not hard to find another way.

Moini
Posts: 3381
Joined: Mon Oct 05, 2015 10:44 am

Re: snap a specific node to grid

Postby Moini » Thu Jan 19, 2017 7:23 am

Resetting rotation center also works with Shift + Click :)
https://inkscape.org/en/doc/keys092.html
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)

theozh
Posts: 437
Joined: Fri Mar 23, 2012 6:30 pm

Re: snap a specific node to grid

Postby theozh » Thu Jan 19, 2017 6:29 pm

@Moini, good to know. :)
However, with this Shift+Click on rotation center I do observe a strange behaviour (only with Inkscape0.92):

For example if you just draw a rectangle.
Move rotation center:
1) click on object. Scaling handles appear
2) click 2nd time on object. Rotation center and Rotation/Skew handles appear
3) drag Rotation center somewhere else
4) deselect object by clicking somewhere outside of the object
Reset rotation center:
5) repeat 1) and 2)
6) Shift+Click on Rotation center. Handles will disappear and rotation center does NOT "jump" back to the center of the object.
7) deselect object by clicking somewhere outside of the object
8) select object again. I would expect handles appear again but they do not! Just the dashed bounding box without handles.

I get back the handles only if I move the object or double click the object ending up editing the rectangle. Then I see that the rotation center is moved back to the center. But that's not how it's intended to work?
This time it's not just on my Win7 /IS 0.92 system, but I also observe it under Win10 / IS 0.92.
On Win10/Inkscape0.91 the rotation center was immediately correctly reset to the center by the Shift+Click.
So it must be a 0.92-issue?! Can this be reproduced by others?
Win7/64, Inkscape 0.92.2

Moini
Posts: 3381
Joined: Mon Oct 05, 2015 10:44 am

Re: snap a specific node to grid

Postby Moini » Fri Jan 20, 2017 4:24 am

Yes! I think it could be related to this bug report: https://bugs.launchpad.net/inkscape/+bug/1656719
(but I wasn't able to reproduce so reliably - so maybe it's not *exactly* the same)

Can you make a report, and refer to the linked one, or add a comment to the linked report where you describe the step-by-step, please?
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)


Return to “Help with using Inkscape”