\documentclass[border=10pt]{standalone}
\usepackage{tikz}
\usetikzlibrary{decorations.text, decorations.markings, fit, arrows.meta}
% definition of some colors
\colorlet{mygreen1}{green!50!cyan!80!black}
\colorlet{mygreen2}{yellow!80!green!80!black!50}
\colorlet{myyellow}{yellow!50!black}
% definition of the cuboid pic
\tikzset{
pics/regular cuboid/.style={
code={
\tikzset{regular cuboid/.cd, #1}
\draw[regular cuboid/front]
(0,0)
coordinate (-south west) rectangle
(\pgfkeysvalueof{/tikz/regular cuboid/width},
\pgfkeysvalueof{/tikz/regular cuboid/height})
coordinate (-north east)
node[regular cuboid/label]
{\pgfkeysvalueof{/tikz/regular cuboid/label text}};
\draw[regular cuboid/top]
(0,\pgfkeysvalueof{/tikz/regular cuboid/height})
coordinate (-north west) --
++(\pgfkeysvalueof{/tikz/regular cuboid/depth},
\pgfkeysvalueof{/tikz/regular cuboid/depth})
coordinate (-far north west) --
++(\pgfkeysvalueof{/tikz/regular cuboid/width},0)
coordinate (-far north east) --
(-north east) --
cycle;
\draw[regular cuboid/side]
(\pgfkeysvalueof{/tikz/regular cuboid/width},0)
coordinate (-south east) --
++(\pgfkeysvalueof{/tikz/regular cuboid/depth},
\pgfkeysvalueof{/tikz/regular cuboid/depth})
coordinate (-far south east) --
(-far north east) --
(-north east) --
cycle;
\coordinate (-north) at
({0.5\pgfkeysvalueof{/tikz/regular cuboid/width}},
\pgfkeysvalueof{/tikz/regular cuboid/height});
\coordinate (-south) at
({0.5\pgfkeysvalueof{/tikz/regular cuboid/width}},0);
\coordinate (-east) at
(\pgfkeysvalueof{/tikz/regular cuboid/width},
{0.5\pgfkeysvalueof{/tikz/regular cuboid/height}});
\coordinate (-west) at
(0,0.5\pgfkeysvalueof{/tikz/regular cuboid/height});
}
},
regular cuboid/height/.initial={1},
regular cuboid/width/.initial={1},
regular cuboid/depth/.initial={0.5},
regular cuboid/label text/.initial={},
regular cuboid/front/.style={fill=black!10},
regular cuboid/top/.style={fill=black!10},
regular cuboid/side/.style={fill=black!20},
regular cuboid/label/.style={midway}
}
\begin{document}
\begin{tikzpicture}
% create the row of pics
\coordinate (box 0-south west) at (0,0);
\foreach \h/\f/\d/\l [count=\i] in {
3cm/yellow!20/mygreen1/Text,
3cm/yellow!20/mygreen1/TEXt,
2.9cm/blue!20/black/Text,
2.5cm/yellow!20/mygreen1/Text,
2.4cm/yellow!20/mygreen1/Text,
2.3cm/blue!10/black/Text,
2cm/yellow!20/mygreen1/Text
} {
% create the cuboid
\pgfmathtruncatemacro{\lasti}{\i-1}
\pic (box \i) at ([xshift=1.25cm]box \lasti-south west) {
regular cuboid={
front/.style={draw=\d,fill=\f},
top/.style={draw=\d,fill=\f},
side/.style={draw=\d,fill=\f!black!20},
height={\h},
width={0.65cm},
depth={0.25cm}
}
};
% add the vertical label
\edef\labelpath{
\noexpand%
\path[decorate, decoration={
text effects along path, text={\l}, text align=center
}] (box \i-north) -- (box \i-south);
}\labelpath
}
% add the last cuboid with horizontal label
\pic (box 8) at ([xshift=1.25cm]box 7-south west) {
regular cuboid={
front/.style={fill=mygreen2},
top/.style={fill=mygreen2},
side/.style={fill=mygreen2!80!black},
width={1.33cm},
depth={0.25cm},
label text={Text}
}
};
% add the surrounding frame with arrow heads
\node[draw, thick, rounded corners=0.5cm, inner xsep=0.5cm, inner ysep=1cm,
fit={(box 1-south west) ([yshift=0.5cm]box 1-far north west) (box 8-far north east)},
postaction={decorate, decoration={markings,
mark={at position 7.5cm with {\arrow{Stealth[length=10pt]}}},
mark={at position 15.5cm with {\arrow{Stealth[length=10pt]}}},
mark={at position 32.5cm with {\arrow{Stealth[length=10pt]}}}
}}]
(frame) {};
% place some text inside the frame
\node[myyellow, font=\bfseries, anchor=west]
at ([yshift=1cm]box 1-north west)
{Some text, some text};
% add the two orange nodes at the bottom of the frame
\node[draw, fill=orange!10, rounded corners, inner sep=0.25cm, minimum width=4cm]
at ([yshift=-1cm, xshift=4cm]box 1-south west)
{Text};
\node[draw, fill=orange!10, rounded corners, inner sep=0.25cm, minimum width=4cm]
at ([yshift=-1cm, xshift=8.5cm]box 1-south west)
{Text};
% place another pic to the left
\pic (box 9) at (-4,0) {
regular cuboid={
front/.style={draw=mygreen1,fill=mygreen2},
top/.style={draw=mygreen1,fill=mygreen2},
side/.style={draw=mygreen1,fill=mygreen2!80!black},
width={1.33cm},
depth={0.25cm},
label text={Text}
}
};
% add the three nodes above and below the pic on the left
\node[draw=mygreen1, rounded corners, inner sep=0.25cm, minimum width=2cm]
(label 1) at ([yshift=-1cm]box 9-south)
{text};
\node[draw=mygreen1, rounded corners, inner sep=0.25cm, minimum width=2cm]
(label 2) at ([yshift=1.5cm]box 9-north)
{text};
\node[draw=mygreen1, rounded corners, inner sep=0.25cm, minimum width=2cm]
(label 3) at ([yshift=1cm]label 2.north)
{text};
% add the arrows with labels
\draw[-{Stealth[length=10pt]}, thick]
(frame.90) -- ++(0,0.5cm) -| (label 3.north)
node[pos=0.4, below, myyellow, font=\bfseries] {Some text};
\draw[-{Stealth[length=10pt]}, thick]
(label 1.north) -- (box 9-south);
\draw[-{Stealth[length=10pt]}, thick]
(label 3.south) -- (label 2.north);
\draw[-{Stealth[length=10pt]}, thick]
(label 2.south) -- (box 9-north |- box 9-far north east);
\draw[-{Stealth[length=10pt]}, thick, myyellow]
(box 9-west -| box 9-far north east) -- (box 9-west -| frame.west)
node[midway, above, myyellow, font=\bfseries] {Text}
node[midway, below, myyellow, font=\bfseries] {Text};
\end{tikzpicture}
\end{document}
3Dlibrary for this diagram. Actually, these 3D-like shapes can easily be drawn by just shifting some coordinates in a 45-degrees angle to the upper right. Using three-dimensional coordinates for this, and especially for the rest of your diagram is just not needed and only makes the code hard to read. Do get the frame-like box, take a look at thefitlibrary. – Jasper Habicht Apr 05 '23 at 20:323Dshapes. – koolaids Apr 05 '23 at 21:18fitlibrary has no problems to "find" a coordinate that you defined in 3D, because it just uses its 2D representation. – Jasper Habicht Apr 05 '23 at 21:25