From Inkscape Wiki
Revision as of 04:11, 1 April 2011 by Airhogs777 (talk | contribs)
Jump to navigation Jump to search

Connector Tool Improvements

In Inkscape, it is possible to connect two shapes from their centers. But if you want to make a schematic with represent a family (for example), it's not possible to add connectors from an edge of a shape.

It will be great if connectors can be added to edge of shape, in a way that auto adaptation to "best path" is still possible.

Another idea is to implement a tool that can *restrict* the connector to vertical and horizontal lines only. For now, Inkscape is tracing straight lines or broken line if there is an shape in the path, but lines go in any direction.

It will be great if connectors can be configured in a way that they must avoid others shapes, AND pass through some specific points, AND stay even horizontal even vertical.

I do not speak yet about the functionality of making a little "bridge" when two lines cross each others and are not connected. This is a functionality that exists in M$ Visio but does not work very well :-/

Thanks for reading !



I'd like to formalise aspects of this project proposal. I'm the author of libavoid (the library used for routing in Inkscape) and the person who added the existing connector tool. I'd also probably be the most appropriate person to mentor this project if it were undertaken as a Google Summer of Code (GSoC) project. Below are some connector improvement tasks, along with some comments.

1) Drawing to shape edge, rather than bounding box: Currently, the connector tool only draws connectors to the bounding box of shapes. It should (probably) instead draw them up to the first intersection point with the shape's stroke. This is probably quite easy to achieve now that lib2geom is included in Inkscape -- 2geom can find intersection points between lines or curves making up shapes. Otherwise, the old Boolean Ops code could be used instead.

2) Connector ports (Connecting to a specific point on a shape): libavoid is able to route connectors to specific points. This work would require adding a GUI for this feature to Inkscape so that users could define connector ports on shapes. These would need to be editable through the canvas and the information saved and loaded from files. I think this activity, along with the other minor items on this list, would form the basis of a good GSoC project.

3) Orthogonal connector support (vertical and horizontal lines only): This is something I am working on in libavoid right now. An initial version will be complete during the 2009 GSoC period, so this feature will shortly become fairly trivial to add to Inkscape.

4) Routing connectors through specific points: This is not currently a feature of libavoid, though it is a fundamentally easy thing to do. I would be able to add this feature to libavoid fairly easily, and then the work would be in creating an interface for creating such points and working with them in Inkscape.

5) Visualising connector crossings: libavoid can be queried to determine where connector crossings occur. Thus, Inkscape could be updated to use this information to modify the connector's path to visualise the crossings distinctly (such as by drawing a little "bridge").

6) Curved poly-line and orthogonal connectors: Inkscape can return versions of poly-line or orthogonal connector paths with curved corners. This is purely an aesthetic improvement. Inkscape could be fairly easily modified to add an option for this and to use this feature of libavoid.

7) Routing preferences and penalties: libavoid can provide routes that have less segments, or that have less large bends. It does this by penalising these features when determining the routes. These options could be exposed within Inkscape to give users more control over the quality of the generated paths for connectors.

I'm willing to mentor and assist an interested student who is willing to work on one or more of these tasks. -- Michael Wybrow