Incremental Connector Routing Michael Wybrow 1 , Kim Marriott 1 , and Peter J. Stuckey 2 1 Clayton School of Information Technology, Monash University, Clayton, Victoria 3800, Australia, {mwybrow,marriott}@csse.monash.edu.au 2 NICTA Victoria Laboratory, Dept. of Comp. Science & Soft. Eng., University of Melbourne, Victoria 3010, Australia, pjs@cs.mu.oz.au Abstract. Most diagram editors and graph construction tools provide some form of automatic connector routing, typically providing orthogo- nal or poly-line connectors. Usually the editor provides an initial auto- matic route when the connector is created and then modifies this when the connector end-points are moved. None that we know of ensure that the route is of minimal length while avoiding other objects in the dia- gram. We study the problem of incrementally computing minimal length object-avoiding poly-line connector routings. Our algorithms are surpris- ingly fast and allow us to recalculate optimal connector routings fast enough to reroute connectors even during direct manipulation of an ob- ject’s position, thus giving instant feedback to the diagram author. 1 Introduction Most diagram editors and graph construction tools provide some form of auto- matic connector routing. They typically provide orthogonal and some form of poly-line or curved connectors. Usually the editor provides an initial automatic route when the connector is created and again each time the connector end- points (or attached shapes) are moved. The automatic routing is usually chosen by an ad hoc heuristic. In more detail the graphic editors OmniGraffle [1] and Dia [2] provide connec- tor routing when attached objects are moved, though these routes may overlap other objects in the diagram. Both Microsoft Visio [3] and ConceptDraw [4] provide object-avoiding connector routing. In both applications the routes are updated only after object movement has been completed, rather than as the action is happening. In the case of ConceptDraw, its orthogonal object-avoiding connectors are updated as attached objects are dragged, though not if an object is moved or dropped onto an existing connector’s path. The method used for rout- ing does not use a predictable heuristic and often creates surprising paths. Visio offers orthogonal connectors, as well as curved connectors that follow roughly orthogonal routes. Visio’s connectors are updated when the attached shapes are moved or when objects are placed over the connector paths, but only in response