[Resolved] Combine 2 lines to get only 1 line in svg ?

Discuss SVG code, accessible via the XML Editor.
Papy Octet
Posts: 19
Joined: Tue Nov 25, 2008 3:06 pm

[Resolved] Combine 2 lines to get only 1 line in svg ?

Postby Papy Octet » Thu Jan 21, 2010 3:20 am

Hello,
I draw in Inkscape whitch create svg files.
In this file, I have 2 short straight lines with only 1 start node and 1 end node.
The end node of the first line is superimposed on the start node of the second line.

I will create only 1 line (or curve) with these two lines in svg language.
Can you explain to me how to do in svg programming ?

Thank you.
A+
Last edited by Papy Octet on Wed Jan 27, 2010 6:46 pm, edited 1 time in total.

User avatar
kelan
Posts: 178
Joined: Thu Sep 06, 2007 12:55 am
Location: Unicorn of Open Source
Contact:

Re: Combine 2 lines to get only 1 line in svg ?

Postby kelan » Mon Jan 25, 2010 11:36 pm

Select both lines and go to the Path menu, then choose the Combine option. This will make both lines part of the same path, although they'll still be separate pieces. Now use the :tool_node: Node tool to select the two nodes you want to merge into one node. Look at the toolbar and find the icon that looks like two separate nodes on the top and one node on the bottom, and click that icon.

Papy Octet
Posts: 19
Joined: Tue Nov 25, 2008 3:06 pm

Re: Combine 2 lines to get only 1 line in svg ?

Postby Papy Octet » Tue Jan 26, 2010 6:54 pm

Ok, thank you.
My error was not combining the two pathes.

But in SVG, how can I do that ?

A+

User avatar
kelan
Posts: 178
Joined: Thu Sep 06, 2007 12:55 am
Location: Unicorn of Open Source
Contact:

Re: Combine 2 lines to get only 1 line in svg ?

Postby kelan » Tue Jan 26, 2010 11:52 pm

Under the Path menu, use the Combine option with both paths selected. Or try pressing Shift+Ctrl+K with both paths selected.

You can add to an existing path when using the :tool_pen: Pen tool by selecting the path you want to add to, then holding Shift when you click to start the new line.

Or are you asking how you can do it by editing the XML? I'm not sure about that question.

I don't know of any other ways to combine two paths, so if none of those options are what you're asking for, you'll need to explain your question better.

Papy Octet
Posts: 19
Joined: Tue Nov 25, 2008 3:06 pm

Re: Combine 2 lines to get only 1 line in svg ?

Postby Papy Octet » Wed Jan 27, 2010 2:54 am

Oh yes.
I want to do these operations (combine and amalgamate two nodes) with an extension inkscape in XML.
A+

oups ! I'm very unforgivable. It is maybe not possible in xml but with PYTHON, a extension exists https://bugs.launchpad.net/inkscape/+bug/400592. This extension is exactly what I am looking for.

Thank you for all.


Return to “SVG / XML Code”