How can I use a tikz folding library to create a box that does not have regular faces?. For instance, consider this sketch:
I need first to create a trapezoid face to use it with the folding library. This is my first attempt:
\documentclass[11pt]{article}
\usepackage{tikz}
\usetikzlibrary{folding}
\makeatletter
\def\tikz@lib@fold@trapecio#1#2#3#4#5{%
\begin{scope}[xshift=.5\tikz@lib@fold@length,yshift=.5\tikz@lib@fold@length]
#1
\end{scope}
\begin{scope}[yshift=0.8\tikz@lib@fold@length,rotate=20]
#2
\node{Edge A};
\end{scope}
\begin{scope}[xshift=\tikz@lib@fold@length,yshift=\tikz@lib@fold@length,rotate=-90]
#3
\node{Edge B};
\end{scope}
\begin{scope}[xshift=\tikz@lib@fold@length,rotate=180]
#4
\node{Edge C};
\end{scope}
\begin{scope}[rotate=90]
#5
\node{Edge D};
\end{scope}
}
\def\tikzfoldingtetrahedron#1[#2]#3;{%
\begingroup%
\tikzset{#2}%
\tikz@lib@fold@trapecio
{\tikz@lib@fold@face@A}
{\tikz@lib@fold@path}
{\tikz@lib@fold@path}
{\tikz@lib@fold@path}
{\tikz@lib@fold@path}
\endgroup
}
\makeatother
\begin{document}
\begin{tikzpicture}[scale=1]
\path pic [
folding line length=4cm,
transform shape,
numbered faces
]
{tetrahedron folding};
\end{tikzpicture}
\end{document}
Please, ignore the tetrahedron name, I didn't realize how to define a new folding name. The code gives this picture:
How can I fix the connecting lines between the edges? Even if I compute the proper angles, I need two or more different folding lengths. In all the folding library examples I have seen, there is only one folding length.
\usetikzlibrary{folding}
.)