3

In Inkscape, is it possible to connect 3 or more line segments in their end points, so that the connection will keep holding if I move the connection point? I want to create a diagram of vertices and edges between them, and when I move a vertex, I want the edges connected to it to move accordingly.

2

There is a Diagram Connector tool in Inkscape that might suit your requirements, if you want to create a diagram like a flow chart, although it's a bit flakey in the recent 0.92.3 version on Windows. I have found it only works if you move connected shapes using the arrow keys for some strange reason. Obviously, since it's designed for creating flow charts, you need to create some objects to connect the connectors to.

enter image description here

If you don't mean a flow chart, but connecting lines only, then there is no way to permanently connect 3 separate lines at a single node. You can only have a node on a single path. You can't connect other nodes to that node, although you can use snapping to draw lines that snap to that node. And you can select more than one node to move all at the same time.

E.g. In the screen capture below, I have drawn one path with a single corner node in the middle. Then using snapping (Handle to Cusp node), I can position another path and line up it's node to the middle node. I can Select All (CTRL+A) then click and drag using the Select Paths by Nodes Tool (F2) to select all the nodes in the middle. And then I can move them together as one unit, even though there is no physical connection as such.

enter image description here

2

A workaround with normal connectors:

enter image description here

The connection point of three lines is actually a small circle which has been scaled to about 1% after inserting normal Inkscape's connectors.

You can select the microscopic shape by dragging, but to move it use arrow keys. Using the mouse scales it, you cannot place the cursor inside about 1 pixel.

How to move the node with the mouse:

Make a bigger shape with solid color fill. Make the fill color 0% opaque and group the shape with the microscopic node shape. You can easily drag the group.

Here's an example. There's a little opacity left to show the size:

enter image description here

See the objects panel. The new shape group is on the top to make sure it's catched first when one drags with the mouse.

Beware double clicking, it makes the big shape separately movable. It's safest to use objects panel to make or at least to check the selections.

ADD: This starts to look out a little complex. Try at first to use separate normal lines and the node tool as shown in another answer.

  • This is a nice solution too, but the weird arrow key thing makes the Diagram Connector functionality quite hard to use. I don't know what's up with this in the recent version of Inkscape, perhaps it's a bug. It's really annoying. – Billy Kerr Nov 1 '18 at 11:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.