Here's an example with the code you provided, just reuse part of the paths you used to make the 3D shape.
By the way, consider adding a new feature for the corners, so that the shape looks a bit better. To see the difference using regular angles vs changing them to round, see In TikZ when is “line join=miter” the preferrable over “line join=round”?
Output

Code
\documentclass[margin=10pt]{standalone}
\usepackage{tikz}
\tikzset{
every path/.style={line join=round}
}
\begin{document}
\begin{tikzpicture}
\pgfmathsetmacro{\cubex}{1}
\pgfmathsetmacro{\cubey}{6}
\pgfmathsetmacro{\cubez}{2}
\draw[black, ultra thick,fill=yellow] (0,0,0) -- ++(-\cubex,0,0) -- ++(0,-\cubey,0) -- ++(\cubex,0,0) -- cycle;
\draw[black, ultra thick,fill=yellow] (0,0,0) -- ++(0,0,-\cubez) -- ++(0,-\cubey,0) -- ++(0,0,\cubez) -- cycle;
\draw[black, ultra thick, fill=yellow] (0,0,0) -- ++(-\cubex,0,0) -- ++(0,0,-\cubez) -- ++(\cubex,0,0) -- cycle;
\draw[ultra thick, |-|] (-2,0,0) -- ++(0,-\cubey,0) node[midway, left] {30cm};
\draw[ultra thick, |-|] (-\cubex,-7,0) -- ++(\cubex,0,0) node[midway, below] {10cm};
\draw[ultra thick, |-|] ++(1.5,-\cubey,0) -- ++(0,0,\cubez) node[midway, below right] {15cm};
\end{tikzpicture}
\end{document}