I am trying to draw inside a node and connect lines to its anchors. With a rectangular shape it works just fine, but when I try to connect two lines face-to-face, as in the example below, a gap remains. Can somebody help me an tell me how do get rid of the gap?
The [draw] around the Node is just for orientation, I want to keep the boundary invisible.
Thanks for your help in advance!
\documentclass[tikz]{standalone}
\begin{document}
\begin{tikzpicture}
% define macro for drawing inside node
\newcommand{\myMacro}[1]{
\tikz[]{
\draw[thick] ([xshift=0.2mm]2*#1,0)
-- (2*#1,0)
arc (0:180:2*#1)
-- ([xshift=-0.2mm]-2*#1,0);
\draw[thick] (0,0) circle (#1);
\draw[thick] (0,-#1) -- (0,-2*#1);
}
}
% node with drawing inside
\node[inner sep=0, minimum size=0, outer sep=0, draw=black!20, very thin](n1) at (0,0) {\myMacro{0.15}};
% connect lines to node.
% blue circle: connection like it's supposed to be
% red circle: connection with gap! :-(
\draw[thick] (n1.west) node[draw=red, circle, inner sep=0.05cm, thin]{} -- ++(-0.5,0);
\draw[thick] (n1.east) -- ++(0.5,0);
\draw[thick] (n1.south) -- ++(0,-0.5);
\draw[thick] (n1.north) node[draw=blue, circle, inner sep=0.05cm, thin]{} -- ++(0,0.5);
\end{tikzpicture}
\end{document}