You can absolutely not use shifts and so on to define 3d coordinates that are used in any type of 3d computations.
Here is something that does not give an error.
```
\documentclass[border=1mm,12pt,tikz]{standalone}
\usetikzlibrary{3dtools,calc}% https://github.com/marmotghost/tikz-3dtools
\begin{document}
\foreach \Angle in {70}
{\begin{tikzpicture}[3d/install view={phi=\Angle,psi=0,theta=65},line join = round, line cap = round,c/.style={circle,fill,inner sep=1pt}, same bounding box=A,
declare function={a=6;h=6;r=a*sqrt(3)/6;}]
\path
(-a/2,{-a*sqrt(3)/6},0) coordinate (D) (a/2,{-a*sqrt(3)/6},0) coordinate (F)
(0,{a*sqrt(3)/3},0) coordinate (E)
(-a/2,{-a*sqrt(3)/6},h) coordinate (A) (a/2,{-a*sqrt(3)/6},h) coordinate (C)
(0,{a*sqrt(3)/3},h) coordinate (B)
[3d coordinate ={(M) =0.5*(C) + 0.5*(E)},3d coordinate ={(N) =0.5*(F) + 0.5*(E)},3d coordinate ={(X) =0.5*(F) + 0.5*(D)},3d coordinate ={(Y) =0.5*(E) + 0.5*(D)},3d coordinate ={(H) =0.5*(E) + 0.5*(B)},3d coordinate ={(K) =0.5*(C) + 0.5*(F)}];
\path[overlay,3d coordinate={(n)=(A)-(M)x(B)-(C)}];
\path[3d/plane with normal={(n) through (M) named p},3d/line with direction={(0,0,1) through (X) named l1},3d/line with direction={(0,0,1) through (Y) named l2}];
\path pic[3d/hidden]{3d incircle={%
A={(D)},B={(E)},C={(F)},center name=G}};
\path[3d/line with direction={(0,0,1) through (G) named l3}];
\path[3d/intersection of={l1 with p}] coordinate (X');
\path[3d/intersection of={l2 with p}] coordinate (Y');
\path[3d/intersection of={l3 with p}] coordinate (I);
\pgfmathsetmacro{\myscreenex}{TDunit("(0,0,1)x(nscreenx,nscreeny,nscreenz)")}
%\draw[red,->] (0,0,0) -- (\myscreenex);
\path[3d coordinate={(L)=(G)-(\myscreenex)}];
\path [3d/line with direction={(0,0,1) through (L) named l5}];
\path [3d coordinate ={(Z) = 2*(I) - (X')}, 3d coordinate ={(W) = 2*(I) - (Y')}];
\pgfmathsetmacro{\mybarycenter}{barycenter("(A),(B),(C),(D),(E),(F)")}
\path (\mybarycenter) coordinate (O'');
\pgfmathsetmacro{\mya}{tddistance("(I)","(M)")}%
\pgfmathsetmacro{\myb}{tddistance("(G)","(N)")}
\tikzset{3d/define orthonormal dreibein={A={(A)},B={(I)},C={(X')}}}
\begin{scope}[x={(ex)},y={(ey)},z={(ez)}]
\draw[3d/hidden] (I) circle[x radius
=\mya,y radius=\myb];
\end{scope}
\tikzset{3d/polyhedron/.cd,O={(O'')},
fore/.append style={fill=none,/tikz/3d/visible},
back/.append style={fill=none,/tikz/3d/hidden},
draw face with corners={{(B)},{(C)},{(F)},{(E)}},
draw face with corners={{(A)},{(C)},{(F)},{(D)}},
draw face with corners={{(A)},{(B)},{(E)},{(D)}},
draw face with corners={{(A)},{(B)},{(C)}},
draw face with corners={{(D)},{(E)},{(F)}}}
\draw[3d/visible] (M) -- (N);
\draw[3d/hidden] (A) -- (M) (A) -- (H);
\draw[3d/visible] (A) -- (K) -- (H);
\path foreach \p/\g in {A/90,B/90,C/200,D/-90,E/-90,F/-90,G/-90,M/-50,X/-90,X'/-180,Y'/70,I/90,Z/0,W/-90,Y/90,N/-90,L/0}
{(\p)node[c]{}+(\g:2.5mm) node{$\p$}};
\pgfmathsetmacro{\myn}{TD("(B)-(E)x(E)-(F)")}
\pgfmathtruncatemacro{\itest}{screendepth(\myn)>0?1:0}
\ifnum\itest=0
\draw[3d/visible] (M)--(N);
\else
\draw[3d/hidden] (M)--(N);
\fi
\end{tikzpicture}}
\end{document}
````