In general, three-dimensional drawing in TikZ does not have z buffering capability (there are some exceptions to this, namely 3D plots in pgfplots
, but that does not apply here).
What does this mean? It means that while you can conveniently specify coordinates as (x,y,z)
triples, TikZ makes no attempt to store these off and take care of which drawing elements should appear "in front of" other elements. It simply draws everything in the order specified in the picture code.
Because of this, it is up to the user to draw overlapping things in the order desired. No code was given; so I'll show a simple example of this here:
\documentclass[tikz]{standalone}
\begin{document}
\begin{tikzpicture}[
x={(0.935cm,-0.118cm)},
y={(0.354cm, 0.312cm)},
z={(0.000cm, 0.943cm)},
]
\draw[red] (0,0,-1) -- ++(0,6,0); % drawn first, so rectangle covers it up
\draw[fill=blue!10] (0,0,0) -- (2,0,0) -- (2,0,1) -- (0,0,1) -- cycle;
\draw[green] (0.1,0,-1) -- ++(0,6,0); % should be "below" the rectangle, but appears on top
\end{tikzpicture}
\end{document}
In practice, you can manage this by drawing (or redrawing) items in the foreground "after" (on top of) any background items.