答案1
这是一种手动方法,可以找到两个节点的路径之间的交点,然后通过删除重叠部分再次绘制轮廓。
代码
\documentclass[tikz]{standalone}
\usetikzlibrary{intersections, shapes.arrows, spath3}
\begin{document}
\begin{tikzpicture}
\node [rectangle, minimum height=1cm, above] [spath/save global=rect] (a) {};
\node [single arrow, minimum height=1.5cm] [spath/save global=arro] (r) {};
\tikzset{spath/.cd,
split at intersections={rect}{arro},
remove components={rect}{2},
remove components={arro}{1},
}
\draw[thick, spath/.cd, use=rect, use={arro, weld}, adjust and close=current];
\end{tikzpicture}
\end{document}