\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{calc}
\begin{document}
\tikzset{%
add/.style args={#1 and #2}{to path={%
($(\tikztostart)!-#1!(\tikztotarget)$)--($(\tikztotarget)!-#2!(\tikztostart)$)%
\tikztonodes}}
}
\begin{tikzpicture}
\node [ minimum size = 1cm] (box) {};
\draw [line width = 5pt,add=0 and .1] (2cm, 2cm) to (box.east);
\node [draw, fill=white,minimum size = 1cm] {};
\end{tikzpicture}
\end{document}
second solution
\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{calc}
\begin{document}
\tikzset{%
add/.style args={#1 and #2}{to path={%
($(\tikztostart)!-#1!(\tikztotarget)$)--($(\tikztotarget)!-#2!(\tikztostart)$)%
\tikztonodes}}
}
\begin{tikzpicture}
\node [draw, fill=white,minimum size = 1cm] (box) {};
\clip (box.south east) rectangle (2.1cm, 2.1cm);
\draw [line width = 5pt,add=0 and .1] (2cm, 2cm) to (box.east);
\end{tikzpicture}
\end{document}
Third solution
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{calc,backgrounds}
\begin{document}
\tikzset{%
add/.style args={#1 and #2}{to path={%
($(\tikztostart)!-#1!(\tikztotarget)$)--($(\tikztotarget)!-#2!(\tikztostart)$)%
\tikztonodes}}
}
\begin{tikzpicture}
\draw[help lines] (0,0) grid (2,2);
\node [draw,minimum size = 1cm,fill=white] (box) {};
\begin{pgfonlayer}{background}
\draw [line width = 5pt,add=0 and .1] (2cm, 2cm) to (box.east);
\end{pgfonlayer}
\end{tikzpicture}
\end{document}
Fourth version With reverseclip
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[remember picture]
% A path that follows the edges of the current page
\tikzstyle{reverseclip}=[insert path={(current page.north east) --
(current page.south east) --
(current page.south west) --
(current page.north west) --
(current page.north east)}
]
\node [draw, minimum size = 1cm,inner sep=0pt,ultra thick,red] (box) at (.5cm,.5cm){};
\coordinate (D) at (box.north west);
\coordinate (C) at (box.north east);
\coordinate (B) at (box.south east);
\coordinate (A) at (box.south west);
\begin{pgfinterruptboundingbox}
\path [clip] (A) -- (B) -- (C) -- (D) -- cycle [reverseclip];
\end{pgfinterruptboundingbox}
\draw [line width = 15pt] (.5cm, 1.5cm) to (.8cm,-.5cm);
\end{tikzpicture}
\end{document}
