Total number of nodes in a file

Post questions on how to use or achieve an effect in Inkscape.
User avatar
lejimi
Posts: 54
Joined: Sat Jun 23, 2012 1:21 am
Location: Bourges (France)

Total number of nodes in a file

Postby lejimi » Sun May 19, 2013 4:39 pm

Hi !

I'm sure I saw it once, but I can't remember where (or maybe I dreamt ?) Is it possible to know the total number of nodes in an Inkscape file ?

Thank you !
Inkscape 0.91 / Ubuntu 12.04
Inkscape 0.91 / Debian Wheezy

Gloire à qui n'ayant pas d'idéal sacro-saint
Se borne à ne pas trop emmerder ses voisins

User avatar
ragstian
Posts: 1181
Joined: Thu Oct 11, 2012 2:44 am
Location: Stavanger-Norway

Re: Total number of nodes in a file

Postby ragstian » Sun May 19, 2013 5:50 pm

Good Luck!
( ͡° ͜ʖ ͡°)
RGDS
Ragnar

User avatar
lejimi
Posts: 54
Joined: Sat Jun 23, 2012 1:21 am
Location: Bourges (France)

Re: Total number of nodes in a file

Postby lejimi » Sun May 19, 2013 6:04 pm

Thank you for your answer, but the proposed solution doesn't exactly fit my need : I my file I have numerous object which are not paths (many groups and effects). Maybe I could turn them all tp paths, but... this wouldn't return me the real number of nodes : the number of the nodes that I've now, without any conversation.

Anyway, it's more a matter of curiosity from me than a real issue : I send a svg file to someone who managed to make it lighter (from 1.2 mo to 900 ko) mainly by simplifying some path (so reducing nodes number). I simply wanted to compare this number in both files to get a hint about the number of suppressed nodes.
Inkscape 0.91 / Ubuntu 12.04
Inkscape 0.91 / Debian Wheezy

Gloire à qui n'ayant pas d'idéal sacro-saint
Se borne à ne pas trop emmerder ses voisins

User avatar
ragstian
Posts: 1181
Joined: Thu Oct 11, 2012 2:44 am
Location: Stavanger-Norway

Re: Total number of nodes in a file

Postby ragstian » Sun May 19, 2013 7:05 pm

Hi

You can - on some paths - reduce the number of nodes without any noticeable difference in appearance.

To simplify a path; Select the path and do a CTRL + L
See image below - in the upper rectangle the red curve is a "damped sine-wave" consisting of 500 nodes (represented by the black dots just above).
In the lower rectangle the same curves is simplified to 16 nodes.

Image

It is possible to make a "NodeCounter" extension - any interest?

RGDS
Ragnar
Good Luck!
( ͡° ͜ʖ ͡°)
RGDS
Ragnar

User avatar
lejimi
Posts: 54
Joined: Sat Jun 23, 2012 1:21 am
Location: Bourges (France)

Re: Total number of nodes in a file

Postby lejimi » Sun May 19, 2013 10:42 pm

No interest : as I said it's only a matter of pointless curiosity. There's that guy on TV who wants to believe, but I want to know ;-)
Inkscape 0.91 / Ubuntu 12.04
Inkscape 0.91 / Debian Wheezy

Gloire à qui n'ayant pas d'idéal sacro-saint
Se borne à ne pas trop emmerder ses voisins

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

Re: Total number of nodes in a file

Postby Lazur » Sun May 19, 2013 11:22 pm

I would be more interested in a path rephrasing extension like that simplify effect.
An extension wich would add nodes where the path have pre-defined tangents,
and wich would get rid all of the other points between the starting and end points on an open path.
And another rephraser one, wich would add nodes to where the path has horizontal and vertical tangents,
and to where it has inflexion points, and get rid of the others just like the previous one.
With that you could represent a sin-wave much better.


Return to “Help with using Inkscape”