# tikz - drawing an edge that splits to reach two targets [closed]

I'm using tikz and want to have an arrow from one node that leaves and goes straight for a while and then splits into two arrows going to different nodes.

Here is a picture I drew a while ago. I now want to replace it with a tikz figure:

Notice that one of the vertical edges goes straight for a while and splits into 2. Is there a way to do this cleanly? Let's say that the source is named `source` and the targets are named `targetA` and `targetB`.

I could specify the in and out angles so that they come out of `source` with the same slope, but I really want them to be the same edge for a while, not just be close to each other.

Bonus: is there an easy way to make the edge dashed while it overlaps a box to give the impression it's going behind the box?

## closed as off-topic by Symbol 1, Zarko, Stefan Pinnow, CarLaTeX, gernotApr 22 '17 at 21:18

• This question does not fall within the scope of TeX, LaTeX or related typesetting systems as defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

• Since you are using Tikz show us please what you had done. – Sigur May 1 '15 at 15:04
• Is the shared portion of the path always a straight line or could it be curved as well? – Paul Gessler May 1 '15 at 15:35
• To get a smooth transition from the common, straight section to the split curved section, you will need to calculate the angle (slope) of the straight section using \pgfmathparse and atan() or atan2()(). – John Kormylo May 1 '15 at 15:52
• @PaulGessler It will be a straight line – Joel May 1 '15 at 22:56
• I'm voting to close this question as off-topic because OP did not put any effort in this question in the past 23 months, and probably will never do. – Symbol 1 Apr 22 '17 at 20:19