[Tex/LaTex] Fuse symbol with TikZ

symbolstikz-pgf

I am using the circuits.ee.IEC library. However, I cannot find any fuse symbol like this:

fuse symbol

How can I define such a symbol using circuit declare symbol? It should be just combining the resistor symbol and a line in some way, but I don't understand the syntax well enough to do this.

Best Answer

A different approach would be to append code after the resistor node, similar to the light emitting and direction info styles:

\documentclass{standalone}

\usepackage{tikz}
\usetikzlibrary{circuits.ee.IEC}

\begin{document}

\tikzset{
    fuse graphic/.style={
        append after command={% At the end of the \draw command, do the following
            \bgroup % Start a new group
                [current point is local=true, % Do not influence the current point on the path
                every fuse/.try, % If `every fuse` has been defined, use it
                #1] % Apply options supplied by user
                (\tikzlastnode.west) edge [line to] (\tikzlastnode.east) % An edge, i.e. an independent path, from the west to the east of the resistor node
            \egroup% End the group
        }
    },
    fuse/.style={resistor={fuse graphic=#1}} % The fuse is just a resistor node with the `fuse graphics` key
}


\begin{tikzpicture}[circuit ee IEC]
    \draw (0,0) to [fuse] (2,0)  to [fuse] (0,-2) to [fuse] (0,0);
  \end{tikzpicture}


\end{document}