For example, I have many short paths (with just 2 nodes) which look like a longer dashed path.
Is there an efficient way to connect these paths to one continuous path? (not just combine with Ctrl+K)
If possible, I want to avoid a hundred times manually selecting 2 nodes pairwise and joining them or completely redrawing the line.
I know that an open path can be closed simply by the node tool with marking all nodes and join selected nodes. It will be closed with a straight line between the end nodes.
So, my hope was that I could join multiple nodes to a contiuous path in a similar way. But of course, joining endnodes is different than joining to the next neighbouring node.
The extension "Interpolate" seems right from its name but it interpolates between two shapes.
Maybe there is still a way which I do not see? Thank you for hints...
How to join multiple nearest neighbouring nodes?
How to join multiple nearest neighbouring nodes?
Win7/64, Inkscape 0.92.2
Re: How to join multiple nearest neighbouring nodes?
Select all nodes, deselect the start-end nodes of the stitched path and connect nodes.
Isn't that's what you after?
Isn't that's what you after?
Re: How to join multiple nearest neighbouring nodes?
In this example there are 25 paths with 2 nodes each. What do you mean with start-end nodes? What do you mean with "connect" nodes? This one?
Doesn't work for me... Each of the 25 paths will get closed, but no interconnection...
If I combine (Ctrl+K) the 25 paths first and deselect the start and end node I will get a line between the second and the second last node.
Doesn't work for me... Each of the 25 paths will get closed, but no interconnection...
If I combine (Ctrl+K) the 25 paths first and deselect the start and end node I will get a line between the second and the second last node.
Win7/64, Inkscape 0.92.2
Re: How to join multiple nearest neighbouring nodes?
It joins the nearest nodes, so it's not 100% perfect all cases, but it should work to some extent:

The spaces in between your dashes are larger than between two connected nodes, that's whyit doesn't work. Not sure yet how to handle that problem the best.

