我应该如何垂直排列分开的盒子?

我应该如何垂直排列分开的盒子?

我应该如何垂直排列分开的盒子?

\documentclass[parskip]{scrartcl}
\usepackage[margin=15mm]{geometry}
\usepackage{tikz}
\usepackage{tabularray}

\begin{document}

\newcommand{\tikzcuboid}[4]{% width, height, depth, scale
\begin{tikzpicture}[scale=#4]
\foreach \x in {0,...,#1}
{   \draw (\x ,0  ,#3 ) -- (\x ,#2 ,#3 );
    \draw (\x ,#2 ,#3 ) -- (\x ,#2 ,0  );
}
\foreach \x in {0,...,#2}
{   \draw (#1 ,\x ,#3 ) -- (#1 ,\x ,0  );
    \draw (0  ,\x ,#3 ) -- (#1 ,\x ,#3 );
}
\foreach \x in {0,...,#3}
{   \draw (#1 ,0  ,\x ) -- (#1 ,#2 ,\x );
    \draw (0  ,#2 ,\x ) -- (#1 ,#2 ,\x );
}
\end{tikzpicture}
}

\newcommand{\tikzcube}[2]{% length, scale
\tikzcuboid{#1}{#1}{#1}{#2}
}

\tikzcuboid{1}{10}{1}{0.4} \tikzcuboid{1}{10}{1}{0.4} \tikzcuboid{1}{10}{1}{0.4} \tikzcuboid{1}{1}{1}{0.4} \tikzcuboid{1}{1}{1}{0.4} \hspace{3cm} \tikzcuboid{1}{10}{1}{0.4} \tikzcuboid{1}{10}{1}{0.4} \tikzcuboid{1}{1}{1}{0.4} \tikzcuboid{1}{1}{1}{0.4} \tikzcuboid{1}{1}{1}{0.4} \tikzcuboid{1}{1}{1}{0.4}

\vspace{3cm}


\tikzcuboid{1}{10}{1}{0.4} \tikzcuboid{1}{10}{1}{0.4} \tikzcuboid{1}{10}{1}{0.4} \tikzcuboid{1}{10}{1}{0.4} \tikzcuboid{1}{10}{1}{0.4} \hspace{3cm} \tikzcuboid{1}{10}{1}{0.4} \tikzcuboid{1}{10}{1}{0.4} \tikzcuboid{1}{10}{1}{0.4} \tikzcuboid{1}{10}{1}{0.4} \tikzcuboid{1}{10}{1}{0.4} \tikzcuboid{1}{10}{1}{0.4} \tikzcuboid{1}{10}{1}{0.4} \tikzcuboid{1}{1}{1}{0.4} \tikzcuboid{1}{1}{1}{0.4} \tikzcuboid{1}{1}{1}{0.4} \tikzcuboid{1}{1}{1}{0.4}

\end{document}

在此处输入图片描述

我想像这样排列分开的盒子: 在此处输入图片描述

谢谢

相关内容