使用 TikZ 的阀门和泵符号

使用 TikZ 的阀门和泵符号

我想知道是否有泵和阀门符号的库。我想使用 TikZ 绘制以下示意图。

泵站

使用类似这样的方法:

\documentclass{standalone}

\usepackage{VALVEPUMPPACAKGE}

\begin{document}

  \begin{tikzpicture}

    \draw (0,0)  to[pump] (2,0) -- (4,0) to[valve] (4,-2);

   \end{tikzpicture}

\end{document}

答案1

我的解决方案是逐行绘制。

\documentclass[border=2pt,tikz]{standalone}

\newcommand{\valve}[3]{%
    \draw (#1-.5,#2) -- (#1+.5,#2) -- (#1-.5,#2-2) -- (#1+.5,#2-2) -- cycle;
    \draw (#1,#2-1) -- (#1-.5,#2-1);
    \draw (#1-.5,#2-1.45) rectangle (#1-1.25,#2-.65);
    \node at (#1-2.5,#2-1) {\bf #3};
}

\newcommand{\process}[3]{%
    \draw [rounded corners=1.5mm] (#1-.5,#2) rectangle (#1+.5,#2-2);
    \node at (#1-2,#2-1) {\bf #3};
}

\begin{document}
\begin{tikzpicture}

    \begin{scope}[ultra thick]

        %% pump
        \draw (0,-.2) --  (2,-.2) -- (1,.8) -- (0,-.2);
        \filldraw [color=white,draw=black](1,1) circle (1cm);
        \draw [->] (-2,1) -- (1,1);
        \draw [->] (1,2) -- (2,2);
        \node at (1,-.75) {\bf Pump};

        \draw (2,2) -- (6,2);
        \draw (6,2) -- (6,-2);

        % <- valve 1

        \draw (6,-4) -- (6,-6);

        % <- process 1

        \draw (6,-8) -- (6,-10) -- (-2,-10);
        \draw (6,2) -- (12,2) -- (12,-2);

        % <- valve 2

        \draw (12,-4) -- (12,-6);

        % <- process 2

        \draw (12,-8) -- (12,-10) -- (6,-10);

    \end{scope}

    \begin{scope}[thick]

        \valve{6}{-2}{Valve 1}
        \process{6}{-6}{Process 1}
        \valve{12}{-2}{Valve2}
        \process{12}{-6}{Process 2}

    \end{scope}

\end{tikzpicture}
\end{document}

泵站

相关内容