The spaces in between your dashes are larger than between two connected nodes, that's whyit doesn't work. Not sure yet how to handle that problem the best.
Re: How to join multiple nearest neighbouring nodes?
Thanks, @Lazur, I used the measure tool an saw that the paths in my example were about 5mm long but the gaps were about 5.12mm. So, the nearest neighbour node is always on the same path not on the neighbouring path.
So, then I guess if the gaps are larger than the lenghts of small paths there won't be any chance to get them connected?
So, then I guess if the gaps are larger than the lenghts of small paths there won't be any chance to get them connected?
Win7/64, Inkscape 0.92.2
Re: How to join multiple nearest neighbouring nodes?
The same method as in the other topic where you split apart a path to its markers may be an approximate option here.
With markers you can extrapolate the segments a bit and then they could be joined.
Approximate as in you will have many unnecessary and jittered nodes compared to the core path. But would it really matter once you add a simplify path effect atop?
Edit:
Another workaround that could work similarly is when you scale up each segment with the transformation panel before the stitching.
With markers you can extrapolate the segments a bit and then they could be joined.
Approximate as in you will have many unnecessary and jittered nodes compared to the core path. But would it really matter once you add a simplify path effect atop?
Edit:
Another workaround that could work similarly is when you scale up each segment with the transformation panel before the stitching.
Re: How to join multiple nearest neighbouring nodes?
Lazur wrote:It joins the nearest nodes, so it's not 100% perfect all cases, but it should work to some extent:
The spaces in between your dashes are larger than between two connected nodes, that's whyit doesn't work. Not sure yet how to handle that problem the best.
Interesting. It seems buggish to me. Although there maybe be some explanation. I don't find any reported bugs, although that's no guarantee there aren't any. I'd be glad to ask on the mailing list, if there's a reason for it, or if it should be reported.
When I tried it with the spaces and the short paths of equal length, it seems to randomly join different nodes. Like for example, the first time I tried, the few dashes are joined as expected, but then the next dash is connected to a dash a few steps away, and leaves those in between not connected. But undo everything, and try again, this time different dashes are connected as expected and different ones are skipped. (I tested on straight horizontal path. Maybe different if it's not straight??)
theozh wrote:If possible, I want to avoid a hundred times manually selecting 2 nodes pairwise and joining them or completely redrawing the line.
If your path is more or less horizontal or vertical, like in your example, you can drag a selection box, to select all but the outside end nodes. Or as Lazur suggested, select all, then deselect the 2 outside nodes.
Basics - Help menu > Tutorials
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Re: How to join multiple nearest neighbouring nodes?
theozh wrote:...the paths in my example were about 5mm long but the gaps were about 5.12mm. So, the nearest neighbour node is always on the same path not on the neighbouring path.
So, then I guess if the gaps are larger than the lenghts of small paths there won't be any chance to get them connected?
An option/feature/extension for connecting to the nearest neighbour but excluding just closing the same path would be nice. Although, probably too special for being realized...?!
Win7/64, Inkscape 0.92.2
-
- Posts: 2344
- Joined: Sun Apr 14, 2013 12:04 pm
- Location: Michigan, USA
Re: How to join multiple nearest neighbouring nodes?
Could you post an example dashed path file to experiment with?
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/
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/
Re: How to join multiple nearest neighbouring nodes?
sure...
- Attachments
-
- JoinMultipleNodes_Test.svg
- (33.92 KiB) Downloaded 149 times
Win7/64, Inkscape 0.92.2
-
- Posts: 2344
- Joined: Sun Apr 14, 2013 12:04 pm
- Location: Michigan, USA
Re: How to join multiple nearest neighbouring nodes?
Thanks!
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/
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/
-
- Posts: 2344
- Joined: Sun Apr 14, 2013 12:04 pm
- Location: Michigan, USA
Re: How to join multiple nearest neighbouring nodes?
You might try the tweak tool in enlarge mode to lengthen the segments before combining and joining nodes with segments. It kinda works here... length control is a bit inconsistent due to "by-hand" application of the tweak, but as long as the segments are longer than the gaps, the join-nodes operation performs as expected.
Since the code for the enlarge exists, it might be possible to cobble an extension together that applies a parametric value to a selection.
Since the code for the enlarge exists, it might be possible to cobble an extension together that applies a parametric value to a selection.
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/
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/
Re: How to join multiple nearest neighbouring nodes?
Thanks, @tylerdurden. Up to now, I didn't know what the Tweak Tool was good for
.
Well, you could also use the Transform Tool (Shift+Ctrl+M) to scale each path (if you check "apply to each object separately"), e.g. by 150% and the gaps might get small enough to be connected by the "node join tool". However, you will get a pretty humpy path.
Although, the original idea was to have equidistant nodes on a path, which almost works (viewtopic.php?f=5&t=32190&p=97896) if there weren't the original path nodes which disturb the regularity.
Maybe a special extension (to be written
) might be able to fit a new bezier curve through selected nodes...?

Well, you could also use the Transform Tool (Shift+Ctrl+M) to scale each path (if you check "apply to each object separately"), e.g. by 150% and the gaps might get small enough to be connected by the "node join tool". However, you will get a pretty humpy path.
Although, the original idea was to have equidistant nodes on a path, which almost works (viewtopic.php?f=5&t=32190&p=97896) if there weren't the original path nodes which disturb the regularity.
Maybe a special extension (to be written

Win7/64, Inkscape 0.92.2
-
- Posts: 2344
- Joined: Sun Apr 14, 2013 12:04 pm
- Location: Michigan, USA
Re: How to join multiple nearest neighbouring nodes?
My experiments with the transform panel resulted in horizontal and vertical scaling, not scaling along the axis of the paths. By contrast, the tweak tool extends the length of each path individually.
Hmmm.... maybe it amounts to the same.
Hmmm.... maybe it amounts to the same.
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/
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/