I am trying to draw a cube with dashed at some place of the segment EH.
I tried
\documentclass[tikz,border=3mm]{standalone}
\usepackage{tikz,tikz-3dplot}
\begin{document}
\tdplotsetmaincoords{70}{110}
\begin{tikzpicture}[tdplot_main_coords,line cap=butt,line join=round,c/.style={circle,fill,inner sep=1pt},
declare function={a=4;}]
\path
(0,0,0) coordinate (A)
(a,0,0) coordinate (B)
(a,a,0) coordinate (C)
(0,a,0) coordinate (D)
(0,0,a) coordinate (E)
(a,0,a) coordinate (F)
(a,a,a) coordinate (G)
(0,a,a) coordinate (H)
(0,0,0) coordinate (O)
($ (B)!0.5!(C) $)coordinate (N)
($ (G)!0.5!(H) $)coordinate (M)
(a,a,2*a) coordinate (X)
(a,3*a/4,a) coordinate (Y)
;
\draw[dashed] (A) -- (B) (A) -- (E) (D) -- (A) (D) -- (N) (M) -- (Y) ;
\draw (B) -- (C) -- (D) (H) -- (E) -- (F) -- (G) -- cycle (B) -- (F) (C) -- (G) -- (C) (D) -- (H) (N) -- (X) -- (D);
\path foreach \p/\g in {A/-90,B/-90,C/-90,D/-90,E/90,F/90,G/90,H/90,N/-90,M/90,X/90,Y/180}{(\p)node[c]{}+(\g:2.5mm) node{$\p$}};
\end{tikzpicture}
\end{document}
How can I get dashed line in the segment EH?