I used the \centerarc command provided in this answer to fill a region enclosed by arcs. I have made a slight modification. I have removed the \draw inside the definition and the first parameter.
MWE:
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{calc}
\begin{document}
\centering
\begin{tikzpicture}
\def\centerarc(#1)(#2:#3:#4){ ($(#1)+({#4*cos(#2)},{#4*sin(#2)})$) arc (#2:#3:#4); }
\coordinate (A) at (0,0);
\coordinate (B) at (1.6,0);
\coordinate (C) at (4,-2.5);
\draw \centerarc(0,0)(48.23:60:1.6);
\draw \centerarc(1.6,0)(120:180:1.6);
\draw \centerarc(4,-2.5)(128.47:147.99:4.72);
\fill[red]\centerarc(0,0)(48.23:60:1.6) -- \centerarc(1.6,0)(120:180:1.6) -- \centerarc(4,-2.5)(128.47:147.99:4.72);
\end{tikzpicture}
\end{document}
The command \centerarc works perfectly when I use \draw. But when I try to use \fill, it just prints the command as text.
Why is this happening and is there a workaround?
;at the end of the definition of\centerarc. It's closing the path prematurely. – Phelype Oleinik Mar 19 '19 at 11:55