Mobile app version of vmapp.org
Login or Join
Carla748

: Joining two paths, non-end-node to non-end-node I think this should be a popular question, that it must be answered elsewhere. But when searching I only find guides on how to join end nodes.

@Carla748

Posted in: #Inkscape

I think this should be a popular question, that it must be answered elsewhere. But when searching I only find guides on how to join end nodes.

I would like to join two non-end-nodes. That means, after joining, in the example below. there will be one node in the middle with four line segments.

Is this possible?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Carla748

1 Comments

Sorted by latest first Latest Oldest Best

 

@Smith574

I don't think what you are asking for is possible with SVGs.

The reason is is called a "node" in Inkscape is really path data in the SVG standard.

<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="4cm" height="4cm" viewBox="0 0 400 400"
xmlns="http://www.w3.org/2000/svg" version="1.1">
<title>Example triangle01- simple example of a 'path'</title>
<desc>A path that draws a triangle</desc>
<rect x="1" y="1" width="398" height="398"
fill="none" stroke="blue" />
<!-- the numbers in the next line are coordinates for the path;
the letters separating them are operations -->
<path d="M 100 100 L 300 100 L 200 300 z"
fill="red" stroke="blue" stroke-width="3" />
</svg>


In this example (which just draws a triangle), the path data (/svg/path/@d) is being told to draw lines between different points with the L command, which causes the current location to change with it. Basically, it's an instruction telling how to draw the line, like if you put a pen on a piece of graph paper and moved it between points.

There is no way to express a path that splits while it is being drawn. The closest you can do with an SVG is draw one stroke, use M to move back to the "shared node", and then continue drawing. Inkscape would still treat this as two separate nodes though.

There are a few ways to work around this:


Use snapping to move the nodes to the same spot. If you need to move then together, select both options, then drag over the area with the 2 overlapping nodes to select both
Combine them by converting each path Path > Stroke to Path, and then selecting both objects and doing a union Path > Union. This makes your lines more complicated, but it does create a single path.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme