[Tex/LaTex] How to cut out a scope using “even odd rule”


I have a predefined geometry \big_area and want to fill it out cutting another predefined piece \cut_this_out from it. And I want to cut a whole "scope" from it and not an explicit definition of a shape.

\def \cutout {(0,0) --++ (3.5,0) --++ (0,7) --++ (-3.5,0) --++(0,-7)}

\def \mycircle {(0,0) circle (10)}


%This works
\fill[even odd rule] \mycircle \cutout;

%This doesn't work
%\fill[even odd rule] \mycircle \begin{scope}[xshift=1cm] \cutout \end{scope};


How do I do this?

Best Answer

One option with scopes library

%\usetikzlibrary{scopes} %<---- Somewhere in the preamble

\def\big_area{(0,0) circle (3)}
\def\cut_this_out{(0,0) circle (1)}
%\draw[fill, even odd rule] \big_area \cut_this_out;

\draw[fill, even odd rule] \big_area {[shift={(3cm,2cm)}]\cut_this_out};

For your own sanity, don't use underscores in TeX macro names.

Related Question