Stroke to Path and node types

This is NOT a support forum. You are welcome to discuss software issues here, but all issues should be reported on Launchpad if you want them fixed.
User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Stroke to Path and node types

Postby brynn » Mon Sep 06, 2010 8:04 am

Hi Friends,
This is probably not a bug. It's just another case where I see Inkscape performing in a way that seems illogical to me (not a graphics professional or developer). I'm just curious why it works like it does. I'll put a screen shot below.

I have 2 questions about this situation: an open path consisting of all smooth nodes, except for the end nodes, then perform Stroke to Path.
1 -- Why does Inkscape more than double the original number of nodes?
2 -- Why are some of them cusp nodes, when the original was all smooth nodes?

Image

Thanks for your help :D

User avatar
tomh
Posts: 218
Joined: Sat Feb 14, 2009 10:14 pm

Re: Stroke to Path and node types

Postby tomh » Mon Sep 06, 2010 9:26 am

Short answer: Because that is how many nodes are required to mathematically represent the outline of the path. Inkscape could approximate to use less nodes, but that would be unhelpful and unpredictable in some situations

The outline of a stroke is not just the original path moved - especially if you have things like different stroke styles (Join) - simplest example:

create a striate line path with 3 nodes at an angle
Change the stoke join style to round and increase the stoke width.
Then do stoke to path.

The only mathematical way of representing that path will require at least 8 nodes

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

Re: Stroke to Path and node types

Postby brynn » Mon Sep 06, 2010 11:00 am

Thanks tom.
I do see what you mean. In my sense of logic, stroke to path should duplicate the path, move it over slightly, and join the appropriate end nodes. But I did notice that the wider the stroke, the more nodes were created with stroke to path. And especially with a very wide stroke, I can see that Inkscape tries to precisely create even the....I don't know what to call it, but in a tight angle for example, where it almost looks like a crease. And like you pointed out, the different end caps and joins can effect corners and very accute angles differently. Plus when you zoom in, you can see details that were not noticable at lower zoom, for which additional or different node types would be needed.

But still, I see places in my screen shot, where cusp nodes appear not to be needed. And there are other times when smooth nodes are converted to cusp nodes, that just doesn't make sense to me. For example, after I posted this topic, I happened to use Dynamic Offset on the same path in my screen shot, and that changed every single smooth node to a cusp node. And as was discussed in another topic a year or more ago, when one smooth node is deleted, the 2 remaining nodes next to it are changed to cusp.

I'm guessing it all comes down to mathematical formulas, which are way too complicated for me to understand. And I'm guessing the reason is to make Inkscape as flexible.....or able to serve many different graphical purposes as possible. But sometimes it doesn't seem to make sense to me. Plus I'm getting tired changing node types all the time.

Anyway, I was just curious. Thanks for the info tomh :D


Return to “Discuss Software Issues”