I want to draw the figure above, a wooden cube with one orner cut off and shaded.
I can only draw the cube, I can't remove a part of the cube by a plane.
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{center}
\begin{tikzpicture}[scale=0.5]
\draw[thick,black] (4,0,0) -- (0,0,0) -- (0,4,0) -- (4,4,0);
\draw[thick,black] (4,0,0) -- (4,0,-4) -- (4,4,-4) -- (4,4,0) -- cycle;
\draw[thick,black](0,4,0) -- (0,4,-4) -- (4,4,-4);
\draw[style=dashed, color=black] (4,0,-4) -- (0,0,-4)-- (0,4,-4);
\draw[style=dashed, color=black] (0,0,0) -- (0,0,-4);
\end{tikzpicture}
\end{document}