TLDR; Is there a way I can specify a start and end point it it would route (hopefully orthogonally) around all nodes and other paths.
I'm converting a large number of visio flow charts to TikZ and keep running into one issue. Orthogonal* paths with more than one bend are hard to do. I'm also trying to keep the diagrams dynamic so any future changes can be made without tweaking the chart a bunch.
Now, I'm able to make these and keep them dynamic, but it seems much harder than it should be. Take the red line: that line required a minimum of 3 distinct points and to keep it dynamic, I ended up using 5! It would be nice if I could just specify a start and end point it it would route around all nodes and other paths.
*I'm using terminology from Omnigraffle, so what I mean is that any change in direction for the path is multiple of 90 degrees.

\documentclass{article}
\usepackage{tikz}
\usepackage[margin=0.5in]{geometry}
\pagestyle{empty}
\begin{document}
%\input{../tikz-setup.tex}
\usetikzlibrary{shapes, arrows, calc, positioning}
% Define block styles
\tikzstyle{state} = [ rounded rectangle,
draw,
text centered,
minimum height=3em ,
minimum width = 6em,
inner sep = 5pt
]
\tikzstyle{test} = [ diamond,
draw,
shape aspect=2,
inner sep = 0pt,
text width = 7em,
text centered
]
\tikzstyle{action} = [ rectangle, draw,
text width=8em,
inner sep = 5pt,
minimum height=5em
]
\tikzstyle{data} = [ trapezium,
draw,
trapezium left angle=60,
trapezium right angle=120pt,
minimum height = 6em,
text width = 5em
]
\tikzstyle{line} = [ draw, -triangle 45 ]
\begin{center}
\begin{tikzpicture}[align = flush center, font = \small]
% Place nodes
\matrix [column sep = 2.5em, row sep = 2em] (mtrx)
{
\node [state] (a) {a}; &[1em]
\node (b) {}; \\
\node [action] (c) {c}; &
\node [action] (d) {d}; \\
\node [test] (e) {e}; &
\node [test] (f) {f}; \\
\node [action] (g) {g}; &
\node [action] (h) {h}; \\
\node [action] (i) {i};&
\node [action] (j) {j}; \\
&
\node [state] (k) {k}; \\
};
% Draw edges
\path [line] (a) -- (c);
\path [line] (c) -- (e);
\path [line] (e) -- node [right, near start] {Yes} (g);
\path [line] (e.east) -- node [above] {No} ( $(e.east)!0.3!(f.west)$ ) |- ( $(g)!0.45!(i)$ );
\path [line] (g) -- (i);
\path [line,red] let \p1=( $(a.south)!0.6!(b.south)$ ) in (i.south) -- +(0, -0.5) -| (\p1) -| (d.north);
\end{tikzpicture}
\end{center}
\end{document}


|-/-|syntax? – Qrrbrbirlbel Sep 10 '12 at 22:40\path [line,red] let \p1=( $(a.south)!0.6!(b.south)$ ) in (i.south) -- +(0, -0.5) -| (\p1) -| (d.north);. The let is cruft from an older attempt and unnecessary. – blitzvergnugen Sep 11 '12 at 13:15\draw[-triangle 45,red] (i.south) -- ++(0,-5mm) -| ([shift={(-5mm,5mm)}]d.north west) -| (d);be simple enough? – percusse Sep 11 '12 at 14:13