Is there a way to instantly set all selected nodes to their respective closes integer x,y positions?

Post questions on how to use or achieve an effect in Inkscape.
toxigames
Posts: 141
Joined: Sat Aug 17, 2013 7:28 pm

Is there a way to instantly set all selected nodes to their respective closes integer x,y positions?

Postby toxigames » Wed Aug 30, 2017 8:27 pm

Is there a way to instantly set all selected nodes to their respective closest integer x,y positions?

Say I have a path with for example 100 nodes that all are placed at fractional x,y positions (like 2.345, 4.569 etc) and want the nodes to all be placed at integer positions (like 2, 5 etc) then as it is now I have to Enable Snapping, Snap Nodes and select and move each individual node such that they snap to the grid (so repeating that 100 times for this example). Needless to say this is very inefficient, is there way to do this automatically with one click shortcut or similar quick operation?

Lazur
Posts: 4425
Joined: Tue Jun 14, 2016 10:38 am

Re: Is there a way to instantly set all selected nodes to their respective closes integer x,y positions?

Postby Lazur » Wed Aug 30, 2017 9:42 pm

The pixelsnap extension is supposed to solve that problem.
Last time I checked it wasn't 100% perfect. May worth a try.

~suv
Posts: 2272
Joined: Sun May 10, 2009 2:07 am

Re: Is there a way to instantly set all selected nodes to their respective closes integer x,y positions?

Postby ~suv » Thu Aug 31, 2017 1:08 am

The extension Inkscape Gallery > Extensions > Rounder 0.3 by Jabiertxo Arraiza Cenoz might help.

It has "limitations" though (i.e. likely it does not fully match expectations not explicitly mentioned in the topic post), like for example:
  • rounding SVG user unit values (i.e. not necessarily the same values as the representations in display units and right-handed coordinate system as shown in Inkscape's GUI)
  • rounding values in select element attributes (i.e. absolute computed positions resulting from transforms on the object itself or on parent group(s) might still not be rounded to 0 precision)
  • modifying all selected objects (i.e. the extension has not been updated to a recently added feature (>= Inkscape 0.92) to allow extensions to modify a list of selected path nodes only)
  • storing values rounded to 0 precision as floats (i.e. not explicitly converting the rounded values to integers if feasible)
  • ...

toxigames
Posts: 141
Joined: Sat Aug 17, 2013 7:28 pm

Re: Is there a way to instantly set all selected nodes to their respective closes integer x,y positions?

Postby toxigames » Fri Sep 01, 2017 10:03 am

Thanks for the reply Lazur and ~suv, that's very helpful! :)


Return to “Help with using Inkscape”

Who is online

Users browsing this forum: Bing [Bot] and 5 guests