[Tex/LaTex] clip in TikZ leaves a faint outline of clip region even after filling with white!

path-clippingtikz-pgf

I have three circles A, B, C whose centers are collinear and equally spaced. I would like to clip the region which is inside the middle circle, but outside the other two. I do a poor man's version of this by clipping the inside circle and simply filling the inside of the other two circles with white. However I still see an outline of the middle circle in the region which was filled!? Here is a hopefully MWE.

\documentclass{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[x=1mm,y=1mm,scale=5]
\coordinate (A) at (-6.928,0);
\coordinate (B) at (0,0);
\coordinate (C) at (6.928,0);
\clip (B) circle (6.0);
\draw[ultra thick] (B) circle (6.0);
\filldraw [fill=white,draw=black,thick] (A) circle (6);
\filldraw [fill=white,draw=black,thick] (C) circle (6);
\end{tikzpicture}
\end{document}

And the result is the following, which shows the faint outline of the clipping region. What am I missing?!

enter image description here

Best Answer

You say "I would like to clip the region which is inside the middle circle, but outside the other two". Using answers from this question, and this one, you can do it by using a reverseclip like this :

\documentclass[border=1cm]{standalone}
\usepackage{tikz}

\tikzset{
  reverseclip/.style={insert path={(-99cm,-99cm) rectangle (99cm,99cm)}}
}
\begin{document}
  \begin{tikzpicture}[x=1mm,y=1mm,scale=5]

    %before the clip
    \fill[blue!30] (-10,-10) rectangle (10,10);

    \coordinate (A) at (-6.928,0);
    \coordinate (B) at (0,0);
    \coordinate (C) at (6.928,0);

    % clip
    \begin{pgfinterruptboundingbox}
      \clip (B) circle (6.0);
      \clip[reverseclip] (A) circle (6);
      \clip[reverseclip] (C) circle (6);
    \end{pgfinterruptboundingbox}

    % after the clip
    \fill [orange] (-10,-10) rectangle (10,10);

  \end{tikzpicture}
\end{document}

enter image description here

But if what you want is to understand why you see the outline of the middle circle, then my answer will not helps you.

UPDATE: Here are original next to reversclipped figures:

\documentclass[border=7mm,varwidth]{standalone}
\usepackage{tikz}

\tikzset{
  reverseclip/.style={insert path={(-99cm,-99cm) rectangle (99cm,99cm)}}
}
\begin{document}
  \begin{tikzpicture}[x=1mm,y=1mm,scale=5]
    \coordinate (A) at (-6.928,0);
    \coordinate (B) at (0,0);
    \coordinate (C) at (6.928,0);
    \clip (B) circle (6.0);
    \draw[ultra thick] (B) circle (6.0);
    \filldraw [fill=white,draw=black,thick] (A) circle (6);
    \filldraw [fill=white,draw=black,thick] (C) circle (6);
  \end{tikzpicture}
  \hspace{-4cm}
  \begin{tikzpicture}[x=1mm,y=1mm,scale=5]
    \coordinate (A) at (-6.928,0);
    \coordinate (B) at (0,0);
    \coordinate (C) at (6.928,0);

    % clip
    \begin{pgfinterruptboundingbox}
      \clip (B) circle (6.0);
      \clip[reverseclip] (A) circle (6);
      \clip[reverseclip] (C) circle (6);
    \end{pgfinterruptboundingbox}

    % after the clip
    \draw[ultra thick] (B) circle (6.0);
    \filldraw [fill=white,draw=black,thick] (A) circle (6);
    \filldraw [fill=white,draw=black,thick] (C) circle (6);
  \end{tikzpicture}
\end{document}

in Chrome :

enter image description here

and converted with ghostscript (same as Sumatra view) :

enter image description here

Related Question