Connector tool tutorial
Using the Connector tool
The connector tool currently supports autorouting polyline connectors. These connectors can be attached to the shapes, i.e. pretty much anything that is not an open path. When the shape is moved the connector will update itself to follow the shape. In addition, connectors will avoid objects marked as 'avoided' and reroute if one of these objects is placed on their existing path, or is moved and frees up a new path.
Mark shapes as 'avoided' or 'ignored' for connector routing.
While in the connector context there are two toolbar buttons on the tool toolbar. The first of these marks all the objects in the current selection as avoided for connector routing. Correctors will avoid these shapes. The second button marks all objects in the current selection as ignored for connector routing.
Currently, just the shapes bounding box is used for the avoidance. The preferred approach is to use each shapes convez hull. Currently Inkscape's NR::ConvexHull only uses a rectangular bounding box. Once proper convex hull code is in the codebase connector routing will be switched to using that.
Drawing new connectors
Click and drag from any empty point on the canvas to create a new connector. If you begin or end the connector over a connection point, then the connector will be attached to that shape. Connection points are currently shown at the center (of the bounding box) of any shape, and are shown when the mouse cursor is over the object.
Rerouting an existing connector
If you click on a connector in the connector context, a handle will be shown for each of its endpoints. Dragging either of these will alter the endpoint of the connector. If the endpoint was attached to a shape then this connection will be removed. Again, if the this dragging ends over a connection point, then that end of the connector will be attached to the object. Connectors will automatically reroute during this operation.
If an 'avoided' shape is placed over an existing connector route, then the connector will automatically reroute to avoid the shape. Also, if moving or deleting a shape frees up a better (currrently meaning shorter) path then the connector will again be rerouted.
There is lots more interesting things to do. One of the important ones (I think) is to allow conectors to be attached to user placeable connection points. This is something I would like to get people's thoughts on, i.e., what would you use them for, what would you want from them, etc.
Also, please have a play with connectors and let me know what you like/dislike. What works for you, what doesn't. I'm very interested in hearing peoples opinions and in working further on making this part of Inkscape realy useful to users.
-- Michael Wybrow
I think having user placeable connection points would be really helpful; it could allow you to do things like flow charts in Inkscape. That would open up Inkscape to usage as a helpful charting tool as well. - cam
Besides user placeable connection points it would be cool if it would be possible to use an outset of the convex hull. It would allow arrows or lines to clearly point to an object while not touching it. Often this is visually more pleasing. Another point would be to "fix" markers such that it is possible to use the tip of the arrow as the endpoint of a polyline instead of the point the marker is placed on. - Paul
I second Paul's suggestions. In 0.43, the effect can be created with an invisible dynamic offset, but its a bit of a cludge. - Jon
Yes, user-placeable connection points are the one single missing feature that just stopped me from using Inkscape for some control system block diagrams. I could easily do them in dia, but I was looking for a tool which can easily generate nice-looking "presentable" graphics. I will now probably draw them in Xfig. One more comment regarding connectors: it would be nice if the arrowheads and other shapes that can be used for either the connection end points or in the middle would automatically inherit colour etc. from the connection line. Currently they always come up as black, and it takes some SVG/XML tweaking to get them right. Just my 2 cts worth. - Helmut Walle.
Agreed; proper connectors are pretty much essential for many kinds of system diagrams. It would be nice to have connectors attach to path nodes, or an option to create connector points at or between nodes. -- Andrew.
Here here! User placeable connection points are the only missing feature holding me back from using Inkscape 100%. To draw complicated network diagrams I am forced to use Visio since there's nothing (that I'm aware of) in the opensource world, short of more complicated CAD packages, that can do technical drawings with user connection points, stencils, scaling, etc ... but Inkscape comes the closest. It's almost there! -Adam
I agree with all above and must say that I love this tool very much. I have an idea about how to go about the connector points, what if each object in an object group kept its individual connector point (they don't at the moment). In that way it would be possible to create complicated objects with a flexible amount of connector points. This leads to another feature that I would like to have and that is some sort of object gallery where I can store objectgroups I create. Much like the Visio software has with precreated objects. Both of these features combined would bring extra strength to the already poverful Inkscape software. - Mikael
The connector tool is a great idea, but it's not usable for me since it only draws edges connecting the bounding boxes, which looks really bad for circles. I imagine it would be easy to draw the edges between the centers of the objects (or the connection point, when that's possible), and keep the edge behind the objects being connected. This way, the edge would properly "touch" both connected objects. --Gfonsecabr 21:19, 25 April 2007 (UTC)
Just another "me too" on the connector tool needing to draw correctly to shape edges rather than bounding boxes and have definable connection points. This would promote inkscape from "borderline unusable" to "darn near perfect" for drawing the sorts of diagrams I need. The bounding box issue is far more important in my use case, which is network diagrams and the like to be presented to management and clients. I've used dia in the past for this, but the visual quality of the diagrams it creates just aren't quite up to par. --Qhartman May 9, 2007
I also vote for the connector tool needing to draw correctly to shape edges rather than just the bounding box. In my case, I add connectors between circles . It is the only reason I can't use Inkscape for "serious" work. Not completely sure of this, but could I accomplish nearly the same thing by defining user defined connectors every 45 degrees around the circle? -- --Tesseract 17:49, 6 June 2008 (UTC)
I would like to see curved connector lines. I make a lot of FSM diagrams and need two connector lines going between two separate shapes (in either direction). It would be great if I could just specify one value (the curvature) and have two lines connect two shapes curved with the given curvature. --Robert.l.toscano 06:42, 13 February 2008 (UTC)
Still to do: (lifted from src/connector-context.cpp)
o Have shapes avoid coonvex hulls of objects, rather than their bounding box. Possibly implement the unfinished [[ConvexHull]] class in libnr. o Draw connectors to shape edges rather than bounding box. o Fix minor endpoint position error for connected objects. o Show a visual indicator for objects with the 'avoid' property set. o Create an interface for setting markers (arrow heads). o Better distinguish between paths and connectors to prevent problems in the node tool and paths accidently being turned into connectors in the connector tool. Perhaps have a way to convert between. o Allow doubleclicking on connectors to swap to the connector context. o Cleanup to remove unecessary borrowed [[DrawContext]] code. o Allow user-placeable connection points. o Deal sanely with connectors with both endpoints attached to the same connection point, and drawing of connectors attaching overlaping shapes (currently tries to adjust connector to be outside both bounding boxes). o Fix many special cases related to connectors updating, e.g., copying a couple of shapes and a connector that are attached to each other. e.g., detach connector when it is moved or transformed in one of the other contexts.