Hi,
I'm very new to Inkscape, using it to create scientific graphs for patents and stuff, love it so far.
I now have a question.
My scientific software outputs a dotted curve as a bunch of segments, not a single curve with "dotted-linestyle". I would like to join those segments into a single curve, so that I can change the linestyle and stuff.
I attached the file.
Thanks.
Joining dotted curve line segments to one curve
-
- Posts: 3
- Joined: Wed Oct 16, 2013 4:46 pm
Joining dotted curve line segments to one curve
- Attachments
-
- join_segments_to_one.svg
- (60.88 KiB) Downloaded 208 times
Re: Joining dotted curve line segments to one curve
Hi.
Most likely the easiest solution would be to have your scientific software to output a regular line and change it to dotted line in inkscape.
What Scientific software are you using?
Your software is not outputting line segments but rather "blobs" - too see for yourself;
select one segment and press the number 3 key on the main keyboard (not the numpad) to zoom in on the object.
You can also verify this by selecting one "segment" and type CTRL-SHIFT-X to get the XML editor. In the XML editor you can see the type, coordinates of the nodes, etc.
Good Luck
RGDS
Ragnar
Most likely the easiest solution would be to have your scientific software to output a regular line and change it to dotted line in inkscape.
What Scientific software are you using?
Your software is not outputting line segments but rather "blobs" - too see for yourself;
select one segment and press the number 3 key on the main keyboard (not the numpad) to zoom in on the object.
You can also verify this by selecting one "segment" and type CTRL-SHIFT-X to get the XML editor. In the XML editor you can see the type, coordinates of the nodes, etc.
Good Luck
RGDS
Ragnar
Last edited by ragstian on Thu Oct 17, 2013 10:55 am, edited 1 time in total.
Good Luck!
( ͡° ͜ʖ ͡°)
RGDS
Ragnar
( ͡° ͜ʖ ͡°)
RGDS
Ragnar
Re: Joining dotted curve line segments to one curve
Here is how it could be stiched manually from that svg.
If you could get "regular line" from that program it would not only be easier but cleaner too.
But if it can only export svg-s with strokes converted to paths, then set a non-dotted line, which can be turned to
a path with a set stroke and no fill in a much cleaner way.

If you could get "regular line" from that program it would not only be easier but cleaner too.
But if it can only export svg-s with strokes converted to paths, then set a non-dotted line, which can be turned to
a path with a set stroke and no fill in a much cleaner way.
-
- Posts: 3
- Joined: Wed Oct 16, 2013 4:46 pm
Re: Joining dotted curve line segments to one curve
ragstian wrote:Hi.
Most likely the easiest solution would be to have your scientific software to output a regular line and change it to dotted line in inkscape.
What Scientific software are you using?
Your software is not outputting line segments but rather "blobs" - too se for yourself;
select one segment and press the number 3 key on the main keyboard (not the numpad) to zoom in to the object.
You can also verify this by selecting one "segment" and type CTRL-SHIFT-X to get the XMLO editor. In the XML editor you can see the tye, coordinates of the nodes, etc.
Good Luck
RGDS
Ragnar
Thanks Ragnar, I see what you mean. Indeed they are all blobs.
I'm using CodeV, a lens design software. It does not offer any option in exporting that.
-
- Posts: 3
- Joined: Wed Oct 16, 2013 4:46 pm
Re: Joining dotted curve line segments to one curve
Lazur URH wrote:Here is how it could be stiched manually from that svg.
If you could get "regular line" from that program it would not only be easier but cleaner too.
But if it can only export svg-s with strokes converted to paths, then set a non-dotted line, which can be turned to
a path with a set stroke and no fill in a much cleaner way.
I think manual stitching would work!
Could you tell me how to do it please?
Thanks a lot!
Re: Joining dotted curve line segments to one curve
This one can be painful with longer lines, but here is the "most correct" way to do this:
Combine the small parts together (Ctrl+K),
use the node editor tool for deleting nodes that make each small parts have a rounded ending.
Then, select all segments and set them to linear ones,
and enable snapping of nodes to segment middle points.
Then use the pen tool to connect each line parts's end's middle points, and after that
set all nodes except the start and end nodes to smooth ones.
Then select the first segment of that path, set nodes to cusp ones, set segment linear.
After that set it back to curved, and set the second node to be a smooth one.
Do the same with the last segment too.
Maybe adjust the first and end node handles a bit as well.
That way you will have a path which has nodes exactly on the original path segments,
but not where it's nodes were.
Like your svg could be reconstructed by a five node path.
But there is no way to construct that right, there are only approximations.
Like using the simplify path option on that previously constructed one.
If you had a non-dotted line, you could get to the core path much easier, by using the interpolate extension.
Combine the small parts together (Ctrl+K),
use the node editor tool for deleting nodes that make each small parts have a rounded ending.
Then, select all segments and set them to linear ones,
and enable snapping of nodes to segment middle points.
Then use the pen tool to connect each line parts's end's middle points, and after that
set all nodes except the start and end nodes to smooth ones.
Then select the first segment of that path, set nodes to cusp ones, set segment linear.
After that set it back to curved, and set the second node to be a smooth one.
Do the same with the last segment too.
Maybe adjust the first and end node handles a bit as well.
That way you will have a path which has nodes exactly on the original path segments,
but not where it's nodes were.
Like your svg could be reconstructed by a five node path.
But there is no way to construct that right, there are only approximations.
Like using the simplify path option on that previously constructed one.
If you had a non-dotted line, you could get to the core path much easier, by using the interpolate extension.
-
- Posts: 2344
- Joined: Sun Apr 14, 2013 12:04 pm
- Location: Michigan, USA
Re: Joining dotted curve line segments to one curve
Is the uploaded file the original output?... it looks like an inkscape version.
The original untouched file from the lens program might be easier to mod.
The original untouched file from the lens program might be easier to mod.
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/