I'm using the brace decoration from the TikZ decorations.pathreplacing library to draw a brace around some nodes.
Now I would like to connect the tip of the brace to another path (use case: labelling terms in an equation).
First, I used the LaTeX command \overbrace, but realised it would be difficult to connect a tikz-path to the tip.
It should be easier using the TikZ decoration brace.
However, if I place node[midway] along the path, the node is placed midway along the unaltered path, not midway along the decorated path.
Below is code along with the undesired output.
\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{decorations.pathreplacing}
\begin{document}
\begin{tikzpicture}
\node (spam) at (1, 1) {Spam};
\node (eggs) at (4, 1) {Eggs};
\draw[decoration={brace,amplitude=5mm}, decorate] (spam.north) -- (eggs.north) coordinate[midway] (mid);
\draw (mid) -- ++(0,1);
\end{tikzpicture}
\end{document}

Of course, in the present example, I could simply replace the second \draw-command by \draw (mid) ++(0,5mm) -- ++(0,1);.
But I would like something more stable that I don't need to tweak by hand, and maybe even work for arbitrary decorated paths.
So, my question is:
- How do I place a coordinate at some point along a decorated path?
UPDATE 2012-12-17: To show the use case, I add a picture of the solution here.



edgelike brace, you need to consider some examples in the pgfmanual something likeedge from parent path= {(\tikzparentnode.south) .. controls +(0,-1) and +(0,1) .. (\tikzchildnode.north)}]. (see Making Trees Grow) – Alain Matthes Dec 16 '11 at 15:17\overbracebut have no idea how I would dynamically connect a path to its tip... – gerrit Dec 17 '11 at 17:53