Drawing a structure diagram with TikZ chains

diagramstikz-chains

I want to draw a structure diagram with TiKZ and the chains library. See example:

enter image description here

I'm missing to find a solution for the middle part. There are three elements with text inside. Each element is 30% of the width and one element extends over two rows.
How would a solution using TiKZ look like?

Best Answer

Here is a solution with chains. You can adjust spacing however you like. The key to getting the placement right is to use \tikzchainprevious and anchor= as in the code below.

enter image description here

\documentclass{article}

\usepackage{tikz}
\usetikzlibrary {chains}

\tikzset{long node/.style={draw, rounded corners, minimum width=7.5cm, minimum height=1cm},
    short node/.style={draw, rounded corners, minimum width=2cm, minimum height=1cm},
    square node/.style={draw, rounded corners, minimum width=2.5cm, minimum height=2.5cm}
}

\begin{document}

\begin{tikzpicture}[start chain, node distance=5mm]
\node[on chain, long node]{};
\node[on chain=going below, long node]{};
\node[on chain=going {below=of \tikzchainprevious.south west, anchor=north west}, short node]{};
\node[on chain=going below, short node, ]{};
\node[on chain=going right, short node]{};
\node[on chain=going above, short node]{};
\node[on chain=going {right=of \tikzchainprevious.north east, anchor=north west}, square node]{};
\node[on chain=going {below=of \tikzchainprevious.south east, anchor=north east}, long node]{};
\end{tikzpicture}

\end{document}

If you add every node/.style=join, every join/.style={red,->} to the tikzpicture options, you can see the chain sequence:

enter image description here

Related Question