# Correction of calculation error to produce a more appealing rounded end of line joins

From the answers to this and this questions, I used the following code to draw a cross, which produced an extended rounded corners. I understood that this is due to a calculation error, but I could not figure out which measures to adjust.

\documentclass{beamer}
\usepackage{verbatim}
\usepackage{tikz}
\begin{document}
\begin{frame}[t]
\frametitle{Coptic Cross original final (question applied)}
\begin{tikzpicture}[line join=round, line cap=round]
\def\edge{
(.5,.5) to [out=90,in=-160] ++ (1,1.45) to [out=130,in=0] ++ (-1,.35) to [out=90,in=-20] ++ (-.5,.8) to [out=-160,in=90] ++ (-.5,-.8) to [out=180,in=50] ++ (-1,-.35) to [out=-20,in=90] ++ (1,-1.45)}
\draw[line width=.1cm,blue, fill=blue!40!white, opacity=.6, rounded corners=.1cm] (.5,.5) foreach \i in {0,90,180,270}{[rotate=\i] -- \edge} -- cycle;
\end{tikzpicture}
\end{frame}
\end{document}


The problem does not come from a calculation error, but from the fact that you use rounded corners and paths of length 0. Just get rid of those paths.

\documentclass{beamer}
\usepackage{verbatim}
\usepackage{tikz}
\begin{document}
\begin{frame}[t]
\frametitle{Coptic Cross original final (question applied)}
\begin{tikzpicture}[line join=round, line cap=round]
\def\edge{
(.5,.6) to [out=90,in=-160] ++ (1,1.45) to [out=130,in=0] ++ (-1,.35) to
[out=90,in=-20] ++ (-.5,.8) to [out=-160,in=90] ++ (-.5,-.8) to [out=180,in=50]
++ (-1,-.35) to [out=-20,in=90] ++ (1,-1.45)}
\draw[line width=.1cm,blue, fill=blue!40!white, opacity=.6, rounded
corners=.1cm] (.5,.6) foreach \i in {0,90,180,270}{[rotate=\i] -- \edge} --
cycle;
\end{tikzpicture}
\end{frame}
\end{document}


Another way to go is to switch the rounded corners off and on as needed.

\documentclass{beamer}
\usepackage{verbatim}
\usepackage{tikz}
\begin{document}
\begin{frame}[t]
\frametitle{Coptic Cross original final (question applied)}
\begin{tikzpicture}[line join=round, line cap=round]
\def\edge{
(0,3.1) to [out=-160,in=90] ++ (-.5,-.8)
[rounded corners=2pt]
to [out=180,in=50] ++ (-1,-.35)
to [out=-20,in=90] ++ (1,-1.45)
to [out=180,in=-70] ++ (-1.45,1)
to [out=220,in=90] ++ (-.35,-1) [sharp corners]
to [out=180,in=70] ++ (-.8,-.5)
}
\draw[line width=.1cm,blue, fill=blue!40!white, opacity=.6]
(0,3.1) foreach \i in {0,90,180,270}{[rotate=\i] -- \edge} --
cycle;
\end{tikzpicture}
\end{frame}
\end{document}


• Thank you very much. – Hany Dec 11 '19 at 7:42
• @Hany You're welcome! – Schrödinger's cat Dec 11 '19 at 7:55