Joining dotted curve line segments to one curve

Post questions on how to use or achieve an effect in Inkscape.
deepsilence
Posts: 3
Joined: Wed Oct 16, 2013 4:46 pm

Joining dotted curve line segments to one curve

Postby deepsilence » Wed Oct 16, 2013 4:58 pm

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.
Attachments
join_segments_to_one.svg
(60.88 KiB) Downloaded 208 times

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

Re: Joining dotted curve line segments to one curve

Postby ragstian » Thu Oct 17, 2013 9:00 am

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
Last edited by ragstian on Thu Oct 17, 2013 10:55 am, edited 1 time in total.
Good Luck!
( ͡° ͜ʖ ͡°)
RGDS
Ragnar

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

Re: Joining dotted curve line segments to one curve

Postby Lazur » Thu Oct 17, 2013 9:46 am

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.

SVG Image

deepsilence
Posts: 3
Joined: Wed Oct 16, 2013 4:46 pm

Re: Joining dotted curve line segments to one curve

Postby deepsilence » Thu Oct 17, 2013 9:58 am

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.

deepsilence
Posts: 3
Joined: Wed Oct 16, 2013 4:46 pm

Re: Joining dotted curve line segments to one curve

Postby deepsilence » Thu Oct 17, 2013 10:01 am

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.

SVG Image


I think manual stitching would work!

Could you tell me how to do it please?

Thanks a lot!

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

Re: Joining dotted curve line segments to one curve

Postby Lazur » Fri Oct 18, 2013 9:22 pm

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.

tylerdurden
Posts: 2344
Joined: Sun Apr 14, 2013 12:04 pm
Location: Michigan, USA

Re: Joining dotted curve line segments to one curve

Postby tylerdurden » Fri Oct 18, 2013 10:49 pm

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.
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/


Return to “Help with using Inkscape”