我正在尝试制作一个 S 形箭头来避开图中的节点。我可以放一个角,但不知道如何放多个。我尝试过这个答案但无法用我的代码进行编译。
\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{positioning,shapes,arrows, calc}
\tikzstyle{startstop} = [rectangle, rounded corners, minimum width=3cm, minimum height=1cm,text centered, draw=black]
\tikzstyle{io} = [trapezium, trapezium left angle=70, trapezium right angle=110, minimum width=3cm, minimum height=1cm, text centered, draw=black]
\tikzstyle{process} = [rectangle, minimum width=3cm, minimum height=1cm, text centered, draw=black]
\tikzstyle{decision} = [diamond, minimum width=3cm, minimum height=1cm, text centered, draw=black]
\tikzstyle{arrow} = [thick,->,>=stealth]
\begin{document}
\begin{tikzpicture}[node distance=1cm]
\node (start) [startstop] {Camera};
\node (Transmitter) [process, right =of start] {Transmitter};
\node (Receiver) [process, below =of start, yshift = -2cm] {Receiver};
\node (Computer) [process, right =of Receiver] {Computer};
\node (Field) [process, below =of $(start)!0.5!(Transmitter)$] {Field};
\draw [arrow] (start) -- (Transmitter);
\draw [dotted] (Transmitter) |- (Receiver);
\draw [arrow] (Receiver) -- (Computer);
\draw[arrow] (Field) -> node[left]{}($(start)!0.5!(Transmitter)$);
\end{tikzpicture}
\end{document}
答案1
像这样吗?
我刚刚将|-
和连接器与和节点-|
之间的一个点一起使用。以下是完整代码:start
Computer
\documentclass[tikz, border=5mm]{standalone}
\usetikzlibrary{positioning,shapes,arrows, calc}
\tikzstyle{startstop} = [rectangle, rounded corners, minimum width=3cm, minimum height=1cm,text centered, draw=black]
\tikzstyle{io} = [trapezium, trapezium left angle=70, trapezium right angle=110, minimum width=3cm, minimum height=1cm, text centered, draw=black]
\tikzstyle{process} = [rectangle, minimum width=3cm, minimum height=1cm, text centered, draw=black]
\tikzstyle{decision} = [diamond, minimum width=3cm, minimum height=1cm, text centered, draw=black]
\tikzstyle{arrow} = [thick,->,>=stealth]
\begin{document}
\begin{tikzpicture}[node distance=1cm]
\node (start) [startstop] {Camera};
\node (Transmitter) [process, right =of start] {Transmitter};
\node (Receiver) [process, below =of start, yshift = -2cm] {Receiver};
\node (Computer) [process, right =of Receiver] {Computer};
\node (Field) [process, below =of $(start)!0.5!(Transmitter)$] {Field};
\draw [arrow] (start) -- (Transmitter);
%\draw [dotted] (Transmitter) |- (Receiver);
\draw [arrow] (Receiver) -- (Computer);
\draw[arrow] (Field) -> node[left]{}($(start)!0.5!(Transmitter)$);
\draw[rounded corners, arrow]
(Receiver.north) |- ($ (start)!0.7!(Computer) $)
-| (Transmitter.south);
\end{tikzpicture}
\end{document}