I have a path in my application that I want to split up in smaller paths. These, I would like to draw with a label attached to them. Take the following image as an example:

The upper arc is split up into three segments by the horizontal lines and by the two lines coming out of the center of the circle. I draw all three parts of the path and attach a label to them.
Now, the way I do this now is a bit tedious. For each segment I have to reconstruct the path by hand: I have to specify how the path is continued at each intersection. In this case the intersection is simple and the continuation is clear, but if the path is complicated this becomes more difficult.
What I would like to do is the following:
- Define a full path, in this case the upper arc from the the left all the way to the right. This path could be arbitrarily complicated.
- Find coordinates in the path by intersecting with other paths.
- Have a command to say: draw the path from the first intersection coordinate to the second and assign a label to this segment. Draw the path from the second intersection to the third, etc.
How can I achieve this?
\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{calc,shapes.multipart,fit,shapes,calc,backgrounds,decorations.pathreplacing,decorations.markings,intersections}
\begin{document}
\begin{tikzpicture}[scale=2]
\path[name path=t] (1,0) to[out=90,in=180] (2,1) to[out=0,in=90] (3,0); % top arc
\path [name path=ml] (2,0) -- (1,1);
\path [name intersections={of=ml and t}];
\coordinate (A) at (intersection-1);
\path [name path=l] (2,0) -- (3,1);
\path [name intersections={of=l and t}];
\coordinate (B) at (intersection-1);
\draw[thick,draw=blue,] (3,0) to[out=90,in=315] node[midway,above right] {$c$} (B) to[out=135,in=45] node[midway,above] {$b$} (A) to[out=225,in=90] node[midway,above left] {$a$} (1,0);
\draw[thick,draw=blue,] (1,0) -- (0,0) node[midway,above] {};
\draw[thick,draw=blue,] (1,0) to[out=-90,in=180] node[midway,below left] {} (2,-1);
\draw[thick,draw=blue,] (2,-1) to[out=0,in=-90] node[midway,below right] {} (3,0);
\draw[thick,draw=blue,] (4,0) -- (3,0) node[midway,above] {};
\draw[thick,draw=blue,] (2,0) -- node[midway,right] {} (2,-1);
\draw[thick,draw=blue,] (A) -- node[midway,below left] {} (2,0);
\draw[thick,draw=blue,] (2,0) -- node[midway,below right] {} (B);
\end{tikzpicture}
\end{document}


standalonedocument class instead ofminimal. See http://tex.stackexchange.com/questions/42114/why-should-the-minimal-class-be-avoided – Matthew Leingang Nov 13 '14 at 13:19intersectiontimescan be used to find where paths cross andsubpathcan extract the relevant sections of your paths. – Thruston Nov 13 '14 at 15:39pos=...and the answer provides and iterative solution. – Ignasi Nov 13 '14 at 15:48\drawin pieces that would really depend on exactly how you want to specify the path -- for instance, you could code each portion of the path separately viacontrolpoints. – Peter Grill Nov 13 '14 at 22:01\draw[thick,blue] (1,0) to[out=90,in=180] node[pos=.25, above left] {$a$} (2,1) node[above] {$b$} to [out=0,in=90] node[pos=.75, above right] {$c$} (3,0);, or even more simply\draw[thick,blue] (1,0) arc (180:0:1) node[pos=.125,above left] {$a$} node[pos=.5,above] {$b$} node[pos=.875,above right] {$c$};. – Emma Nov 16 '17 at 00:45