Tikz 中的断箭 - 两线框图

Tikz 中的断箭 - 两线框图

我想制作一个两条线的框图,并且连接这两条线对我来说很困难,因为我是 Tikz 的初学者,这是我的代码,我能做的最好的事情: 在此处输入图片描述

    \documentclass{article}
    \usepackage{schemabloc} 
    \usetikzlibrary{circuits}
    \usepackage{verbatim}
    \begin{document}

        \begin{tikzpicture}[cross/.style={path picture={ 
                \draw[black]
                (path picture bounding box.south east) -- (path picture bounding box.north west) (path picture bounding box.south west) -- (path picture bounding box.north east);
            }}]
            \sbEntree{E}
            \sbBloc[8]{fir1}{$FIR_1$}{E}
            \sbRelier[ADC Output]{E}{fir1}
            \sbBlocL{dec1}{$\downarrow 2$}{fir1}    
            \sbBlocL{fir2}{$FIR_2$}{dec1}
            \sbBlocL{dec2}{$\downarrow 2$}{fir2}    

            \node[draw,circle,cross,minimum width=1 cm, right of=dec2, node distance = 5em ](mixer){};
            \sbRelier{dec2}{mixer}
            \node[above of=mixer, node distance = 5em](fi){$Sin(2\pi f_It)$};

            %   \sbBloc[12]{fir3}{$FIR_3$}{E}
            \node [draw, rectangle, minimum height=3em, minimum width=3em, below of=fir1, node distance = 5em ](fir3){$FIR_3$};
            \node [draw, rectangle, minimum height=3em, minimum width=3em, right of=fir3, node distance = 5em ](dec3){$\downarrow R_3$};
            \node [draw, rectangle, minimum height=3em, minimum width=3em, right of=dec3, node distance = 7em ](resa){Resampling};  
            \sbRelier{fir3}{dec3}       
            \sbRelier{dec3}{resa}

            \draw[->] (fi) -- (mixer);
            \node [ right of=mixer](a){};
            \node [ below of=a](b){};
            \node [ below of=E](c){};
            \node [ below of=c, node distance=-6pt](d){};
            \draw[->] (mixer) |- (d) ;
            \draw[->] (d) |- (fir3);
            %   \draw[-] (c) -- (d);
            \end{tikzpicture}
    \end{document}

答案1

由于您在上述评论中收到了答案,因此此答案更侧重于 off.topis 问题:如何简单地使用 MWE、使用最新语法以及数学运算符的正确名称。对于所做的更改,我使用了两个 TikZ 库:calcpositioning。当然,在下面的 MWE 中使用(仅一个)坐标而不是空节点:

\documentclass{article}
\usepackage{schemabloc}
\usetikzlibrary{calc,
                positioning}
%\usepackage{verbatim}
    \newcommand\ppbb{path picture bounding box}

\begin{document}

\begin{tikzpicture}[
node distance = 3em and 2em,
mixer/.style = {circle, draw, minimum size=3em,
    path picture={\draw[black]  (\ppbb.south east) -- (\ppbb.north west)
                                (\ppbb.south west) -- (\ppbb.north east);},
    node contents={}
              },
block/.style = {draw, rectangle, minimum height=3em, minimum width=3em}
              ]
\sbEntree{E}
\sbBloc[8]{fir1}{$FIR_1$}{E}
\sbRelier[ADC Output]{E}{fir1}
\sbBlocL{dec1}{$\downarrow 2$}{fir1}
\sbBlocL{fir2}{$FIR_2$}{dec1}
\sbBlocL{dec2}{$\downarrow 2$}{fir2}

\node (mixer)   [mixer,right=of dec2];
\sbRelier{dec2}{mixer}
\node (fi)      [above=of mixer] {$\sin(2\pi f_It)$};

%   \sbBloc[12]{fir3}{$FIR_3$}{E}
\node (fir3) [block, below=of fir1] {$FIR_3$};
\node (dec3) [block, right=of fir3] {$\downarrow R_3$};
\node (resa) [block, right=of dec3] {Resampling};
\sbRelier{fir3}{dec3}
\sbRelier{dec3}{resa}
%
\coordinate[left=of $(fir1.west)!0.5!(fir3.west)$] (a);

\draw[->] (fi) -- (mixer);
\draw[->] (mixer) |- (a)  |- (fir3);
\end{tikzpicture}
\end{document}

在此处输入图片描述

相关内容