![如何让边缘跳跃 tikz](https://linux22.com/image/440008/%E5%A6%82%E4%BD%95%E8%AE%A9%E8%BE%B9%E7%BC%98%E8%B7%B3%E8%B7%83%20tikz.png)
我正在尝试将箭头传递到图像上的节点上方并加入“饱和度”块。如果你有想法,我很感兴趣。第二件事,我希望在到达总和的西边之前在箭头上放置第二个直角。任何帮助都会受到欢迎
代码如下:
\documentclass[border=0.2cm]{standalone}
% More defined colors
\usepackage[dvipsnames]{xcolor}
\usepackage{comment}
% Required package
\usepackage{tikz}
\usepackage{tabularx}
\usetikzlibrary{fit,positioning,shapes,arrows,decorations.pathreplacing}
\begin{document}
\tikzstyle{pinstyle}=[pin edge={to-,thin,black}]
\begin{tikzpicture}
%% B
%%sum
\foreach \i in{1,2,3}{
\node[draw,
circle,
minimum size=0.6cm] at (0.5*\i,-1*\i ) (sum\i) {};
\draw (sum\i.north east) -- (sum\i.south west)
(sum\i.north west) -- (sum\i.south east);
\draw (sum\i.north east) -- (sum\i.south west)
(sum\i.north west) -- (sum\i.south east);
\node[above=-1pt] at (sum\i.center){\tiny $+$};
\node[left=-1pt] at (sum\i.center){\tiny $-$};
}
%%fast non linear
\node[draw,rectangle,minimum width=1cm,minimum height=3cm,align=center,right=1.5 of sum2] (saturation) {Saturation \& \\ limiteur de taux};
\node[draw,rectangle,fill=green!60!black,minimum width=1cm,minimum height=3cm,align=center,right=1.5 of saturation] (fast) {Modèle \\ non linéaire \\ FAST};
\node[draw,rectangle, minimum size = 1.5cm, align=center, above left=of fast.north west ] (cpb){Contrôle \\ CPB};
\node[draw,rectangle, minimum size = 1.5cm, align=center, below left=of fast.south west ] (ipb){Contrôle \\ IPB};
%%Arrow
\draw[-stealth] ([yshift=20pt]fast.east) -- ++ (1cm,0) |- (cpb.east)
node[midway,above]{};
\draw[-stealth] ([yshift=-20pt]fast.east) -- ++ (1cm,0) |- (ipb.east)
node[midway,above]{};
\draw[-stealth] ([yshift=10pt]ipb.west) -- ++ (-0.5cm,0) -|(sum3.west) node[midway,above]{};
\draw[-stealth] ([yshift=0pt]ipb.west) -- ++ (-0.5cm,0) -| (sum2.west) node[midway,above]{};
\draw[-stealth] ([yshift=-10pt]ipb.west) -- ++ (-0.5cm,0) -| (sum1.west) node[midway,above]{};
%%arrow cpb
\draw[-stealth] (cpb.west) -- ++ (-0.5cm,0) -| (sum1.north) node[midway,above]{};
\draw[-stealth] (cpb.west) -- ++ (-0.5cm,0) -| (sum2.north) node[midway,above]{};
\draw[-stealth] (cpb.west) -- ++ (-0.5cm,0) -| (sum3.north) node[midway,above]{};
\end{tikzpicture}
\end{document}
答案1
我认为这当然是按需解决方案,但它显示了使用箭头解决问题的不正当手段。
这应该可以通过编写自动绘制桥梁的命令来改进。
\documentclass[crop=true]{standalone}
\usepackage{tikz}
\usetikzlibrary{intersections}
\usetikzlibrary{positioning}
\usetikzlibrary{fit}
\usetikzlibrary{calc,arrows.meta}
\begin{document}
\centering
\begin{tikzpicture}
\draw[red,thick] (2,0)coordinate(A) -- ++(0,-3);
\draw[red,thick] (3,0)coordinate(B) -- ++(0,-3);
\draw[ultra thick,-{Arc Barb[harpoon,reversed]}] (0,-1) coordinate(C)-- (A|-C);
\draw[ultra thick,{Arc Barb[harpoon,reversed,right]}-{Arc Barb[harpoon,reversed]}] (A|-C) -- (B|-C);
\draw[ultra thick,{Arc Barb[harpoon,reversed,right]}-] (B|-C) -- ++(2,0);
\end{tikzpicture}
\end{document}