Hello, I wish to split a stroke down the red line indicated into two different strokes so as to form two separate strokes along the same curve.
Reason being, I wished to accomplish an effect in the picture below. I had tried experimenting with gradients but it proved impossible for the gradient to follow the curve of the strokes. A search online indicated it was an Inkscape limitation.
I had tried to draw both strokes separately but it was just too inaccurate with various points poking out. Other methods were trying to create custom dash styles but my experiments have failed so far as I couldn't even get the effect to work.
Any solution would be appreciated. I have been stuck on this for two years and constantly delaying it for other projects.
Thank you.
Splitting a Stroke down the Middle
Re: Splitting a Stroke down the Middle
Welcome aboard!
That is a bit complicated to make.
Even there are more ways of doing it, there is not a completely live way I know of.
If you are looking for the fastest way, use the dynamic offset option (Ctrl+J),
and add the right value for the offsetting through the xml editor panel (Shift+Ctrl+X).
That will sadly result in closed paths,
so that you would need to convert each dynamic offset to path (Ctrl+Shift+C) and edit each part to unconnect the unwanted segments.
There are two more complicated methods shown in this svg -click on it and download to view in inkscape:
-somehow browsers cannot render it right-
Both of them involve masking of the lines.
The one on the left was done without any offsetting.
The one on the right has a small part that was made with offsetting.
Comparing the three methods:
with the first you would need four paths for the line,
with the second you would need two paths and two more for masking the others -and works only if it's a symmetrical one.
With the third one you would need 2*5 paths -but would preserve the same core path for the outer and inner lines.
Good luck!
That is a bit complicated to make.
Even there are more ways of doing it, there is not a completely live way I know of.
If you are looking for the fastest way, use the dynamic offset option (Ctrl+J),
and add the right value for the offsetting through the xml editor panel (Shift+Ctrl+X).
That will sadly result in closed paths,
so that you would need to convert each dynamic offset to path (Ctrl+Shift+C) and edit each part to unconnect the unwanted segments.
There are two more complicated methods shown in this svg -click on it and download to view in inkscape:
-somehow browsers cannot render it right-
Both of them involve masking of the lines.
The one on the left was done without any offsetting.
The one on the right has a small part that was made with offsetting.
Comparing the three methods:
with the first you would need four paths for the line,
with the second you would need two paths and two more for masking the others -and works only if it's a symmetrical one.
With the third one you would need 2*5 paths -but would preserve the same core path for the outer and inner lines.
Good luck!
Re: Splitting a Stroke down the Middle
Hi.
This one is easy but involves quite a few steps.
1. Draw Shape.
2. Set the stroke width (in my example 32)
2. Convert Stroke to path.
4. Set Stroke width to 1 - clear fill.
5a. Select the 4 nodes at the square ends of the path. (Four "blue" nodes in fig 4.)
5b. Break Path at selected nodes.
5c. Select all paths in figure. Use Path - Break apart. (Shift - Ctrl - K) (Here all parts are moved apart for illustration purpose (Don't do this!))
6. Select the outer path only (here in red).
6b. Use - Path - Reverese. Important for this to work!
7. Select both inner and outer paths (but not the ends). Use Extensions - Generate from path - Interpolate, set steps to 1 - Press apply.
Viola! New path in the middle. Here shown in blue.
Good Luck
RGDS
Ragnar
This one is easy but involves quite a few steps.
1. Draw Shape.
2. Set the stroke width (in my example 32)
2. Convert Stroke to path.
4. Set Stroke width to 1 - clear fill.
5a. Select the 4 nodes at the square ends of the path. (Four "blue" nodes in fig 4.)
5b. Break Path at selected nodes.
5c. Select all paths in figure. Use Path - Break apart. (Shift - Ctrl - K) (Here all parts are moved apart for illustration purpose (Don't do this!))
6. Select the outer path only (here in red).
6b. Use - Path - Reverese. Important for this to work!
7. Select both inner and outer paths (but not the ends). Use Extensions - Generate from path - Interpolate, set steps to 1 - Press apply.
Viola! New path in the middle. Here shown in blue.
Good Luck
RGDS
Ragnar
Last edited by ragstian on Mon Sep 16, 2013 2:33 am, edited 2 times in total.
Good Luck!
( ͡° ͜ʖ ͡°)
RGDS
Ragnar
( ͡° ͜ʖ ͡°)
RGDS
Ragnar
-
- Posts: 2344
- Joined: Sun Apr 14, 2013 12:04 pm
- Location: Michigan, USA
Re: Splitting a Stroke down the Middle
Maybe this?
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: Splitting a Stroke down the Middle
Hello:
I think it can be done with the Bend path effect. But the problem is that when you apply transformations (skew, rotate, scale, even move) to the skeleton path or the group of paths, then strange results may appear.
See here:
https://www.dropbox.com/s/fazl7v9ud56blcw/bendpaths.png
https://www.dropbox.com/s/xyn93nh0kndyn ... aths01.svg
Greetings
Edit: With more calm now I see. Do you want the results as strokes? ... I'n giving a solution with closed thin paths in the place of strokes, but I think the bend effect will also work for a group of strokes.
I think it can be done with the Bend path effect. But the problem is that when you apply transformations (skew, rotate, scale, even move) to the skeleton path or the group of paths, then strange results may appear.
See here:
https://www.dropbox.com/s/fazl7v9ud56blcw/bendpaths.png
https://www.dropbox.com/s/xyn93nh0kndyn ... aths01.svg
Greetings
Edit: With more calm now I see. Do you want the results as strokes? ... I'n giving a solution with closed thin paths in the place of strokes, but I think the bend effect will also work for a group of strokes.
If you have problems:
1.- Post a sample (or samples) of your file please.
2.- Please check here:
http://tavmjong.free.fr/INKSCAPE/MANUAL/html/index.html
3.- If you manage to solve your problem, please post here your solution.
1.- Post a sample (or samples) of your file please.
2.- Please check here:
http://tavmjong.free.fr/INKSCAPE/MANUAL/html/index.html
3.- If you manage to solve your problem, please post here your solution.
Re: Splitting a Stroke down the Middle
And another way!
No pictures! Use your imagination...
Convert stroke to path.
Break at ends to give two sub-paths.
Path effects interpolate subpaths - make two new paths, spaced in between the existing paths. Apply the path effect - object to path...
Break apart this gives you 4 paths. Delete the outer two.
Stroke as you like. A little overlap might be necessary in the middle.
There is a similar and better looking method IMO that involves converting the stroke to a path, deleting the end segments to give 2 subpaths, making ONE copy in between, breaking all apart, duplicating the center path and reconnecting each center path at the ends with one of the side paths. This gives you two filled paths, not strokes, which I prefer, but you might not. Both paths can be given an additional thin stroke to cover gaps.
In reading further I see that Ragnar posted something similar in which he points out that you have to reverse one of the paths, of course I should have mentioned earlier that your two subpaths will go in different directions, to fix this you need to select with the and ctrl A all the nodes in one subpath and do a reverse. but I am not sure about that result with just one path?? His pictures are nicer though. Sorry if I just copied your method, Ragnar!
No pictures! Use your imagination...
Convert stroke to path.
Break at ends to give two sub-paths.
Path effects interpolate subpaths - make two new paths, spaced in between the existing paths. Apply the path effect - object to path...
Break apart this gives you 4 paths. Delete the outer two.
Stroke as you like. A little overlap might be necessary in the middle.
There is a similar and better looking method IMO that involves converting the stroke to a path, deleting the end segments to give 2 subpaths, making ONE copy in between, breaking all apart, duplicating the center path and reconnecting each center path at the ends with one of the side paths. This gives you two filled paths, not strokes, which I prefer, but you might not. Both paths can be given an additional thin stroke to cover gaps.
In reading further I see that Ragnar posted something similar in which he points out that you have to reverse one of the paths, of course I should have mentioned earlier that your two subpaths will go in different directions, to fix this you need to select with the and ctrl A all the nodes in one subpath and do a reverse. but I am not sure about that result with just one path?? His pictures are nicer though. Sorry if I just copied your method, Ragnar!
Your mind is what you think it is.