[Tex/LaTex] Truncated octahedron in TikZ

tikz-3dplottikz-pgf

I'm having trouble drawing a truncated octahedron for a Brillouin zone in TikZ. My attempt so far is an adaptation of this answer
which produces wonky square bits that are also too small (the sides of the hexagons should be equal in length).

The size of the square parts could be changed by adjusting the nodes but this seems very manual and there must be a better way. Can anyone enlighten me? Perhaps a TikZ-3D plot is more appropriate?

Output:

enter image description here

MWE:

\documentclass{article}
\usepackage{tikz}

\begin{document}

\begin{tikzpicture}[thick,scale=10]
%
\coordinate (C1) at (0.3,-0.15);
\coordinate (C2) at (0.55,-0.15);
\coordinate (C3) at (0.425,-0.025);
\coordinate (C4) at (0.425,-0.275);
%
\coordinate (D1) at (0.85,-0.05);
\coordinate (D2) at (0.9,0.05);
\coordinate (D3) at (0.875,0.125);
\coordinate (D4) at (0.875,-0.125);
%
\coordinate (E1) at (0.375,0.375);
\coordinate (E2) at (0.625,0.375);
\coordinate (E3) at (0.525,0.425);
\coordinate (E4) at (0.525,0.325);
%
\coordinate (F1) at (0.15,0.015);
\coordinate (F2) at (0.1,-0.015);
\coordinate (F3) at (0.125,0.125);
\coordinate (F4) at (0.125,-0.125);
%
\coordinate (G1) at (0.375,-0.375);
\coordinate (G2) at (0.625,-0.375);
\coordinate (G3) at (0.475,-0.425);
\coordinate (G4) at (0.575,-0.325);

\begin{scope}[thick,dashed]
\draw (C1) -- (C4) -- (C2) -- (C3) -- (C1);
\draw (D1) -- (D4) -- (D2) -- (D3) -- (D1);
\draw (E1) -- (E4) -- (E2) -- (E3) -- (E1);
\draw (F1) -- (F4) -- (F2) -- (F3) -- (F1);
\draw (G1) -- (G4) -- (G2) -- (G3) -- (G1);
\end{scope}
\draw (F3) -- (F2) -- (C1) -- (C3) -- (E4) -- (E1);
\draw (C1) -- (C4) -- (G3) -- (G1) -- (F4) -- (F2);
\draw (D1) -- (C2) -- (C3) -- (E4) -- (E2) -- (D3) -- (D1);
\draw (D1) -- (C2) -- (C4) -- (G3) -- (G2) --(D4) -- (D1);
\draw (E2) -- (E3) -- (E1) -- (F3) -- (F2) -- (F4) -- (G1) -- (G3) --  (G2) -- (D4) -- (D1) -- (D3) --cycle;
\end{tikzpicture}

\end{document}

Desired output:

enter image description here

Please note I haven't added the labels to my attempt as undoubtably they would change after getting the shape right.

Best Answer

This ought to get you started constructing the shape in 3d.

analysis

I started by drawing all the squares, then joining neighboring corners one at a time.

\documentclass{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\draw[blue] (1.414,.707,0) -- (1.414,0,.707) -- (1.414,-.707,0) -- (1.414,0,-.707) -- cycle;
\draw[blue,dashed] (-1.414,.707,0) -- (-1.414,0,.707) -- (-1.414,-.707,0) -- (-1.414,0,-.707) -- cycle;
\draw[red] (.707,1.414,0) -- (0,1.414,.707) -- (-.707,1.414,0) -- (0,1.414,-.707) -- cycle;
\draw[red,dashed] (.707,-1.414,0) -- (0,-1.414,.707) -- (-.707,-1.414,0) -- (0,-1.414,-.707) -- cycle;
\draw[green] (.707,0,1.414) -- (0,.707,1.414) -- (-.707,0,1.414) -- (0,-.707,1.414) -- cycle;
\draw[green,dashed] (.707,0,-1.414) -- (0,.707,-1.414) -- (-.707,0,-1.414) -- (0,-.707,-1.414) -- cycle;
\draw (1.414,.707,0) -- (.707,1.414,0)
  (1.414,0,.707) -- (.707,0,1.414)
  (0,1.414,.707) -- (0,.707,1.414)
  (1.414,-.707,0) -- (.707,-1.414,0)
  (-.707,0,1.414) -- (-1.414,0,.707)
  (0,-.707,1.414) -- (0,-1.414,.707)
  (-.707,1.414,0) -- (-1.414,.707,0)
  (-1.414,-.707,0) -- (-.707,-1.414,0);
\end{tikzpicture}
\end{document}

3d shape

Related Question