Is there a TikZ equivalent to the PSTricks \ncdiag command?

Here's my first shot. I do it using a to path, which allows me to replace a path by something else. The first bit of the arm is easy enough, but the second needs the calc library. Also, when applied to nodes then the arm length is relative to the centre of the node, not the length of path that is actually drawn.

Code:

\documentclass{article}
%\url{http://tex.stackexchange.com/q/25474/86}
\usepackage{tikz}
\usetikzlibrary{calc}
\usepackage{pst-node}

\tikzset{
  arm angleA/.initial={0},
  arm angleB/.initial={0},
  arm length/.initial={0mm},
  arm/.style={
    to path={%
      (\tikztostart) -- ++(\pgfkeysvalueof{/tikz/arm
         angleA}:\pgfkeysvalueof{/tikz/arm length}) -- ($(\tikztotarget)+
         (\pgfkeysvalueof{/tikz/arm angleB}:\pgfkeysvalueof{/tikz/arm length})$)
          -- (\tikztotarget)
    }
  },
}

\begin{document}

\rput(0,3){\rnode{A}{Foo}}
\rput(2,0){\rnode{B}{Bar}}
\ncdiag[angleA=-90,angleB=90,arm=5mm]{A}{B}
\hspace{2in}
\begin{tikzpicture}
\node at (0,3) (A) {Foo};
\node at (2,0) (B) {Bar};
\draw[thick] (A) to[arm, arm angleA=-90,arm angleB=90,arm length=5mm] (B);
\end{tikzpicture}
\end{document}

(Note: I changed the node positions in the TikZ one to match the PSTricks specification.)

Picture, PSTricks on left, TikZ on right:

tikz arm