I need to draw multiple stages of current in a circuit, and it involves MOSFETs having current through it's channel or trhough it's body diode. I want the FET drawn with solid lines, and the body diode with dashed lines when current goes through the channel, and vice versa.
I know I could do it drawing separately the MOSFET and the diode, but I think that would take more time. Is there a way to make the tag bodydiode
have it's own line style?
To be clear, I want something like this:
However, the image above was made with separate components. I want it with this kind of component:
which is made with
\documentclass[12pt]{report}
\usepackage{tikz}
\usepackage{circuitikz}
\begin{document}
\begin{circuitikz}
\draw (0,0) node (mosfet1) [nigfete,anchor=D,bodydiode] {$Q_1$};
\end{circuitikz}
\end{document}
Best Answer
(update September 9, 2022) I have added the option for styling the body diodes for the next release 1.5.4. You can have a preview here: https://github.com/circuitikz/circuitikz/pull/651.
For versions < 1.5.4, you can use the following code to patch the body diode drawing code: