From efcd5e8347b47e3d90125f8e4c13d5fcc236ee00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20K=C3=A4berich?= Date: Mon, 21 Sep 2020 18:49:17 +0200 Subject: [PATCH] Blockdiagrams --- .../DeveloperInfo/DigitalBlockdiagram.pdf | Bin 0 -> 46086 bytes .../DeveloperInfo/DigitalBlockdiagram.tex | 222 + .../DeveloperInfo/PowerBlockdiagram.pdf | Bin 0 -> 56913 bytes .../DeveloperInfo/PowerBlockdiagram.tex | 246 + .../DeveloperInfo/RFBlockdiagram.pdf | Bin 0 -> 51887 bytes .../DeveloperInfo/RFBlockdiagram.tex | 400 + Documentation/DeveloperInfo/circuitikzgit.sty | 16743 ++++++++++++++++ 7 files changed, 17611 insertions(+) create mode 100644 Documentation/DeveloperInfo/DigitalBlockdiagram.pdf create mode 100644 Documentation/DeveloperInfo/DigitalBlockdiagram.tex create mode 100644 Documentation/DeveloperInfo/PowerBlockdiagram.pdf create mode 100644 Documentation/DeveloperInfo/PowerBlockdiagram.tex create mode 100644 Documentation/DeveloperInfo/RFBlockdiagram.pdf create mode 100644 Documentation/DeveloperInfo/RFBlockdiagram.tex create mode 100644 Documentation/DeveloperInfo/circuitikzgit.sty diff --git a/Documentation/DeveloperInfo/DigitalBlockdiagram.pdf b/Documentation/DeveloperInfo/DigitalBlockdiagram.pdf new file mode 100644 index 0000000000000000000000000000000000000000..9ceb8ea9cc88a3d1cdca4c2c62c58264375656c5 GIT binary patch literal 46086 zcma%=LzE^=(51`nF59+k+qP}nwr#t*Y}64GGV8r4sD0; zUr{}zdx{bA02bkm4YWA3#2I{2ey#ocewd!PWSE2ubSTFMMJ6$j9^Piwck|u}>kUeA zcYJV|;_DUU;Ouwc`|^IBoPFKBfnDe7?ECcg#=f_&Pv`J&=={7NUk8}*Xe!4*NW^}s z+50Hob*Kg5%=vpVQ79TOpX#dIM*1iCd|s+(Hcf(#vY^9F72u>>Z81ZP76D8e6DhCN zQwg3h(#@Cp>hbhqrAzP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(6~fiw_R_+Mk_ Z>|*5P;^72~8jusn$%RZsC9WWW{BMQ)Y}fz* literal 0 HcmV?d00001 diff --git a/Documentation/DeveloperInfo/PowerBlockdiagram.tex b/Documentation/DeveloperInfo/PowerBlockdiagram.tex new file mode 100644 index 0000000..8fceffb --- /dev/null +++ b/Documentation/DeveloperInfo/PowerBlockdiagram.tex @@ -0,0 +1,246 @@ +\documentclass[border=10pt]{standalone} +\usepackage{tikz} +\usepackage[european,siunitx,rotatelabels]{circuitikzgit} +\usetikzlibrary{arrows,calc,positioning} + +\newcommand{\divider}[1] +{ % #1 = name +\begin{scope}[transform shape] +\draw[thick] (#1)node[](a){} +(-12pt,-12pt) rectangle +(12pt,12pt); +\draw (a)+(12pt, 12pt)--+(-12pt,-12pt); +\draw (a)+(-5pt,6pt) node[](){\footnotesize -45}; +\draw (a)+(4pt,-7pt) node[](){\footnotesize +45}; +\end{scope} +} + + +\newlength{\ResUp} \newlength{\ResDown} +\newlength{\ResLeft} \newlength{\ResRight} +\newlength{\ResRadius} \newlength{\ResMiddle} + +\makeatletter +%%%% new anchors: "out A" and "out B" +\expandafter\def\csname pgf@anchor@rectangle@out A\endcsname{% output A: below .east + \pgf@process{\southwest}% + \pgf@ya=0.25\pgf@y% + \pgf@process{\northeast}% + \pgf@y=0.75\pgf@y% + \advance\pgf@y by\pgf@ya }% end of out A +\expandafter\def\csname pgf@anchor@rectangle@out B\endcsname{% output B: above .east + \pgf@process{\southwest}% + \pgf@ya=0.75\pgf@y% + \pgf@process{\northeast}% + \pgf@y=0.25\pgf@y% + \advance\pgf@y by\pgf@ya } % end of out B +\expandafter\def\csname pgf@anchor@rectangle@DUT\endcsname{% output DUT: above .east + \pgf@process{\southwest}% + \pgf@ya=0.1\pgf@y% + \pgf@process{\northeast}% + \pgf@y=0.9\pgf@y% + \advance\pgf@y by\pgf@ya } % end of DUT +\expandafter\def\csname pgf@anchor@rectangle@ret p\endcsname{% output ret p: above .east + \pgf@process{\northeast}% + \pgf@ya=0.9\pgf@y% + \pgf@process{\southwest}% + \pgf@y=0.1\pgf@y% + \advance\pgf@y by\pgf@ya } % end of ret p +\expandafter\def\csname pgf@anchor@rectangle@ret n\endcsname{% output ret n: above .east + \pgf@process{\northeast}% + \pgf@ya=0.7\pgf@y% + \pgf@process{\southwest}% + \pgf@y=0.3\pgf@y% + \advance\pgf@y by\pgf@ya } % end of ret n +\expandafter\def\csname pgf@anchor@rectangle@ret c\endcsname{% output ret c: above .east + \pgf@process{\northeast}% + \pgf@ya=0.8\pgf@y% + \pgf@process{\southwest}% + \pgf@y=0.2\pgf@y% + \advance\pgf@y by\pgf@ya } % end of ret c + + +\def\TikzBipolePath#1#2{\pgf@circ@bipole@path{#1}{#2}} +\def\CircDirection{\pgf@circ@direction} +%\pgf@circ@Rlen = \pgfkeysvalueof{/tikz/circuitikz/bipoles/length} +\let\ResLen=\pgf@circ@Rlen +\makeatother + +\newcommand{\Compass}% define anchors for compass points +{\anchor{north east}{\northeast} +\anchor{south west}{\southwest} +\anchor{north}{\pgfextracty{\ResUp}{\northeast}\pgfpoint{0cm}{\ResUp}} +\anchor{north west}{\pgfextracty{\ResUp}{\northeast}\pgfextractx{\ResLeft}{\southwest}\pgfpoint{\ResLeft}{\ResUp}} +\anchor{west}{\pgfextractx{\ResLeft}{\southwest}\pgfpoint{\ResLeft}{0cm}} +\anchor{south}{\pgfextracty{\ResDown}{\southwest}\pgfpoint{0cm}{\ResDown}} +\anchor{south east}{\pgfextracty{\ResDown}{\southwest}\pgfextractx{\ResRight}{\northeast}\pgfpoint{\ResRight}{\ResDown}} +\anchor{east}{\pgfextractx{\ResRight}{\northeast}\pgfpoint{\ResRight}{0cm}}} + +% ***************************** ADC ********************************* +% extra anchors out,in1,in2,vref + +\ctikzset{bipoles/ADC/width/.initial=1} +\ctikzset{bipoles/ADC/height/.initial=.5} +\ctikzset{bipoles/ADC/middle/.initial=-.25} +\ctikzset{bipoles/ADC/part/.initial={}} + +\def\drawADC{% used by both bipole and node + \ResRight=\ctikzvalof{bipoles/ADC/width}\ResLen + \ResRight=0.5\ResRight + \ResLeft=-\ResRight + \ResUp=\ctikzvalof{bipoles/ADC/height}\ResLen + \ResUp=0.5\ResUp + \ResDown=-\ResUp + \ResMiddle=\ctikzvalof{bipoles/ADC/middle}\ResLen + \pgfpathmoveto{\pgfpoint{\ResLeft}{0pt}} + \pgfpathlineto{\pgfpoint{\ResMiddle}{\ResUp}} + \pgfpathlineto{\pgfpoint{\ResRight}{\ResUp}} + \pgfpathlineto{\pgfpoint{\ResRight}{\ResDown}} + \pgfpathlineto{\pgfpoint{\ResMiddle}{\ResDown}} + \pgfpathlineto{\pgfpoint{\ResLeft}{0pt}} + \pgfpathclose + \pgfusepath{draw} + \pgftext{\texttt{\ctikzvalof{bipoles/ADC/part}}} +} + +\pgfcircdeclarebipole{}% no extra anchors for bipole version + {\ctikzvalof{bipoles/ADC/height}} + {ADC} + {\ctikzvalof{bipoles/ADC/height}} + {\ctikzvalof{bipoles/ADC/width}} + {\pgfsetlinewidth{\ctikzvalof{bipoles/thickness}\pgfstartlinewidth}\drawADC} + +\def\ADCpath#1{\TikzBipolePath{ADC}{#1}} +\tikzset{ADC/.style = {\circuitikzbasekey, /tikz/to path=\ADCpath, l_=#1}} + +\pgfdeclareshape{dADC}{% +\anchor{center}{\pgfpointorigin} % within the node, (0,0) is the center + +\anchor{text} % this is used to center the text in the node + {\pgfpoint{-.5\wd\pgfnodeparttextbox}{-.5\ht\pgfnodeparttextbox}} + +\savedmacro{\resize}{ % called automatically + \ResRight=\ctikzvalof{bipoles/ADC/width}\ResLen + \ResRight=0.5\ResRight + \ResLeft=-\ResRight + \ResUp=\ctikzvalof{bipoles/ADC/height}\ResLen + \ResUp=0.5\ResUp + \ResDown=-\ResUp + \ResMiddle=\ctikzvalof{bipoles/ADC/middle}\ResLen + \ResRadius=\ResMiddle% location of in1 and in2 + \advance\ResRadius by \ResLeft + \ResRadius=0.5\ResRadius +}% while these can be used for savedanchors, they will be fogotten by anchors + +\savedanchor{\northeast}{\pgfpoint{\ResRight}{\ResUp}} +\savedanchor{\southwest}{\pgfpoint{\ResLeft}{\ResDown}} + +\savedanchor\InOne{\pgfpoint{\ResRadius}{0.5\ResUp}} +\savedanchor\InTwo{\pgfpoint{\ResRadius}{0.5\ResDown}} +\savedanchor\Out{\pgfpoint{\ResRight}{0pt}} +\savedanchor\Vref{\pgfpoint{0pt}{\ResDown}} + +\Compass% standard anchors + +\anchor{in1}{\InOne} +\anchor{in2}{\InTwo} +\anchor{out}{\Out} +\anchor{vref}{\Vref} + +\foregroundpath{ + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgflinewidth} + \drawADC} +} + +\begin{document} + +\begin{circuitikz} +% Microcontroller +\node[draw, align=center] (pwrswitch) at (0,0) {Power\\Selector}; +\node[anchor=east, below left=1cm and 1cm of pwrswitch] (usb) {USB C}; +\draw[-latex] (usb.east)-|(pwrswitch.south); +\node[anchor=east, left=1cm of pwrswitch, align=center] (ext) {External\\Power}; +\draw[-latex] (ext.east)--(pwrswitch.west); +\coordinate (5V) at (1.5,0); +\draw(pwrswitch.east) to[short, -*](5V); +\node[above] at (5V) {\SI{5}{\volt}}; + +\node[draw] (boost) at (3,0) {MIC2253}; +\node[anchor=south, font=\footnotesize] at (boost.north){Boost converter}; +\draw[latex-](boost.west)--(5V); + +\node[draw,minimum height=1cm] (buck) at (3,-3) {LM3370}; +\node[anchor=south, font=\footnotesize] at (buck.north){Buck converter}; +\draw[latex-](buck.west)-|(5V); +\draw[-latex]([yshift=3mm]buck.east)--++(0.5,0)node[anchor=west](){$\SI{3.3}{\volt}_{digital}$}; +\draw[-latex]([yshift=-3mm]buck.east)--++(0.5,0)node[anchor=west](){$\SI{1.8}{\volt}_{FPGA}$}; + +\coordinate (6V) at (7,0); +\draw(boost.east) to[short, -*](6V); +\node[above] at (6V) {\SI{6}{\volt}}; + +\node[draw] (ldo1) at (9,0) {LDL212PU}; +\node[anchor=south, font=\footnotesize] at (ldo1.north){LDO}; +\draw[latex-](ldo1.west)--(6V); + +\coordinate (5VPLL) at (11,0); +\draw(ldo1.east) to[short, -*](5VPLL); +\node[above] at (5VPLL) {$\SI{5}{\volt}_{PLLs}$}; + +\node[draw] (ldo2) at (13,0) {NCP702}; +\node[anchor=south, font=\footnotesize] at (ldo2.north){LDO}; +\draw[latex-](ldo2.west)--(5VPLL); +\draw[-latex](ldo2.east)--++(0.5,0)node[anchor=west](){$\SI{3.3}{\volt}_{Source~CP}$}; + +\node[draw] (ldo3) at (13,-1) {AP2114H}; +\node[anchor=south, font=\footnotesize] at (ldo3.north){LDO}; +\draw[latex-] (ldo3.west) -- (ldo3.west-|5VPLL); +\draw (5VPLL) to [short, -*] (ldo3.west-|5VPLL); +\draw[-latex](ldo3.east)--++(0.5,0)node[anchor=west](){$\SI{3.3}{\volt}_{Source~RF}$}; + +\node[draw] (ldo4) at (13,-2) {NCP702}; +\node[anchor=south, font=\footnotesize] at (ldo4.north){LDO}; +\draw[latex-] (ldo4.west) -- (ldo4.west-|5VPLL); +\draw (5VPLL) to [short, -*] (ldo4.west-|5VPLL); +\draw[-latex](ldo4.east)--++(0.5,0)node[anchor=west](){$\SI{3.3}{\volt}_{1.LO~CP}$}; + +\node[draw] (ldo5) at (13,-3) {AP2114H}; +\node[anchor=south, font=\footnotesize] at (ldo5.north){LDO}; +\draw[latex-] (ldo5.west) -| (ldo4.west-|5VPLL); +\draw[-latex](ldo5.east)--++(0.5,0)node[anchor=west](){$\SI{3.3}{\volt}_{1.LO~RF}$}; + +\node[draw] (ldo6) at (9,-4) {LDL212PU}; +\node[anchor=south, font=\footnotesize] at (ldo6.north){LDO}; +\draw[latex-] (ldo6.west) -- (ldo6.west-|6V); +\draw (6V) to [short, -*] (ldo6.west-|6V); +\coordinate (5VADC1) at (11, -4); +\draw(ldo6.east) to [short, -*](5VADC1); +\draw[-latex](5VADC1)--++(3.3,0)node[anchor=west](){$\SI{5}{\volt}_{Port~1~ADC}$}; +\node[draw] (ldo7) at (13,-5) {NCP702}; +\node[anchor=south, font=\footnotesize] at (ldo7.north){LDO}; +\draw[latex-] (ldo7.west) -| (5VADC1); +\draw[-latex](ldo7.east)--++(0.5,0)node[anchor=west](){$\SI{1.8}{\volt}_{Port~1~ADC}$}; + +\node[draw] (ldo8) at (9,-6) {LDL212PU}; +\node[anchor=south, font=\footnotesize] at (ldo8.north){LDO}; +\draw[latex-] (ldo8.west) -- (ldo8.west-|6V); +\draw (6V) to [short, -*] (ldo8.west-|6V); +\coordinate (5VADC2) at (11, -6); +\draw(ldo8.east) to [short, -*](5VADC2); +\draw[-latex](5VADC2)--++(3.3,0)node[anchor=west](){$\SI{5}{\volt}_{Port~2~ADC}$}; +\node[draw] (ldo9) at (13,-7) {NCP702}; +\node[anchor=south, font=\footnotesize] at (ldo9.north){LDO}; +\draw[latex-] (ldo9.west) -| (5VADC2); +\draw[-latex](ldo9.east)--++(0.5,0)node[anchor=west](){$\SI{1.8}{\volt}_{Port~2~ADC}$}; + +\node[draw] (ldo10) at (9,-8) {LDL212PU}; +\node[anchor=south, font=\footnotesize] at (ldo10.north){LDO}; +\draw[latex-] (ldo10.west) -| (ldo8.west-|6V); +\coordinate (5VADC3) at (11, -8); +\draw(ldo10.east) to [short, -*](5VADC3); +\draw[-latex](5VADC3)--++(3.3,0)node[anchor=west](){$\SI{5}{\volt}_{Reference~ADC}$}; +\node[draw] (ldo11) at (13,-9) {NCP702}; +\node[anchor=south, font=\footnotesize] at (ldo11.north){LDO}; +\draw[latex-] (ldo11.west) -| (5VADC3); +\draw[-latex](ldo11.east)--++(0.5,0)node[anchor=west](){$\SI{1.8}{\volt}_{Reference~ADC}$}; + +\end{circuitikz} +\end{document} diff --git a/Documentation/DeveloperInfo/RFBlockdiagram.pdf b/Documentation/DeveloperInfo/RFBlockdiagram.pdf new file mode 100644 index 0000000000000000000000000000000000000000..798ba10bef412a9bd74f0a25bfb413781e2923ac GIT binary patch literal 51887 zcma%iQ*ZB^-@*6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{W-c-2ba~x_A!K4{^x=(K=hbR`O8F7&6`G>fwHCT5+@t3O z(PF>egoERkOX|MqK7xMf>_R?#A}zi$jQXa0g0&if*{?RKyzQQLZT;EZb*BAmY8y0b z?;4uc+h9bapIYzX7q6v4J89(q&6IzPW%`m;RdI{0W%WUGba$V#-i(W8|?i8FPW%=7yKxRXsfSUalA$!jsUQ?GHT zCAGX=P0e}bs8c0PT{4Q~XZoVn>DI=38Ot9%n@WGqXs8yf@6+raXw0cWWS*=bmJ92j zt#liS&5e>x-|8}Ml=!Tjd+B$J&Gc1r0u^unM5FX?aVwPWhqZgN|~y$JLE|FfLEf%hF3#l`N~8N^$OY zPkdI+{G$D?rit~7Zds-yZdfwCsB}5?b5D3~aDwv%B z?8X2f&KH7q58ES`IvfP;1?1o9r?v3R^C#L&>z%?|P#>C(>; literal 0 HcmV?d00001 diff --git a/Documentation/DeveloperInfo/RFBlockdiagram.tex b/Documentation/DeveloperInfo/RFBlockdiagram.tex new file mode 100644 index 0000000..b5226dc --- /dev/null +++ b/Documentation/DeveloperInfo/RFBlockdiagram.tex @@ -0,0 +1,400 @@ +\documentclass[border=10pt]{standalone} +\usepackage{tikz} +\usepackage[european,siunitx,rotatelabels]{circuitikzgit} +\usetikzlibrary{arrows,calc,positioning} + +\newcommand{\divider}[1] +{ % #1 = name +\begin{scope}[transform shape] +\draw[thick] (#1)node[](a){} +(-12pt,-12pt) rectangle +(12pt,12pt); +\draw (a)+(12pt, 12pt)--+(-12pt,-12pt); +\draw (a)+(-5pt,6pt) node[](){\footnotesize -45}; +\draw (a)+(4pt,-7pt) node[](){\footnotesize +45}; +\end{scope} +} + + +\newlength{\ResUp} \newlength{\ResDown} +\newlength{\ResLeft} \newlength{\ResRight} +\newlength{\ResRadius} \newlength{\ResMiddle} + +\makeatletter +%%%% new anchors: "out A" and "out B" +\expandafter\def\csname pgf@anchor@rectangle@out A\endcsname{% output A: below .east + \pgf@process{\southwest}% + \pgf@ya=0.25\pgf@y% + \pgf@process{\northeast}% + \pgf@y=0.75\pgf@y% + \advance\pgf@y by\pgf@ya }% end of out A +\expandafter\def\csname pgf@anchor@rectangle@out B\endcsname{% output B: above .east + \pgf@process{\southwest}% + \pgf@ya=0.75\pgf@y% + \pgf@process{\northeast}% + \pgf@y=0.25\pgf@y% + \advance\pgf@y by\pgf@ya } % end of out B +\expandafter\def\csname pgf@anchor@rectangle@DUT\endcsname{% output DUT: above .east + \pgf@process{\southwest}% + \pgf@ya=0.1\pgf@y% + \pgf@process{\northeast}% + \pgf@y=0.9\pgf@y% + \advance\pgf@y by\pgf@ya } % end of DUT +\expandafter\def\csname pgf@anchor@rectangle@ret p\endcsname{% output ret p: above .east + \pgf@process{\northeast}% + \pgf@ya=0.9\pgf@y% + \pgf@process{\southwest}% + \pgf@y=0.1\pgf@y% + \advance\pgf@y by\pgf@ya } % end of ret p +\expandafter\def\csname pgf@anchor@rectangle@ret n\endcsname{% output ret n: above .east + \pgf@process{\northeast}% + \pgf@ya=0.7\pgf@y% + \pgf@process{\southwest}% + \pgf@y=0.3\pgf@y% + \advance\pgf@y by\pgf@ya } % end of ret n +\expandafter\def\csname pgf@anchor@rectangle@ret c\endcsname{% output ret c: above .east + \pgf@process{\northeast}% + \pgf@ya=0.8\pgf@y% + \pgf@process{\southwest}% + \pgf@y=0.2\pgf@y% + \advance\pgf@y by\pgf@ya } % end of ret c + + +\def\TikzBipolePath#1#2{\pgf@circ@bipole@path{#1}{#2}} +\def\CircDirection{\pgf@circ@direction} +%\pgf@circ@Rlen = \pgfkeysvalueof{/tikz/circuitikz/bipoles/length} +\let\ResLen=\pgf@circ@Rlen +\makeatother + +\newcommand{\Compass}% define anchors for compass points +{\anchor{north east}{\northeast} +\anchor{south west}{\southwest} +\anchor{north}{\pgfextracty{\ResUp}{\northeast}\pgfpoint{0cm}{\ResUp}} +\anchor{north west}{\pgfextracty{\ResUp}{\northeast}\pgfextractx{\ResLeft}{\southwest}\pgfpoint{\ResLeft}{\ResUp}} +\anchor{west}{\pgfextractx{\ResLeft}{\sosuthwest}\pgfpoint{\ResLeft}{0cm}} +\anchor{south}{\pgfextracty{\ResDown}{\southwest}\pgfpoint{0cm}{\ResDown}} +\anchor{south east}{\pgfextracty{\ResDown}{\southwest}\pgfextractx{\ResRight}{\northeast}\pgfpoint{\ResRight}{\ResDown}} +\anchor{east}{\pgfextractx{\ResRight}{\northeast}\pgfpoint{\ResRight}{0cm}}} + +% ***************************** ADC ********************************* +% extra anchors out,in1,in2,vref + +\ctikzset{bipoles/ADC/width/.initial=1} +\ctikzset{bipoles/ADC/height/.initial=.5} +\ctikzset{bipoles/ADC/middle/.initial=-.25} +\ctikzset{bipoles/ADC/part/.initial={}} + +\def\drawADC{% used by both bipole and node + \ResRight=\ctikzvalof{bipoles/ADC/width}\ResLen + \ResRight=0.5\ResRight + \ResLeft=-\ResRight + \ResUp=\ctikzvalof{bipoles/ADC/height}\ResLen + \ResUp=0.5\ResUp + \ResDown=-\ResUp + \ResMiddle=\ctikzvalof{bipoles/ADC/middle}\ResLen + \pgfpathmoveto{\pgfpoint{\ResLeft}{0pt}} + \pgfpathlineto{\pgfpoint{\ResMiddle}{\ResUp}} + \pgfpathlineto{\pgfpoint{\ResRight}{\ResUp}} + \pgfpathlineto{\pgfpoint{\ResRight}{\ResDown}} + \pgfpathlineto{\pgfpoint{\ResMiddle}{\ResDown}} + \pgfpathlineto{\pgfpoint{\ResLeft}{0pt}} + \pgfpathclose + \pgfusepath{draw} + \pgftext{\texttt{\ctikzvalof{bipoles/ADC/part}}} +} + +\pgfcircdeclarebipole{}% no extra anchors for bipole version + {\ctikzvalof{bipoles/ADC/height}} + {ADC} + {\ctikzvalof{bipoles/ADC/height}} + {\ctikzvalof{bipoles/ADC/width}} + {\pgfsetlinewidth{\ctikzvalof{bipoles/thickness}\pgfstartlinewidth}\drawADC} + +\def\ADCpath#1{\TikzBipolePath{ADC}{#1}} +\tikzset{ADC/.style = {\circuitikzbasekey, /tikz/to path=\ADCpath, l_=#1}} + +\pgfdeclareshape{dADC}{% +\anchor{center}{\pgfpointorigin} % within the node, (0,0) is the center + +\anchor{text} % this is used to center the text in the node + {\pgfpoint{-.5\wd\pgfnodeparttextbox}{-.5\ht\pgfnodeparttextbox}} + +\savedmacro{\resize}{ % called automatically + \ResRight=\ctikzvalof{bipoles/ADC/width}\ResLen + \ResRight=0.5\ResRight + \ResLeft=-\ResRight + \ResUp=\ctikzvalof{bipoles/ADC/height}\ResLen + \ResUp=0.5\ResUp + \ResDown=-\ResUp + \ResMiddle=\ctikzvalof{bipoles/ADC/middle}\ResLen + \ResRadius=\ResMiddle% location of in1 and in2 + \advance\ResRadius by \ResLeft + \ResRadius=0.5\ResRadius +}% while these can be used for savedanchors, they will be fogotten by anchors + +\savedanchor{\northeast}{\pgfpoint{\ResRight}{\ResUp}} +\savedanchor{\southwest}{\pgfpoint{\ResLeft}{\ResDown}} + +\savedanchor\InOne{\pgfpoint{\ResRadius}{0.5\ResUp}} +\savedanchor\InTwo{\pgfpoint{\ResRadius}{0.5\ResDown}} +\savedanchor\Out{\pgfpoint{\ResRight}{0pt}} +\savedanchor\Vref{\pgfpoint{0pt}{\ResDown}} + +\Compass% standard anchors + +\anchor{in1}{\InOne} +\anchor{in2}{\InTwo} +\anchor{out}{\Out} +\anchor{vref}{\Vref} + +\foregroundpath{ + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgflinewidth} + \drawADC} +} + + +\tikzset% +{ +splitter/.style = {rectangle, draw, semithick, minimum height=15mm, minimum width=15mm, + append after command={\pgfextra{\let\LN\tikzlastnode + \draw[thick] (\LN.west) -- ([xshift=-4mm] \LN.center) + -- ([xshift=-8mm] \LN.out A) + -- (\LN.out A) + ([xshift=-4mm] \LN.center) -- ([xshift=-8mm] \LN.out B) + -- (\LN.out B); + \node[above left=0.35cm and 0cm,font=\footnotesize] at (\LN.east) {\SI{-1}{\decibel}}; + \node[below left=0.35cm and 0cm,font=\footnotesize] at (\LN.east) {\SI{-25}{\decibel}}; + }} + }, + splitter/.default = {} +} + +\tikzset% +{ +synthesizer/.style ={rectangle, draw, semithick, minimum height=20mm, minimum width=25mm, + append after command={\pgfextra{\let\LN\tikzlastnode + \node[draw, right=0.15cm,font=\footnotesize, anchor=west](pll) at (\LN.west) {PLL}; + \node[oscillator,box,left=0.15cm,anchor=east](osc) at ( \LN.east){}; + \node[anchor=north] at(\LN.north){#1}; +\draw[-latex] (pll.east)--(osc.west); +\draw[-latex] (osc.south)--++(0,-0.2cm)-|(pll.south); + }} + }, + synthesizer/.default = {} +} + +\tikzset% +{ +RLB/.style ={rectangle, draw, semithick, minimum height=25mm, minimum width=30mm, + append after command={\pgfextra{\let\LN\tikzlastnode + \draw(\LN.south) to[short,-*]++(0,0.5)--++(0.8,0) to[R,/tikz/circuitikz/bipoles/length=1cm,l=\SI{50}{\ohm}] ++(0,1) |- (\LN.DUT); + \draw(\LN.south) ++(0,0.5) to[R,/tikz/circuitikz/bipoles/length=1cm,l=\SI{50}{\ohm}] ++(0,1) -- (\LN.south|-\LN.ret n) to[short,-*]++(-0.8,0) + ++(0,-1) node[ground,/tikz/circuitikz/bipoles/length=1cm]{} to[R,/tikz/circuitikz/bipoles/length=1cm,l=\SI{50}{\ohm}] ++(0,1) |- (\LN.ret n); + \draw (\LN.south|-\LN.DUT)++(0.8,0) to[short, *-] (\LN.ret p); + + }} + }, + RLB/.default = {} +} + +\tikzset% +{ +RLBinv/.style ={rectangle, draw, semithick, minimum height=25mm, minimum width=30mm,yscale=-1, + append after command={\pgfextra{\let\LN\tikzlastnode + \draw(\LN.south) to[short,-*]++(0,-0.5)--++(0.8,0) to[R,/tikz/circuitikz/bipoles/length=1cm,l=\SI{50}{\ohm}] ++(0,-1) |- (\LN.DUT); + \draw(\LN.south) ++(0,-0.5) to[R,/tikz/circuitikz/bipoles/length=1cm,l=\SI{50}{\ohm}] ++(0,-1) -- (\LN.south|-\LN.ret n) to[short,-*]++(-0.8,0) + ++(0,1) node[ground,/tikz/circuitikz/bipoles/length=1cm,yscale=-1]{} to[R,/tikz/circuitikz/bipoles/length=1cm,l=\SI{50}{\ohm}] ++(0,-1) |- (\LN.ret n); + \draw (\LN.south|-\LN.DUT)++(0.8,0) to[short, *-] (\LN.ret p); + + }} + }, + RLBinv/.default = {} +} + +\begin{document} + +\begin{circuitikz} +% SI5351 +\node[synthesizer={Si5351C},label={[align=center]LF Source\\CLK Distributor\\2.LO}] (Si5351) at (-3,0) {}; +\node[anchor=east] (refin) at (-5, 0.8){\SI{10}{\mega\hertz} in}; +\node[anchor=east] (refout) at (-5, 0.4){\SI{10}{\mega\hertz} out}; +\draw[-latex](refin.east)--(refin.east-|Si5351.west); +\draw[latex-](refout.east)--(refout.east-|Si5351.west); +\draw (-6,-0.8) to [PZ,l_=$\SI{26}{\mega\hertz}$,/tikz/circuitikz/bipoles/length=1cm,n=crystal] (-5,-0.8); +\draw(crystal.east)--(crystal.east-|Si5351.west); +\draw(crystal.west)--++(-0.5, 0) |-(Si5351.west); + +% HF Source +\node[synthesizer={MAX2871},label={[align=center]HF Source}] (HFSource) at (1,0) {}; +\draw[-latex] (Si5351.east) -- (HFSource.west) node[midway,above,font=\footnotesize]{\SI{100}{\mega\hertz}} ; +% Filter bank +\draw (HFSource.east) -- ++(0.5,0) + node[rotary switch <->=4 in 60 wiper 60, anchor=in](swfiltin){}; +\node[above=1.5cm, rotate=90,font=\footnotesize] at (swfiltin){RFSW6024}; +\draw (8,0) -- ++(-0.5,0) + node[rotary switch <->=4 in 60 wiper 60, anchor=in, xscale = -1](swfiltout){}; +\node[above right=0.6cm and 0.5cm, rotate=90,font=\footnotesize] at (swfiltout){RFSW6024}; +\draw (swfiltin.out 1) |- (4, 1.5) to[lowpass, l=\SI{900}{\mega\hertz}, font=\footnotesize] ++(2,0) -| (swfiltout.out 1); +\draw (swfiltin.out 2) |- (4, 0) to[lowpass, l=\SI{1800}{\mega\hertz}, font=\footnotesize] ++(2,0) -| (swfiltout.out 2); +\draw (swfiltin.out 3) |- (4, -1.5) to[lowpass, l=\SI{3500}{\mega\hertz}, font=\footnotesize] ++(2,0) -| (swfiltout.out 3); +\draw (swfiltin.out 4) |- ++(0,-1.5) -| (swfiltout.out 4); + +\draw (swfiltout.in) -- ++(0.5,0) + node[rotary switch <->=2 in 30 wiper -30, anchor=out 2, xscale = -1](bandselect){}; +\node[above right=0.2cm and 0.3cm, rotate=90,font=\footnotesize] at (bandselect){QPC6324}; +\draw (Si5351.east)++(0,0.5)-|++(1,2)-|(bandselect.out 1) node[midway,above, anchor=south east,font=\footnotesize]{\SIrange{1}{25}{\mega\hertz}} ; + +%Attenuation and amplifier and splitter +\draw (bandselect.in) to[vpiattenuator,label={RFSA3714}, font=\footnotesize] ++(2,0) to[amp, font=\footnotesize, label={TRF37A73},n=amp]++(2,0) node[splitter, label={},anchor=west](s){}; +% Port select switch +\draw (s.out A)--++(2,0)node[rotary switch <->=2 in 30 wiper 30, anchor=in](portselect){}; +\draw (portselect.out 1)--++(0.5,0)node[rotary switch <->=2 in 30 wiper -30, anchor=out 2, xscale=-1](port1switch){}; +\draw (portselect.out 2)--++(0.5,0)node[rotary switch <->=2 in 30 wiper -30, anchor=out 1, xscale=-1](port2switch){}; +\draw (port1switch.out 1) to[R,/tikz/circuitikz/bipoles/length=1cm,l=\SI{50}{\ohm}]++(0,1) node[ground,yscale=-1]{}; +\draw (port2switch.out 2) ++(0,-1) node[ground]{} to[R,/tikz/circuitikz/bipoles/length=1cm,l=\SI{50}{\ohm}] (port2switch.out 2); +\node[right=1cm of portselect]{3x QPC6324}; + +% Port1 signal flow +\draw (port1switch.in) -| ++(2,2) node[RLB, anchor=south](rlb1){}; +\draw[latex-latex](rlb1.DUT)--++(1,0)node[anchor=west]{Port 1}; +\node[mixer, box,left = 3cm of rlb1.ret c] (mix11){}; +\node[anchor=south, font=\footnotesize] at (mix11.north){ADL5801}; +\draw[-latex](rlb1.ret p)--(rlb1.ret p-|mix11.east); +\draw[-latex](rlb1.ret n)--(rlb1.ret n-|mix11.east); +\draw(mix11.west)++(-1,0) to[lowpass, l_=\SI{70}{\mega\hertz}, font=\footnotesize]++(-1,0); +\draw[-latex]([yshift=-2mm]mix11.west)--++(-1,0); +\draw[-latex]([yshift=2mm]mix11.west)--++(-1,0); + +\node[mixer, box,left = 3cm of mix11](mix12){}; +\node[anchor=south, font=\footnotesize] at (mix12.north){LT5560}; +\draw(mix12.west)++(-1,0) to[lowpass, l_=\SI{300}{\kilo\hertz}, font=\footnotesize]++(-1,0); +\draw[-latex]([yshift=-2mm]mix12.west)--++(-1,0); +\draw[-latex]([yshift=2mm]mix12.west)--++(-1,0); +\draw[latex-]([yshift=-2mm]mix12.east)--++(1,0); +\draw[latex-]([yshift=2mm]mix12.east)--++(1,0); + +\node[dADC,left=4cm of mix12,xscale=-1] (ADC1) {}; +\node[font=\footnotesize] at (ADC1){ADC}; +\node[anchor=south, font=\footnotesize] at (ADC1.north){MCP33131D-10}; +\draw[latex-](ADC1.in1)--([xshift=-2cm]ADC1.in1-|mix12.west); +\draw[latex-](ADC1.in2)--([xshift=-2cm]ADC1.in2-|mix12.west); + +% Reference signal flow +\node[mixer, box,below left = 9cm and 5cm of rlb1.ret c] (mixr1){}; +\node[anchor=south, font=\footnotesize] at (mixr1.north){ADL5801}; +\draw(mixr1.west)++(-1,0) to[lowpass, l_=\SI{70}{\mega\hertz}, font=\footnotesize]++(-1,0); +\draw[-latex]([yshift=-2mm]mixr1.west)--++(-1,0); +\draw[-latex]([yshift=2mm]mixr1.west)--++(-1,0); + +\node[mixer, box,left = 3cm of mixr1](mixr2){}; +\node[anchor=south, font=\footnotesize] at (mixr2.north){LT5560}; +\draw(mixr2.west)++(-1,0) to[lowpass, l_=\SI{300}{\kilo\hertz}, font=\footnotesize]++(-1,0); +\draw[-latex]([yshift=-2mm]mixr2.west)--++(-1,0); +\draw[-latex]([yshift=2mm]mixr2.west)--++(-1,0); +\draw[latex-]([yshift=-2mm]mixr2.east)--++(1,0); +\draw[latex-]([yshift=2mm]mixr2.east)--++(1,0); + +\node[dADC,left=4cm of mixr2,xscale=-1] (ADC1) {}; +\node[font=\footnotesize] at (ADC1){ADC}; +\node[anchor=south, font=\footnotesize] at (ADC1.north){MCP33131D-10}; +\draw[latex-](ADC1.in1)--([xshift=-2cm]ADC1.in1-|mixr2.west); +\draw[latex-](ADC1.in2)--([xshift=-2cm]ADC1.in2-|mixr2.west); + +\draw[-latex] (s.out B)--++(0.25,0)|-(mixr1.east); + +% Port2 signal flow +\draw (port2switch.in) -| ++(2,-7) node[RLBinv, anchor=south](rlb1){}; +\draw[latex-latex](rlb1.DUT)--++(1,0)node[anchor=west]{Port 2}; +\node[mixer, box,left = 5cm of rlb1.ret c] (mix21){}; +\node[anchor=north, font=\footnotesize] at (mix21.south){ADL5801}; +\draw[-latex](rlb1.ret p)--(rlb1.ret p-|mix21.east); +\draw[-latex](rlb1.ret n)--(rlb1.ret n-|mix21.east); +\draw(mix21.west)++(-1,0) to[lowpass, l=\SI{70}{\mega\hertz}, font=\footnotesize]++(-1,0); +\draw[-latex]([yshift=-2mm]mix21.west)--++(-1,0); +\draw[-latex]([yshift=2mm]mix21.west)--++(-1,0); + +\node[mixer, box,left = 3cm of mix21](mix22){}; +\node[anchor=north, font=\footnotesize] at (mix22.south){LT5560}; +\draw(mix22.west)++(-1,0) to[lowpass, l=\SI{300}{\kilo\hertz}, font=\footnotesize]++(-1,0); +\draw[-latex]([yshift=-2mm]mix22.west)--++(-1,0); +\draw[-latex]([yshift=2mm]mix22.west)--++(-1,0); +\draw[latex-]([yshift=-2mm]mix22.east)--++(1,0); +\draw[latex-]([yshift=2mm]mix22.east)--++(1,0); + +\node[dADC,left=4cm of mix22,xscale=-1] (ADC1) {}; +\node[font=\footnotesize] at (ADC1){ADC}; +\node[anchor=north, font=\footnotesize] at (ADC1.south){MCP33131D-10}; +\draw[latex-](ADC1.in1)--([xshift=-2cm]ADC1.in1-|mix22.west); +\draw[latex-](ADC1.in2)--([xshift=-2cm]ADC1.in2-|mix22.west); + +%LO1 +\node[synthesizer={MAX2871},label={[align=center]1.LO}] (lo1) at (1,-3) {}; +\draw[-latex] (Si5351.east)++(0,-0.5) --++(1,0) |- (lo1.west) node[midway,above,rotate=90,font=\footnotesize]{\SI{100}{\mega\hertz}} ; +\draw[-latex] (lo1.east)--++(1,0) |- ([yshift=-1cm]mixr1.south) coordinate(lo1split) to[short,*-](mixr1.south); +\draw[-latex] (lo1split)--(mix21.north); +\draw[-latex] (lo1split)-|(mix11.south); + +%LO2 connections +\draw[-latex] (Si5351.east)++(0,0.8) -|++(0.5,3) -| (mix12.south); +\draw[-latex] (Si5351.east)++(0,-0.8) --++(0.5,0) |- ([yshift=-3cm]mixr2.south) coordinate(lo2split) to[short,*-](mixr2.south); +\draw[-latex] (lo2split)--(mix22.north); + +%\path (0,0) node[](synth) {} to[vco=\SI{-3}{\decibel},label={[align=center]Resistive\\splitter}]node[above=0.5cm](){\SI{250}{\mega\hertz} to \SI{2.1}{\giga\hertz}} (0,0); +%\path (2,0) node[](){} to[box]node(div){}(3,0); +%\divider{div} +%\draw[-latex] (synth)++(0.5,0)--++(1.57,0); +%% I/Q mixer +%\draw (4,1) node[mixer](mixeri){}; +%\draw (6,-1) node[mixer](mixerq){}; +%\draw[-latex] (div)++(0,12pt)|-(mixeri.west); +%\draw[-latex] (div)++(0,-12pt)|-(mixerq.west); +%\draw (7,0) node[adder](add){}; +%\draw[-latex] (mixeri.east)-|(add.north); +%\draw[-latex] (mixerq.east)-|(add.south); +%% I/Q DAC + filters +%\draw (4,-4.5) to[dac, n=daci] (4,-3.5); +%\draw[-latex] (4,-3) to[lowpass, n=lpfi] (4,-2) -- (mixeri.south); +%\node[rotate=90] at (3.3,-2.5) {\SI{50}{\mega\hertz}}; +%\draw[-latex] (daci)++(0,0.5)--++(0,0.5); +%\draw (6,-4.5) to[dac, n=dacq] (6,-3.5); +%\draw[-latex] (6,-3) to[lowpass, n=lpfq] (6,-2) -- (mixerq.south); +%\node[rotate=90] at (5.3,-2.5) {\SI{50}{\mega\hertz}}; +%\draw[-latex] (dacq)++(0,0.5)--++(0,0.5); +% +%% rotary switches and filter bank +%\draw (add.east) -- ++(0.5,0) +% node[rotary switch <->=6 in 60 wiper 60, anchor=in](swfiltin){}; +%\draw (14.5,0) -- ++(-0.5,0) +% node[rotary switch <->=6 in 60 wiper 60, anchor=in, xscale = -1](swfiltout){}; +% +%\draw (swfiltin.out 1) -| (9, 3) -- (10,3) to[lowpass, l=\SI{340}{\mega\hertz}] ++(2,0) -- ++(1,0) |- (swfiltout.out 1); +%\draw (swfiltin.out 2) -| (9.5, 1.5) -- (10,1.5) to[lowpass, l=\SI{500}{\mega\hertz}] ++(2,0) -- ++(0.5,0) |- (swfiltout.out 2); +%\draw (swfiltin.out 3) -| (10, 0) -- (10,0) to[lowpass, l=\SI{750}{\mega\hertz}] ++(2,0) -- ++(0,0) |- (swfiltout.out 3); +%\draw (swfiltin.out 4) -| (9.5, -1.5) -- (10,-1.5) to[lowpass, l=\SI{1.1}{\giga\hertz}] ++(2,0) -- ++(0.5,0) |- (swfiltout.out 4); +%\draw (swfiltin.out 5) -| (9, -3) -- (10,-3) to[lowpass, l=\SI{1.7}{\giga\hertz}] ++(2,0) -- ++(1,0) |- (swfiltout.out 5); +%\draw (swfiltin.out 6) -| (8.5, -4.5) -- (10,-4.5) to[lowpass, l=\SI{2.5}{\giga\hertz}] ++(2,0) -- ++(1.5,0) |- (swfiltout.out 6); +% +%\node[spdt](switchin) at (17,0) {}; +%\node[spdt, xscale=-1](switchout) at (23,0) {}; +%\draw (swfiltout.in) to[vpiattenuator] (switchin.in); +%\draw (switchin.out 1)--(switchout.out 1); +%\draw (switchin.out 2)++(1,0) node[mixer](mixhet){}; +%\draw[-latex] (switchin.out 2)--(mixhet.west); +%\draw (mixhet.east) to[amp] ++(2,0) to[lowpass, l_=\SI{250}{\mega\hertz}] (switchout.out 2); +%\path (mixhet)++(0,-2) to[vco]node[below=0.5cm](){\SI{1}{\giga\hertz}} ++(0,0); +%\draw[latex-] (mixhet.south)--++(0,-1); +% +%\node[splitter,label={[align=center]Resistive\\splitter}] (s) at (29,0) {}; +%\draw (switchout.in) to[vpiattenuator] ++(1.5,0) to[amp] ++(1.5,0) to[amp] (s.west); +%\node[align=center] at (24.3,1) {\SIrange{0}{-45}{\decibel}\\in \SI{15}{\decibel} steps} ; +% +%\draw (15.2,-4.5) to[dac, n=daclvl] (15.2,-3.5); +%\draw[-latex] (15.2,-3.5) to (15.2,-0.5); +% +%%\node[op amp, xscale=-1, yscale=-1](levelctrl) at (21,-3.5) {}; +%\draw[-latex] (s.out B) -| ++(0.5,-1) to[detector] ++(0,-2.13); +%\draw (30.26,-4.5) to[adc, n=adc] (30.26,-3.5); +% +%%\draw (levelctrl.-)node[right]{Output amplitude setpoint}; +%%\draw[-latex, dashed] (levelctrl.out) -| (15.2,-0.5); +%\draw[-o] (s.out A)--++(0.5,0)node[right]{Output}; +\end{circuitikz} +\end{document} diff --git a/Documentation/DeveloperInfo/circuitikzgit.sty b/Documentation/DeveloperInfo/circuitikzgit.sty new file mode 100644 index 0000000..ea7b3bc --- /dev/null +++ b/Documentation/DeveloperInfo/circuitikzgit.sty @@ -0,0 +1,16743 @@ +% Copyright 2007-2019 by Massimo Redaelli +% +% This file may be distributed and/or modified +% +% 1. under the LaTeX Project Public License and/or +% 2. under the GNU Public License. +% +% See the files gpl-3.0_license.txt and lppl-1-3c_license.txt for more details. + +\NeedsTeXFormat{LaTeX2e} + +\def\pgfcircversion{git:2715a85} +\def\pgfcircversiondate{2019/07/04} + +\ProvidesPackage{circuitikzgit} +[\pgfcircversiondate{} The CircuiTikz circuit drawing package version \pgfcircversion] + +%% Version 3.0 of pgf/TikZ is required +\RequirePackage{tikz} +\usetikzlibrary{calc} +% +% "arrows" library is deprecated, and behave badly with +% arrows on short paths. Change to the new arrows.meta +% In pfgcirc.define, we will add the old definition of +% latex' which we have lost in the transition +% +\usetikzlibrary{arrows.meta, bending} + +% The options are listed in the manual in this order + +\DeclareOption{europeanvoltage}{ + \ctikzset{voltage=european} +} + +\DeclareOption{straightvoltages}{ + \pgf@circuit@bipole@voltage@straighttrue +} + +\DeclareOption{americanvoltage}{ + \ctikzset{voltage=american} +} + +\DeclareOption{europeancurrent}{ + \ctikzset{current = european} +} + +\DeclareOption{americancurrent}{ + \ctikzset{current = american} +} + + + +\DeclareOption{americanresistor}{ + \ctikzset{resistor = american} +} + +\DeclareOption{europeanresistor}{ + \ctikzset{resistor = european} +} + +\DeclareOption{americaninductor}{ + \ctikzset{inductor = american} +} + +\DeclareOption{europeaninductor}{ + \ctikzset{inductor = european} +} + +\DeclareOption{cuteinductor}{ + \ctikzset{inductor = cute} +} + +\DeclareOption{americanport}{ + \ctikzset{logic ports = american} +} + +\DeclareOption{europeanport}{ + \ctikzset{logic ports = european} +} + +\DeclareOption{european}{ + \ctikzset{voltage=european} \ctikzset{current=european} \ctikzset{inductor=european} + \ctikzset{resistor=european} \ctikzset{logic ports=european} \ctikzset{gas filled surge arrester choice = european} +} + +\DeclareOption{american}{ + \ctikzset{voltage=american} \ctikzset{current=american} \ctikzset{resistor=american} \ctikzset{inductor=american} \ctikzset{gas filled surge arrester choice = american} + \ctikzset{logic ports = american} +} + +\DeclareOption{fulldiodes}{ + \ctikzset{diode = full} +} + +\DeclareOption{emptydiodes}{ + \ctikzset{diode = empty} +} + +\DeclareOption{europeanvoltages}{ + \ctikzset{voltage=european} +} + +\DeclareOption{americanvoltages}{ + \ctikzset{voltage=american} +} + +\DeclareOption{europeancurrents}{ + \ctikzset{current = european} +} + +\DeclareOption{americancurrents}{ + \ctikzset{current = american} +} + +\DeclareOption{americanresistors}{ + \ctikzset{resistor = american} +} + +\DeclareOption{europeanresistors}{ + \ctikzset{resistor = european} +} + +\DeclareOption{americaninductors}{ + \ctikzset{inductor = american} +} + +\DeclareOption{europeaninductors}{ + \ctikzset{inductor = european} +} + +\DeclareOption{cuteinductors}{ + \ctikzset{inductor = cute} +} + +\DeclareOption{americanports}{ + \ctikzset{logic ports = american} +} + +\DeclareOption{europeanports}{ + \ctikzset{logic ports = european} +} + +\DeclareOption{americangfsurgearrester}{ + \ctikzset{gas filled surge arrester choice = american} +} + +\DeclareOption{europeangfsurgearrester}{ + \ctikzset{gas filled surge arrester choice = european} +} + +\DeclareOption{siunitx}{ + \pgf@circ@siunitxtrue +} + +\DeclareOption{nosiunitx}{ + \pgf@circ@siunitxfalse +} + +\DeclareOption{fulldiode}{ + \ctikzset{diode = full} +} + +\DeclareOption{emptydiode}{ + \ctikzset{diode = empty} +} + +\DeclareOption{strokediode}{ + \ctikzset{diode = stroke} +} + +\DeclareOption{arrowmos}{ + \pgf@circuit@mos@arrowstrue +} + +\DeclareOption{noarrowmos}{ + \pgf@circuit@mos@arrowsfalse +} + +\DeclareOption{fetbodydiode}{ + \pgf@circuit@fet@bodydiodetrue +} + +\DeclareOption{nofetbodydiode}{ + \pgf@circuit@fet@bodydiodefalse +} + +\DeclareOption{fetsolderdot}{ + \pgf@circuit@fet@solderdottrue +} + +\DeclareOption{nofetsolderdot}{ + \pgf@circuit@fet@solderdotfalse +} + +\DeclareOption{emptypmoscircle}{ + \pgf@circuit@pmos@emptycircletrue +} + + +\DeclareOption{lazymos}{ + \ctikzset{tripoles/nmos/width=.5} + \ctikzset{tripoles/nmos/gate height=.35} + \ctikzset{tripoles/nmos/base height=.35} + \ctikzset{tripoles/nmos/height/.initial=1.2} + \ctikzset{tripoles/nmos/base width=.5} + \ctikzset{tripoles/nmos/gate width=.65} + + \ctikzset{tripoles/pmos/width=.5} + \ctikzset{tripoles/pmos/gate height=.35} + \ctikzset{tripoles/pmos/base height=.35} + \ctikzset{tripoles/pmos/height/.initial=1.2} + \ctikzset{tripoles/pmos/base width=.5} + \ctikzset{tripoles/pmos/gate width=.65} + + \pgf@circuit@pmos@emptycircletrue +} + +\DeclareOption{straightlabels}{ + \ctikzset{label/align = straight} +} + +\DeclareOption{rotatelabels}{ + \ctikzset{label/align = rotate} +} + +\DeclareOption{smartlabels}{ + \ctikzset{label/align = smart} +} + +\DeclareOption{compatibility}{ + \pgf@circuit@compattrue +} + +\DeclareOption{oldvoltagedirection}{ + \pgf@circ@oldvoltagedirectiontrue + \pgf@circ@explicitvdirtrue + \pgf@circ@fixbatteriesfalse +} +\DeclareOption{nooldvoltagedirection}{ + \pgf@circ@oldvoltagedirectionfalse + \pgf@circ@explicitvdirtrue + \pgf@circ@fixbatteriesfalse +} + +\DeclareOption{RPvoltages}{ + \pgf@circ@oldvoltagedirectiontrue + \pgf@circ@explicitvdirtrue + \pgf@circ@fixbatteriestrue +} +\DeclareOption{EFvoltages}{ + \pgf@circ@oldvoltagedirectionfalse + \pgf@circ@explicitvdirtrue + \pgf@circ@fixbatteriestrue +} + + +\DeclareOption{betterproportions}{ + \ctikzset{monopoles/ground/width/.initial=.15} + + \ctikzset{bipoles/resistor/height/.initial=.23} + \ctikzset{bipoles/resistor/width/.initial=.6} + \ctikzset{bipoles/capacitor/height/.initial=.4} + \ctikzset{bipoles/capacitor/width/.initial=.1} + \ctikzset{bipoles/potentiometer/height/.initial=.6} + \ctikzset{bipoles/potentiometer/height 2/.initial=.23} + \ctikzset{bipoles/potentiometer/width/.initial=.6} + \ctikzset{bipoles/photoresistor/height/.initial=.6} + \ctikzset{bipoles/photoresistor/height 2/.initial=.23} + \ctikzset{bipoles/photoresistor/width/.initial=.6} + \ctikzset{bipoles/thermistor/main/.initial=.7} + \ctikzset{bipoles/thermistor/height/.initial=.328}%.23/.7 + \ctikzset{bipoles/thermistor/width/.initial=.6} + \ctikzset{bipoles/thermistorntc/width/.initial=.6} + \ctikzset{bipoles/thermistorntc/main/.initial=.7} + \ctikzset{bipoles/thermistorntc/height/.initial=.328}%.23/.7 + \ctikzset{bipoles/thermistorntc/height 2/.initial=.75}%.23/.7 + \ctikzset{bipoles/thermistorptc/width/.initial=.6} + \ctikzset{bipoles/thermistorptc/main/.initial=.7} + \ctikzset{bipoles/thermistorptc/height/.initial=.328}%.23/.7 + \ctikzset{bipoles/varistor/main/.initial=.7} + \ctikzset{bipoles/varistor/height/.initial=.328}%.23/.7 + \ctikzset{bipoles/varistor/width/.initial=.6} + \ctikzset{bipoles/vresistor/height/.initial=.45} + \ctikzset{bipoles/vresistor/width/.initial=.6} + \ctikzset{bipoles/generic/height/.initial=.23} + \ctikzset{bipoles/generic/width/.initial=.6} + \ctikzset{bipoles/generic potentiometer/height/.initial=.6} + \ctikzset{bipoles/generic potentiometer/height 2/.initial=.23} + \ctikzset{bipoles/generic potentiometer/width/.initial=.6} + \ctikzset{bipoles/ageneric/height/.initial=.23} + \ctikzset{bipoles/ageneric/width/.initial=.6} + \ctikzset{bipoles/memristor/height/.initial=.23} + \ctikzset{bipoles/memristor/wave height/.initial=.375} + \ctikzset{bipoles/memristor/width/.initial=.60} + \ctikzset{bipoles/tgeneric/height/.initial=.525} + \ctikzset{bipoles/tgeneric/width/.initial=.6} + \ctikzset{bipoles/tfullgeneric/height/.initial=.525} + \ctikzset{bipoles/tfullgeneric/width/.initial=.60} + \ctikzset{bipoles/fullgeneric/height/.initial=.23} + \ctikzset{bipoles/fullgeneric/width/.initial=.6} + \ctikzset{bipoles/diode/height/.initial=.3} + \ctikzset{bipoles/diode/width/.initial=.25} + \ctikzset{bipoles/bidirectionaldiode/height/.initial=.66} + \ctikzset{bipoles/bidirectionaldiode/width/.initial=.6} + \ctikzset{bipoles/bidirectionaldiode/diode width left/.initial=.3} + \ctikzset{bipoles/bidirectionaldiode/diode width right/.initial=.3} + + \ctikzset{tripoles/thyristor/height/.initial=.66} + \ctikzset{tripoles/thyristor/height 2/.initial=.3} + \ctikzset{tripoles/thyristor/width/.initial=.6} + \ctikzset{tripoles/thyristor/diode height/.initial=.3} + \ctikzset{tripoles/thyristor/diode width left/.initial=.4} + \ctikzset{tripoles/thyristor/diode width right/.initial=.3} + + \ctikzset{tripoles/triac/height/.initial=.66} + \ctikzset{tripoles/triac/width/.initial=.6} + \ctikzset{tripoles/triac/diode width left/.initial=.3} + \ctikzset{tripoles/triac/diode width right/.initial=.3} +} + +% This is a nice hack that prints all the shapes declared +% by the package. Very useful for coverage testing and debugging. +% +% \let\origpgfdeclareshape=\pgfdeclareshape +% \def\pgfdeclareshape#1{% +% \typeout{SHAPE:\space"#1"}% +% \origpgfdeclareshape{#1} +% } + + +%%%%%%%%% +%%%%%%%%%%% Springe nach tex/pgfcirc.defines +%%%---------- open: tex/pgfcirc.defines.tex +%% Counters + +\newcount\pgf@circ@count@a +\newcount\pgf@circ@count@b +\newcount\pgf@circ@count@c +%%%%%%%%%%%% +%% Dimensions + +% coordinates +\newdimen\pgf@circ@res@up +\newdimen\pgf@circ@res@down +\newdimen\pgf@circ@res@zero +\newdimen\pgf@circ@res@left +\newdimen\pgf@circ@res@right +\newdimen\pgf@circ@res@other +\newdimen\pgf@circ@res@step +\newdimen\pgf@circ@res@temp +% inital thickness +\newdimen \pgfstartlinewidth + +% arrow tips, ported over old arrows library (deprecated) +% see https://tex.stackexchange.com/questions/234084/latex-arrow-tip-with-arrows-meta-library +% this was the original definition of latex' tips, renamed to avoid clashes +% +\pgfarrowsdeclare{latexslim}{latexslim} +{ + \pgfutil@tempdima=0.28pt% + \advance\pgfutil@tempdima by.3\pgflinewidth% + \pgfarrowsleftextend{+-4\pgfutil@tempdima} + \pgfarrowsrightextend{+6\pgfutil@tempdima} +} +{ + \pgfutil@tempdima=0.28pt% + \advance\pgfutil@tempdima by.3\pgflinewidth% + \pgfpathmoveto{\pgfqpoint{6\pgfutil@tempdima}{0\pgfutil@tempdima}} + \pgfpathcurveto + {\pgfqpoint{3.5\pgfutil@tempdima}{.5\pgfutil@tempdima}} + {\pgfqpoint{-1\pgfutil@tempdima}{1.5\pgfutil@tempdima}} + {\pgfqpoint{-4\pgfutil@tempdima}{3.75\pgfutil@tempdima}} + \pgfpathcurveto + {\pgfqpoint{-1.5\pgfutil@tempdima}{1\pgfutil@tempdima}} + {\pgfqpoint{-1.5\pgfutil@tempdima}{-1\pgfutil@tempdima}} + {\pgfqpoint{-4\pgfutil@tempdima}{-3.75\pgfutil@tempdima}} + \pgfpathcurveto + {\pgfqpoint{-1\pgfutil@tempdima}{-1.5\pgfutil@tempdima}} + {\pgfqpoint{3.5\pgfutil@tempdima}{-.5\pgfutil@tempdima}} + {\pgfqpoint{6\pgfutil@tempdima}{0\pgfutil@tempdima}} + \pgfpathclose + \pgfusepathqfill +} + +\pgfarrowsdeclarereversed{latexslim reversed}{latexslim reversed}{latexslim}{latexslim} + +%% Macro to fill or draw + +\def\pgf@circ@draworfill{% + \ifx\tikz@fillcolor\pgfutil@empty + \pgfusepath{draw} + \else + \pgfsetfillcolor{\tikz@fillcolor} + \pgfusepath{draw, fill} + \fi +} + +\def\pgf@circ@draworfillandclip{% + \ifx\tikz@fillcolor\pgfutil@empty + \pgfusepath{draw, clip} + \else + \pgfsetfillcolor{\tikz@fillcolor} + \pgfusepath{draw, clip, fill} + \fi +} + +\def\pgf@circ@maybefill{% + \ifx\tikz@fillcolor\pgfutil@empty + \pgfusepath{discard} + \else + \pgfsetfillcolor{\tikz@fillcolor} + \pgfusepath{fill} + \fi +} +%% Keys + +\long\def\pgf@circ@comment#1{} + +\def\circuitikzbasekey{/tikz/circuitikz} + +\pgfkeys{\circuitikzbasekey/.is family} + +\def\circuitikzset#1{\pgfkeys{\circuitikzbasekey,#1}} +\let\ctikzset\circuitikzset +\def\ctikzvalof#1{\pgfkeysvalueof{\circuitikzbasekey/#1}} +\def\ctikzsetvalof#1#2{\pgfkeyssetvalue{\circuitikzbasekey/#1}{#2}} + +\newif\ifpgf@circ@siunitx +\newif\ifpgf@circuit@compat +\newif\ifpgf@circ@oldvoltagedirection % default false +\newif\ifpgf@circ@explicitvdir +\newif\ifpgf@circ@fixbatteries + +\ctikzset{voltage dir/.is choice} +\ctikzset{voltage dir/old/.code={\pgf@circ@oldvoltagedirectiontrue\pgf@circ@fixbatteriesfalse}} +\ctikzset{voltage dir/noold/.code={\pgf@circ@oldvoltagedirectionfalse\pgf@circ@fixbatteriesfalse}} +\ctikzset{voltage dir/RP/.code={\pgf@circ@oldvoltagedirectiontrue\pgf@circ@fixbatteriestrue}} +\ctikzset{voltage dir/EF/.code={\pgf@circ@oldvoltagedirectionfalse\pgf@circ@fixbatteriestrue}} +\tikzset{voltage dir/.style={circuitikz/voltage dir=#1}} + + +% Option ">" for twoports +\newif\ifpgf@circuit@inputarrow +\ctikzset{>/.add code={}{\pgf@circuit@inputarrowtrue}} +\ctikzset{inputarrow/.is choice} +\ctikzset{inputarrow/true/.code={\pgf@circuit@inputarrowtrue}} +\ctikzset{inputarrow/false/.code={\pgf@circuit@inputarrowfalse}} + +% Option "boxed" for nodes and twoports +\newif\ifpgf@circuit@boxed +\pgfkeys{/tikz/boxed/.add code={}{\pgf@circuit@boxedtrue}} +\ctikzset{boxed/.add code={}{\pgf@circuit@boxedtrue}} +\pgfkeys{/tikz/box/.add code={}{\pgf@circuit@boxedtrue}} +\ctikzset{box/.add code={}{\pgf@circuit@boxedtrue}} + +% Option "dashed" for nodes and twoports +\newif\ifpgf@circuit@dashed +\pgfkeys{/tikz/dashed/.add code={}{\pgf@circuit@dashedtrue}} +\ctikzset{dashed/.add code={}{\pgf@circuit@dashedtrue}} + +% Option "t=*" for nodes +\pgfkeys{/tikz/t/.add code={}{\ctikzset{text=#1}}} + +\ctikzset{current arrow scale/.initial=16} + +\ctikzset{bipoles/.is family} +\ctikzset{bipoles/border margin/.initial=1.1} +\ctikzset{bipoles/thickness/.initial=2} +\ctikzset{tripoles/thickness/.initial=2} +\ctikzset{quadpoles/thickness/.initial=2} +\ctikzset{nodes width/.initial=.04} + +% Base len for all circuitikz +\newdimen\pgf@circ@Rlen +\ctikzset{bipoles/length/.code={\pgf@circ@Rlen = #1}} +\pgf@circ@Rlen = 1.4cm + +\ctikzset{monopoles/.is family} +\ctikzset{monopoles/ground/width/.initial=.25} +\ctikzset{monopoles/ground/connectionthickness/.initial=1} +\ctikzset{monopoles/ground/thickness/.initial=2} +\ctikzset{monopoles/rground/thickness/.initial=2} +\ctikzset{monopoles/tground/thickness/.initial=3} +\ctikzset{monopoles/vcc/width/.initial=.2} +\ctikzset{monopoles/vcc/arrow/.initial=legacy} +\ctikzset{monopoles/vee/arrow/.initial=legacy} +\ctikzset{monopoles/match/width/.initial=.4} +\ctikzset{monopoles/chassis/width/.initial=.25} +\ctikzset{monopoles/alternative chassis/width/.initial=.25} +\ctikzset{monopoles/equipotentiality/width/.initial=.25} +\ctikzset{monopoles/tlinestub/width/.initial=.25} +\ctikzset{monopoles/antenna/width/.initial=.25} +\ctikzset{monopoles/antenna/label/xanchor/.initial=.4} +\ctikzset{monopoles/antenna/label/yanchor/.initial=.75} +\ctikzset{monopoles/txantenna/label/xanchor/.initial=.4} +\ctikzset{monopoles/txantenna/label/yanchor/.initial=.75} +\ctikzset{monopoles/txantenna/width/.initial=.25} +\ctikzset{monopoles/rxantenna/label/xanchor/.initial=.4} +\ctikzset{monopoles/rxantenna/label/yanchor/.initial=.75} +\ctikzset{monopoles/rxantenna/width/.initial=.25} +\ctikzset{monopoles/bareantenna/width/.initial=.25} +\ctikzset{monopoles/bareantenna/label/xanchor/.initial=1} +\ctikzset{monopoles/bareantenna/label/yanchor/.initial=0.5} +\ctikzset{monopoles/waves/width/.initial=0.5} +% microstrips +\ctikzset{bipoles/mstline/height/.initial=0.3} +\ctikzset{bipoles/mstline/width/.initial=1.2} +\pgfkeys{/tikz/mstlinelen/.add code={}{\ctikzset{bipoles/mstline/width=#1}}} +\ctikzset{monopoles/msport/width/.initial=.5} +\ctikzset{monopoles/msrstub/height/.initial=1.0} +\ctikzset{monopoles/msrstub/width/.initial=0.6} + +% microphone and loudspeaker +\ctikzset{bipoles/loudspeaker/height/.initial=.8} +\ctikzset{bipoles/loudspeaker/depth/.initial=.3} +\ctikzset{bipoles/loudspeaker/width/.initial=.8} +\ctikzset{bipoles/mic/height/.initial=1.2} +\ctikzset{bipoles/mic/depth/.initial=.0} +\ctikzset{bipoles/mic/width/.initial=.8} + +\ctikzset{bipoles/resistor/height/.initial=.3} +\ctikzset{bipoles/resistor/width/.initial=.8} +\ctikzset{bipoles/potentiometer/height/.initial=.8} +\ctikzset{bipoles/potentiometer/height 2/.initial=.3} +\ctikzset{bipoles/potentiometer/width/.initial=.8} +\ctikzset{bipoles/photoresistor/height/.initial=.6} +\ctikzset{bipoles/photoresistor/height 2/.initial=.3} +\ctikzset{bipoles/photoresistor/width/.initial=.8} +\ctikzset{bipoles/thermistor/main/.initial=.7} +\ctikzset{bipoles/thermistor/height/.initial=.428}%.3/.7 +\ctikzset{bipoles/thermistorntc/width/.initial=.8} +\ctikzset{bipoles/thermistorntc/main/.initial=.7} +\ctikzset{bipoles/thermistorntc/height/.initial=.428}%.3/.7 +\ctikzset{bipoles/thermistorntc/height 2/.initial=.75}%.3/.7 +\ctikzset{bipoles/thermistorptc/width/.initial=.8} +\ctikzset{bipoles/thermistorptc/main/.initial=.7} +\ctikzset{bipoles/thermistorptc/height/.initial=.428}%.3/.7 +\ctikzset{bipoles/thermistorptc/height 2/.initial=.75}%.3/.7 +\ctikzset{bipoles/thermistor/width/.initial=.8} +\ctikzset{bipoles/varistor/main/.initial=.7} +\ctikzset{bipoles/varistor/height/.initial=.428}%.3/.7 +\ctikzset{bipoles/varistor/width/.initial=.8} +\ctikzset{bipoles/vresistor/height/.initial=.6} +\ctikzset{bipoles/vresistor/width/.initial=.8} +\ctikzset{bipoles/cuteinductor/height/.initial=.3} +\ctikzset{bipoles/cuteinductor/lower coil height/.initial=.15} +\ctikzset{bipoles/cuteinductor/width/.initial=.6} +\ctikzset{bipoles/cuteinductor/coils/.initial=5} +\ctikzset{bipoles/cuteinductor/coil aspect/.initial=.5}%percentage of inductor width, which is covered by lower coil +%% Cute choke settings +\ctikzset{bipoles/cutechoke/height/.initial=.3} +\ctikzset{bipoles/cutechoke/lower coil height/.initial=.15} +\ctikzset{bipoles/cutechoke/width/.initial=.6} +\ctikzset{bipoles/cutechoke/coils/.initial=5} +\ctikzset{bipoles/cutechoke/coil aspect/.initial=.5}%percentage of choke width, which is covered by lower coil +\ctikzset{bipoles/cutechoke/cstep/.initial=.3} +\ctikzset{bipoles/cutechoke/cdist/.initial=1.3} +\ctikzset{bipoles/cutechoke/cthick/.initial=1} +\newif\ifpgf@circuit@bipole@twolines +\pgf@circuit@bipole@twolinesfalse +% +\ctikzset{bipoles/americaninductor/height/.initial=.3} +\ctikzset{bipoles/americaninductor/height 2/.initial=.1} +\ctikzset{bipoles/americaninductor/width/.initial=.8} +\ctikzset{bipoles/americaninductor/coils/.initial=4} +\ctikzset{bipoles/americaninductor/coil height/.initial=.15} +\ctikzset{bipoles/vcuteinductor/height/.initial=.6} +\ctikzset{bipoles/vcuteinductor/lower coil height/.initial=.3} +\ctikzset{bipoles/vcuteinductor/width/.initial=.6} +\ctikzset{bipoles/vcuteinductor/coils/.initial=5} +\ctikzset{bipoles/vcuteinductor/coil aspect/.initial=.5}%percentage of inductor width, which is covered by lower coil +\ctikzset{bipoles/vamericaninductor/height/.initial=.6} +\ctikzset{bipoles/vamericaninductor/height 2/.initial=.2} +\ctikzset{bipoles/vamericaninductor/width/.initial=.8} +\ctikzset{bipoles/vamericaninductor/coils/.initial=4} +\ctikzset{bipoles/vamericaninductor/coil height/.initial=.15} +\ctikzset{bipoles/esource/height/.initial=.60} +\ctikzset{bipoles/esource/width/.initial=.60} +\ctikzset{bipoles/pvsource/height/.initial=.60} +\ctikzset{bipoles/pvsource/width/.initial=.60} +\ctikzset{bipoles/isource/height/.initial=.60} +\ctikzset{bipoles/isource/width/.initial=.60} +\ctikzset{bipoles/oosource/height/.initial=.60} +\ctikzset{bipoles/oosource/width/.initial=.60} +\ctikzset{bipoles/oosource/circlesize/.initial=.65}%circlesize+circleoffset should be =1 +\ctikzset{bipoles/oosource/circleoffset/.initial=.35}%circlesize+circleoffset should be =1 +\ctikzset{bipoles/dcisource/angle/.initial=80} +\ctikzset{bipoles/dcisource/height/.initial=.60} +\ctikzset{bipoles/dcisource/width/.initial=.60} +\ctikzset{bipoles/dcvsource/height/.initial=.60} +\ctikzset{bipoles/dcvsource/width/.initial=.60} +\ctikzset{bipoles/vsourcetri/height/.initial=.60} +\ctikzset{bipoles/vsourcetri/width/.initial=.60} +\ctikzset{bipoles/isourceam/height/.initial=.60} +\ctikzset{bipoles/isourceam/width/.initial=.60} +\ctikzset{bipoles/vsource/height/.initial=.60} +\ctikzset{bipoles/vsource/width/.initial=.60} +\ctikzset{bipoles/vsourceam/height/.initial=.60} +\ctikzset{bipoles/vsourceam/width/.initial=.60} +\ctikzset{bipoles/vsourceam/margin/.initial=.7} +\ctikzset{bipoles/isourcesin/height/.initial=.60} +\ctikzset{bipoles/isourcesin/width/.initial=.60} +\ctikzset{bipoles/vsourcesin/height/.initial=.60} +\ctikzset{bipoles/vsourcesin/width/.initial=.60} +\ctikzset{bipoles/vsourcesquare/height/.initial=.60} +\ctikzset{bipoles/vsourcesquare/width/.initial=.60} +\ctikzset{bipoles/cisource/height/.initial=.7} +\ctikzset{bipoles/cisource/width/.initial=.7} +\ctikzset{bipoles/cisourceam/height/.initial=.7} +\ctikzset{bipoles/cisourceam/width/.initial=.7} +\ctikzset{bipoles/cvsource/height/.initial=.7} +\ctikzset{bipoles/cvsource/width/.initial=.7} +\ctikzset{bipoles/cvsourceam/height/.initial=.7} +\ctikzset{bipoles/cvsourceam/width/.initial=.7} +\ctikzset{bipoles/cvsourceam/margin/.initial=.7} +\ctikzset{bipoles/cvsourceam/text scale/.initial=1} +\ctikzset{bipoles/cisourcesin/width/.initial=.7} +\ctikzset{bipoles/cvsourcesin/height/.initial=.7} +\ctikzset{bipoles/cvsourcesin/width/.initial=.7} +\ctikzset{bipoles/capacitor/height/.initial=.6} +\ctikzset{bipoles/capacitor/width/.initial=.2} +\ctikzset{bipoles/ecapacitor/height/.initial=.5} +\ctikzset{bipoles/ecapacitor/width/.initial=.2} +\ctikzset{bipoles/ecapacitor/font/.initial= \fontsize{6}{0}\selectfont\boldmath} +\ctikzset{bipoles/pcapacitor/height/.initial=.6} +\ctikzset{bipoles/pcapacitor/width/.initial=.2} +\ctikzset{bipoles/pcapacitor/bend width/.initial=1.1} +\ctikzset{bipoles/vcapacitor/height/.initial=.6} +\ctikzset{bipoles/vcapacitor/width/.initial=.5} +\ctikzset{bipoles/vcapacitor/capacitor width/.initial=.4} +\ctikzset{bipoles/piezoelectric/height/.initial=.7} +\ctikzset{bipoles/piezoelectric/width/.initial=.5} +\ctikzset{bipoles/battery/height/.initial=.6} +\ctikzset{bipoles/battery/width/.initial=.3} +\ctikzset{bipoles/battery1/height/.initial=.6} +\ctikzset{bipoles/battery1/width/.initial=.3} +\ctikzset{bipoles/battery2/height/.initial=.6} +\ctikzset{bipoles/battery2/width/.initial=.3} +\ctikzset{bipoles/diode/height/.initial=.50} +\ctikzset{bipoles/diode/width/.initial=.40} +\ctikzset{bipoles/bidirectionaldiode/height/.initial=1.1} +\ctikzset{bipoles/bidirectionaldiode/width/.initial=1} +\ctikzset{bipoles/bidirectionaldiode/diode width left/.initial=.3} +\ctikzset{bipoles/bidirectionaldiode/diode width right/.initial=.3} +\ctikzset{bipoles/varcap/height/.initial=.50} +\ctikzset{bipoles/varcap/width/.initial=.45} +\ctikzset{bipoles/spst/height/.initial=.35} +\ctikzset{bipoles/spst/width/.initial=.35} +\ctikzset{bipoles/spst/depth/.initial=.2} +\ctikzset{bipoles/nos/height/.initial=.3} +\ctikzset{bipoles/nos/width/.initial=.35} +\ctikzset{bipoles/nos/depth/.initial=.2} +\ctikzset{bipoles/ncs/height/.initial=.35} +\ctikzset{bipoles/ncs/width/.initial=.35} +\ctikzset{bipoles/ncs/depth/.initial=.2} +\ctikzset{bipoles/generic/height/.initial=.30} +\ctikzset{bipoles/generic/width/.initial=.80} +\ctikzset{bipoles/european gas filled surge arrester/height/.initial=.30} +\ctikzset{bipoles/european gas filled surge arrester/width/.initial=.80} +\ctikzset{bipoles/european gas filled surge arrester/inside/.initial=.30} +\ctikzset{bipoles/american gas filled surge arrester/height/.initial=.60} +\ctikzset{bipoles/american gas filled surge arrester/width/.initial=.60} +\ctikzset{bipoles/american gas filled surge arrester/inside/.initial=.15} +\ctikzset{bipoles/american gas filled surge arrester/dot x/.initial=.25} +\ctikzset{bipoles/american gas filled surge arrester/dot y/.initial=.45} +\ctikzset{bipoles/american gas filled surge arrester/size/.initial=.1} +\ctikzset{bipoles/fuse/height/.initial=.20} +\ctikzset{bipoles/fuse/width/.initial=.50} +\ctikzset{bipoles/afuse/height/.initial=.20} +\ctikzset{bipoles/afuse/width/.initial=.50} +\ctikzset{bipoles/generic potentiometer/height/.initial=.80} +\ctikzset{bipoles/generic potentiometer/height 2/.initial=.30} +\ctikzset{bipoles/generic potentiometer/width/.initial=.80} +\ctikzset{bipoles/ageneric/height/.initial=.30} +\ctikzset{bipoles/ageneric/width/.initial=.80} +\ctikzset{bipoles/memristor/height/.initial=.30} +\ctikzset{bipoles/memristor/wave height/.initial=.5} +\ctikzset{bipoles/memristor/width/.initial=.80} +\ctikzset{bipoles/tgeneric/height/.initial=.70} +\ctikzset{bipoles/tgeneric/width/.initial=.80} +\ctikzset{bipoles/tfullgeneric/height/.initial=.70} +\ctikzset{bipoles/tfullgeneric/width/.initial=.80} +\ctikzset{bipoles/fullgeneric/height/.initial=.30} +\ctikzset{bipoles/fullgeneric/width/.initial=.80} +\ctikzset{bipoles/open/height/.initial=.3} %necessary for curly voltages +\ctikzset{bipoles/open/width/.initial=.3} %necessary for curly voltages +\ctikzset{bipoles/open/voltage/straight label distance/.initial=0} +\ctikzset{bipoles/open/voltage/distance from node/.initial=.2} +\ctikzset{bipoles/short/height/.initial=0} %dummy height for voltage positioning +\ctikzset{bipoles/short/width/.initial=0} %dummy width for voltage positioning +%\ctikzset{bipoles/short/voltage/straight label distance/.initial=.2} +%\ctikzset{bipoles/short/voltage/distance from node/.initial=.5} +\ctikzset{bipoles/ammeter/height/.initial=.60} +\ctikzset{bipoles/ammeter/width/.initial=.60} +\ctikzset{bipoles/ohmmeter/height/.initial=.60} +\ctikzset{bipoles/ohmmeter/width/.initial=.60} +\ctikzset{bipoles/voltmeter/height/.initial=.60} +\ctikzset{bipoles/voltmeter/width/.initial=.60} +\ctikzset{bipoles/smeter/height/.initial=.60} +\ctikzset{bipoles/smeter/width/.initial=.60} +\ctikzset{bipoles/qmeter/depth/.initial=.40} +\ctikzset{bipoles/qmeter/height/.initial=.80} +\ctikzset{bipoles/qmeter/width/.initial=.60} +\ctikzset{bipoles/iloop/width/.initial=.40} +\ctikzset{bipoles/iloop/height/.initial=.60} +\ctikzset{bipoles/oscope/height/.initial=.60} +\ctikzset{bipoles/oscope/width/.initial=.60} +\ctikzset{bipoles/buffer/height/.initial=1} +\ctikzset{bipoles/buffer/width/.initial=1} +\ctikzset{bipoles/not port/width/.initial=1} +\ctikzset{bipoles/not port/height/.initial=.8} +\ctikzset{bipoles/not port/circle width/.initial=.15} +\ctikzset{bipoles/lamp/height/.initial=.60} +\ctikzset{bipoles/lamp/width/.initial=.60} +\ctikzset{bipoles/bulb/height/.initial=.8} +\ctikzset{bipoles/bulb/width/.initial=.8} +\ctikzset{bipoles/tline/height/.initial=.3} +\ctikzset{bipoles/tline/width/.initial=.8} +\ctikzset{bipoles/squid/height/.initial=.60} +\ctikzset{bipoles/squid/width/.initial=.60} +\ctikzset{bipoles/barrier/height/.initial=.60} +\ctikzset{bipoles/barrier/width/.initial=.60} +\ctikzset{bipoles/thermocouple/height/.initial=.250} +\ctikzset{bipoles/thermocouple/height 2/.initial=.60} +\ctikzset{bipoles/thermocouple/width/.initial=.140} +\ctikzset{bipoles/pushbutton/height/.initial=.5} +\ctikzset{bipoles/pushbutton/height 2/.initial=.2} +\ctikzset{bipoles/pushbutton/width/.initial=.50} + +\ctikzset{bipoles/twoport/width/.initial=.7} +\ctikzset{bipoles/twoport/height/.initial=.7} +\ctikzset{bipoles/twoport/text/.initial=} +\ctikzset{bipoles/vco/width/.initial=.7} +\ctikzset{bipoles/bandpass/width/.initial=.7} +\ctikzset{bipoles/bandstop/width/.initial=.7} +\ctikzset{bipoles/highpass/width/.initial=.7} +\ctikzset{bipoles/lowpass/width/.initial=.7} +\ctikzset{bipoles/adc/width/.initial=.7} +\ctikzset{bipoles/dac/width/.initial=.7} +\ctikzset{bipoles/dsp/width/.initial=.7} +\ctikzset{bipoles/fft/width/.initial=.7} +\ctikzset{bipoles/amp/width/.initial=.7} +\ctikzset{bipoles/vamp/width/.initial=.7} +\ctikzset{bipoles/piattenuator/width/.initial=.7} +\ctikzset{bipoles/vpiattenuator/width/.initial=.7} +\ctikzset{bipoles/tattenuator/width/.initial=.7} +\ctikzset{bipoles/vtattenuator/width/.initial=.7} +\ctikzset{bipoles/phaseshifter/width/.initial=.7} +\ctikzset{bipoles/vphaseshifter/width/.initial=.7} +\ctikzset{bipoles/detector/width/.initial=.7} +% resistive sensor american style +\ctikzset{bipoles/resistivesens/height/.initial=.6} +\ctikzset{bipoles/resistivesens/width/.initial=.8} + +% crossing wires +\ctikzset{bipoles/crossing/size/.initial=.2} + +\newif\ifpgf@circuit@trans@depletiontype +\pgf@circuit@trans@depletiontypefalse + +\newif\ifpgf@circuit@mos@arrows +\ctikzset{tripoles/mos style/.is choice} +\ctikzset{tripoles/mos style/no arrows/.code={\pgf@circuit@mos@arrowsfalse}} +\ctikzset{tripoles/mos style/arrows/.code={\pgf@circuit@mos@arrowstrue}} +\pgfkeys{/tikz/arrowmos/.add code={}{\pgf@circuit@mos@arrowstrue}} +\pgfkeys{/tikz/noarrowmos/.add code={}{\pgf@circuit@mos@arrowsfalse}} + +% Option solderdot for fet +\newif\ifpgf@circuit@fet@solderdot +\pgfkeys{/tikz/solderdot/.add code={}{\pgf@circuit@fet@solderdottrue}} +\ctikzset{solderdot/.add code={}{\pgf@circuit@fet@solderdottrue}} +\pgfkeys{/tikz/nosolderdot/.add code={}{\pgf@circuit@fet@solderdotfalse}} +\ctikzset{nosolderdot/.add code={}{\pgf@circuit@fet@solderdotfalse}} + +% Option bodydiode for fet +\newif\ifpgf@circuit@fet@bodydiode +\pgfkeys{/tikz/bodydiode/.add code={}{\pgf@circuit@fet@bodydiodetrue}} +\ctikzset{bodydiode/.add code={}{\pgf@circuit@fet@bodydiodetrue}} +\pgfkeys{/tikz/nobodydiode/.add code={}{\pgf@circuit@fet@bodydiodefalse}} +\ctikzset{nobodydiode/.add code={}{\pgf@circuit@fet@bodydiodefalse}} + +% Option draw fet without gate connection +\newif\ifpgf@circuit@bpt@drawgate +\pgf@circuit@bpt@drawgatetrue +\pgfkeys{/tikz/nogate/.add code={}{\pgf@circuit@bpt@drawgatefalse}} +\ctikzset{nogate/.add code={}{\pgf@circuit@bpt@drawgatefalse}} +\pgfkeys{/tikz/nobase/.add code={}{\pgf@circuit@bpt@drawgatefalse}} +\ctikzset{nobase/.add code={}{\pgf@circuit@bpt@drawgatefalse}} + +% Option draw bpt without base connection +\newif\ifpgf@circuit@bpt@drawbase +\pgf@circuit@bpt@drawbasetrue +\pgfkeys{/tikz/nobase/.add code={}{\pgf@circuit@bpt@drawbasefalse}} +\ctikzset{nobase/.add code={}{\pgf@circuit@bpt@drawbasefalse}} +\pgfkeys{/tikz/nogate/.add code={}{\pgf@circuit@bpt@drawbasefalse}} +\ctikzset{nogate/.add code={}{\pgf@circuit@bpt@drawbasefalse}} + +% Option draw bpt with optical input +\newif\ifpgf@circuit@bpt@drawphoto +\pgf@circuit@bpt@drawphotofalse +\pgfkeys{/tikz/photo/.add code={}{\pgf@circuit@bpt@drawphototrue}} +\ctikzset{photo/.add code={}{\pgf@circuit@bpt@drawphototrue}} +\pgfkeys{/tikz/photo/.add code={}{\pgf@circuit@bpt@drawphototrue}} +\ctikzset{photo/.add code={}{\pgf@circuit@bpt@drawphototrue}} + +% Option draw pmos with empty circle +\newif\ifpgf@circuit@pmos@emptycircle +\pgf@circuit@pmos@emptycirclefalse +\pgfkeys{/tikz/emptycircle/.add code={}{\pgf@circuit@pmos@emptycircletrue}} +\ctikzset{tripoles/pmos style/emptycircle/.add code={}{\pgf@circuit@pmos@emptycircletrue}} +% Option draw pmos with no circle +\newif\ifpgf@circuit@pmos@nocircle +\pgf@circuit@pmos@nocirclefalse +\pgfkeys{/tikz/nocircle/.add code={}{\pgf@circuit@pmos@nocircletrue}} +\ctikzset{tripoles/pmos style/nocircle/.add code={}{\pgf@circuit@pmos@nocircletrue}} +% back to normal +\pgfkeys{/tikz/fullcircle/.add code={}{\pgf@circuit@pmos@emptycirclefalse\pgf@circuit@pmos@nocirclefalse}} +\ctikzset{tripoles/pmos style/fullcircle/.add code={}{\pgf@circuit@pmos@emptycirclefalse\pgf@circuit@pmos@nocirclefalse}} + + +\newif\ifpgf@circuit@trans@ntype +\pgf@circuit@trans@ntypetrue %default true +%\newif\ifpgf@circuit@trans@ptype +%\ctikzset{tripoles/nmos/.add code={\pgf@circuit@trans@ntypetrue}} +\ctikzset{tripoles/nmos/width/.initial=.7} +\ctikzset{tripoles/nmos/gate height/.initial=.35} +\ctikzset{tripoles/nmos/base height/.initial=.5} +\ctikzset{tripoles/nmos/conn height/.initial=0} +\ctikzset{tripoles/nmos/height/.initial=1.1} +\ctikzset{tripoles/nmos/base width/.initial=.5} +\ctikzset{tripoles/nmos/gate width/.initial=.62} +\ctikzset{tripoles/nmos/arrow pos/.initial=.6} +\ctikzset{tripoles/nmos/bodydiode scale/.initial=.3} +\ctikzset{tripoles/nmos/bodydiode distance/.initial=.3} +\ctikzset{tripoles/nmos/bodydiode conn/.initial=.6} +\ctikzset{tripoles/nmos/curr direction/.initial=1} + +\ctikzset{tripoles/pmos/width/.initial=.7} +\ctikzset{tripoles/pmos/gate height/.initial=.35} +\ctikzset{tripoles/pmos/base height/.initial=.5} +\ctikzset{tripoles/pmos/conn height/.initial=0} +\ctikzset{tripoles/pmos/height/.initial=1.1} +\ctikzset{tripoles/pmos/base width/.initial=.5} +\ctikzset{tripoles/pmos/gate width/.initial=.62} +\ctikzset{tripoles/pmos/arrow pos/.initial=.4} +\ctikzset{tripoles/pmos/bodydiode scale/.initial=.3} +\ctikzset{tripoles/pmos/bodydiode distance/.initial=.3} +\ctikzset{tripoles/pmos/bodydiode conn/.initial=.6} +\ctikzset{tripoles/pmos/curr direction/.initial=-1} + +\ctikzset{tripoles/hemt/width/.initial=.7} +\ctikzset{tripoles/hemt/gate height/.initial=.35} +\ctikzset{tripoles/hemt/base height/.initial=.5} +\ctikzset{tripoles/hemt/conn height/.initial=0} +\ctikzset{tripoles/hemt/height/.initial=1.1} +\ctikzset{tripoles/hemt/base width/.initial=.5} +\ctikzset{tripoles/hemt/gate width/.initial=.62} +\ctikzset{tripoles/hemt/bodydiode scale/.initial=.3} +\ctikzset{tripoles/hemt/bodydiode distance/.initial=.3} +\ctikzset{tripoles/hemt/bodydiode conn/.initial=.6} +\ctikzset{tripoles/hemt/curr direction/.initial=1} + +\ctikzset{tripoles/nfet/width/.initial=.7} +\ctikzset{tripoles/nfet/gate height/.initial=.35} +\ctikzset{tripoles/nfet/base height/.initial=.5} +\ctikzset{tripoles/nfet/conn height/.initial=0} +\ctikzset{tripoles/nfet/height/.initial=1.1} +\ctikzset{tripoles/nfet/base width/.initial=.5} +\ctikzset{tripoles/nfet/gate width/.initial=.62} +\ctikzset{tripoles/nfet/bodydiode scale/.initial=.3} +\ctikzset{tripoles/nfet/bodydiode distance/.initial=.3} +\ctikzset{tripoles/nfet/bodydiode conn/.initial=.6} +\ctikzset{tripoles/nfet/curr direction/.initial=1} + +\ctikzset{tripoles/pfet/width/.initial=.7} +\ctikzset{tripoles/pfet/gate height/.initial=.35} +\ctikzset{tripoles/pfet/base height/.initial=.5} +\ctikzset{tripoles/pfet/conn height/.initial=0} +\ctikzset{tripoles/pfet/height/.initial=1.1} +\ctikzset{tripoles/pfet/base width/.initial=.5} +\ctikzset{tripoles/pfet/gate width/.initial=.62} +\ctikzset{tripoles/pfet/bodydiode scale/.initial=.3} +\ctikzset{tripoles/pfet/bodydiode distance/.initial=.3} +\ctikzset{tripoles/pfet/bodydiode conn/.initial=.6} +\ctikzset{tripoles/pfet/curr direction/.initial=-1} + +\ctikzset{tripoles/nigfete/width/.initial=.7} +\ctikzset{tripoles/nigfete/gate height/.initial=.35} +\ctikzset{tripoles/nigfete/base height/.initial=.5} +\ctikzset{tripoles/nigfete/conn height/.initial=.35} +\ctikzset{tripoles/nigfete/height/.initial=1.1} +\ctikzset{tripoles/nigfete/base width/.initial=.5} +\ctikzset{tripoles/nigfete/gate width/.initial=.62} +\ctikzset{tripoles/nigfete/bodydiode scale/.initial=.3} +\ctikzset{tripoles/nigfete/bodydiode distance/.initial=.3} +\ctikzset{tripoles/nigfete/bodydiode conn/.initial=.6} +\ctikzset{tripoles/nigfete/curr direction/.initial=1} + +\ctikzset{tripoles/nigfetd/width/.initial=.7} +\ctikzset{tripoles/nigfetd/gate height/.initial=.35} +\ctikzset{tripoles/nigfetd/base height/.initial=.5} +\ctikzset{tripoles/nigfetd/conn height/.initial=.35} +\ctikzset{tripoles/nigfetd/height/.initial=1.1} +\ctikzset{tripoles/nigfetd/base width/.initial=.5} +\ctikzset{tripoles/nigfetd/gate width/.initial=.62} +\ctikzset{tripoles/nigfetd/bodydiode scale/.initial=.3} +\ctikzset{tripoles/nigfetd/bodydiode distance/.initial=.3} +\ctikzset{tripoles/nigfetd/bodydiode conn/.initial=.6} +\ctikzset{tripoles/nigfetd/curr direction/.initial=1} + +\ctikzset{tripoles/nigfetebulk/width/.initial=.7} +\ctikzset{tripoles/nigfetebulk/gate height/.initial=.35} +\ctikzset{tripoles/nigfetebulk/base height/.initial=.5} +\ctikzset{tripoles/nigfetebulk/conn height/.initial=.35} +\ctikzset{tripoles/nigfetebulk/height/.initial=1.1} +\ctikzset{tripoles/nigfetebulk/base width/.initial=.5} +\ctikzset{tripoles/nigfetebulk/gate width/.initial=.62} +\ctikzset{tripoles/nigfetebulk/bodydiode scale/.initial=.3} +\ctikzset{tripoles/nigfetebulk/bodydiode distance/.initial=.3} +\ctikzset{tripoles/nigfetebulk/bodydiode conn/.initial=.6} +\ctikzset{tripoles/nigfetebulk/curr direction/.initial=1} + +\ctikzset{tripoles/pigfete/width/.initial=.7} +\ctikzset{tripoles/pigfete/gate height/.initial=.35} +\ctikzset{tripoles/pigfete/base height/.initial=.5} +\ctikzset{tripoles/pigfete/conn height/.initial=.35} +\ctikzset{tripoles/pigfete/height/.initial=1.1} +\ctikzset{tripoles/pigfete/base width/.initial=.5} +\ctikzset{tripoles/pigfete/gate width/.initial=.62} +\ctikzset{tripoles/pigfete/bodydiode scale/.initial=.3} +\ctikzset{tripoles/pigfete/bodydiode distance/.initial=.3} +\ctikzset{tripoles/pigfete/bodydiode conn/.initial=.6} +\ctikzset{tripoles/pigfete/curr direction/.initial=-1} + +\ctikzset{tripoles/pigfetd/width/.initial=.7} +\ctikzset{tripoles/pigfetd/gate height/.initial=.35} +\ctikzset{tripoles/pigfetd/base height/.initial=.5} +\ctikzset{tripoles/pigfetd/conn height/.initial=.35} +\ctikzset{tripoles/pigfetd/height/.initial=1.1} +\ctikzset{tripoles/pigfetd/base width/.initial=.5} +\ctikzset{tripoles/pigfetd/gate width/.initial=.62} +\ctikzset{tripoles/pigfetd/bodydiode scale/.initial=.3} +\ctikzset{tripoles/pigfetd/bodydiode distance/.initial=.3} +\ctikzset{tripoles/pigfetd/bodydiode conn/.initial=.6} +\ctikzset{tripoles/pigfetd/curr direction/.initial=-1} + +\ctikzset{tripoles/pigfetebulk/width/.initial=.7} +\ctikzset{tripoles/pigfetebulk/gate height/.initial=.35} +\ctikzset{tripoles/pigfetebulk/conn height/.initial=.35} +\ctikzset{tripoles/pigfetebulk/base height/.initial=.5} +\ctikzset{tripoles/pigfetebulk/height/.initial=1.1} +\ctikzset{tripoles/pigfetebulk/base width/.initial=.5} +\ctikzset{tripoles/pigfetebulk/gate width/.initial=.62} +\ctikzset{tripoles/pigfetebulk/bodydiode scale/.initial=.3} +\ctikzset{tripoles/pigfetebulk/bodydiode distance/.initial=.3} +\ctikzset{tripoles/pigfetebulk/bodydiode conn/.initial=.6} +\ctikzset{tripoles/pigfetebulk/curr direction/.initial=-1} + +\ctikzset{tripoles/npn/width/.initial=.6} +\ctikzset{tripoles/npn/base height/.initial=.45} +\ctikzset{tripoles/npn/base height 2/.initial=.15} +\ctikzset{tripoles/npn/base height/.initial=.4} +\ctikzset{tripoles/npn/conn height/.initial=0} +\ctikzset{tripoles/npn/height/.initial=1.1} +\ctikzset{tripoles/npn/base width/.initial=.5} +\ctikzset{tripoles/npn/arrow pos/.initial=.5} +\ctikzset{tripoles/npn/bodydiode scale/.initial=.3} +\ctikzset{tripoles/npn/bodydiode distance/.initial=.3} +\ctikzset{tripoles/npn/bodydiode conn/.initial=.6} +\ctikzset{tripoles/npn/curr direction/.initial=1} + +\ctikzset{tripoles/pnp/width/.initial=.6} +\ctikzset{tripoles/pnp/base height/.initial=.45} +\ctikzset{tripoles/pnp/base height 2/.initial=.15} +\ctikzset{tripoles/pnp/base height/.initial=.4} +\ctikzset{tripoles/pnp/conn height/.initial=0} +\ctikzset{tripoles/pnp/height/.initial=1.1} +\ctikzset{tripoles/pnp/base width/.initial=.5} +\ctikzset{tripoles/pnp/arrow pos/.initial=.5} +\ctikzset{tripoles/pnp/bodydiode scale/.initial=.3} +\ctikzset{tripoles/pnp/bodydiode distance/.initial=.3} +\ctikzset{tripoles/pnp/bodydiode conn/.initial=.6} +\ctikzset{tripoles/pnp/curr direction/.initial=-1} + +\ctikzset{tripoles/pigbt/width/.initial=.6} +\ctikzset{tripoles/pigbt/gate height/.initial=.45} +\ctikzset{tripoles/pigbt/gate height 2/.initial=.15} +\ctikzset{tripoles/pigbt/base height/.initial=.4} +\ctikzset{tripoles/pigbt/conn height/.initial=0} +\ctikzset{tripoles/pigbt/height/.initial=1.1} +\ctikzset{tripoles/pigbt/gate width/.initial=.62} +\ctikzset{tripoles/pigbt/base width/.initial=.5} +\ctikzset{tripoles/pigbt/bodydiode scale/.initial=.3} +\ctikzset{tripoles/pigbt/bodydiode distance/.initial=.3} +\ctikzset{tripoles/pigbt/bodydiode conn/.initial=.6} +\ctikzset{tripoles/pigbt/curr direction/.initial=-1} + +\ctikzset{tripoles/nigbt/width/.initial=.6} +\ctikzset{tripoles/nigbt/gate height/.initial=.45} +\ctikzset{tripoles/nigbt/gate height 2/.initial=.15} +\ctikzset{tripoles/nigbt/base height/.initial=.4} +\ctikzset{tripoles/nigbt/conn height/.initial=0} +\ctikzset{tripoles/nigbt/height/.initial=1.1} +\ctikzset{tripoles/nigbt/gate width/.initial=.62} +\ctikzset{tripoles/nigbt/base width/.initial=.5} +\ctikzset{tripoles/nigbt/bodydiode scale/.initial=.3} +\ctikzset{tripoles/nigbt/bodydiode distance/.initial=.3} +\ctikzset{tripoles/nigbt/bodydiode conn/.initial=.6} +\ctikzset{tripoles/nigbt/curr direction/.initial=1} + +\ctikzset{tripoles/Lpigbt/width/.initial=.6} +\ctikzset{tripoles/Lpigbt/gate height/.initial=.45} +\ctikzset{tripoles/Lpigbt/gate height 2/.initial=.15} +\ctikzset{tripoles/Lpigbt/base height/.initial=.4} +\ctikzset{tripoles/Lpigbt/conn height/.initial=.4} +\ctikzset{tripoles/Lpigbt/height/.initial=1.1} +\ctikzset{tripoles/Lpigbt/gate width/.initial=.62} +\ctikzset{tripoles/Lpigbt/base width/.initial=.5} +\ctikzset{tripoles/Lpigbt/bodydiode scale/.initial=.3} +\ctikzset{tripoles/Lpigbt/bodydiode distance/.initial=.3} +\ctikzset{tripoles/Lpigbt/bodydiode conn/.initial=.6} +\ctikzset{tripoles/Lpigbt/curr direction/.initial=-1} + +\ctikzset{tripoles/Lnigbt/width/.initial=.6} +\ctikzset{tripoles/Lnigbt/gate height/.initial=.45} +\ctikzset{tripoles/Lnigbt/gate height 2/.initial=.15} +\ctikzset{tripoles/Lnigbt/base height/.initial=.4} +\ctikzset{tripoles/Lnigbt/conn height/.initial=.4} +\ctikzset{tripoles/Lnigbt/height/.initial=1.1} +\ctikzset{tripoles/Lnigbt/gate width/.initial=.62} +\ctikzset{tripoles/Lnigbt/base width/.initial=.5} +\ctikzset{tripoles/Lnigbt/bodydiode scale/.initial=.3} +\ctikzset{tripoles/Lnigbt/bodydiode distance/.initial=.3} +\ctikzset{tripoles/Lnigbt/bodydiode conn/.initial=.6} +\ctikzset{tripoles/Lnigbt/curr direction/.initial=1} + +\ctikzset{tripoles/njfet/width/.initial=.7} +\ctikzset{tripoles/njfet/gate height/.initial=.5} +\ctikzset{tripoles/njfet/gate height 2/.initial=.35} +\ctikzset{tripoles/njfet/gate width/.initial=.5} +\ctikzset{tripoles/njfet/conn height/.initial=.35} +\ctikzset{tripoles/njfet/height/.initial=1.1} +\ctikzset{tripoles/njfet/bodydiode scale/.initial=.3} +\ctikzset{tripoles/njfet/bodydiode distance/.initial=.3} +\ctikzset{tripoles/njfet/bodydiode conn/.initial=.6} +\ctikzset{tripoles/njfet/curr direction/.initial=1} + +\ctikzset{tripoles/pjfet/width/.initial=.7} +\ctikzset{tripoles/pjfet/gate height/.initial=.5} +\ctikzset{tripoles/pjfet/gate height 2/.initial=.35} +\ctikzset{tripoles/pjfet/gate width/.initial=.5} +\ctikzset{tripoles/pjfet/conn height/.initial=.35} +\ctikzset{tripoles/pjfet/height/.initial=1.1} +\ctikzset{tripoles/pjfet/bodydiode scale/.initial=.3} +\ctikzset{tripoles/pjfet/bodydiode distance/.initial=.3} +\ctikzset{tripoles/pjfet/bodydiode conn/.initial=.6} +\ctikzset{tripoles/pjfet/curr direction/.initial=-1} + +\ctikzset{tripoles/isfet/width/.initial=1} +\ctikzset{tripoles/isfet/gate height/.initial=.35} +\ctikzset{tripoles/isfet/base height/.initial=.5} +\ctikzset{tripoles/isfet/height/.initial=1.1} +\ctikzset{tripoles/isfet/base width/.initial=.3} +\ctikzset{tripoles/isfet/gate width/.initial=.5} +\ctikzset{tripoles/isfet/conn height/.initial=0} +\ctikzset{tripoles/isfet/wave width/.initial=.16} +\ctikzset{tripoles/isfet/wave amp/.initial=.06} +\ctikzset{tripoles/isfet/waves y sep/.initial=.22} +\ctikzset{tripoles/isfet/waves x sep/.initial=.8} +\ctikzset{tripoles/isfet/bodydiode scale/.initial=.3} +\ctikzset{tripoles/isfet/bodydiode distance/.initial=.3} +\ctikzset{tripoles/isfet/bodydiode conn/.initial=.6} +\ctikzset{tripoles/isfet/curr direction/.initial=1} + +\newif\ifpgf@circuit@europeanlogicport +\ctikzset{logic ports/.is choice} +\ctikzset{logic ports/european/.code= {\pgf@circuit@europeanlogicporttrue + \tikzset{and port/.style={shape=european and port}} + \tikzset{or port/.style={shape=european or port}} + \tikzset{xor port/.style={shape=european xor port}} + \tikzset{not port/.style={shape=european not port}} + \tikzset{nand port/.style={shape=european nand port}} + \tikzset{nor port/.style={shape=european nor port}} + \tikzset{xnor port/.style={shape=european xnor port}} + } } +\ctikzset{logic ports/american/.code= {\pgf@circuit@europeanlogicportfalse + \tikzset{and port/.style={shape=american and port}} + \tikzset{or port/.style={shape=american or port}} + \tikzset{xor port/.style={shape=american xor port}} + \tikzset{not port/.style={shape=american not port}} + \tikzset{nand port/.style={shape=american nand port}} + \tikzset{nor port/.style={shape=american nor port}} + \tikzset{xnor port/.style={shape=american xnor port}} + } } + +\ctikzset{logic ports origin/.is choice} +\ctikzset{logic ports origin/legacy/.code= { + \ctikzset{tripoles/american and port/origin/.initial=0.8} + \ctikzset{tripoles/american nand port/origin/.initial=0.8} + \ctikzset{tripoles/american nor port/origin/.initial=0.8} + \ctikzset{tripoles/american or port/origin/.initial=0.8} + \ctikzset{tripoles/american xor port/origin/.initial=0.8} + \ctikzset{tripoles/american xnor port/origin/.initial=0.8} + \ctikzset{tripoles/european and port/origin/.initial=0.8} + \ctikzset{tripoles/european nand port/origin/.initial=0.8} + \ctikzset{tripoles/european or port/origin/.initial=0.8} + \ctikzset{tripoles/european nor port/origin/.initial=0.8} + \ctikzset{tripoles/european xor port/origin/.initial=0.8} + \ctikzset{tripoles/european xnor port/origin/.initial=0.8} + \ctikzset{tripoles/european not port/origin/.initial=0.8} + } +} +\ctikzset{logic ports origin/center/.code= { + \ctikzset{tripoles/american and port/origin/.initial=0} + \ctikzset{tripoles/american nand port/origin/.initial=0} + \ctikzset{tripoles/american nor port/origin/.initial=0} + \ctikzset{tripoles/american or port/origin/.initial=0} + \ctikzset{tripoles/american xor port/origin/.initial=0} + \ctikzset{tripoles/american xnor port/origin/.initial=0} + \ctikzset{tripoles/european and port/origin/.initial=0} + \ctikzset{tripoles/european nand port/origin/.initial=0} + \ctikzset{tripoles/european or port/origin/.initial=0} + \ctikzset{tripoles/european nor port/origin/.initial=0} + \ctikzset{tripoles/european xor port/origin/.initial=0} + \ctikzset{tripoles/european xnor port/origin/.initial=0} + \ctikzset{tripoles/european not port/origin/.initial=0} + } +} + + +\ctikzset{tripoles/american and port/width/.initial=1.1} +\ctikzset{tripoles/american and port/height/.initial=.8} +\ctikzset{tripoles/american and port/port width/.initial=.7} +\ctikzset{tripoles/american and port/input height/.initial=.5} +\ctikzset{tripoles/american nand port/width/.initial=1.1} +\ctikzset{tripoles/american nand port/height/.initial=.8} +\ctikzset{tripoles/american nand port/port width/.initial=.7} +\ctikzset{tripoles/american nand port/circle width/.initial=.15} +\ctikzset{tripoles/american nand port/input height/.initial=.5} +\ctikzset{tripoles/american or port/width/.initial=1.1} +\ctikzset{tripoles/american or port/height/.initial=.8} +\ctikzset{tripoles/american or port/port width/.initial=.7} +\ctikzset{tripoles/american or port/input height/.initial=.5} +\ctikzset{tripoles/american or port/input skip/.initial=.25} +\ctikzset{tripoles/american or port/aaa/.initial=.6} +\ctikzset{tripoles/american or port/bbb/.initial=.4} +\ctikzset{tripoles/american or port/ccc/.initial=.5} +\ctikzset{tripoles/american or port/ddd/.initial=.0} +\ctikzset{tripoles/american nor port/width/.initial=1.1} +\ctikzset{tripoles/american nor port/height/.initial=.8} +\ctikzset{tripoles/american nor port/port width/.initial=.7} +\ctikzset{tripoles/american nor port/input height/.initial=.5} +\ctikzset{tripoles/american nor port/input skip/.initial=.25} +\ctikzset{tripoles/american nor port/circle width/.initial=.15} +\ctikzset{tripoles/american nor port/aaa/.initial=.6} +\ctikzset{tripoles/american nor port/bbb/.initial=.4} +\ctikzset{tripoles/american nor port/ccc/.initial=.5} +\ctikzset{tripoles/american nor port/ddd/.initial=.0} +\ctikzset{tripoles/american xor port/width/.initial=1.1} +\ctikzset{tripoles/american xor port/height/.initial=.8} +\ctikzset{tripoles/american xor port/port width/.initial=.7} +\ctikzset{tripoles/american xor port/input height/.initial=.5} +\ctikzset{tripoles/american xor port/input skip/.initial=.15} +\ctikzset{tripoles/american xor port/distance/.initial=.1} +\ctikzset{tripoles/american xnor port/width/.initial=1.1} +\ctikzset{tripoles/american xnor port/height/.initial=.8} +\ctikzset{tripoles/american xnor port/port width/.initial=.7} +\ctikzset{tripoles/american xnor port/input height/.initial=.5} +\ctikzset{tripoles/american xnor port/input skip/.initial=.15} +\ctikzset{tripoles/american xnor port/distance/.initial=.1} +\ctikzset{tripoles/american xnor port/circle width/.initial=.15} +\ctikzset{tripoles/american and port/origin/.initial=0.8} +\ctikzset{tripoles/american and port/inputs/.initial=2} +% variable number of inputs +\ctikzset{tripoles/american nand port/origin/.initial=0.8} +\ctikzset{tripoles/american nand port/inputs/.initial=2} +\ctikzset{tripoles/american nor port/origin/.initial=0.8} +\ctikzset{tripoles/american nor port/inputs/.initial=2} +\ctikzset{tripoles/american nor port/angle/.initial=70} +\ctikzset{tripoles/american nor port/inner/.initial=0.3} +\ctikzset{tripoles/american or port/origin/.initial=0.8} +\ctikzset{tripoles/american or port/inputs/.initial=2} +\ctikzset{tripoles/american or port/angle/.initial=70} +\ctikzset{tripoles/american or port/inner/.initial=0.3} +\ctikzset{tripoles/american xor port/origin/.initial=0.8} +\ctikzset{tripoles/american xor port/inputs/.initial=2} +\ctikzset{tripoles/american xor port/angle/.initial=70} +\ctikzset{tripoles/american xor port/inner/.initial=0.3} +\ctikzset{tripoles/american xnor port/origin/.initial=0.8} +\ctikzset{tripoles/american xnor port/inputs/.initial=2} +\ctikzset{tripoles/american xnor port/angle/.initial=70} +\ctikzset{tripoles/american xnor port/inner/.initial=0.3} + +\ctikzset{tripoles/european and port/width/.initial=1.4} +\ctikzset{tripoles/european and port/height/.initial=.65} +\ctikzset{tripoles/european and port/reserved/.initial=.6} +\ctikzset{tripoles/european and port/input height/.initial=.6} +\ctikzset{tripoles/european or port/width/.initial=1.4} +\ctikzset{tripoles/european or port/height/.initial=.65} +\ctikzset{tripoles/european or port/reserved/.initial=.6} +\ctikzset{tripoles/european or port/input height/.initial=.6} +\ctikzset{tripoles/european xor port/width/.initial=1.4} +\ctikzset{tripoles/european xor port/height/.initial=.65} +\ctikzset{tripoles/european xor port/reserved/.initial=.6} +\ctikzset{tripoles/european xor port/input height/.initial=.6} +\ctikzset{tripoles/european nand port/width/.initial=1.4} +\ctikzset{tripoles/european nand port/not height/.initial=.3} +\ctikzset{tripoles/european nand port/not width/.initial=.8} +\ctikzset{tripoles/european nand port/height/.initial=.65} +\ctikzset{tripoles/european nand port/reserved/.initial=.6} +\ctikzset{tripoles/european nand port/input height/.initial=.6} +\ctikzset{tripoles/european not port/width/.initial=1.4} +\ctikzset{tripoles/european not port/not height/.initial=.3} +\ctikzset{tripoles/european not port/not width/.initial=.8} +\ctikzset{tripoles/european not port/height/.initial=.65} +\ctikzset{tripoles/european not port/reserved/.initial=.6} +\ctikzset{tripoles/european not port/input height/.initial=0} +\ctikzset{tripoles/european xnor port/width/.initial=1.4} +\ctikzset{tripoles/european xnor port/not height/.initial=.3} +\ctikzset{tripoles/european xnor port/not width/.initial=.8} +\ctikzset{tripoles/european xnor port/height/.initial=.65} +\ctikzset{tripoles/european xnor port/reserved/.initial=.6} +\ctikzset{tripoles/european xnor port/input height/.initial=.6} +\ctikzset{tripoles/european nor port/width/.initial=1.4} +\ctikzset{tripoles/european nor port/not height/.initial=.3} +\ctikzset{tripoles/european nor port/not width/.initial=.8} +\ctikzset{tripoles/european nor port/height/.initial=.65} +\ctikzset{tripoles/european nor port/reserved/.initial=.6} +\ctikzset{tripoles/european nor port/input height/.initial=.6} +% variable number of inputs +\ctikzset{tripoles/european and port/origin/.initial=0.8} +\ctikzset{tripoles/european and port/inputs/.initial=2} +\ctikzset{tripoles/european nand port/origin/.initial=0.8} +\ctikzset{tripoles/european nand port/inputs/.initial=2} +\ctikzset{tripoles/european or port/origin/.initial=0.8} +\ctikzset{tripoles/european or port/inputs/.initial=2} +\ctikzset{tripoles/european nor port/origin/.initial=0.8} +\ctikzset{tripoles/european nor port/inputs/.initial=2} +\ctikzset{tripoles/european xor port/origin/.initial=0.8} +\ctikzset{tripoles/european xor port/inputs/.initial=2} +\ctikzset{tripoles/european xnor port/origin/.initial=0.8} +\ctikzset{tripoles/european xnor port/inputs/.initial=2} +\ctikzset{tripoles/european not port/origin/.initial=0.8} +\ctikzset{tripoles/european not port/inputs/.initial=1}% +%%% parameters that are not used anymore after multi-input +%%% gates --- left for compatibility of source code. +\ctikzset{tripoles/american xor port/aaa/.initial=.6} +\ctikzset{tripoles/american xor port/bbb/.initial=.4} +\ctikzset{tripoles/american xor port/ccc/.initial=.5} +\ctikzset{tripoles/american xor port/ddd/.initial=.0} +\ctikzset{tripoles/american xnor port/aaa/.initial=.6} +\ctikzset{tripoles/american xnor port/bbb/.initial=.4} +\ctikzset{tripoles/american xnor port/ccc/.initial=.5} +\ctikzset{tripoles/american xnor port/ddd/.initial=.0} +% switches for logic gates +% +\pgfkeys{/tikz/number inputs/.initial=0} +\pgfkeys{/tikz/number inputs/.default=0} +% +% switches for op amps +% changing input polarity +% +\newif\ifpgf@circuit@oa@iplusup\pgf@circuit@oa@iplusupfalse +\pgfkeys{/tikz/noinv input up/.add code={}{\pgf@circuit@oa@iplusuptrue}} +\ctikzset{noinv input up/.add code={}{\pgf@circuit@oa@iplusuptrue}} +\pgfkeys{/tikz/input noinv down/.add code={}{\pgf@circuit@oa@iplusupfalse}} +\ctikzset{input noinv down/.add code={}{\pgf@circuit@oa@iplusupfalse}} +% +% changing output polarity (for fully diff objects) +% +\newif\ifpgf@circuit@oa@oplusup\pgf@circuit@oa@oplusuptrue +\pgfkeys{/tikz/noinv output up/.add code={}{\pgf@circuit@oa@oplusuptrue}} +\ctikzset{noinv output up/.add code={}{\pgf@circuit@oa@oplusuptrue}} +\pgfkeys{/tikz/noinv output down/.add code={}{\pgf@circuit@oa@oplusupfalse}} +\ctikzset{noinv output down/.add code={}{\pgf@circuit@oa@oplusupfalse}} +% +\ctikzset{tripoles/op amp/width/.initial=1.7} +\ctikzset{tripoles/op amp/port width/.initial=.7} +\ctikzset{tripoles/op amp/height/.initial=1.4} +\ctikzset{tripoles/op amp/input height/.initial=.5} +\ctikzset{tripoles/op amp/up pos/.initial=.45} +\ctikzset{tripoles/op amp/font/.initial= \fontsize{10}{12}\selectfont\boldmath}%absolute font size needed! +\ctikzset{tripoles/en amp/width/.initial=1.7} +\ctikzset{tripoles/en amp/port width/.initial=.7} +\ctikzset{tripoles/en amp/height/.initial=1.6} +\ctikzset{tripoles/en amp/input height/.initial=.3} +\ctikzset{tripoles/en amp/up pos/.initial=.45} +\ctikzset{tripoles/en amp/font/.initial= \fontsize{10}{12}\selectfont}%absolute font size needed! +\ctikzset{tripoles/en amp/font2/.initial= \fontsize{12}{14}\selectfont}%absolute font size needed! +\ctikzset{tripoles/en amp/text/.initial={$\mathstrut{\triangleright}\,{\infty}$}} +\tikzset{ + en amp text/.code = { + \ctikzsetvalof{tripoles/en amp/text}{#1} + }, + en amp text A/.code = { + \ctikzsetvalof{tripoles/en amp/text}{$\mathstrut{\triangleright}\,\mathrm{A}$} + }, +} +\ctikzset{tripoles/gm amp/width/.initial=1.7} +\ctikzset{tripoles/gm amp/port width/.initial=.7} +\ctikzset{tripoles/gm amp/height/.initial=1.4} +\ctikzset{tripoles/gm amp/input height/.initial=.5} +\ctikzset{tripoles/gm amp/up pos/.initial=.45} +\ctikzset{tripoles/inst amp/width/.initial=1.7} % instrumentation amplifier, simple +\ctikzset{tripoles/inst amp/port width/.initial=.7} +\ctikzset{tripoles/inst amp/height/.initial=1.4} +\ctikzset{tripoles/inst amp/input height/.initial=.5} +\ctikzset{tripoles/inst amp/up pos/.initial=.4} +\ctikzset{tripoles/inst amp/refv pos/.initial=.7} +\ctikzset{tripoles/inst amp/font/.initial= \fontsize{10}{0}\selectfont\boldmath}%absolute font size needed! +\ctikzset{tripoles/fd inst amp/width/.initial=1.7} % instrumentation amplifier, diff output +\ctikzset{tripoles/fd inst amp/port width/.initial=.7} +\ctikzset{tripoles/fd inst amp/height/.initial=1.4} +\ctikzset{tripoles/fd inst amp/input height/.initial=.5} +\ctikzset{tripoles/fd inst amp/up pos/.initial=.4} +\ctikzset{tripoles/fd inst amp/refv pos/.initial=.7} +\ctikzset{tripoles/fd inst amp/font/.initial= \fontsize{10}{0}\selectfont\boldmath}%absolute font size needed! +\ctikzset{tripoles/inst amp ra/width/.initial=2.4} % instrumentation amplifier with ra gain resistance added +\ctikzset{tripoles/inst amp ra/port width/.initial=.7} +\ctikzset{tripoles/inst amp ra/height/.initial=2.9} +\ctikzset{tripoles/inst amp ra/input height/.initial=.7} +\ctikzset{tripoles/inst amp ra/up pos/.initial=.4} +\ctikzset{tripoles/inst amp ra/refv pos/.initial=.7} +\ctikzset{tripoles/inst amp ra/ra pos/.initial=.6} +\ctikzset{tripoles/inst amp ra/font/.initial= \fontsize{10}{0}\selectfont\boldmath}%absolute font size needed! +\ctikzset{tripoles/plain amp/width/.initial=1.7} +\ctikzset{tripoles/plain amp/port width/.initial=.7} +\ctikzset{tripoles/plain amp/height/.initial=1.4} +\ctikzset{tripoles/plain amp/input height/.initial=.5} +\ctikzset{tripoles/plain amp/up pos/.initial=.45} + +\ctikzset{tripoles/thyristor/height/.initial=1.10} +\ctikzset{tripoles/thyristor/height 2/.initial=.5} +\ctikzset{tripoles/thyristor/width/.initial=1.0} +\ctikzset{tripoles/thyristor/diode height/.initial=.5} +\ctikzset{tripoles/thyristor/diode width left/.initial=.4} +\ctikzset{tripoles/thyristor/diode width right/.initial=.3} + +\ctikzset{tripoles/triac/height/.initial=1.1} +\ctikzset{tripoles/triac/width/.initial=1} +\ctikzset{tripoles/triac/diode width left/.initial=.3} +\ctikzset{tripoles/triac/diode width right/.initial=.3} + +%% Cute switches +\ctikzset{bipoles/cuteswitch/shape/.initial={ocirc}} +\ctikzset{bipoles/cuteswitch/height/.initial=.6} +\ctikzset{bipoles/cuteswitch/height 2/.initial=.2} +\ctikzset{bipoles/cuteswitch/width/.initial=.50} +\ctikzset{bipoles/cuteswitch/thickness/.initial=1} + +\ctikzset{tripoles/spdt/width/.initial=.85} +\ctikzset{tripoles/spdt/height/.initial=.45} +\ctikzset{tripoles/spdt/margin/.initial=.45} + +\ctikzset{tripoles/toggleswitch/height/.initial=.8} +\ctikzset{tripoles/toggleswitch/height 2/.initial=.0} +\ctikzset{tripoles/toggleswitch/width/.initial=.80} + +\ctikzset{tripoles/mixer/width/.initial=0.7} +\ctikzset{tripoles/adder/width/.initial=0.7} +\ctikzset{tripoles/circulator/width/.initial=.7} +\ctikzset{tripoles/oscillator/width/.initial=.7} + + +\ctikzset{tripoles/wilkinson/height/.initial=1.3} +\ctikzset{tripoles/wilkinson/width/.initial=1.3} + +\ctikzset{quadpoles/transformer/inner/.initial=0.4} +\ctikzset{quadpoles/transformer/width/.initial=1.5} +\ctikzset{quadpoles/transformer/width1/.initial=.4} +\ctikzset{quadpoles/transformer/height/.initial=1.5} +\ctikzset{quadpoles/transformer/height1/.initial=.8} +\ctikzset{quadpoles/transformer core/inner/.initial=0.4} +\ctikzset{quadpoles/transformer core/width/.initial=1.5} +\ctikzset{quadpoles/transformer core/height/.initial=1.5} +\ctikzset{quadpoles/transformer core/core height/.initial=.5} +\ctikzset{quadpoles/transformer core/core width/.initial=.05} +\ctikzset{quadpoles/gyrator/inner/.initial=0.4} +\ctikzset{quadpoles/gyrator/width/.initial=1.5} +\ctikzset{quadpoles/gyrator/height/.initial=1.5} +\ctikzset{quadpoles/fourport/width/.initial=1.3} +\ctikzset{quadpoles/fourport/height/.initial=1.3} +\ctikzset{quadpoles/coupler/width/.initial=1.3} +\ctikzset{quadpoles/coupler/height/.initial=1.3} +\ctikzset{quadpoles/coupler2/width/.initial=1.3} +\ctikzset{quadpoles/coupler2/height/.initial=1.3} + +\ctikzset{/tikz/circuitikz/tripoles/magnetron/width/.initial=1} + +\ctikzset{quadpoles style/.is choice} +\ctikzset{quadpoles style/inward/.code={ % default value + \ctikzset{quadpoles/transformer/inner=0.4} + \ctikzset{quadpoles/transformer/width=1.5} + \ctikzset{quadpoles/transformer core/inner=0.4} + \ctikzset{quadpoles/transformer core/width=1.5} + \ctikzset{quadpoles/gyrator/inner=0.4} + \ctikzset{quadpoles/gyrator/width=1.5} + } +} +\ctikzset{quadpoles style/inline/.code={ % now horizontal baffle + \ctikzset{quadpoles/transformer/inner=1} + \ctikzset{quadpoles/transformer/width=0.6} + \ctikzset{quadpoles/transformer core/inner=1} + \ctikzset{quadpoles/transformer core/width=0.6} + \ctikzset{quadpoles/gyrator/inner=1} + \ctikzset{quadpoles/gyrator/width=0.6} + } +} + + +% +% multipoles +% +\ctikzset{multipoles/thickness/.initial=2} +\ctikzset{multipoles/font/.initial=\tiny} +% DIP (dual in line package) chips +\ctikzset{multipoles/dipchip/width/.initial=1.2} +\ctikzset{multipoles/dipchip/num pins/.initial=8} +\ctikzset{multipoles/dipchip/pin spacing/.initial=0.4} +\pgfkeys{/tikz/num pins/.add code={}{\ctikzset{multipoles/dipchip/num pins=#1}}} +% QFP (quad flat package) chips +\ctikzset{multipoles/qfpchip/num pins/.initial=8} +\ctikzset{multipoles/qfpchip/pin spacing/.initial=0.4} +\pgfkeys{/tikz/num pins/.add code={}{\ctikzset{multipoles/qfpchip/num pins=#1}}} +% chip numbers +\newif\ifpgf@circuit@chip@shownumbers\pgf@circuit@chip@shownumberstrue +\pgfkeys{/tikz/show numbers/.add code={}{\pgf@circuit@chip@shownumberstrue}} +\ctikzset{show numbers/.add code={}{\pgf@circuit@chip@shownumberstrue}} +\pgfkeys{/tikz/hide numbers/.add code={}{\pgf@circuit@chip@shownumbersfalse}} +\ctikzset{hide numbers/.add code={}{\pgf@circuit@chip@shownumbersfalse}} +\newif\ifpgf@circuit@chip@straightnumbers\pgf@circuit@chip@straightnumberstrue +\pgfkeys{/tikz/straight numbers/.add code={}{\pgf@circuit@chip@straightnumberstrue}} +\ctikzset{straight numbers/.add code={}{\pgf@circuit@chip@straightnumberstrue}} +\pgfkeys{/tikz/rotated numbers/.add code={}{\pgf@circuit@chip@straightnumbersfalse}} +\ctikzset{rotated numbers/.add code={}{\pgf@circuit@chip@straightnumbersfalse}} +% external chip pins +\ctikzset{multipoles/external pins thickness/.initial=1} +\ctikzset{multipoles/external pins width/.initial=0.2} +\ctikzset{multipoles/external pad fraction/.initial=0} +\pgfkeys{/tikz/external pins width/.add code={}{\ctikzset{multipoles/external pins width=#1}}} +\pgfkeys{/tikz/external pad fraction/.add code={}{\ctikzset{multipoles/external pad fraction=#1}}} +% topmarks +\newif\ifpgf@circuit@chip@topmark\pgf@circuit@chip@topmarktrue +\pgfkeys{/tikz/topmark/.add code={}{\pgf@circuit@chip@topmarktrue}} +\ctikzset{topmark/.add code={}{\pgf@circuit@chip@topmarktrue}} +\pgfkeys{/tikz/no topmark/.add code={}{\pgf@circuit@chip@topmarkfalse}} +\ctikzset{no topmark/.add code={}{\pgf@circuit@chip@topmarkfalse}} + +% rotary switch by Romano +\ctikzset{multipoles/rotary/thickness/.initial=1} +\ctikzset{multipoles/rotary/shape/.initial=ocirc} +\ctikzset{multipoles/rotary/channels/.initial=5} +\ctikzset{multipoles/rotary/angle/.initial=60} +\ctikzset{multipoles/rotary/wiper/.initial=20} +\ctikzset{multipoles/rotary/arrow/.is choice} +\newif\ifpgf@circ@rotaryarrow\pgf@circ@rotaryarrowfalse +\newif\ifpgf@circ@rotaryarrow@cw\pgf@circ@rotaryarrow@cwfalse +\newif\ifpgf@circ@rotaryarrow@ccw\pgf@circ@rotaryarrow@ccwfalse +\ctikzset{multipoles/rotary/arrow/none/.code={\pgf@circ@rotaryarrowfalse\pgf@circ@rotaryarrow@cwfalse\pgf@circ@rotaryarrow@ccwfalse}} +\ctikzset{multipoles/rotary/arrow/both/.code={\pgf@circ@rotaryarrowtrue\pgf@circ@rotaryarrow@cwtrue\pgf@circ@rotaryarrow@ccwtrue}} +\ctikzset{multipoles/rotary/arrow/cw/.code={\pgf@circ@rotaryarrowtrue\pgf@circ@rotaryarrow@cwtrue\pgf@circ@rotaryarrow@ccwfalse}} +\ctikzset{multipoles/rotary/arrow/ccw/.code={\pgf@circ@rotaryarrowtrue\pgf@circ@rotaryarrow@cwfalse\pgf@circ@rotaryarrow@ccwtrue}} + +\tikzset{% + rotary switch/.style args={#1in#2wiper#3}{ + shape=rotaryswitch, + /tikz/circuitikz/multipoles/rotary/channels=#1, + /tikz/circuitikz/multipoles/rotary/angle=#2, + /tikz/circuitikz/multipoles/rotary/wiper=#3, + }, + rotary switch -/.style args={#1in#2wiper#3}{ + rotary switch=#1 in #2 wiper #3, + /tikz/circuitikz/multipoles/rotary/arrow=none, + }, + rotary switch <-/.style args={#1in#2wiper#3}{ + rotary switch=#1 in #2 wiper #3, + /tikz/circuitikz/multipoles/rotary/arrow=ccw, + }, + rotary switch ->/.style args={#1in#2wiper#3}{ + rotary switch=#1 in #2 wiper #3, + /tikz/circuitikz/multipoles/rotary/arrow=cw, + }, + rotary switch <->/.style args={#1in#2wiper#3}{ + rotary switch=#1 in #2 wiper #3, + /tikz/circuitikz/multipoles/rotary/arrow=both, + }, + % Notice that these should be the same as the initial values of the keys + rotary switch/.default={5 in 60 wiper 20 }, + rotary switch -/.default={5 in 60 wiper 20 }, + rotary switch <-/.default={5 in 60 wiper 20 }, + rotary switch ->/.default={5 in 60 wiper 20 }, + rotary switch <->/.default={5 in 60 wiper 20 }, +} + +% %Mechanical section +\ctikzset{/tikz/circuitikz/tripoles/elmech/height/.initial=.8} +\ctikzset{/tikz/circuitikz/tripoles/elmech/width/.initial=.6} +\ctikzset{bipoles/spring/height/.initial=.5} +\ctikzset{bipoles/spring/width/.initial=.5} +\ctikzset{bipoles/mass/height/.initial=.55} +\ctikzset{bipoles/mass/box height/.initial=.4} +\ctikzset{bipoles/mass/width/.initial=.5} + +\ctikzset{bipoles/damper/height/.initial=.35} +\ctikzset{bipoles/damper/length/.initial=.3} +\ctikzset{bipoles/damper/width/.initial=.4} + + +\ctikzset{bipole/.is family} +\ctikzset{bipole/kind/.initial = } +\ctikzset{bipole/name/.initial = } +\newif\ifpgf@circuit@bipole@isvoltage +\ctikzset{bipole/is voltage/.is if=pgf@circuit@bipole@isvoltage} +\newif\ifpgf@circuit@bipole@voltageoutsideofsymbol +\ctikzset{bipole/is voltageoutsideofsymbol/.is if=pgf@circuit@bipole@voltageoutsideofsymbol} +\newif\ifpgf@circuit@bipole@strokedsymbol +\ctikzset{bipole/is strokedsymbol/.is if=pgf@circuit@bipole@strokedsymbol} +\newif\ifpgf@circuit@bipole@iscurrent +\ctikzset{bipole/is current/.is if=pgf@circuit@bipole@iscurrent} + +\ctikzset{bipole/voltage/.is family} +\newif\ifpgf@circuit@bipole@voltage@backward +\ctikzset{bipole/voltage/direction/.is choice} +\ctikzset{bipole/voltage/direction/forward/.code={\pgf@circuit@bipole@voltage@backwardfalse}} +\ctikzset{bipole/voltage/direction/backward/.code={\pgf@circuit@bipole@voltage@backwardtrue}} +\newif\ifpgf@circuit@bipole@voltage@below +\ctikzset{bipole/voltage/position/.is choice} +\ctikzset{bipole/voltage/position/above/.code={\pgf@circuit@bipole@voltage@belowfalse}} +\ctikzset{bipole/voltage/position/below/.code={\pgf@circuit@bipole@voltage@belowtrue}} + +\ctikzset{bipole/voltage/label/unit/.initial=} +\ctikzset{bipole/voltage/label/name/.initial=} + +\ctikzset{bipole/current/.is family} +\newif\ifpgf@circuit@bipole@current@backward +\ctikzset{bipole/current/direction/.is choice} +\ctikzset{bipole/current/direction/forward/.code={\pgf@circuit@bipole@current@backwardfalse}} +\ctikzset{bipole/current/direction/backward/.code={\pgf@circuit@bipole@current@backwardtrue}} +\newif\ifpgf@circuit@bipole@current@before +\ctikzset{bipole/current/x position/.is choice} +\ctikzset{bipole/current/x position/after/.code={\pgf@circuit@bipole@current@beforefalse}} +\ctikzset{bipole/current/x position/before/.code={\pgf@circuit@bipole@current@beforetrue}} +\newif\ifpgf@circuit@bipole@current@below +\ctikzset{bipole/current/y position/.is choice} +\ctikzset{bipole/current/y position/above/.code={\pgf@circuit@bipole@current@belowfalse}} +\ctikzset{bipole/current/y position/below/.code={\pgf@circuit@bipole@current@belowtrue}} +\ctikzset{bipole/current/label/unit/.initial=} +\ctikzset{bipole/current/label/name/.initial=} + +\ctikzset{bipole/flow/.is family} +\newif\ifpgf@circuit@bipole@flow@backward +\ctikzset{bipole/flow/direction/.is choice} +\ctikzset{bipole/flow/direction/forward/.code={\pgf@circuit@bipole@flow@backwardfalse}} +\ctikzset{bipole/flow/direction/backward/.code={\pgf@circuit@bipole@flow@backwardtrue}} +\newif\ifpgf@circuit@bipole@flow@before +\ctikzset{bipole/flow/x position/.is choice} +\ctikzset{bipole/flow/x position/after/.code={\pgf@circuit@bipole@flow@beforefalse}} +\ctikzset{bipole/flow/x position/before/.code={\pgf@circuit@bipole@flow@beforetrue}} +\newif\ifpgf@circuit@bipole@flow@below +\ctikzset{bipole/flow/y position/.is choice} +\ctikzset{bipole/flow/y position/above/.code={\pgf@circuit@bipole@flow@belowfalse}} +\ctikzset{bipole/flow/y position/below/.code={\pgf@circuit@bipole@flow@belowtrue}} +\ctikzset{bipole/flow/label/unit/.initial=} +\ctikzset{bipole/flow/label/name/.initial=} +\ctikzset{flow/distance/.initial = .5} +\ctikzset{flow/offset/.initial = .2}%distance between flow-arrow and conductor + +\ctikzset{bipole/label/.is family} +\ctikzset{bipole/label/position/.initial=90} +\ctikzset{bipole/label/unit/.initial=} +\ctikzset{bipole/label/name/.initial=} +\ctikzset{bipole/annotation/.is family} +\ctikzset{bipole/annotation/position/.initial=-90} +\ctikzset{bipole/annotation/unit/.initial=} +\ctikzset{bipole/annotation/name/.initial=} + +\newif\ifpgf@circuit@europeanresistor +\ctikzset{resistor/.is choice} +\ctikzset{resistor/american/.code = \pgf@circuit@europeanresistorfalse } +\ctikzset{resistor/european/.code = \pgf@circuit@europeanresistortrue } + +\ctikzset{inductor/.is choice} +\ctikzset{inductor/cute/.code={\ctikzsetvalof{inductor}{cute}}} +\ctikzset{inductor/european/.code={\ctikzsetvalof{inductor}{european}}} +\ctikzset{inductor/american/.code={\ctikzsetvalof{inductor}{american}}} + +\newif\ifpgf@circuit@strokediode +\newif\ifpgf@circuit@fulldiode +\pgf@circuit@strokediodefalse +\pgf@circuit@fulldiodefalse + +\ctikzset{diode/.is choice} +\ctikzset{diode/empty/.code = \pgf@circuit@fulldiodefalse\pgf@circuit@strokediodefalse}%default +\ctikzset{diode/full/.code = \pgf@circuit@fulldiodetrue } +\ctikzset{diode/stroke/.code = \pgf@circuit@strokediodetrue} + +\tikzset{full diodes/.style = { \circuitikzbasekey/diode = full }} +\tikzset{empty diodes/.style = { \circuitikzbasekey/diode = empty }} +\tikzset{stroke diodes/.style = { \circuitikzbasekey/diode = stroke }} + +\ctikzset{thickness/.initial=2} +\ctikzset{color/.initial=black} +\pgfkeys{/tikz/color/.add code={}{\ctikzset{color={#1}}}} + +\newif\ifpgf@circ@siunitx +\newif\ifpgf@circ@siunitx@res + +\ctikzset{straight/.is choice} +\ctikzset{straightvoltage value/.initial=true} +\ctikzset{straight/true/.code = {\pgf@circuit@bipole@voltage@straighttrue}} +\ctikzset{straight/false/.code = {\pgf@circuit@bipole@voltage@straightfalse}} +\ctikzset{straightvoltage/.style = {/tikz/circuitikz/straight=true}} +\newif\ifpgf@circuit@bipole@voltage@straight +\ctikzset{bipole/straight/.is if=pgf@circuit@bipole@voltage@straight} + + +\ctikzset{voltage/.is family} +\ctikzset{voltage/distance from node/.initial=.5} %\pgf@circ@Rlen units +\ctikzset{voltage/distance from line/.initial=.08} % pos, tra 0 e 1 +\ctikzset{voltage/bump a/.initial=1.2} +\ctikzset{voltage/bump b/.initial=1.5} +\ctikzset{voltage/shift/.initial=0.0} % shift form the cable of voltage symbols +\ctikzset{voltage shift/.style={voltage/shift=#1}} +\tikzset{voltage shift/.style={\circuitikzbasekey/voltage/shift=#1}} +\ctikzset{voltage/european label distance/.initial=1.4} +\ctikzset{voltage/american label distance/.initial=1.1} +% shaping the +/- sign, see pgfcircvoltage.tex +\ctikzset{voltage/american font/.initial={}} +\ctikzset{voltage/american plus/.initial={$+$}} +\ctikzset{voltage/american minus/.initial={$-$}} + +% special cases +\ctikzset{bipoles/generic/voltage/distance from node/.initial=.4} +\ctikzset{bipoles/generic/voltage/bump b/.initial=2} +\ctikzset{bipoles/generic/voltage/european label distance/.initial=1.8} +%\ctikzset{bipoles/thermocouple/voltage/distance from node/.initial=.3} +\ctikzset{bipoles/thermocouple/voltage/bump b/.initial=2.2} +\ctikzset{bipoles/thermocouple/voltage/european label distance/.initial=1.5} +\ctikzset{bipoles/ageneric/voltage/distance from node/.initial=.4} +\ctikzset{bipoles/ageneric/voltage/bump b/.initial=2} +\ctikzset{bipoles/ageneric/voltage/european label distance/.initial=1.8} +\ctikzset{bipoles/fullgeneric/voltage/distance from node/.initial=.4} +\ctikzset{bipoles/fullgeneric/voltage/bump b/.initial=2} +\ctikzset{bipoles/fullgeneric/voltage/european label distance/.initial=1.8} +\ctikzset{bipoles/memristor/voltage/distance from node/.initial=.4} +\ctikzset{bipoles/memristor/voltage/bump b/.initial=2} +\ctikzset{bipoles/memristor/voltage/european label distance/.initial=1.8} +%\ctikzset{bipoles/tline/voltage/distance from node/.initial=.2} +\ctikzset{bipoles/tline/voltage/bump b/.initial=2.4} +\ctikzset{bipoles/tline/voltage/european label distance/.initial=2.1} +%\ctikzset{bipoles/varistor/voltage/distance from node/.initial=.2} +\ctikzset{bipoles/varistor/voltage/bump b/.initial=2.4} +\ctikzset{bipoles/varistor/voltage/european label distance/.initial=2} +%\ctikzset{bipoles/photoresistor/voltage/distance from node/.initial=.2} +\ctikzset{bipoles/photoresistor/voltage/bump b/.initial=2} +\ctikzset{bipoles/photoresistor/voltage/european label distance/.initial=1.8} +%\ctikzset{bipoles/thermistor/voltage/distance from node/.initial=.2} +\ctikzset{bipoles/thermistor/voltage/bump b/.initial=2.4} +\ctikzset{bipoles/thermistor/voltage/european label distance/.initial=2} +%\ctikzset{bipoles/thermistorntc/voltage/distance from node/.initial=.2} +\ctikzset{bipoles/thermistorntc/voltage/bump b/.initial=1.6} +%\ctikzset{bipoles/thermistorptc/voltage/distance from node/.initial=.2} +\ctikzset{bipoles/thermistorptc/voltage/bump b/.initial=1.6} + +\ctikzset{current/.is family} +\ctikzset{current/distance/.initial = .5} + + +\tikzset{american currents/.style = { \circuitikzbasekey/current = american } } +\tikzset{european currents/.style = { \circuitikzbasekey/current = european } } +\tikzset{american voltages/.style = { \circuitikzbasekey/voltage = american } } +\tikzset{european voltages/.style = { \circuitikzbasekey/voltage = european } } +\tikzset{american resistors/.style = { \circuitikzbasekey/resistor = american } } +\tikzset{european resistors/.style = { \circuitikzbasekey/resistor = european } } + +\newif\ifpgf@circuit@europeangfsurgearrester +\ctikzset{gas filled surge arrester choice/.is choice} +\ctikzset{gas filled surge arrester choice/european/.code= {\pgf@circuit@europeangfsurgearrestertrue } } +\ctikzset{gas filled surge arrester choice/american/.code= {\pgf@circuit@europeangfsurgearresterfalse } } + +\tikzset{american gas filled surge arrester set/.style = { \circuitikzbasekey/gas filled surge arrester choice=american } } +\tikzset{european gas filled surge arrester set/.style = { \circuitikzbasekey/gas filled surge arrester choice=european } } +\tikzset{american inductors/.style = { \circuitikzbasekey/inductor = american } } +\tikzset{european inductors/.style = { \circuitikzbasekey/inductor = european } } +\tikzset{cute inductors/.style = { \circuitikzbasekey/inductor = cute } } +\tikzset{american ports/.style = { \circuitikzbasekey/logic ports = american } } +\tikzset{european ports/.style = { \circuitikzbasekey/logic ports = european } } +\tikzset{european/.style = { european currents, european voltages, european resistors, european inductors, european ports, european gas filled surge arrester set} } +\tikzset{american/.style = { american currents, american voltages, american resistors, american inductors, american ports, american gas filled surge arrester set} } +\tikzset{cute/.style = { european currents, european voltages, american resistors, cute inductors, american ports } } + +% I should try to make the tree clearer (this voltage conflicts with the options above) + +\newif\ifpgf@circuit@europeanvoltage +\ctikzset{voltage/.is choice} +\ctikzset{voltage/american/.code = {\pgf@circuit@europeanvoltagefalse } } +\ctikzset{voltage/european/.code = {\pgf@circuit@europeanvoltagetrue } } + +\newif\ifpgf@circuit@europeancurrent +\ctikzset{current/.is choice} +\ctikzset{current/american/.code = \pgf@circuit@europeancurrentfalse } +\ctikzset{current/european/.code = \pgf@circuit@europeancurrenttrue } + +% noise sources +\ctikzset{bipoles/noise sources/fillcolor/.initial=gray!50} + +\ctikzset{label/align/.is choice} +\ctikzset{label/align/straight/.code={\ctikzsetvalof{label/align}{straight}}} +\ctikzset{label/align/rotate/.code={\ctikzsetvalof{label/align}{rotate}}} +\ctikzset{label/align/smart/.code={\ctikzsetvalof{label/align}{smart}}} + +% seven segment displays by RGtti + +\newif\ifpgf@circ@sevenseg@dot +\newif\ifpgf@circ@sevenseg@box +\def\pgf@circ@sevenseg@dotstate{empty} +\ctikzset{seven seg/.is family} +\ctikzset{seven seg/dot/.is choice} +% none means no dot, not space for it. Empty means no dot, but space +\ctikzset{seven seg/dot/none/.code={\pgf@circ@sevenseg@dotfalse}} +\ctikzset{seven seg/dot/empty/.code={\pgf@circ@sevenseg@dottrue\def\pgf@circ@sevenseg@dotstate{empty}}} +\ctikzset{seven seg/dot/off/.code={\pgf@circ@sevenseg@dottrue\def\pgf@circ@sevenseg@dotstate{off}}} +\ctikzset{seven seg/dot/on/.code={\pgf@circ@sevenseg@dottrue\def\pgf@circ@sevenseg@dotstate{on}}} +% +\ctikzset{seven seg/width/.initial=0.4}% relative to \pgf@circ@Rlen +\ctikzset{seven seg/thickness/.initial=4pt}% segment thickness +\ctikzset{seven seg/segment sep/.initial=0.2pt}% gap between segments +\ctikzset{seven seg/box sep/.initial=1pt}% external box gap +\ctikzset{seven seg/color on/.initial=red}% color for segment "on" +\ctikzset{seven seg/color off/.initial=gray!20!white} % ...and "off" +\ctikzset{seven seg/box/.is choice} +\ctikzset{seven seg/box/off/.code={\pgf@circ@sevenseg@boxfalse}} +\ctikzset{seven seg/box/on/.code={\pgf@circ@sevenseg@boxtrue}} + +\ctikzset{seven seg/bits/.initial=0000000} + +\ctikzset{seven seg/value/.code={ + \edef\@@tmp{#1} + \edef\@@n{0} \ifx\@@tmp\@@n\relax\ctikzset{seven seg/bits=1111110}\fi + \edef\@@n{1} \ifx\@@tmp\@@n\relax\ctikzset{seven seg/bits=0110000}\fi + \edef\@@n{2} \ifx\@@tmp\@@n\relax\ctikzset{seven seg/bits=1101101}\fi + \edef\@@n{3} \ifx\@@tmp\@@n\relax\ctikzset{seven seg/bits=1111001}\fi + \edef\@@n{4} \ifx\@@tmp\@@n\relax\ctikzset{seven seg/bits=0110011}\fi + \edef\@@n{5} \ifx\@@tmp\@@n\relax\ctikzset{seven seg/bits=1011011}\fi + \edef\@@n{6} \ifx\@@tmp\@@n\relax\ctikzset{seven seg/bits=1011111}\fi + \edef\@@n{7} \ifx\@@tmp\@@n\relax\ctikzset{seven seg/bits=1110000}\fi + \edef\@@n{8} \ifx\@@tmp\@@n\relax\ctikzset{seven seg/bits=1111111}\fi + \edef\@@n{9} \ifx\@@tmp\@@n\relax\ctikzset{seven seg/bits=1111011}\fi + \edef\@@n{10}\ifx\@@tmp\@@n\relax\ctikzset{seven seg/bits=1110111}\fi + \edef\@@n{11}\ifx\@@tmp\@@n\relax\ctikzset{seven seg/bits=0011111}\fi + \edef\@@n{12}\ifx\@@tmp\@@n\relax\ctikzset{seven seg/bits=1001110}\fi + \edef\@@n{13}\ifx\@@tmp\@@n\relax\ctikzset{seven seg/bits=0111101}\fi + \edef\@@n{14}\ifx\@@tmp\@@n\relax\ctikzset{seven seg/bits=1001111}\fi + \edef\@@n{15}\ifx\@@tmp\@@n\relax\ctikzset{seven seg/bits=1000111}\fi + \edef\@@n{A} \ifx\@@tmp\@@n\relax\ctikzset{seven seg/bits=1110111}\fi + \edef\@@n{B} \ifx\@@tmp\@@n\relax\ctikzset{seven seg/bits=0011111}\fi + \edef\@@n{C} \ifx\@@tmp\@@n\relax\ctikzset{seven seg/bits=1001110}\fi + \edef\@@n{D} \ifx\@@tmp\@@n\relax\ctikzset{seven seg/bits=0111101}\fi + \edef\@@n{E} \ifx\@@tmp\@@n\relax\ctikzset{seven seg/bits=1001111}\fi + \edef\@@n{F} \ifx\@@tmp\@@n\relax\ctikzset{seven seg/bits=1000111}\fi + \edef\@@n{a} \ifx\@@tmp\@@n\relax\ctikzset{seven seg/bits=1110111}\fi + \edef\@@n{b} \ifx\@@tmp\@@n\relax\ctikzset{seven seg/bits=0011111}\fi + \edef\@@n{c} \ifx\@@tmp\@@n\relax\ctikzset{seven seg/bits=1001110}\fi + \edef\@@n{d} \ifx\@@tmp\@@n\relax\ctikzset{seven seg/bits=0111101}\fi + \edef\@@n{e} \ifx\@@tmp\@@n\relax\ctikzset{seven seg/bits=1001111}\fi + \edef\@@n{f} \ifx\@@tmp\@@n\relax\ctikzset{seven seg/bits=1000111}\fi + \edef\@@n{-} \ifx\@@tmp\@@n\relax\ctikzset{seven seg/bits=0000001}\fi +}} + +\tikzset{% + seven segment val/.style args={#1dot#2box#3}{ + shape=bare7seg, + /tikz/circuitikz/seven seg/value=#1, + /tikz/circuitikz/seven seg/dot=#2, + /tikz/circuitikz/seven seg/box=#3, + }, + seven segment bits/.style args={#1dot#2box#3}{ + shape=bare7seg, + /tikz/circuitikz/seven seg/bits=#1, + /tikz/circuitikz/seven seg/dot=#2, + /tikz/circuitikz/seven seg/box=#3, + }, +} + + +%%%%%%%%%% new +\pgfkeys{\circuitikzbasekey/.search also={/tikz}} + +% Electronic tubes: diodetube, triode, tetrode and pentode +\ctikzset{tubes/width/.initial=1} % relative width +\ctikzset{tubes/height/.initial=1.4} % relative height +\ctikzset{tubes/tube radius/.initial=0.40} % radius of tube circle +\ctikzset{tubes/anode distance/.initial=0.40} % distance from center +\ctikzset{tubes/anode width/.initial=0.40} % width of an anode/plate +\ctikzset{tubes/grid protrusion/.initial=0.25} % distance from center +\ctikzset{tubes/grid dashes/.initial=5} % number of grid dashes +\ctikzset{tubes/grid separation/.initial=0.2} % separation between grids +\ctikzset{tubes/grid shift/.initial=0.0} % y shift grids from center +\ctikzset{tubes/cathode distance/.initial=0.40} % distance from grid +\ctikzset{tubes/cathode width/.initial=0.40} % width of an cathode +\ctikzset{tubes/cathode corners/.initial=0.06} % corners of the cathode wire +\ctikzset{tubes/cathode right extend/.initial=0.075} % extension at the right side +\ctikzset{tubes/filament distance/.initial=0.1} % distance from cathode +\ctikzset{tubes/filament angle/.initial=15} % Angle from centerpoint + +\newif\ifpgf@circuit@tubes@filament\pgf@circuit@tubes@filamentfalse +\pgfkeys{/tikz/filament/.add code={}{\pgf@circuit@tubes@filamenttrue}} +\ctikzset{tubes/filament/.add code={}{\pgf@circuit@tubes@filamenttrue}} +\newif\ifpgf@circuit@tubes@nocathode\pgf@circuit@tubes@nocathodefalse +\pgfkeys{/tikz/nocathode/.add code={}{\pgf@circuit@tubes@nocathodetrue}} +\ctikzset{tubes/nocathode/.add code={}{\pgf@circuit@tubes@nocathodetrue}} +\newif\ifpgf@circuit@tubes@fullcathode\pgf@circuit@tubes@fullcathodefalse +\pgfkeys{/tikz/fullcathode/.add code={}{\pgf@circuit@tubes@fullcathodetrue}} +\ctikzset{tubes/fullcathode/.add code={}{\pgf@circuit@tubes@fullcathodetrue}} + +%%%---------- close: tex/pgfcirc.defines +%%%%%%%%%%% Springe nach tex/pgfcircutils +%%%---------- open: tex/pgfcircutils.tex +% Copyright 2007-2009 by Massimo Redaelli +% +% This file may be distributed and/or modified +% +% 1. under the LaTeX Project Public License and/or +% 2. under the GNU Public License. +% +% See the files gpl-3.0_license.txt and lppl-1-3c_license.txt for more details. + +%\def\pgf@circ@handleSI#1{% + % \pgf@circ@siunitx@resfalse +% + % \edef\len{\stringlength[e]{#1}} + %\testmatchingchar[e]{#1}{\len}{>}% + %\ifmatchingchar% + % \ifnum\findchars{#1}{<}=0 + % \def\pgf@circ@handleSI@val{\substring{#1}{1}{\findchars{#1}{<}-1}} + %\def\pgf@circ@handleSI@unit{\substring{#1}{\findchars{#1}{<}-1}+1}{\stringlength{#1}} + %\pgf@circ@siunitx@restrue +% \else +% \fi + %\else + %\fi +%} + +\def\pgf@circ@handleSI#1{ + \noexpandarg + \def\pgf@temp{} + \StrBetween{#1}{<}{>}[\pgf@circ@handleSI@unit] + \StrLen{\pgf@circ@handleSI@unit}[\pgf@circ@handleSI@unit@len] + + \ifnum\pgf@circ@handleSI@unit@len=0 + \pgf@circ@siunitx@resfalse + \else + \IfEndWith{#1}{>}{ + \pgf@circ@siunitx@restrue + \noexpandarg + \StrBefore{#1}{<}[\pgf@circ@handleSI@val] + %\typeout{si |#1|} + }{ + \pgf@circ@siunitx@resfalse + %\typeout{no si |#1|} + } +\fi +} + +\def\pgf@circ@ifkeyempty#1{ + \pgfextra{ + \ctikzset{#1/.get=\pgf@circ@temp} + \edef\pgf@temp{} + } + \ifx\pgf@circ@temp\pgf@temp + } + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Math routines + +\def\pgf@circ@stripdecimals#1.#2\pgf@nil{#1} + +%%%---------- close: tex/pgfcircutils + +%%%%%%%%%%% Springe nach tex/pgfcircshapes +%%%---------- open: tex/pgfcircshapes.tex +% Copyright 2007-2009 by Massimo Redaelli +% +% This file may be distributed and/or modified +% +% 1. under the LaTeX Project Public License and/or +% 2. under the GNU Public License. +% +% See the files gpl-3.0_license.txt and lppl-1-3c_license.txt for more details. + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Other shapes + +%% Nothing + +\pgfdeclareshape{emptyshape}{ + \savedanchor{\northeast}{% + \pgf@x=.5\wd\pgfnodeparttextbox% + \pgf@y=.5\ht\pgfnodeparttextbox% + } + \anchor{north}{\northeast\pgf@x=0cm\relax} + \anchor{east}{\northeast\pgf@y=0cm\relax} + \anchor{south}{\northeast\pgf@y=-\pgf@y \pgf@x=0cm\relax} + \anchor{west}{\northeast\pgf@y=0cm\pgf@x=-\pgf@x} + \anchor{north east}{\northeast} + \anchor{north west}{\northeast\pgf@x=-\pgf@x} + \anchor{south east}{\northeast\pgf@y=-\pgf@y} + \anchor{south west}{\northeast\pgf@y=-\pgf@y\pgf@x=-\pgf@x} + \anchor{text}{\pgfpoint{-.5\wd\pgfnodeparttextbox}{\dimexpr.5\dp\pgfnodeparttextbox-.5\ht\pgfnodeparttextbox}} + \anchor{center}{ + \pgfpointorigin + } +} + +%% Full terminal + +\pgfdeclareshape{circ}{ + \anchor{center}{ + \pgfpointorigin + } + \savedanchor\northwest{% + \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/nodes width}\pgf@circ@Rlen + \pgf@x=-\pgf@y + } + \anchor{center}{ \pgf@y=0pt \pgf@x=0pt } + \anchor{east}{ \northwest \pgf@y=0pt \pgf@x=-\pgf@x } + \anchor{e}{ \northwest \pgf@y=0pt \pgf@x=-\pgf@x } + \anchor{west}{ \northwest \pgf@y=0pt } + \anchor{w}{ \northwest \pgf@y=0pt } + \anchor{south}{ \northwest \pgf@x=0pt \pgf@y=-\pgf@y } + \anchor{s}{ \northwest \pgf@x=0pt \pgf@y=-\pgf@y } + \anchor{north}{ \northwest \pgf@x=0pt } + \anchor{n}{ \northwest \pgf@x=0pt } + \anchor{south west}{ \northwest \pgf@y=-\pgf@y } + \anchor{north east}{ \northwest \pgf@x=-\pgf@x } + \anchor{north west}{ \northwest } + \anchor{south east}{ \northwest \pgf@x=-\pgf@x \pgf@y=-\pgf@y } + \anchorborder{ + \pgf@circ@res@left=\pgf@x + \pgf@circ@res@up=\pgf@y + \pgfpointborderellipse{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up} + }{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgf@circ@Rlen}{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgf@circ@Rlen}} + } + \behindforegroundpath{ + + \pgfscope + \pgfpathcircle{\pgfpointorigin}{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgf@circ@Rlen} + \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}} + \pgfsetfillopacity{1.0} + \pgfusepath{draw,fill} + \endpgfscope + + } +} + +%% Empty terminal + +\pgfdeclareshape{ocirc}{ + \anchor{center}{ + \pgfpointorigin + } + \savedanchor\northwest{% + \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/nodes width}\pgf@circ@Rlen + \pgf@x=-\pgf@y + } + \anchor{center}{ \pgf@y=0pt \pgf@x=0pt } + \anchor{east}{ \northwest \pgf@y=0pt \pgf@x=-\pgf@x } + \anchor{e}{ \northwest \pgf@y=0pt \pgf@x=-\pgf@x } + \anchor{west}{ \northwest \pgf@y=0pt } + \anchor{w}{ \northwest \pgf@y=0pt } + \anchor{south}{ \northwest \pgf@x=0pt \pgf@y=-\pgf@y } + \anchor{s}{ \northwest \pgf@x=0pt \pgf@y=-\pgf@y } + \anchor{north}{ \northwest \pgf@x=0pt } + \anchor{n}{ \northwest \pgf@x=0pt } + \anchor{south west}{ \northwest \pgf@y=-\pgf@y } + \anchor{north east}{ \northwest \pgf@x=-\pgf@x } + \anchor{north west}{ \northwest } + \anchor{south east}{ \northwest \pgf@x=-\pgf@x \pgf@y=-\pgf@y } + \anchorborder{ + \pgf@circ@res@left=\pgf@x + \pgf@circ@res@up=\pgf@y + \pgfpointborderellipse{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up} + }{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgf@circ@Rlen}{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgf@circ@Rlen}} + } + + \behindforegroundpath{ + + \pgfscope + \pgfpathcircle{\pgfpointorigin}{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgf@circ@Rlen} + \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}} + \ifx\tikz@fillcolor\pgfutil@empty + \pgfsetfillcolor{white} + \else + \pgfsetfillcolor{\tikz@fillcolor} + \fi + \pgfsetfillopacity{1.0} + \pgfusepath{draw,fill} + \endpgfscope + + } +} + +%% Diamond terminal + +\pgfdeclareshape{diamondpole}{ + \anchor{center}{ + \pgfpointorigin + } + \savedanchor\northwest{% + \pgfmathsetlength{\pgf@y}{sqrt(2)*\ctikzvalof{nodes width}*\pgf@circ@Rlen} + \pgf@x=-\pgf@y + } + \anchor{center}{ \pgf@y=0pt \pgf@x=0pt } + \anchor{east}{ \northwest \pgf@y=0pt \pgf@x=-\pgf@x } + \anchor{e}{ \northwest \pgf@y=0pt \pgf@x=-\pgf@x } + \anchor{west}{ \northwest \pgf@y=0pt } + \anchor{w}{ \northwest \pgf@y=0pt } + \anchor{south}{ \northwest \pgf@x=0pt \pgf@y=-\pgf@y } + \anchor{s}{ \northwest \pgf@x=0pt \pgf@y=-\pgf@y } + \anchor{north}{ \northwest \pgf@x=0pt } + \anchor{n}{ \northwest \pgf@x=0pt } + \anchor{south west}{ \northwest \pgf@y=-\pgf@y } + \anchor{north east}{ \northwest \pgf@x=-\pgf@x } + \anchor{north west}{ \northwest } + \anchor{south east}{ \northwest \pgf@x=-\pgf@x \pgf@y=-\pgf@y } + \anchorborder{ + % \typeout{IN\space X:\the\pgf@x\space Y:\the\pgf@y} + \pgfmathsetmacro{\@@switchx}{ifthenelse(\pgf@x>0,1,-1)} + \pgfmathsetmacro{\@@switchy}{ifthenelse(\pgf@y>0,1,-1)} + \pgfmathsetlength{\pgf@xa}{abs(\pgf@x)} + \pgfmathsetlength{\pgf@ya}{abs(\pgf@y)} + \pgfextracty{\pgf@circ@res@up}{\northwest} + % \typeout{MID\space X:\the\pgf@xa\space Y:\the\pgf@ya\space L:\the\pgf@circ@res@up} + % \typeout{MID\space SX:\@@switchx\space SY:\@@switchy} + \pgfpointintersectionoflines + {\pgfpointorigin}{\pgfqpoint{\pgf@xa}{\pgf@ya}} + {\pgfqpoint{0pt}{\pgf@circ@res@up}}{\pgfqpoint{\pgf@circ@res@up}{0pt}} + % \typeout{CROSS \space X:\the\pgf@x\space Y:\the\pgf@y} + \pgf@x=\@@switchx\pgf@x + \pgf@y=\@@switchy\pgf@y + } + \behindforegroundpath{ + \pgfscope + \pgfmathsetlength{\pgf@circ@res@temp}{\ctikzvalof{nodes width}*\pgf@circ@Rlen} + \pgftransformrotate{45} + \pgfpathrectanglecorners + {\pgfpoint{-\pgf@circ@res@temp}{-\pgf@circ@res@temp}} + {\pgfpoint{\pgf@circ@res@temp}{\pgf@circ@res@temp}} + \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}} + \pgfsetfillopacity{1.0} + \pgfusepath{draw,fill} + \endpgfscope + } +} + +%% Diamond terminal, unfilled + +\pgfdeclareshape{odiamondpole}{ + \anchor{center}{ + \pgfpointorigin + } + \savedanchor\northwest{% + \pgfmathsetlength{\pgf@y}{sqrt(2)*\ctikzvalof{nodes width}*\pgf@circ@Rlen} + \pgf@x=-\pgf@y + } + \anchor{center}{ \pgf@y=0pt \pgf@x=0pt } + \anchor{east}{ \northwest \pgf@y=0pt \pgf@x=-\pgf@x } + \anchor{e}{ \northwest \pgf@y=0pt \pgf@x=-\pgf@x } + \anchor{west}{ \northwest \pgf@y=0pt } + \anchor{w}{ \northwest \pgf@y=0pt } + \anchor{south}{ \northwest \pgf@x=0pt \pgf@y=-\pgf@y } + \anchor{s}{ \northwest \pgf@x=0pt \pgf@y=-\pgf@y } + \anchor{north}{ \northwest \pgf@x=0pt } + \anchor{n}{ \northwest \pgf@x=0pt } + \anchor{south west}{ \northwest \pgf@y=-\pgf@y } + \anchor{north east}{ \northwest \pgf@x=-\pgf@x } + \anchor{north west}{ \northwest } + \anchor{south east}{ \northwest \pgf@x=-\pgf@x \pgf@y=-\pgf@y } + \anchorborder{ + % \typeout{IN\space X:\the\pgf@x\space Y:\the\pgf@y} + \pgfmathsetmacro{\@@switchx}{ifthenelse(\pgf@x>0,1,-1)} + \pgfmathsetmacro{\@@switchy}{ifthenelse(\pgf@y>0,1,-1)} + \pgfmathsetlength{\pgf@xa}{abs(\pgf@x)} + \pgfmathsetlength{\pgf@ya}{abs(\pgf@y)} + \pgfextracty{\pgf@circ@res@up}{\northwest} + % \typeout{MID\space X:\the\pgf@xa\space Y:\the\pgf@ya\space L:\the\pgf@circ@res@up} + % \typeout{MID\space SX:\@@switchx\space SY:\@@switchy} + \pgfpointintersectionoflines + {\pgfpointorigin}{\pgfqpoint{\pgf@xa}{\pgf@ya}} + {\pgfqpoint{0pt}{\pgf@circ@res@up}}{\pgfqpoint{\pgf@circ@res@up}{0pt}} + % \typeout{CROSS \space X:\the\pgf@x\space Y:\the\pgf@y} + \pgf@x=\@@switchx\pgf@x + \pgf@y=\@@switchy\pgf@y + } + \behindforegroundpath{ + \pgfscope + \pgfmathsetlength{\pgf@circ@res@temp}{\ctikzvalof{nodes width}*\pgf@circ@Rlen} + \pgftransformrotate{45} + \pgfpathrectanglecorners + {\pgfpoint{-\pgf@circ@res@temp}{-\pgf@circ@res@temp}} + {\pgfpoint{\pgf@circ@res@temp}{\pgf@circ@res@temp}} + \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}} + \ifx\tikz@fillcolor\pgfutil@empty + \pgfsetfillcolor{white} + \else + \pgfsetfillcolor{\tikz@fillcolor} + \fi + \pgfsetfillopacity{1.0} + \pgfusepath{draw,fill} + \endpgfscope + } +} + +%% square terminal, filled + +\pgfdeclareshape{squarepole}{ + \anchor{center}{ + \pgfpointorigin + } + \savedanchor\northwest{% + \pgfmathsetlength{\pgf@y}{\ctikzvalof{nodes width}*\pgf@circ@Rlen} + \pgf@x=-\pgf@y + } + \anchor{center}{ \pgf@y=0pt \pgf@x=0pt } + \anchor{east}{ \northwest \pgf@y=0pt \pgf@x=-\pgf@x } + \anchor{e}{ \northwest \pgf@y=0pt \pgf@x=-\pgf@x } + \anchor{west}{ \northwest \pgf@y=0pt } + \anchor{w}{ \northwest \pgf@y=0pt } + \anchor{south}{ \northwest \pgf@x=0pt \pgf@y=-\pgf@y } + \anchor{s}{ \northwest \pgf@x=0pt \pgf@y=-\pgf@y } + \anchor{north}{ \northwest \pgf@x=0pt } + \anchor{n}{ \northwest \pgf@x=0pt } + \anchor{south west}{ \northwest \pgf@y=-\pgf@y } + \anchor{north east}{ \northwest \pgf@x=-\pgf@x } + \anchor{north west}{ \northwest } + \anchor{south east}{ \northwest \pgf@x=-\pgf@x \pgf@y=-\pgf@y } + \anchorborder{ + \pgf@xa=\pgf@x + \pgf@ya=\pgf@y + \pgfextracty{\pgf@circ@res@up}{\northwest} + \pgfpointborderrectangle + {\pgfqpoint{\pgf@xa}{\pgf@ya}} + {\pgfqpoint{\pgf@circ@res@up}{\pgfqpoint{\pgf@circ@res@up}}} + } + \behindforegroundpath{ + \pgfscope + \pgfmathsetlength{\pgf@circ@res@temp}{\ctikzvalof{nodes width}*\pgf@circ@Rlen} + \pgfpathrectanglecorners + {\pgfpoint{-\pgf@circ@res@temp}{-\pgf@circ@res@temp}} + {\pgfpoint{\pgf@circ@res@temp}{\pgf@circ@res@temp}} + \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}} + \pgfsetfillopacity{1.0} + \pgfusepath{draw,fill} + \endpgfscope + } +} +%% square terminal, unfilled + +\pgfdeclareshape{osquarepole}{ + \anchor{center}{ + \pgfpointorigin + } + \savedanchor\northwest{% + \pgfmathsetlength{\pgf@y}{\ctikzvalof{nodes width}*\pgf@circ@Rlen} + \pgf@x=-\pgf@y + } + \anchor{center}{ \pgf@y=0pt \pgf@x=0pt } + \anchor{east}{ \northwest \pgf@y=0pt \pgf@x=-\pgf@x } + \anchor{e}{ \northwest \pgf@y=0pt \pgf@x=-\pgf@x } + \anchor{west}{ \northwest \pgf@y=0pt } + \anchor{w}{ \northwest \pgf@y=0pt } + \anchor{south}{ \northwest \pgf@x=0pt \pgf@y=-\pgf@y } + \anchor{s}{ \northwest \pgf@x=0pt \pgf@y=-\pgf@y } + \anchor{north}{ \northwest \pgf@x=0pt } + \anchor{n}{ \northwest \pgf@x=0pt } + \anchor{south west}{ \northwest \pgf@y=-\pgf@y } + \anchor{north east}{ \northwest \pgf@x=-\pgf@x } + \anchor{north west}{ \northwest } + \anchor{south east}{ \northwest \pgf@x=-\pgf@x \pgf@y=-\pgf@y } + \anchorborder{ + \pgf@xa=\pgf@x + \pgf@ya=\pgf@y + \pgfextracty{\pgf@circ@res@up}{\northwest} + \pgfpointborderrectangle + {\pgfqpoint{\pgf@xa}{\pgf@ya}} + {\pgfqpoint{\pgf@circ@res@up}{\pgfqpoint{\pgf@circ@res@up}}} + } + \behindforegroundpath{ + \pgfscope + \pgfmathsetlength{\pgf@circ@res@temp}{\ctikzvalof{nodes width}*\pgf@circ@Rlen} + \pgfpathrectanglecorners + {\pgfpoint{-\pgf@circ@res@temp}{-\pgf@circ@res@temp}} + {\pgfpoint{\pgf@circ@res@temp}{\pgf@circ@res@temp}} + \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}} + \ifx\tikz@fillcolor\pgfutil@empty + \pgfsetfillcolor{white} + \else + \pgfsetfillcolor{\tikz@fillcolor} + \fi + \pgfsetfillopacity{1.0} + \pgfusepath{draw,fill} + \endpgfscope + } +} +% BNC connector + +\pgfdeclareshape{bnc}{ + \anchor{center}{ + \pgfpointorigin + } + % BNC size is 2.5 times the size of the internal "ocirc" + \savedanchor\northwest{% + \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/nodes width}\pgf@circ@Rlen + \pgf@y=2.5\pgf@y + \pgf@x=-\pgf@y + } + % center is on the opening + \anchor{center}{ \northwest \pgf@y=0pt \pgf@x=-\pgf@x } + \anchor{zero}{ \pgfpointorigin } + \anchor{hot}{ \northwest \pgf@y=0pt \pgf@x=-\pgf@x } + \anchor{shield}{ \northwest \pgf@x=0pt \pgf@y=-\pgf@y } + % geo-anchors + \anchor{east}{ \northwest \pgf@y=0pt \pgf@x=-\pgf@x } + \anchor{right}{ \northwest \pgf@y=0pt \pgf@x=-\pgf@x } + \anchor{west}{ \northwest \pgf@y=0pt } + \anchor{left}{ \northwest \pgf@y=0pt } + \anchor{south}{ \northwest \pgf@x=0pt \pgf@y=-\pgf@y } + \anchor{north}{ \northwest \pgf@x=0pt } + \anchor{south west}{ \northwest \pgf@y=-\pgf@y } + \anchor{north east}{ \northwest \pgf@x=-\pgf@x } + \anchor{north west}{ \northwest } + \anchor{south east}{ \northwest \pgf@x=-\pgf@x \pgf@y=-\pgf@y } + % put the node text above and centered + \anchor{text}{\pgfextracty{\pgf@circ@res@up}{\northwest} + \pgfpoint{-.5\wd\pgfnodeparttextbox}{ + \dimexpr.5\dp\pgfnodeparttextbox+.5\ht\pgfnodeparttextbox+\pgf@circ@res@up\relax + } + } + \anchorborder{ + \pgf@circ@res@left=\pgf@x + \pgf@circ@res@up=\pgf@y + \pgfpointborderellipse{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up} + }{\pgfpoint{2.5*\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgf@circ@Rlen}{2.5*\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgf@circ@Rlen}} + } + \behindforegroundpath{ + \pgfextracty{\pgf@circ@res@other}{\northwest} + \pgf@circ@res@step=\pgfkeysvalueof{/tikz/circuitikz/nodes width}\pgf@circ@Rlen + \pgfscope + \pgfstartlinewidth=\pgflinewidth + \pgfsetlinewidth{\ctikzvalof{bipoles/thickness}\pgflinewidth} + \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}} + % external circle + \pgfscope + % clipping path: first a rectangle bigger then the shape + % to avoid problems with the line thickness + \pgfpathrectanglecorners{\pgfpoint{-2\pgf@circ@res@other}{-2\pgf@circ@res@other}} + {\pgfpoint{2\pgf@circ@res@other}{2\pgf@circ@res@other}} + % next the opening to the right + \pgfpathrectanglecorners{\pgfpoint{-\pgf@circ@res@step}{-\pgf@circ@res@step}} + {\pgfpoint{2\pgf@circ@res@other}{\pgf@circ@res@step}} + % do the difference and clip before drawing + \pgfseteorule + \pgfusepath{clip} + \pgfpathcircle{\pgfpointorigin}{\pgf@circ@res@other} + \pgfusepath{draw} + \endpgfscope + % internal circle + \pgfpathcircle{\pgfpointorigin}{\pgf@circ@res@step} + \pgf@circ@draworfill + % and the contact line to the right + \pgfsetlinewidth{\pgfstartlinewidth} + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{0pt}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{0pt}} + \pgfusepath{draw} + \endpgfscope + } +} + +%% Fill for correct rectangular joins + +\pgfdeclareshape{rectjoinfill}{ + \savedanchor{\northeast}{% + \pgf@x=.5\pgflinewidth% + \pgf@y=.5\pgflinewidth% + } + \anchor{north}{\northeast\pgf@x=0cm\relax} + \anchor{east}{\northeast\pgf@y=0cm\relax} + \anchor{south}{\northeast\pgf@y=-\pgf@y \pgf@x=0cm\relax} + \anchor{west}{\northeast\pgf@y=0cm\pgf@x=-\pgf@x} + \anchor{north east}{\northeast} + \anchor{north west}{\northeast\pgf@x=-\pgf@x} + \anchor{south east}{\northeast\pgf@y=-\pgf@y} + \anchor{south west}{\northeast\pgf@y=-\pgf@y\pgf@x=-\pgf@x} + \anchor{center}{ + \pgfpointorigin + } + \anchorborder{ + \pgf@circ@res@left=\pgf@x + \pgf@circ@res@up=\pgf@y + } + \behindforegroundpath{ + \pgfscope + \pgfpathrectanglecorners + {\pgfpoint{0}{.5\pgflinewidth}} + {\pgfpoint{0}{-.5\pgflinewidth}} + \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}} + \pgfusepath{draw,fill} + \endpgfscope + } +} + + +%% Current arrow + +\pgfdeclareshape{currarrow}{ + \savedanchor{\northeast}{% + \pgf@circ@res@step = \pgf@circ@Rlen + \divide \pgf@circ@res@step by \pgfkeysvalueof{/tikz/circuitikz/current arrow scale} + \pgf@x=.5\pgf@circ@res@step + \pgf@y=\pgf@x% + } + \anchor{north}{\northeast\pgf@x=0cm\relax} + \anchor{east}{\northeast\pgf@y=0cm\relax} + \anchor{south}{\northeast\pgf@y=-\pgf@y \pgf@x=0cm\relax} + \anchor{west}{\northeast\pgf@y=0cm\pgf@x=-\pgf@x} + \anchor{north east}{\northeast} + \anchor{north west}{\northeast\pgf@x=-\pgf@x} + \anchor{south east}{\northeast\pgf@y=-\pgf@y} + \anchor{south west}{\northeast\pgf@y=-\pgf@y\pgf@x=-\pgf@x} + \anchor{center}{ + \pgfpointorigin + } + \anchor{tip}{ + \pgfpointorigin + \pgf@circ@res@step = \pgf@circ@Rlen + \divide \pgf@circ@res@step by \pgfkeysvalueof{/tikz/circuitikz/current arrow scale} + \pgf@x =\pgf@circ@res@step + } + \behindforegroundpath{ + \pgfscope + \pgf@circ@res@step = \pgf@circ@Rlen + \divide \pgf@circ@res@step by \pgfkeysvalueof{/tikz/circuitikz/current arrow scale} + + \pgfpathmoveto{\pgfpoint{-.7\pgf@circ@res@step}{0pt}} + \pgfpathlineto{\pgfpoint{-.7\pgf@circ@res@step}{-.8\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{1\pgf@circ@res@step}{0pt}} + \pgfpathlineto{\pgfpoint{-.7\pgf@circ@res@step}{.8\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{-.7\pgf@circ@res@step}{0pt}} + \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}} + \pgfusepath{draw,fill} + + \endpgfscope + } +} + +%% Flow arrow + +\pgfdeclareshape{flowarrow}{ + \savedanchor{\northeast}{% + \pgf@circ@res@step = \pgf@circ@Rlen + \divide \pgf@circ@res@step by \pgfkeysvalueof{/tikz/circuitikz/current arrow scale} + \pgf@y=.5\pgf@circ@res@step + \pgf@circ@res@step = \pgf@circ@Rlen + \divide \pgf@circ@res@step by 4 + \pgf@x=\pgf@circ@res@step% + } + \anchor{north}{\northeast\pgf@x=0cm\relax} + \anchor{east}{\northeast\pgf@y=0cm\relax} + \anchor{south}{\northeast\pgf@y=-\pgf@y \pgf@x=0cm\relax} + \anchor{west}{\northeast\pgf@y=0cm\pgf@x=-\pgf@x} + \anchor{north east}{\northeast} + \anchor{north west}{\northeast\pgf@x=-\pgf@x} + \anchor{south east}{\northeast\pgf@y=-\pgf@y} + \anchor{south west}{\northeast\pgf@y=-\pgf@y\pgf@x=-\pgf@x} + \anchor{center}{ + \pgfpointorigin + } + \anchor{tip}{ + \pgfpointorigin + \pgf@circ@res@step = \pgf@circ@Rlen + \divide \pgf@circ@res@step by \pgfkeysvalueof{/tikz/circuitikz/current arrow scale} + \pgf@x =\pgf@circ@res@step + } + \behindforegroundpath{ + \pgfscope + \pgf@circ@res@step = \pgf@circ@Rlen + \divide \pgf@circ@res@step by 4 + \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@step}{0pt}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{0pt}} + \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}} + \pgfusepath{draw} + \pgftransformshift{\pgfpoint{\pgf@circ@res@step}{0pt}} + \pgfnode{currarrow}{tip}{}{}{\pgfusepath{fill}} + \endpgfscope + } +} + +%% Input arrow + +\pgfdeclareshape{inputarrow}{ + \savedanchor{\northeast}{% this is really not northeast, really -northwest + \pgf@circ@res@step = \pgf@circ@Rlen + \divide \pgf@circ@res@step by \pgfkeysvalueof{/tikz/circuitikz/current arrow scale} + \pgf@y=.5\pgf@circ@res@step + \pgf@x=1.7\pgf@circ@res@step + } + \anchor{north}{\northeast\pgf@x=0cm\relax} + \anchor{east}{\northeast\pgf@y=0cm\relax\pgf@x=0cm\relax} + \anchor{south}{\northeast\pgf@y=-\pgf@y \pgf@x=0cm\relax} + \anchor{west}{\northeast\pgf@y=0cm\pgf@x=-\pgf@x} + \anchor{north east}{\northeast\pgf@x=0cm\relax} + \anchor{north west}{\northeast\pgf@x=-\pgf@x} + \anchor{south east}{\northeast\pgf@y=-\pgf@y\pgf@x=0cm\relax} + \anchor{south west}{\northeast\pgf@y=-\pgf@y\pgf@x=-\pgf@x} + \savedanchor{\tip}{ + \pgfpointorigin + } + \anchor{center}{ + \tip + } + \anchor{tip}{ + \tip + } + \behindforegroundpath{ + + \pgfscope + \pgf@circ@res@step = \pgf@circ@Rlen + \divide \pgf@circ@res@step by 16 + + \pgfpathmoveto{\pgfpoint{-1.7\pgf@circ@res@step}{0pt}} + \pgfpathlineto{\pgfpoint{-1.7\pgf@circ@res@step}{-.8\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{0pt}{0pt}} + \pgfpathlineto{\pgfpoint{-1.7\pgf@circ@res@step}{.8\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{-1.7\pgf@circ@res@step}{0pt}} + \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}} + \pgfusepath{fill} + + \endpgfscope + } +} + + +%% box + +\pgfdeclareshape{box}{ + \anchor{center}{ + \pgfpointorigin + } + \behindforegroundpath{ + + \pgfscope + \pgf@circ@res@step = \ctikzvalof{bipoles/twoport/width}\pgf@circ@Rlen + \pgf@circ@res@step = 0.5\pgf@circ@res@step + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgfpathrectanglecorners{\pgfpoint{-\pgf@circ@res@step}{\pgf@circ@res@step}}{\pgfpoint{\pgf@circ@res@step}{-\pgf@circ@res@step}} + \pgf@circ@draworfill + \endpgfscope + } + +} + + +% full nodes for wire crossing + +\pgfdeclareshape{jump crossing} +{ + \savedanchor\northwest{% + \pgf@y=\ctikzvalof{bipoles/crossing/size}\pgf@circ@Rlen + \pgf@y=.5\pgf@y + \pgf@x=-\pgf@y + } + \anchor{center}{ \pgf@y=0pt \pgf@x=0pt } + \anchor{east}{ \northwest \pgf@y=0pt \pgf@x=-\pgf@x } + \anchor{e}{ \northwest \pgf@y=0pt \pgf@x=-\pgf@x } + \anchor{west}{ \northwest \pgf@y=0pt } + \anchor{w}{ \northwest \pgf@y=0pt } + \anchor{south}{ \northwest \pgf@x=0pt \pgf@y=-\pgf@y } + \anchor{s}{ \northwest \pgf@x=0pt \pgf@y=-\pgf@y } + \anchor{north}{ \northwest \pgf@x=0pt } + \anchor{n}{ \northwest \pgf@x=0pt } + \anchor{south west}{ \northwest \pgf@y=-\pgf@y } + \anchor{north east}{ \northwest \pgf@x=-\pgf@x } + \anchor{north west}{ \northwest } + \anchor{south east}{ \northwest \pgf@x=-\pgf@x \pgf@y=-\pgf@y } + \behindbackgroundpath{ + \northwest + \pgf@circ@res@up = \pgf@y + \pgf@circ@res@down = -\pgf@y + \pgf@circ@res@right = -\pgf@x + \pgf@circ@res@left = \pgf@x + % horizontal jumper + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}} + \pgfpathlineto{\pgfpoint{0.4\pgf@circ@res@left}{0pt}} + \pgfpatharc{0}{-180}{0.4*\pgf@circ@res@left} + \pgfsetbeveljoin + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0pt}} + % vertical, broken path + \pgfpathmoveto{\pgfpoint{0pt}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{0pt}{0.5\pgf@circ@res@up}} + \pgfpathmoveto{\pgfpoint{0pt}{0.3\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}} + \pgfusepath{draw} + + } +} +\pgfdeclareshape{plain crossing} +{ + \savedanchor\northwest{% + \pgf@y=\ctikzvalof{bipoles/crossing/size}\pgf@circ@Rlen + \pgf@y=.5\pgf@y + \pgf@x=-\pgf@y + } + \anchor{center}{ \pgf@y=0pt \pgf@x=0pt } + \anchor{east}{ \northwest \pgf@y=0pt \pgf@x=-\pgf@x } + \anchor{e}{ \northwest \pgf@y=0pt \pgf@x=-\pgf@x } + \anchor{west}{ \northwest \pgf@y=0pt } + \anchor{w}{ \northwest \pgf@y=0pt } + \anchor{south}{ \northwest \pgf@x=0pt \pgf@y=-\pgf@y } + \anchor{s}{ \northwest \pgf@x=0pt \pgf@y=-\pgf@y } + \anchor{north}{ \northwest \pgf@x=0pt } + \anchor{n}{ \northwest \pgf@x=0pt } + \anchor{south west}{ \northwest \pgf@y=-\pgf@y } + \anchor{north east}{ \northwest \pgf@x=-\pgf@x } + \anchor{north west}{ \northwest } + \anchor{south east}{ \northwest \pgf@x=-\pgf@x \pgf@y=-\pgf@y } + \behindbackgroundpath{ + \northwest + \pgf@circ@res@up = \pgf@y + \pgf@circ@res@down = -\pgf@y + \pgf@circ@res@right = -\pgf@x + \pgf@circ@res@left = \pgf@x + % horizontal jumper + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0pt}} + % vertical, broken path + \pgfpathmoveto{\pgfpoint{0pt}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{0pt}{0.1\pgf@circ@res@up}} + \pgfpathmoveto{\pgfpoint{0pt}{0.1\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}} + \pgfusepath{draw} + + } +} + +%%%---------- close: tex/pgfcircshapes +%%%%%%%%%%% Springe nach tex/pgfcircmonopoles +%%%---------- open: tex/pgfcircmonopoles.tex +% Copyright 2007-2009 by Massimo Redaelli +% +% This file may be distributed and/or modified +% +% 1. under the LaTeX Project Public License and/or +% 2. under the GNU Public License. +% +% See the files gpl-3.0_license.txt and lppl-1-3c_license.txt for more details. + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Monopoles + +%% Ground symbol +% #1 -> name +% #2 -> width +% #3 -> depth +% #4 -> code +\long\def\pgf@circ@declareground#1#2#3#4{ + \pgfdeclareshape{#1}{ + \savedanchor{\southeast}{ + \pgf@x=\ctikzvalof{monopoles/ground/width}\pgf@circ@Rlen + \pgf@x=#2\pgf@x + \pgf@y=\ctikzvalof{monopoles/ground/width}\pgf@circ@Rlen + \pgf@y=-#3\pgf@y + } + \anchor{north}{\pgfpointorigin} + \anchor{north east}{\southeast\pgf@y=0pt\relax} + \anchor{east}{\southeast\pgf@y=.5\pgf@y} + \anchor{south east}{\southeast} + \anchor{south}{\southeast\pgf@x=0pt\relax} + \anchor{south west}{\southeast\pgf@x=-\pgf@x} + \anchor{west}{\southeast\pgf@y=.5\pgf@y\pgf@x=-\pgf@x} + \anchor{north west}{\southeast\pgf@y=0pt\pgf@x=-\pgf@x} + \anchor{left}{\pgfpointorigin} + \anchor{right}{\pgfpointorigin} + \anchor{center}{\pgfpointorigin} + \behindforegroundpath{ + \pgf@circ@res@step=\ctikzvalof{monopoles/ground/width}\pgf@circ@Rlen + \pgfscope + \pgfstartlinewidth=\pgflinewidth + #4 + \endpgfscope + } + } +} + + +\pgf@circ@declareground{ground}{0.6}{1.6}{ + \pgfsetlinewidth{\ctikzvalof{monopoles/ground/connectionthickness}\pgfstartlinewidth} + \pgfpathmoveto{\pgfpointorigin} + \pgfpathlineto{\pgfpoint{0pt}{-1.2\pgf@circ@res@step}} + \pgfusepath{draw} + \pgfsetlinewidth{\ctikzvalof{monopoles/ground/thickness}\pgfstartlinewidth} + \pgfpathmoveto{\pgfpoint{-.6\pgf@circ@res@step}{-1.2\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{.6\pgf@circ@res@step}{-1.2\pgf@circ@res@step}} + \pgfpathmoveto{\pgfpoint{-.4\pgf@circ@res@step}{-1.4\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@step}{-1.4\pgf@circ@res@step}} + \pgfpathmoveto{\pgfpoint{-.25\pgf@circ@res@step}{-1.6\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{.25\pgf@circ@res@step}{-1.6\pgf@circ@res@step}} + \pgfusepath{draw} +} + +\pgf@circ@declareground{tlground}{0.6}{0.4}{ + \pgfsetlinewidth{\ctikzvalof{monopoles/ground/thickness}\pgfstartlinewidth} + \pgfpathmoveto{\pgfpoint{-.6\pgf@circ@res@step}{0pt}} + \pgfpathlineto{\pgfpoint{.6\pgf@circ@res@step}{0pt}} + \pgfpathmoveto{\pgfpoint{-.4\pgf@circ@res@step}{-0.2\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@step}{-0.2\pgf@circ@res@step}} + \pgfpathmoveto{\pgfpoint{-.25\pgf@circ@res@step}{-0.4\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{.25\pgf@circ@res@step}{-0.4\pgf@circ@res@step}} + \pgfusepath{draw} +} + + +\pgf@circ@declareground{rground}{0.6}{1}{ + \pgfpathmoveto{\pgfpointorigin} + \pgfpathlineto{\pgfpoint{0pt}{-\pgf@circ@res@step}} + \pgfusepath{draw} + + \pgfstartlinewidth=\pgflinewidth + \pgfsetlinewidth{\ctikzvalof{monopoles/rground/thickness}\pgfstartlinewidth} + + \pgfpathmoveto{\pgfpoint{-.6\pgf@circ@res@step}{-\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{.6\pgf@circ@res@step}{-\pgf@circ@res@step}} + \pgfsetroundcap\pgfusepath{draw} +} + +\pgf@circ@declareground{tground}{0.6}{0}{ + \pgfpathmoveto{\pgfpointorigin} + \pgfusepath{draw} + + \pgfstartlinewidth=\pgflinewidth + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/monopoles/tground/thickness}\pgfstartlinewidth} + + \pgfpathmoveto{\pgfpoint{-.6\pgf@circ@res@step}{0pt}} + \pgfpathlineto{\pgfpoint{.6\pgf@circ@res@step}{0pt}} + \pgfusepath{draw} +} + +\pgf@circ@declareground{sground}{0.6}{1.8}{ + \pgfpathmoveto{\pgfpointorigin} + \pgfpathlineto{\pgfpoint{0pt}{-\pgf@circ@res@step}} + \pgfusepath{draw} + + \pgfstartlinewidth=\pgflinewidth + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + + \pgfpathmoveto{\pgfpoint{-.6\pgf@circ@res@step}{-\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{.6\pgf@circ@res@step}{-\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{0}{-1.8\pgf@circ@res@step}} + \pgfpathclose + \pgf@circ@draworfill +} + +% noiseless ground +\pgf@circ@declareground{nground}{0.9}{1.6}{ + \pgfsetlinewidth{\ctikzvalof{monopoles/ground/connectionthickness}\pgfstartlinewidth} + \pgfpathmoveto{\pgfpointorigin} + \pgfpathlineto{\pgfpoint{0pt}{-1.2\pgf@circ@res@step}} + \pgfusepath{draw} + \pgfsetlinewidth{\ctikzvalof{monopoles/ground/thickness}\pgfstartlinewidth} + \pgfpathmoveto{\pgfpoint{-.6\pgf@circ@res@step}{-1.2\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{.6\pgf@circ@res@step}{-1.2\pgf@circ@res@step}} + \pgfpathmoveto{\pgfpoint{-.4\pgf@circ@res@step}{-1.4\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@step}{-1.4\pgf@circ@res@step}} + \pgfpathmoveto{\pgfpoint{-.25\pgf@circ@res@step}{-1.6\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{.25\pgf@circ@res@step}{-1.6\pgf@circ@res@step}} + \pgfusepath{draw} + \pgfpathmoveto{\pgfpoint{0.9\pgf@circ@res@step}{-1.6\pgf@circ@res@step}} + \pgfpatharc{0}{180}{0.9\pgf@circ@res@step} + \pgfusepath{draw} +} + +% protective ground +\pgf@circ@declareground{pground}{0.9}{1.8}{ + \pgfsetlinewidth{\ctikzvalof{monopoles/ground/connectionthickness}\pgfstartlinewidth} + \pgfpathmoveto{\pgfpointorigin} + \pgfpathlineto{\pgfpoint{0pt}{-1\pgf@circ@res@step}} + \pgfusepath{draw} + \pgfsetlinewidth{\ctikzvalof{monopoles/ground/thickness}\pgfstartlinewidth} + \pgfpathmoveto{\pgfpoint{-.6\pgf@circ@res@step}{-1\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{.6\pgf@circ@res@step}{-1\pgf@circ@res@step}} + \pgfpathmoveto{\pgfpoint{-.4\pgf@circ@res@step}{-1.2\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@step}{-1.2\pgf@circ@res@step}} + \pgfpathmoveto{\pgfpoint{-.25\pgf@circ@res@step}{-1.4\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{.25\pgf@circ@res@step}{-1.4\pgf@circ@res@step}} + \pgfusepath{draw} + \pgfpathcircle{\pgfpoint{0pt}{-0.9\pgf@circ@res@step}}{0.9\pgf@circ@res@step} + \pgfusepath{draw} +} + +% chassis ground +\pgf@circ@declareground{cground}{1}{2}{ + \pgfsetlinewidth{\ctikzvalof{monopoles/ground/connectionthickness}\pgfstartlinewidth} + \pgfpathmoveto{\pgfpointorigin} + \pgfpathlineto{\pgfpoint{0pt}{-1.5\pgf@circ@res@step}} + \pgfusepath{draw} + \pgfsetlinewidth{\ctikzvalof{monopoles/ground/thickness}\pgfstartlinewidth} + \pgfpathmoveto{\pgfpoint{-1.00\pgf@circ@res@step}{-2.10\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{-0.75\pgf@circ@res@step}{-1.50\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{ 0.75\pgf@circ@res@step}{-1.50\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{ 0.50\pgf@circ@res@step}{-2.10\pgf@circ@res@step}} + \pgfpathmoveto{\pgfpoint{ 0.00\pgf@circ@res@step}{-1.50\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{-0.25\pgf@circ@res@step}{-2.10\pgf@circ@res@step}} + \pgfusepath{draw} +} + +% Contributed by @fotesan https://github.com/fotesan + +\pgf@circ@declareground{eground}{1.1}{1.7}{ + \pgfpathmoveto{\pgfpointorigin} + \pgfpathlineto{\pgfpoint{0pt}{-\pgf@circ@res@step}} + \pgfusepath{draw} + + \pgfstartlinewidth=\pgflinewidth + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/monopoles/tground/thickness}\pgfstartlinewidth} + + \pgfpathmoveto{\pgfpoint{-1\pgf@circ@res@step}{-\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{1\pgf@circ@res@step}{-\pgf@circ@res@step}} + \pgfusepath{draw} + + \pgfsetlinewidth{\pgfstartlinewidth} + \pgfpathmoveto{\pgfpoint{-1.1\pgf@circ@res@step}{-1.7\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{-.6\pgf@circ@res@step}{-1\pgf@circ@res@step}} + \pgfpathmoveto{\pgfpoint{-.6\pgf@circ@res@step}{-1.7\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{-.1\pgf@circ@res@step}{-1\pgf@circ@res@step}} + \pgfpathmoveto{\pgfpoint{-.1\pgf@circ@res@step}{-1.7\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@step}{-1\pgf@circ@res@step}} + \pgfpathmoveto{\pgfpoint{.4\pgf@circ@res@step}{-1.7\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{.9\pgf@circ@res@step}{-1\pgf@circ@res@step}} + \pgfusepath{draw} +} + +\pgf@circ@declareground{eground2}{1.1}{1.7}{ + \pgfpathmoveto{\pgfpointorigin} + \pgfpathlineto{\pgfpoint{0pt}{-\pgf@circ@res@step}} + \pgfusepath{draw} + + \pgfstartlinewidth=\pgflinewidth + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/monopoles/tground/thickness}\pgfstartlinewidth} + + \pgfpathmoveto{\pgfpoint{-1\pgf@circ@res@step}{-\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{1\pgf@circ@res@step}{-\pgf@circ@res@step}} + \pgfusepath{draw} + + \pgfsetlinewidth{\pgfstartlinewidth} + \pgfpathmoveto{\pgfpoint{-1.1\pgf@circ@res@step}{-1.7\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{-.4\pgf@circ@res@step}{-1\pgf@circ@res@step}} + \pgfpathmoveto{\pgfpoint{-.45\pgf@circ@res@step}{-1.7\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{.25\pgf@circ@res@step}{-1\pgf@circ@res@step}} + \pgfpathmoveto{\pgfpoint{.2\pgf@circ@res@step}{-1.7\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{.9\pgf@circ@res@step}{-1\pgf@circ@res@step}} + \pgfusepath{draw} +} + +% Contributed by Leonardo Azzinnari +\pgfdeclareshape{tlinestub}{ + \savedanchor{\northeast}{% + \pgf@circ@res@step = \ctikzvalof{bipoles/tline/width} \pgf@circ@Rlen + \pgf@x=1.625\pgf@circ@res@step + \pgf@circ@res@step = \ctikzvalof{bipoles/tline/width} \pgf@circ@Rlen + \pgf@y=.25\pgf@circ@res@step% + } + % the center is on the left side of the shape for facility of usage + \anchor{north}{\northeast\pgf@x=0.5\pgf@x\relax} + \anchor{east}{\northeast\pgf@y=0cm\relax} + \anchor{south}{\northeast\pgf@y=-\pgf@y \pgf@x=0.5\pgf@x\relax} + \anchor{west}{\pgfpointorigin} + \anchor{north east}{\northeast} + \anchor{north west}{\northeast\pgf@x=0cm\relax} + \anchor{south east}{\northeast\pgf@y=-\pgf@y} + \anchor{south west}{\northeast\pgf@x=0cm\pgf@y=-\pgf@y} + \anchor{center}{\pgfpointorigin} + \behindforegroundpath{ + \pgfstartlinewidth=\pgflinewidth + + \pgf@circ@res@step=\ctikzvalof{bipoles/tline/width} \pgf@circ@Rlen + + \pgfscope\begin{pgftransparencygroup} + \pgfpathellipse{\pgfpoint{0.5\pgf@circ@res@step}{0\pgf@circ@res@step}}{\pgfpoint{0.125\pgf@circ@res@step}{0\pgf@circ@res@step}}{\pgfpoint{0\pgf@circ@res@step}{0.25\pgf@circ@res@step}} + \pgf@circ@maybefill + \pgfpathmoveto{\pgfpoint{0.5\pgf@circ@res@step}{0.25\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{1.5\pgf@circ@res@step}{0.25\pgf@circ@res@step}} + \pgfpatharc{90}{-90}{0.125\pgf@circ@res@step and 0.25\pgf@circ@res@step} + \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@step}{-0.25\pgf@circ@res@step}} + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgf@circ@draworfill + \pgfpathellipse{\pgfpoint{0.5\pgf@circ@res@step}{0\pgf@circ@res@step}}{\pgfpoint{0.125\pgf@circ@res@step}{0\pgf@circ@res@step}}{\pgfpoint{0\pgf@circ@res@step}{0.25\pgf@circ@res@step}} + \pgfusepath{draw} + \end{pgftransparencygroup} \endpgfscope + \pgfpathmoveto{\pgfpointorigin} + \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@step}{0pt}} + \pgfusepath{draw} + } +} + +%% New antennas without tails + +% main body +\def\pgf@circ@antennabody{% + \pgfstartlinewidth=\pgflinewidth + \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}} + \pgf@circ@res@step=\ctikzvalof{monopoles/bareantenna/width}\pgf@circ@Rlen + \pgfscope + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgfpathmoveto{\pgfpointorigin} + \pgfpathlineto{\pgfpoint{-\pgf@circ@res@step}{2\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{2\pgf@circ@res@step}} + \pgfsetbeveljoin + \pgfpathclose + \pgf@circ@draworfill + \endpgfscope + \pgfsetlinewidth{\pgfstartlinewidth} + \pgfpathmoveto{\pgfpointorigin} + \pgfpathlineto{\pgfpoint{0pt}{2\pgf@circ@res@step}} + \pgfusepath{draw} +} + +% Waves for the antennas. +\def\pgf@circ@antennawaves{% + \pgfscope + % define a triangle for clipping the waves + \pgfpathmoveto{\pgfpoint{0pt}{\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{4.2\pgf@circ@res@step}{3\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{4.2\pgf@circ@res@step}{-1\pgf@circ@res@step}} + \pgfpathclose + \pgfusepath{clip} + % ...and build the waves as clipped circles + \pgf@circ@count@a=8\pgf@circ@res@other=0.5\pgf@circ@res@step + \pgfmathloop% + \ifnum\pgf@circ@count@a>2 + \pgfpathcircle{\pgfpoint{0pt}{\pgf@circ@res@step}}{\the\pgf@circ@count@a*\pgf@circ@res@other} + \advance\pgf@circ@count@a-1\relax% + \repeatpgfmathloop + \pgfusepath{draw} + \endpgfscope +} + + +% additional shape with the waves +\pgfdeclareshape{waves}{ + \anchor{center}{\pgfpointorigin} + \savedanchor{\northeast}{ + \pgf@circ@res@step=\ctikzvalof{monopoles/waves/width}\pgf@circ@Rlen + \pgf@x=\pgf@circ@res@step + \pgf@y=\pgf@circ@res@step + } + \anchor{text}{ + \northeast + \pgf@y=\dimexpr\pgf@y+.5\dp\pgfnodeparttextbox-.5\ht\pgfnodeparttextbox\relax + } + \anchor{top}{\northeast\pgf@x=0pt} + \anchor{right}{\northeast\pgf@y=0pt} + \anchor{left}{\northeast\pgf@x=-\pgf@x\pgf@y=0pt} + \anchor{bottom}{\northeast\pgf@y=-\pgf@y\pgf@x=0pt} + \anchor{north}{\northeast\pgf@x=0pt} + \anchor{north east}{\northeast} + \anchor{east}{\northeast\pgf@y=0pt} + \anchor{south east}{\northeast\pgf@y=-\pgf@y} + \anchor{south}{\northeast\pgf@y=-\pgf@y\pgf@x=0pt} + \anchor{south west}{\northeast\pgf@y=-\pgf@y\pgf@x=-\pgf@x} + \anchor{west}{\northeast\pgf@x=-\pgf@x\pgf@y=0pt} + \anchor{north west}{\northeast\pgf@x=-\pgf@x} + \behindforegroundpath{ + \pgf@circ@res@step=\ctikzvalof{monopoles/waves/width}\pgf@circ@Rlen + \pgf@circ@res@step=0.5\pgf@circ@res@step + \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}} + \pgfscope + % define a triangle for clipping the waves + \pgfpathmoveto{\pgfpoint{-2\pgf@circ@res@step}{0pt}} + \pgfpathlineto{\pgfpoint{2.1\pgf@circ@res@step}{2\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{2.1\pgf@circ@res@step}{-2\pgf@circ@res@step}} + \pgfpathclose + \pgfusepath{clip} + % ...and build the waves as clipped circles + \c@pgf@counta=8\pgf@circ@res@other=0.5\pgf@circ@res@step + \pgfmathloop% + \ifnum\c@pgf@counta>1 + \pgfpathcircle{\pgfpoint{-2\pgf@circ@res@step}{0pt}}{\the\c@pgf@counta*\pgf@circ@res@other} + \advance\c@pgf@counta-1\relax% + \repeatpgfmathloop + \pgfusepath{draw} + \endpgfscope + } +} + +% the three types of antennas: simple, TX, RX. Notice that you can flip them... + +\pgfdeclareshape{bareantenna}{ + \anchor{center}{\pgfpointorigin} + \savedanchor{\northeast}{ + \pgf@circ@res@step=\ctikzvalof{monopoles/bareantenna/width}\pgf@circ@Rlen + \pgf@x=\pgf@circ@res@step + \pgf@y=2\pgf@circ@res@step + } + \anchor{text}{ + \northeast + \pgf@x=\ctikzvalof{monopoles/bareantenna/label/xanchor}\pgf@x + \pgf@y=\ctikzvalof{monopoles/bareantenna/label/yanchor}\pgf@y + \pgf@y=\dimexpr\pgf@y+.5\dp\pgfnodeparttextbox-.5\ht\pgfnodeparttextbox\relax + } + \anchor{top}{\northeast\pgf@x=0pt} + \anchor{right}{\northeast\pgf@y=0.5\pgf@y} + \anchor{left}{\northeast\pgf@x=-\pgf@x\pgf@y=0.5\pgf@y} + \anchor{bottom}{\pgfpointorigin} + \anchor{north}{\northeast\pgf@x=0pt} + \anchor{east}{\northeast\pgf@y=0.5\pgf@y} + \anchor{west}{\northeast\pgf@x=-\pgf@x\pgf@y=0.5\pgf@y} + \anchor{south}{\pgfpointorigin} + \anchor{north east}{\northeast} + \anchor{north west}{\northeast\pgf@x=-\pgf@x} + \anchor{south east}{\northeast\pgf@y=0pt\relax} + \anchor{south west}{\northeast\pgf@y=0pt\pgf@x=-\pgf@x} + \behindforegroundpath{ + \pgf@circ@antennabody + } +} + +\pgfdeclareshape{bareTXantenna}{ + \anchor{center}{\pgfpointorigin} + \savedanchor{\northeast}{ + \pgf@circ@res@step=\ctikzvalof{monopoles/bareantenna/width}\pgf@circ@Rlen + \pgf@x=\pgf@circ@res@step + \pgf@y=2\pgf@circ@res@step + } + \anchor{text}{ + \northeast + \pgf@x=\ctikzvalof{monopoles/bareantenna/label/xanchor}\pgf@x + \pgf@y=\ctikzvalof{monopoles/bareantenna/label/yanchor}\pgf@y + \pgf@x=\dimexpr-\pgf@x-\wd\pgfnodeparttextbox\relax + \pgf@y=\dimexpr\pgf@y+.5\dp\pgfnodeparttextbox-.5\ht\pgfnodeparttextbox\relax + } + \anchor{waves}{ + \northeast + \pgf@circ@res@step=\ctikzvalof{monopoles/bareantenna/width}\pgf@circ@Rlen + \pgf@x=4.2\pgf@circ@res@step + \pgf@y=\pgf@circ@res@step + } + \anchor{top}{\northeast\pgf@x=0pt} + \anchor{right}{\northeast\pgf@y=0.5\pgf@y} + \anchor{left}{\northeast\pgf@x=-\pgf@x\pgf@y=0.5\pgf@y} + \anchor{bottom}{\pgfpointorigin} + \anchor{north}{\northeast\pgf@x=0pt} + \anchor{east}{\northeast\pgf@y=0.5\pgf@y} + \anchor{west}{\northeast\pgf@x=-\pgf@x\pgf@y=0.5\pgf@y} + \anchor{south}{\pgfpointorigin} + \anchor{north east}{\northeast} + \anchor{north west}{\northeast\pgf@x=-\pgf@x} + \anchor{south east}{\northeast\pgf@y=0pt\relax} + \anchor{south west}{\northeast\pgf@y=0pt\pgf@x=-\pgf@x} + \behindforegroundpath{ + \pgf@circ@antennabody + \pgf@circ@antennawaves + } +} + +\pgfdeclareshape{bareRXantenna}{ + \anchor{center}{\pgfpointorigin} + \savedanchor{\northeast}{ + \pgf@circ@res@step=\ctikzvalof{monopoles/bareantenna/width}\pgf@circ@Rlen + \pgf@x=\pgf@circ@res@step + \pgf@y=2\pgf@circ@res@step + } + \anchor{text}{ + \northeast + \pgf@x=\ctikzvalof{monopoles/bareantenna/label/xanchor}\pgf@x + \pgf@y=\ctikzvalof{monopoles/bareantenna/label/yanchor}\pgf@y + \pgf@y=\dimexpr\pgf@y+.5\dp\pgfnodeparttextbox-.5\ht\pgfnodeparttextbox\relax + } + \anchor{waves}{ + \northeast + \pgf@circ@res@step=\ctikzvalof{monopoles/bareantenna/width}\pgf@circ@Rlen + \pgf@x=-4.2\pgf@circ@res@step + \pgf@y=\pgf@circ@res@step + } + \anchor{top}{\northeast\pgf@x=0pt} + \anchor{right}{\northeast\pgf@y=0.5\pgf@y} + \anchor{left}{\northeast\pgf@x=-\pgf@x\pgf@y=0.5\pgf@y} + \anchor{bottom}{\pgfpointorigin} + \anchor{north}{\northeast\pgf@x=0pt} + \anchor{east}{\northeast\pgf@y=0.5\pgf@y} + \anchor{west}{\northeast\pgf@x=-\pgf@x\pgf@y=0.5\pgf@y} + \anchor{south}{\pgfpointorigin} + \anchor{north east}{\northeast} + \anchor{north west}{\northeast\pgf@x=-\pgf@x} + \anchor{south east}{\northeast\pgf@y=0pt\relax} + \anchor{south west}{\northeast\pgf@y=0pt\pgf@x=-\pgf@x} + \behindforegroundpath{ + \pgf@circ@antennabody + \pgftransformxshift{-5.2\pgf@circ@res@step} + \pgf@circ@antennawaves + } +} + +% Microstrip monopoles + +\pgfdeclareshape{mslstub}{ + \savedanchor{\southeast}{ + \pgf@x=\ctikzvalof{bipoles/mstline/width}\pgf@circ@Rlen + \pgf@x=.5\pgf@x + \pgf@y=\ctikzvalof{bipoles/mstline/height}\pgf@circ@Rlen + \pgf@y=-.5\pgf@y + } + \savedanchor{\northwest}{ + \pgf@x=\ctikzvalof{bipoles/mstline/width}\pgf@circ@Rlen + \pgf@x=-.5\pgf@x + \pgf@y=\ctikzvalof{bipoles/mstline/height}\pgf@circ@Rlen + \pgf@y=.5\pgf@y + } + \anchor{north}{\northwest\pgf@x=0pt\relax} + \anchor{north east}{\northwest\pgf@x=-\pgf@x} + \anchor{east}{\southeast\pgf@y=0pt\relax} + \anchor{south east}{\southeast} + \anchor{south}{\southeast\pgf@x=0pt\relax} + \anchor{south west}{\southeast\pgf@x=-\pgf@x} + \anchor{west}{\northwest\pgf@y=0pt\relax} + \anchor{north west}{\northwest} + % + \anchor{center}{\northwest\pgf@y=0pt\relax} + \anchor{left}{\northwest\pgf@y=0pt\relax} + \anchor{right}{\southeast\pgf@y=0pt\relax} + % put the node text above and centered + \anchor{text}{\pgfextracty{\pgf@circ@res@up}{\northwest} + \pgfpoint{-.5\wd\pgfnodeparttextbox}{ + \dimexpr.5\dp\pgfnodeparttextbox+.5\ht\pgfnodeparttextbox+\pgf@circ@res@up\relax + } + } + \behindbackgroundpath{ + \pgfextracty{\pgf@circ@res@up}{\northwest} + \pgfextractx{\pgf@circ@res@right}{\southeast} + \pgfextractx{\pgf@circ@res@left}{\northwest} + \pgfextracty{\pgf@circ@res@down}{\southeast} + \pgfmathsetlength{\pgf@circ@res@step}{0.25*\pgf@circ@res@up} + \pgfstartlinewidth=\pgflinewidth + \pgfscope + \pgfsetlinewidth{\ctikzvalof{bipoles/thickness}\pgfstartlinewidth} + \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}} + \pgf@circ@draworfill + \endpgfscope + } +} + +\pgfdeclareshape{msrstub}{ + \savedanchor{\southeast}{ + \pgf@x=\ctikzvalof{monopoles/msrstub/width}\pgf@circ@Rlen + \pgf@x=.5\pgf@x + \pgf@y=0pt\relax + } + \savedanchor{\northwest}{ + \pgf@x=\ctikzvalof{monopoles/msrstub/width}\pgf@circ@Rlen + \pgf@x=-.5\pgf@x + \pgf@y=\ctikzvalof{monopoles/msrstub/height}\pgf@circ@Rlen + \pgf@y=.5\pgf@y + } + \anchor{north}{\northwest\pgf@x=0pt\relax} + \anchor{north east}{\northwest\pgf@x=-\pgf@x} + \anchor{east}{\southeast\pgf@y=0pt\relax} + \anchor{south east}{\southeast} + \anchor{south}{\southeast\pgf@x=0pt\relax} + \anchor{south west}{\southeast\pgf@x=-\pgf@x} + \anchor{west}{\northwest\pgf@y=0pt\relax} + \anchor{north west}{\northwest} + % + \anchor{center}{\pgfpointorigin} + \anchor{left}{\pgfpointorigin} + \anchor{right}{\pgfpointorigin} + % put the node text above and centered + \anchor{text}{\pgfextracty{\pgf@circ@res@up}{\northwest} + \pgfpoint{-.5\wd\pgfnodeparttextbox}{ + \dimexpr.5\dp\pgfnodeparttextbox+.5\ht\pgfnodeparttextbox+\pgf@circ@res@up\relax + } + } + \behindbackgroundpath{ + \pgfextracty{\pgf@circ@res@up}{\northwest} + \pgfextractx{\pgf@circ@res@right}{\southeast} + \pgfextractx{\pgf@circ@res@left}{\northwest} + \pgfextracty{\pgf@circ@res@down}{\southeast} + \pgfmathsetlength{\pgf@circ@res@step}{0.25*\pgf@circ@res@up} + \pgfstartlinewidth=\pgflinewidth + \pgfscope + \pgfpathmoveto{\pgfpointorigin} + \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@step}} + \pgfusepath{draw} + \pgfsetlinewidth{\ctikzvalof{bipoles/thickness}\pgfstartlinewidth} + \pgfpathmoveto{\pgfpointpolar{135}{\pgf@circ@res@step}} + \pgfpatharc{135}{45}{\pgf@circ@res@step} + \pgfpathlineto{\pgfpointpolar{45}{\pgf@circ@res@up}} + \pgfpatharc{45}{135}{\pgf@circ@res@up} + \pgfclosepath + % \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}} + \pgf@circ@draworfill + \endpgfscope + } +} + +\pgfdeclareshape{msport}{ + \savedanchor{\southeast}{ + \pgf@x=\ctikzvalof{monopoles/msport/width}\pgf@circ@Rlen + \pgf@x=.5\pgf@x + \pgf@y=\ctikzvalof{bipoles/mstline/height}\pgf@circ@Rlen + \pgf@y=-.5\pgf@y + } + \savedanchor{\northwest}{ + \pgf@x=\ctikzvalof{monopoles/msport/width}\pgf@circ@Rlen + \pgf@x=-.5\pgf@x + \pgf@y=\ctikzvalof{bipoles/mstline/height}\pgf@circ@Rlen + \pgf@y=.5\pgf@y + } + \anchor{north}{\northwest\pgf@x=0pt\relax} + \anchor{north east}{\northwest\pgf@x=-\pgf@x} + \anchor{east}{\southeast\pgf@y=0pt\relax} + \anchor{south east}{\southeast} + \anchor{south}{\southeast\pgf@x=0pt\relax} + \anchor{south west}{\southeast\pgf@x=-\pgf@x} + \anchor{west}{\northwest\pgf@y=0pt\relax} + \anchor{north west}{\northwest} + % + \anchor{center}{\northwest\pgf@y=0pt\relax} + \anchor{left}{\northwest\pgf@y=0pt\relax} + \anchor{right}{\southeast\pgf@y=0pt\relax} + % put the node text above and centered + \anchor{text}{\pgfextracty{\pgf@circ@res@up}{\northwest} + \pgfpoint{-.5\wd\pgfnodeparttextbox}{ + \dimexpr-.5\dp\pgfnodeparttextbox-.5\ht\pgfnodeparttextbox\relax + } + } + \behindbackgroundpath{ + \pgfextracty{\pgf@circ@res@up}{\northwest} + \pgfextractx{\pgf@circ@res@right}{\southeast} + \pgfextractx{\pgf@circ@res@left}{\northwest} + \pgfextracty{\pgf@circ@res@down}{\southeast} + \pgfmathsetlength{\pgf@circ@res@step}{0.5*\pgf@circ@res@up} + \pgfstartlinewidth=\pgflinewidth + \pgfscope + \pgfsetlinewidth{\ctikzvalof{bipoles/thickness}\pgfstartlinewidth} + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@left+\pgf@circ@res@step}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@left+\pgf@circ@res@step}{\pgf@circ@res@down}} + \pgfpathclose + \pgf@circ@draworfill + \endpgfscope + } +} +% Legacy antennas (with tails) + +\def\pgf@circ@shift@antenna@xy#1#2{% + \pgf@circ@res@step=\ctikzvalof{monopoles/antenna/width}\pgf@circ@Rlen + \pgf@y=\dimexpr\pgf@y+#2\pgf@circ@res@step + \pgf@x=\dimexpr\pgf@x+#1\pgf@circ@res@step +\relax} + +\pgfdeclareshape{antenna}{ + \anchor{center}{\pgfpointorigin} + \savedanchor{\northeast}{ + \pgf@circ@res@step=\ctikzvalof{monopoles/antenna/width}\pgf@circ@Rlen + \pgf@x=\pgf@circ@res@step%-0.5\pgflinewidth + \pgf@y=4\pgf@circ@res@step + } + \anchor{north}{\northeast\pgf@x=0cm\pgf@circ@shift@antenna@xy{0}{2}} + \anchor{east}{\northeast\pgf@y=0cm\pgf@circ@shift@antenna@xy{0}{3}\relax} + \anchor{south}{\northeast\pgf@y=-\pgf@y \pgf@x=0cm\pgf@circ@shift@antenna@xy{0}{4}\relax} + \anchor{west}{\northeast\pgf@y=0cm\pgf@x=-\pgf@x\pgf@circ@shift@antenna@xy{0}{3}} + \anchor{north east}{\northeast\pgf@circ@shift@antenna@xy{0}{2}} + \anchor{north west}{\northeast\pgf@x=-\pgf@x\pgf@circ@shift@antenna@xy{0}{2}} + \anchor{south east}{\northeast\pgf@y=-\pgf@y\pgf@circ@shift@antenna@xy{0}{4}} + \anchor{south west}{\northeast\pgf@y=-\pgf@y\pgf@x=-\pgf@x\pgf@circ@shift@antenna@xy{0}{4}} + \anchor{text}{ + \northeast + \pgf@x=\ctikzvalof{monopoles/antenna/label/xanchor}\pgf@x + \pgf@y=\ctikzvalof{monopoles/antenna/label/yanchor}\pgf@y + } + \behindforegroundpath{ + \pgfstartlinewidth=\pgflinewidth + \pgf@circ@res@step=\ctikzvalof{monopoles/antenna/width}\pgf@circ@Rlen + + \pgftransformxshift{ -4\pgf@circ@res@step } + + \pgfpathmoveto{\pgfpoint{4\pgf@circ@res@step-0.5\pgflinewidth}{0pt}} + \pgfpathlineto{\pgfpoint{4\pgf@circ@res@step-0.5\pgflinewidth}{6\pgf@circ@res@step}} + + \pgfusepath{draw} + + \pgfscope + \pgfpathmoveto{\pgfpoint{4\pgf@circ@res@step-0.5\pgflinewidth}{6\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{5\pgf@circ@res@step-0.5\pgflinewidth}{6\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{4\pgf@circ@res@step-0.5\pgflinewidth}{4\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{3\pgf@circ@res@step-0.5\pgflinewidth}{6\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{4\pgf@circ@res@step-0.5\pgflinewidth}{6\pgf@circ@res@step}} + \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}} + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgfusepath{draw} + \endpgfscope + \pgfsetlinewidth{\pgfstartlinewidth} + + } +} + + +\pgfdeclareshape{txantenna}{ + \anchor{center}{\pgfpointorigin} + \savedanchor{\northeast}{ + \pgf@circ@res@step=\ctikzvalof{monopoles/antenna/width}\pgf@circ@Rlen + \pgf@x=\pgf@circ@res@step%-0.5\pgflinewidth + \pgf@y=4\pgf@circ@res@step + } + \anchor{north}{\northeast\pgf@x=0cm\pgf@circ@shift@antenna@xy{2}{2}} + \anchor{east}{\northeast\pgf@y=0cm\pgf@circ@shift@antenna@xy{4}{3}\relax} + \anchor{south}{\northeast\pgf@y=-\pgf@y \pgf@x=0cm\pgf@circ@shift@antenna@xy{2}{4}\relax} + \anchor{west}{\northeast\pgf@y=0cm\pgf@x=-\pgf@x\pgf@circ@shift@antenna@xy{1}{3}} + \anchor{north east}{\northeast\pgf@circ@shift@antenna@xy{4}{2}} + \anchor{north west}{\northeast\pgf@x=-\pgf@x\pgf@circ@shift@antenna@xy{1}{2}} + \anchor{south east}{\northeast\pgf@y=-\pgf@y\pgf@circ@shift@antenna@xy{4}{4}} + \anchor{south west}{\northeast\pgf@y=-\pgf@y\pgf@x=-\pgf@x\pgf@circ@shift@antenna@xy{1}{4}} + \anchor{text}{ + \northeast + \pgf@x=\ctikzvalof{monopoles/txantenna/label/xanchor}\pgf@x + \pgf@y=\ctikzvalof{monopoles/txantenna/label/yanchor}\pgf@y + } + \behindforegroundpath{ + \pgfstartlinewidth=\pgflinewidth + \pgf@circ@res@step=\ctikzvalof{monopoles/txantenna/width}\pgf@circ@Rlen + + \pgfpathmoveto{\pgfpointorigin} + \pgfpathlineto{\pgfpoint{4\pgf@circ@res@step}{0pt}} + \pgfpathmoveto{\pgfpoint{4\pgf@circ@res@step-0.5\pgflinewidth}{0pt}} + \pgfpathlineto{\pgfpoint{4\pgf@circ@res@step-0.5\pgflinewidth}{6\pgf@circ@res@step}} + + \pgfusepath{draw} + + \pgfscope + \pgfpathmoveto{\pgfpoint{4\pgf@circ@res@step-0.5\pgflinewidth}{6\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{5\pgf@circ@res@step-0.5\pgflinewidth}{6\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{4\pgf@circ@res@step-0.5\pgflinewidth}{4\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{3\pgf@circ@res@step-0.5\pgflinewidth}{6\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{4\pgf@circ@res@step-0.5\pgflinewidth}{6\pgf@circ@res@step}} + \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}} + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgfusepath{draw} + \endpgfscope + \pgfpathmoveto{\pgfpoint{5.5\pgf@circ@res@step}{6\pgf@circ@res@step}} + % \pgfpatharc{60}{-60}{\pgf@circ@res@step and \pgf@circ@res@step} + \pgfpatharc{30}{-30}{2\pgf@circ@res@step} \pgfpathmoveto{\pgfpoint{6\pgf@circ@res@step}{6.25\pgf@circ@res@step}} + \pgfpatharc{30}{-30}{2.5\pgf@circ@res@step} + \pgfpathmoveto{\pgfpoint{6.5\pgf@circ@res@step}{6.5\pgf@circ@res@step}} + \pgfpatharc{30}{-30}{3\pgf@circ@res@step} + \pgfpathmoveto{\pgfpoint{7\pgf@circ@res@step}{6.75\pgf@circ@res@step}} + \pgfpatharc{30}{-30}{3.5\pgf@circ@res@step} + \pgfpathmoveto{\pgfpoint{7.5\pgf@circ@res@step}{7\pgf@circ@res@step}} + \pgfpatharc{30}{-30}{4\pgf@circ@res@step} + \pgfusepath{draw} + \pgfsetlinewidth{\pgfstartlinewidth} + + } +} + + +\pgfdeclareshape{rxantenna}{ + \anchor{center}{\pgfpointorigin} + \savedanchor{\northeast}{ + \pgf@circ@res@step=\ctikzvalof{monopoles/antenna/width}\pgf@circ@Rlen + \pgf@x=\pgf@circ@res@step%-0.5\pgflinewidth + \pgf@y=4\pgf@circ@res@step + } + \anchor{north}{\northeast\pgf@x=0cm\pgf@circ@shift@antenna@xy{2}{2}} + \anchor{east}{\northeast\pgf@y=0cm\pgf@circ@shift@antenna@xy{4}{3}\relax} + \anchor{south}{\northeast\pgf@y=-\pgf@y \pgf@x=0cm\pgf@circ@shift@antenna@xy{2}{4}\relax} + \anchor{west}{\northeast\pgf@y=0cm\pgf@x=-\pgf@x\pgf@circ@shift@antenna@xy{1}{3}} + \anchor{north east}{\northeast\pgf@circ@shift@antenna@xy{4}{2}} + \anchor{north west}{\northeast\pgf@x=-\pgf@x\pgf@circ@shift@antenna@xy{1}{2}} + \anchor{south east}{\northeast\pgf@y=-\pgf@y\pgf@circ@shift@antenna@xy{4}{4}} + \anchor{south west}{\northeast\pgf@y=-\pgf@y\pgf@x=-\pgf@x\pgf@circ@shift@antenna@xy{1}{4}} + \anchor{text}{ + \northeast + \pgf@x=\ctikzvalof{monopoles/rxantenna/label/xanchor}\pgf@x + \pgf@y=\ctikzvalof{monopoles/rxantenna/label/yanchor}\pgf@y + } + \behindforegroundpath{ + \pgfstartlinewidth=\pgflinewidth + \pgf@circ@res@step=\ctikzvalof{monopoles/rxantenna/width}\pgf@circ@Rlen + + \pgfpathmoveto{\pgfpointorigin} + \pgfpathlineto{\pgfpoint{4\pgf@circ@res@step}{0pt}} + \pgfpathmoveto{\pgfpoint{4\pgf@circ@res@step-0.5\pgflinewidth}{0pt}} + \pgfpathlineto{\pgfpoint{4\pgf@circ@res@step-0.5\pgflinewidth}{6\pgf@circ@res@step}} + + \pgfusepath{draw} + + \pgfscope + \pgfpathmoveto{\pgfpoint{4\pgf@circ@res@step-0.5\pgflinewidth}{6\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{5\pgf@circ@res@step-0.5\pgflinewidth}{6\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{4\pgf@circ@res@step-0.5\pgflinewidth}{4\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{3\pgf@circ@res@step-0.5\pgflinewidth}{6\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{4\pgf@circ@res@step-0.5\pgflinewidth}{6\pgf@circ@res@step}} + \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}} + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgfusepath{draw} + \endpgfscope + + \pgfpathmoveto{\pgfpoint{6\pgf@circ@res@step}{7\pgf@circ@res@step}} + % \pgfpatharc{60}{-60}{\pgf@circ@res@step and \pgf@circ@res@step} + \pgfpatharc{150}{210}{4\pgf@circ@res@step} \pgfpathmoveto{\pgfpoint{6.5\pgf@circ@res@step}{6.75\pgf@circ@res@step}} + \pgfpatharc{150}{210}{3.5\pgf@circ@res@step} + \pgfpathmoveto{\pgfpoint{7\pgf@circ@res@step}{6.5\pgf@circ@res@step}} + \pgfpatharc{150}{210}{3\pgf@circ@res@step} + \pgfpathmoveto{\pgfpoint{7.5\pgf@circ@res@step}{6.25\pgf@circ@res@step}} + \pgfpatharc{150}{210}{2.5\pgf@circ@res@step} + \pgfpathmoveto{\pgfpoint{8\pgf@circ@res@step}{6\pgf@circ@res@step}} + \pgfpatharc{150}{210}{2\pgf@circ@res@step} + \pgfusepath{draw} + \pgfsetlinewidth{\pgfstartlinewidth} + + } +} + +% Vcc +\pgfdeclareshape{vcc}{ + \savedanchor{\northeast}{% + \pgf@circ@res@step=\ctikzvalof{monopoles/vcc/width}\pgf@circ@Rlen + \pgf@x=.5\pgf@circ@res@step + \pgf@y=3\pgf@x% + } + \anchor{north}{\northeast\pgf@x=0cm\relax} + \anchor{east}{\northeast\pgf@y=0.5\pgf@y\relax} + \anchor{south}{\pgfpointorigin} + \anchor{west}{\northeast\pgf@y=0.5\pgf@y\pgf@x=-\pgf@x} + \anchor{north east}{\northeast} + \anchor{north west}{\northeast\pgf@x=-\pgf@x} + \anchor{south east}{\northeast\pgf@y=0pt\relax} + \anchor{south west}{\northeast\pgf@y=0pt\pgf@x=-\pgf@x} + \anchor{center}{\pgfpointorigin} + \anchor{text}{ + \pgf@circ@res@step=\ctikzvalof{monopoles/vcc/width}\pgf@circ@Rlen + \pgfpathmoveto{\pgfpoint{-.5\wd\pgfnodeparttextbox}{2\pgf@circ@res@step+2\ht\pgfnodeparttextbox}} + \pgfpathmoveto{\pgfpoint{.5\wd\pgfnodeparttextbox}{2\pgf@circ@res@step+2\ht\pgfnodeparttextbox}} + \pgf@x=0pt + \pgf@y=2\pgf@circ@res@step + \advance \pgf@y by 0.5\ht\pgfnodeparttextbox + \pgf@x=-.5\wd\pgfnodeparttextbox + } + \behindforegroundpath{ + \pgf@circ@res@step=\ctikzvalof{monopoles/vcc/width}\pgf@circ@Rlen + \pgfscope + \edef\pgf@circ@temp{\ctikzvalof{monopoles/vcc/arrow}}\edef\pgf@temp{legacy} + \ifx\pgf@temp\pgf@circ@temp + \pgfstartlinewidth=\pgflinewidth + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + + \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{.8\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{0}{1.5\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@step}{.8\pgf@circ@res@step}} + \pgfusepath{draw} + + \pgfsetlinewidth{\pgfstartlinewidth} + \else + \pgfsetarrowsend{\pgf@circ@temp} + \fi + \pgfpathmoveto{\pgfpointorigin} + \pgfpathlineto{\pgfpoint{0pt}{1.5\pgf@circ@res@step}} + \pgfusepath{draw} + \endpgfscope + } +} + +% Vee +\pgfdeclareshape{vee}{ + \savedanchor{\northeast}{% + \pgf@circ@res@step=\ctikzvalof{monopoles/vcc/width}\pgf@circ@Rlen + \pgf@x=.5\pgf@circ@res@step + \pgf@y=-3\pgf@x% + } + \anchor{south}{\northeast\pgf@x=0cm\relax} + \anchor{east}{\northeast\pgf@y=0.5\pgf@y\relax} + \anchor{north}{\pgfpointorigin} + \anchor{west}{\northeast\pgf@y=0.5\pgf@y\pgf@x=-\pgf@x} + \anchor{south east}{\northeast} + \anchor{south west}{\northeast\pgf@x=-\pgf@x} + \anchor{north east}{\northeast\pgf@y=0pt\relax} + \anchor{north west}{\northeast\pgf@y=0pt\pgf@x=-\pgf@x} + \anchor{center}{\pgfpointorigin} + \anchor{text}{ + \pgf@circ@res@step=\ctikzvalof{monopoles/vcc/width}\pgf@circ@Rlen + \pgfpathmoveto{\pgfpoint{-.5\wd\pgfnodeparttextbox}{-2\pgf@circ@res@step-2\ht\pgfnodeparttextbox}} + \pgfpathmoveto{\pgfpoint{.5\wd\pgfnodeparttextbox}{-2\pgf@circ@res@step-2\ht\pgfnodeparttextbox}} + \pgf@x=0pt + \pgf@y=-2\pgf@circ@res@step + \advance \pgf@y by -1.5\ht\pgfnodeparttextbox + \pgf@x=-.5\wd\pgfnodeparttextbox + } + + \behindforegroundpath{ + \pgf@circ@res@step=\ctikzvalof{monopoles/vcc/width}\pgf@circ@Rlen + \pgfscope + \edef\pgf@circ@temp{\ctikzvalof{monopoles/vee/arrow}}\edef\pgf@temp{legacy} + \ifx\pgf@temp\pgf@circ@temp + + \pgfstartlinewidth=\pgflinewidth + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + + \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{-.8\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{0}{-1.5\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@step}{-.8\pgf@circ@res@step}} + \pgfusepath{draw} + \pgfsetlinewidth{\pgfstartlinewidth} + \else + \pgfsetarrowsend{\pgf@circ@temp} + \fi + \pgfpathmoveto{\pgfpointorigin} + \pgfpathlineto{\pgfpoint{0pt}{-1.5\pgf@circ@res@step}} + \pgfusepath{draw} + \endpgfscope + } +} + +% match +\pgfdeclareshape{match}{ + \savedanchor{\northeast}{% + \pgf@circ@res@step = \ctikzvalof{monopoles/match/width} \pgf@circ@Rlen + \pgf@x=2\pgf@circ@res@step + \pgf@circ@res@step = \ctikzvalof{monopoles/match/width} \pgf@circ@Rlen + \pgf@y=.5\pgf@circ@res@step% + } + % the center is on the left side of the shape for facility of usage + \anchor{north}{\northeast\pgf@x=0.5\pgf@x\relax} + \anchor{east}{\northeast\pgf@y=0cm\relax} + \anchor{south}{\northeast\pgf@y=0pt\pgf@x=0.5\pgf@x\relax} + \anchor{west}{\pgfpointorigin} + \anchor{north east}{\northeast} + \anchor{north west}{\northeast\pgf@x=0cm\relax} + \anchor{south east}{\northeast\pgf@y=0pt\relax} + \anchor{south west}{\pgfpointorigin} + \anchor{center}{ + \pgfpointorigin + } + \anchor{text}{ + \pgf@x=\ctikzvalof{monopoles/match/width}\pgf@circ@Rlen + \pgf@x=1.5\pgf@x + \advance \pgf@x by -.5\wd\pgfnodeparttextbox + \pgf@y=-1.5\ht\pgfnodeparttextbox + } + \behindforegroundpath{ + \pgf@circ@res@step=\ctikzvalof{monopoles/match/width}\pgf@circ@Rlen + + \pgfscope + \pgfpathmoveto{\pgfpointorigin} + \pgfpathlineto{\pgfpoint{2\pgf@circ@res@step}{0pt}} + \pgfusepath{draw} + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{0pt}} + \pgfpathlineto{\pgfpoint{2\pgf@circ@res@step}{0.5\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{2\pgf@circ@res@step}{0}} + \pgfusepath{fill} + + \pgfsetlinewidth{\pgfstartlinewidth} + + \endpgfscope + } +} + +%%%---------- close: tex/pgfcircmonopoles +%%%%%%%%%%% Springe nach tex/pgfcircbipoles +%%%---------- open: tex/pgfcircbipoles.tex +% Copyright 2007-2009 by Massimo Redaelli +% +% This file may be distributed and/or modified +% +% 1. under the LaTeX Project Public License and/or +% 2. under the GNU Public License. +% +% See the files gpl-3.0_license.txt and lppl-1-3c_license.txt for more details. + +%% Generic macro for defining a bipole shape +% #1 - additional anchors +% #2 - lower y-size of the bipole (from the center). +% #3 - #shape is the name of the shape +% #4 - upper y-size of the bipole (from the center) +% #5 - width of the bipole +% #6 - macros drawing the bipole + + +\long\def\pgfcircdeclarebipole#1#2#3#4#5#6{ + \pgfdeclareshape{#3shape}{ + + \savedanchor{\northeast}{ + \pgf@y=#4\pgf@circ@Rlen + \pgf@y=.5\pgf@y + \pgf@x=#5\pgf@circ@Rlen + \pgf@x=.5\pgf@x + } + \savedanchor{\northeastborder}{ + \pgf@y=#4\pgf@circ@Rlen + \pgf@y=.5\pgf@y + \pgf@y=\ctikzvalof{bipoles/border margin}\pgf@y + \pgf@x=#5\pgf@circ@Rlen + \pgf@x=.5\pgf@x + \pgf@x=\ctikzvalof{bipoles/border margin}\pgf@x + } + \savedanchor{\southwestborder}{ + \pgf@y=-#2\pgf@circ@Rlen + \pgf@y=.5\pgf@y + \pgf@y=\ctikzvalof{bipoles/border margin}\pgf@y + \pgf@x=-#5\pgf@circ@Rlen + \pgf@x=.5\pgf@x + \pgf@x=\ctikzvalof{bipoles/border margin}\pgf@x + } + \savedanchor{\southwest}{ + \pgf@y=-#2\pgf@circ@Rlen + \pgf@y=.5\pgf@y + \pgf@x=-#5\pgf@circ@Rlen + \pgf@x=.5\pgf@x + } + \savedanchor{\centerpoint}{ + \pgf@circ@res@down=-#2\pgf@circ@Rlen + \pgf@circ@res@up=#4\pgf@circ@Rlen + \pgfpointorigin + \pgf@y=\pgf@circ@res@up + \advance\pgf@y by\pgf@circ@res@down + \pgf@y=.5\pgf@y + } + \anchor{center}{\pgfpointorigin} + \anchor{n}{ + \northeast + \pgf@x=0cm + } + \anchor{north east}{ + \northeast + } + \anchor{north west}{ + \northeast + \pgf@x=-\pgf@x + } + \anchor{ne}{ + \northeast + } + \anchor{nw}{ + \northeast + \pgf@x=-\pgf@x + } + \anchor{e}{ + \northeast + \pgf@y=0cm + } + \anchor{s}{ + \southwest + \pgf@x=0cm + } + \anchor{south east}{ + \southwest + \pgf@x=-\pgf@x + } + \anchor{south west}{ + \southwest + } + \anchor{se}{ + \southwest + \pgf@x=-\pgf@x + } + \anchor{sw}{ + \southwest + } + \anchor{w}{ + \southwest + \pgf@y=0cm + } + \anchor{north}{ + \northeast + \pgf@x=0cm + } + \anchor{east}{ + \northeast + \pgf@y=0cm + } + \anchor{south}{ + \southwest + \pgf@x=0cm + } + \anchor{west}{ + \southwest + \pgf@y=0cm + } + \anchor{right}{ + \northeast + \pgf@y=0cm + } + \anchor{above}{ + \northeast + \pgf@x=0cm + } + \anchor{left}{ + \southwest + \pgf@y=0cm + } + \anchor{below}{ + \southwest + \pgf@x=0cm + } + \anchor{a}{ + \northeast + \pgf@y=0cm + } + \anchor{b}{ + \southwest + \pgf@y=0cm + } + \savedanchor{\textanchor}{% + \pgf@y=\ht\pgfnodeparttextbox + \pgf@x=-.5\wd\pgfnodeparttextbox + } + \anchor{text}{ + \textanchor + } + \anchorborder{% + \ifpgf@circuit@bipole@inverted + \pgf@circ@res@left=-\pgf@x + \pgf@circ@res@right=-\pgf@y + \else + \pgf@circ@res@left=\pgf@x + \pgf@circ@res@right=\pgf@y + \fi + \ifdim\pgf@circ@res@right>0cm + \pgfpointborderrectangle{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@right}}{\northeastborder} + \else + \southwestborder + \pgfpointborderrectangle{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@right}}{\pgfpoint{-\pgf@x}{-\pgf@y}} + \fi + } + + #1 + + \backgroundpath{ + \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}} + + \northeast + \pgf@circ@res@up = \pgf@y + \pgf@circ@res@zero = 0cm + \pgf@circ@res@left = -\pgf@x + \pgf@circ@res@right = \pgf@x + \southwest + \pgf@circ@res@down = \pgf@y + + \pgfstartlinewidth=\pgflinewidth + \pgfsetcornersarced{\pgfpointorigin}% do not use rounded corners! + #6 + + \pgfsetlinewidth{\pgfstartlinewidth} + } + } +} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Standard bipole shapes declarations + +%% Resistor +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/resistor/height}} +{resistor} +{\ctikzvalof{bipoles/resistor/height}} +{\ctikzvalof{bipoles/resistor/width}} +{ + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgftransformationadjustments + \pgfmathsetlength{\pgf@circ@res@step}{\ctikzvalof{bipoles/resistor/width}\pgf@circ@Rlen+\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth} + \divide \pgf@circ@res@step by 12 + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}{\pgf@circ@res@zero}} + \pgf@circ@res@other = \pgf@circ@res@left + \advance\pgf@circ@res@other by \pgf@circ@res@step + \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@up}} + \advance\pgf@circ@res@other by 2\pgf@circ@res@step + \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@down}} + \advance\pgf@circ@res@other by 2\pgf@circ@res@step + \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@up}} + \advance\pgf@circ@res@other by 2\pgf@circ@res@step + \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@down}} + \advance\pgf@circ@res@other by 2\pgf@circ@res@step + \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@up}} + \advance\pgf@circ@res@other by 2\pgf@circ@res@step + \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@down}} + \advance\pgf@circ@res@other by \pgf@circ@res@step + \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@zero}} + \pgfsetbeveljoin + \pgfusepath{draw} +} + + + +%% Variable resistor +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/vresistor/height}} +{vresistor} +{\ctikzvalof{bipoles/vresistor/height}} +{\ctikzvalof{bipoles/vresistor/width}} +{ + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgftransformationadjustments + \pgfmathsetlength{\pgf@circ@res@step}{\ctikzvalof{bipoles/resistor/width}\pgf@circ@Rlen+\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth} + \divide \pgf@circ@res@step by 12 + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}{\pgf@circ@res@zero}} + + \pgf@circ@res@other = \pgf@circ@res@left + \advance\pgf@circ@res@other by \pgf@circ@res@step + \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{.5\pgf@circ@res@up}} + \advance\pgf@circ@res@other by 2\pgf@circ@res@step + \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{.5\pgf@circ@res@down}} + \advance\pgf@circ@res@other by 2\pgf@circ@res@step + \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{.5\pgf@circ@res@up}} + \advance\pgf@circ@res@other by 2\pgf@circ@res@step + \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{.5\pgf@circ@res@down}} + \advance\pgf@circ@res@other by 2\pgf@circ@res@step + \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{.5\pgf@circ@res@up}} + \advance\pgf@circ@res@other by 2\pgf@circ@res@step + \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{.5\pgf@circ@res@down}} + \advance\pgf@circ@res@other by \pgf@circ@res@step + \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@zero}} + \pgfsetbeveljoin + \pgfusepath{draw} + + \pgfscope + \pgfsetarrowsend{latexslim} + \pgfpathmoveto{\pgfpoint{.4\pgf@circ@res@other}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{-.4\pgf@circ@res@other}{\pgf@circ@res@down}} + \pgfusepath{draw} + \endpgfscope +} + + + +%% Capacitor + +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/capacitor/height}} +{capacitor} +{\ctikzvalof{bipoles/capacitor/height}} +{\ctikzvalof{bipoles/capacitor/width}} +{ + \pgf@circ@res@step = \ctikzvalof{bipoles/capacitor/width}\pgf@circ@Rlen + \divide \pgf@circ@res@step by 5 + + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}} + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}} + \pgfusepath{draw} + +} + +%% Capacitive sensor +\pgfcircdeclarebipole +{\anchor{label}{% + \southwest + \pgf@x=2.6\pgf@x + \pgf@y=1.4\pgf@y + }% +} +{\ctikzvalof{bipoles/capacitor/height}} +{capacitivesens} +{\ctikzvalof{bipoles/capacitor/height}} +{\ctikzvalof{bipoles/capacitor/width}} +{ + \pgf@circ@res@step = \ctikzvalof{bipoles/capacitor/width}\pgf@circ@Rlen + \divide \pgf@circ@res@step by 5 + + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}} + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}} + \pgfusepath{draw} + \pgfscope + \pgfpathmoveto{\pgfpoint{2.6\pgf@circ@res@right}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{-2.6\pgf@circ@res@right}{1.4\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{-4.4\pgf@circ@res@right}{1.4\pgf@circ@res@down}} + \pgfusepath{draw} + \endpgfscope +} + +%% Polar Capacitor + +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/pcapacitor/height}} +{polarcapacitor} +{\ctikzvalof{bipoles/pcapacitor/height}} +{\ctikzvalof{bipoles/pcapacitor/width}} +{ + \pgf@circ@res@step = \ctikzvalof{bipoles/pcapacitor/width}\pgf@circ@Rlen + \divide \pgf@circ@res@step by 5 + + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + + \pgfscope + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left+ \ctikzvalof{bipoles/pcapacitor/bend width}\pgf@circ@res@left}{\pgf@circ@res@up}} + \pgftransformrotate{-90} + \pgfpathsine{\pgfpoint{\pgf@circ@res@up}{-\ctikzvalof{bipoles/pcapacitor/bend width}\pgf@circ@res@left}} + \pgfpathcosine{\pgfpoint{\pgf@circ@res@up}{\ctikzvalof{bipoles/pcapacitor/bend width}\pgf@circ@res@left}} + \pgfusepath{draw} + \endpgfscope + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}} + \pgfusepath{draw} + +} + +%% Electrolytic Capacitor + +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/ecapacitor/height}} +{ecapacitor} +{\ctikzvalof{bipoles/ecapacitor/height}} +{\ctikzvalof{bipoles/ecapacitor/width}} +{ + \pgf@circ@res@step = \ctikzvalof{bipoles/ecapacitor/width}\pgf@circ@Rlen + \divide \pgf@circ@res@step by 5 + \pgfsetrectcap + % % % Draw plus pole + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@left}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@left}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}} + \pgf@circ@draworfill + % % Draw minus pole + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@right}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@right}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}} + \pgfsetfillcolor{black} + \pgfusepath{draw,fill} + \pgfsetfillcolor{black} + % % plus pole annotation + \pgftext[right,at=\pgfpoint{1.2\pgf@circ@res@left}{.6\pgf@circ@res@up}] + {\pgfkeysvalueof{/tikz/circuitikz/bipoles/ecapacitor/font} $+$} +} + +%% Battery + +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/battery/height}} +{battery} +{\ctikzvalof{bipoles/battery/height}} +{\ctikzvalof{bipoles/battery/width}} +{ + \pgf@circ@res@step = \ctikzvalof{bipoles/battery/width}\pgf@circ@Rlen + \divide \pgf@circ@res@step by 6 + + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + + \ifpgf@circ@fixbatteries + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{.5\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{.5\pgf@circ@res@down}} + + \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@step}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{-\pgf@circ@res@step}{\pgf@circ@res@down}} + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{.5\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{.5\pgf@circ@res@down}} + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}} + \else + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}} + + \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@step}{.5\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{-\pgf@circ@res@step}{.5\pgf@circ@res@down}} + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{\pgf@circ@res@down}} + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{.5\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{.5\pgf@circ@res@down}} + \fi + \pgfusepath{draw} +} + + +%% Battery 1 % poles with equl thickness + +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/battery1/height}} +{battery1} +{\ctikzvalof{bipoles/battery1/height}} +{\ctikzvalof{bipoles/battery1/width}} +{ + \pgfpathmoveto{\pgfpoint{.33\pgf@circ@res@right}{0}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0}} + \pgfpathmoveto{\pgfpoint{.33\pgf@circ@res@left}{0}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{0}} + \pgfusepath{draw} + + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \ifpgf@circ@fixbatteries + \pgfpathmoveto{\pgfpoint{.33\pgf@circ@res@right}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{.33\pgf@circ@res@right}{\pgf@circ@res@down}} + + \pgfpathmoveto{\pgfpoint{.33\pgf@circ@res@left}{.5\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{.33\pgf@circ@res@left}{.5\pgf@circ@res@down}} + \else + \pgfpathmoveto{\pgfpoint{.33\pgf@circ@res@right}{.5\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{.33\pgf@circ@res@right}{.5\pgf@circ@res@down}} + + \pgfpathmoveto{\pgfpoint{.33\pgf@circ@res@left}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{.33\pgf@circ@res@left}{\pgf@circ@res@down}} + \fi + \pgfusepath{draw} +} + +%% Battery 2 % negative pole thicker + +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/battery2/height}} +{battery2} +{\ctikzvalof{bipoles/battery2/height}} +{\ctikzvalof{bipoles/battery2/width}} +{ + \pgfpathmoveto{\pgfpoint{.33\pgf@circ@res@right}{0}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0}} + \pgfpathmoveto{\pgfpoint{.33\pgf@circ@res@left}{0}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{0}} + \pgfusepath{draw} + + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \ifpgf@circ@fixbatteries + \pgfpathmoveto{\pgfpoint{.33\pgf@circ@res@right}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{.33\pgf@circ@res@right}{\pgf@circ@res@down}} + \pgfusepath{draw} + \pgfsetlinewidth{3\pgflinewidth} + \pgfpathmoveto{\pgfpoint{.33\pgf@circ@res@left}{.5\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{.33\pgf@circ@res@left}{.5\pgf@circ@res@down}} + \else + \pgfpathmoveto{\pgfpoint{.33\pgf@circ@res@left}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{.33\pgf@circ@res@left}{\pgf@circ@res@down}} + \pgfusepath{draw} + \pgfsetlinewidth{3\pgflinewidth} + \pgfpathmoveto{\pgfpoint{.33\pgf@circ@res@right}{.5\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{.33\pgf@circ@res@right}{.5\pgf@circ@res@down}} + \fi + \pgfusepath{draw} +} + + +%% cute inductor + +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/cuteinductor/lower coil height}} +{cuteinductor} +{\ctikzvalof{bipoles/cuteinductor/height}} +{\ctikzvalof{bipoles/cuteinductor/width}} +{ + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgftransformationadjustments + + \pgfmathsetlength{\pgf@circ@res@other}%width of small coil + {0.5*\ctikzvalof{bipoles/cuteinductor/coil aspect}*\ctikzvalof{bipoles/cuteinductor/width}*\pgf@circ@Rlen/(\ctikzvalof{bipoles/cuteinductor/coils}-1)} + + + \pgfmathsetlength{\pgf@circ@res@step} + {(\ctikzvalof{bipoles/cuteinductor/width}*\pgf@circ@Rlen+\pgfhorizontaltransformationadjustment\pgflinewidth+(\ctikzvalof{bipoles/cuteinductor/coils}-1)*2*\pgf@circ@res@other)/\ctikzvalof{bipoles/cuteinductor/coils}/2} + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}{-\pgfverticaltransformationadjustment*0.4*\pgfstartlinewidth}}%correct value would be 0.5 but arcs are not really flat, therefore 0.4 is better is (almost) all cases + \foreach \x in {2,...,\ctikzvalof{bipoles/cuteinductor/coils}} + { + \pgfpatharc{180}{0}{\pgf@circ@res@step and \pgf@circ@res@up} + \pgfpatharc{0}{-180}{\pgf@circ@res@other and -\pgf@circ@res@down} + } + \pgfpatharc{180}{0}{\pgf@circ@res@step and \pgf@circ@res@up} + \pgfsetbuttcap + \pgfsetbeveljoin + \pgfusepath{stroke} +} + +%% cute inductive sensor + +\pgfcircdeclarebipole +{% +{% anchor for labelling the type of dependency + \anchor{label}{% + \southwest + \pgf@x=0.8\pgf@x + \pgf@y=2.6\pgf@y + }% +}} +{\ctikzvalof{bipoles/cuteinductor/lower coil height}} +{scuteinductor} +{\ctikzvalof{bipoles/cuteinductor/height}} +{\ctikzvalof{bipoles/cuteinductor/width}} +{ + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgftransformationadjustments + + \pgfmathsetlength{\pgf@circ@res@other}%width of small coil + {0.5*\ctikzvalof{bipoles/cuteinductor/coil aspect}*\ctikzvalof{bipoles/cuteinductor/width}*\pgf@circ@Rlen/(\ctikzvalof{bipoles/cuteinductor/coils}-1)} + + + \pgfmathsetlength{\pgf@circ@res@step} + {(\ctikzvalof{bipoles/cuteinductor/width}*\pgf@circ@Rlen+\pgfhorizontaltransformationadjustment\pgflinewidth+(\ctikzvalof{bipoles/cuteinductor/coils}-1)*2*\pgf@circ@res@other)/\ctikzvalof{bipoles/cuteinductor/coils}/2} + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}{-\pgfverticaltransformationadjustment*0.4*\pgfstartlinewidth}}%correct value would be 0.5 but arcs are not really flat, therefore 0.4 is better is (almost) all cases + \foreach \x in {2,...,\ctikzvalof{bipoles/cuteinductor/coils}} + { + \pgfpatharc{180}{0}{\pgf@circ@res@step and \pgf@circ@res@up} + \pgfpatharc{0}{-180}{\pgf@circ@res@other and -\pgf@circ@res@down} + } + \pgfpatharc{180}{0}{\pgf@circ@res@step and \pgf@circ@res@up} + \pgfsetbuttcap + \pgfsetbeveljoin + \pgfusepath{stroke} + \pgfscope + \pgfpathmoveto{\pgfpoint{.8\pgf@circ@res@right}{2\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{-.8\pgf@circ@res@right}{2.6\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{-1.6\pgf@circ@res@right}{2.6\pgf@circ@res@down}} + \pgfusepath{draw} + \endpgfscope +} + +%% cute choke + +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/cutechoke/lower coil height}} +{cutechoke} +{\ctikzvalof{bipoles/cutechoke/height}} +{\ctikzvalof{bipoles/cutechoke/width}} +{ + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgftransformationadjustments + + \pgfmathsetlength{\pgf@circ@res@other}%width of small coil + {0.5*\ctikzvalof{bipoles/cutechoke/coil aspect}*\ctikzvalof{bipoles/cutechoke/width}*\pgf@circ@Rlen/(\ctikzvalof{bipoles/cutechoke/coils}-1)} + + + \pgfmathsetlength{\pgf@circ@res@step} + {(\ctikzvalof{bipoles/cutechoke/width}*\pgf@circ@Rlen+\pgfhorizontaltransformationadjustment\pgflinewidth+(\ctikzvalof{bipoles/cutechoke/coils}-1)*2*\pgf@circ@res@other)/\ctikzvalof{bipoles/cutechoke/coils}/2} + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}{-\pgfverticaltransformationadjustment*0.4*\pgfstartlinewidth}}%correct value would be 0.5 but arcs are not really flat, therefore 0.4 is better is (almost) all cases + \foreach \x in {2,...,\ctikzvalof{bipoles/cutechoke/coils}} + { + \pgfpatharc{180}{0}{\pgf@circ@res@step and \pgf@circ@res@up} + \pgfpatharc{0}{-180}{\pgf@circ@res@other and -\pgf@circ@res@down} + } + \pgfpatharc{180}{0}{\pgf@circ@res@step and \pgf@circ@res@up} + \pgfsetbuttcap + \pgfsetbeveljoin + \pgfusepath{stroke} + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{-\pgfverticaltransformationadjustment*0.4*\pgfstartlinewidth+\ctikzvalof{bipoles/cutechoke/cdist}\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{-\pgfverticaltransformationadjustment*0.4*\pgfstartlinewidth+\ctikzvalof{bipoles/cutechoke/cdist}\pgf@circ@res@up}} + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}*\ctikzvalof{bipoles/cutechoke/cthick}\pgfstartlinewidth} + \pgfusepath{stroke} + + \ifpgf@circuit@bipole@twolines + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{-\pgfverticaltransformationadjustment*0.4*\pgfstartlinewidth+\ctikzvalof{bipoles/cutechoke/cdist}\pgf@circ@res@up+\ctikzvalof{bipoles/cutechoke/cstep}\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{-\pgfverticaltransformationadjustment*0.4*\pgfstartlinewidth+\ctikzvalof{bipoles/cutechoke/cdist}\pgf@circ@res@up+\ctikzvalof{bipoles/cutechoke/cstep}\pgf@circ@res@up}} + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}*\ctikzvalof{bipoles/cutechoke/cthick}\pgfstartlinewidth} + \pgfusepath{stroke} + \fi +} + +%% variable cute inductor + +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/vcuteinductor/lower coil height}} +{vcuteinductor} +{\ctikzvalof{bipoles/vcuteinductor/height}} +{\ctikzvalof{bipoles/vcuteinductor/width}} +{ + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgftransformationadjustments + + \pgfmathsetlength{\pgf@circ@res@other}%width of small coil + {0.5*\ctikzvalof{bipoles/vcuteinductor/coil aspect}*\ctikzvalof{bipoles/vcuteinductor/width}*\pgf@circ@Rlen/(\ctikzvalof{bipoles/vcuteinductor/coils}-1)} + + + \pgfmathsetlength{\pgf@circ@res@step} + {(\ctikzvalof{bipoles/vcuteinductor/width}*\pgf@circ@Rlen+\pgfhorizontaltransformationadjustment\pgflinewidth+(\ctikzvalof{bipoles/vcuteinductor/coils}-1)*2*\pgf@circ@res@other)/\ctikzvalof{bipoles/vcuteinductor/coils}/2} + + \pgfscope + \pgfsetarrowsend{latexslim} + \pgfpathmoveto{\pgfpoint{.4\pgf@circ@res@left}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@right}{\pgf@circ@res@up}} + \pgfusepath{draw} + \endpgfscope + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}{-\pgfverticaltransformationadjustment*0.4*\pgfstartlinewidth}}%correct value would be 0.5 but arcs are not really flat, therefore 0.4 is better is (almost) all cases + \foreach \x in {2,...,\ctikzvalof{bipoles/vcuteinductor/coils}} + { + \pgfpatharc{180}{0}{\pgf@circ@res@step and .5\pgf@circ@res@up} + \pgfpatharc{0}{-180}{\pgf@circ@res@other and -.5\pgf@circ@res@down} + } + \pgfpatharc{180}{0}{\pgf@circ@res@step and .5\pgf@circ@res@up} + \pgfsetbuttcap + \pgfsetbeveljoin + \pgfusepath{stroke} +} +%% american inductor + +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/americaninductor/height 2}} +{americaninductor} +{\ctikzvalof{bipoles/americaninductor/height}} +{\ctikzvalof{bipoles/americaninductor/width}} +{ + \pgf@circ@res@step=\ctikzvalof{bipoles/americaninductor/width}\pgf@circ@Rlen + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgftransformationadjustments + \advance \pgf@circ@res@step by \pgfhorizontaltransformationadjustment\pgflinewidth + \divide \pgf@circ@res@step by \ctikzvalof{bipoles/americaninductor/coils} + \divide \pgf@circ@res@step by 2 + \pgf@circ@res@other = \ctikzvalof{bipoles/americaninductor/coil height}\pgf@circ@Rlen + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}{-\pgfverticaltransformationadjustment*0.4*\pgfstartlinewidth}}%correct value would be 0.5 but arcs are not really flat, therefore 0.4 is better is (almost) all cases + \foreach \x in {1,...,\ctikzvalof{bipoles/americaninductor/coils}} + { + \pgfpatharc{180}{0}{\pgf@circ@res@step and \pgf@circ@res@other} + } + \pgfsetbuttcap + \pgfsetbeveljoin + \pgfusepath{stroke} +} + + +%% american inductive sensor + +\pgfcircdeclarebipole +{% +{% anchor for labelling the type of dependency + \anchor{label}{% + \southwest + \pgf@x=0.8\pgf@x + \pgf@y=2.6\pgf@y + }% +}} +{\ctikzvalof{bipoles/americaninductor/height 2}} +{samericaninductor} +{\ctikzvalof{bipoles/americaninductor/height}} +{\ctikzvalof{bipoles/americaninductor/width}} +{ + \pgf@circ@res@step=\ctikzvalof{bipoles/americaninductor/width}\pgf@circ@Rlen + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgftransformationadjustments + \advance \pgf@circ@res@step by \pgfhorizontaltransformationadjustment\pgflinewidth + \divide \pgf@circ@res@step by \ctikzvalof{bipoles/americaninductor/coils} + \divide \pgf@circ@res@step by 2 + \pgf@circ@res@other = \ctikzvalof{bipoles/americaninductor/coil height}\pgf@circ@Rlen + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}{-\pgfverticaltransformationadjustment*0.4*\pgfstartlinewidth}}%correct value would be 0.5 but arcs are not really flat, therefore 0.4 is better is (almost) all cases + \foreach \x in {1,...,\ctikzvalof{bipoles/americaninductor/coils}} + { + \pgfpatharc{180}{0}{\pgf@circ@res@step and \pgf@circ@res@other} + } + \pgfsetbuttcap + \pgfsetbeveljoin + \pgfusepath{stroke} + \pgfscope + \pgfpathmoveto{\pgfpoint{.8\pgf@circ@res@right}{2\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{-.8\pgf@circ@res@right}{2.6\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{-1.6\pgf@circ@res@right}{2.6\pgf@circ@res@down}} + \pgfusepath{draw} + \endpgfscope +} + +%% variable american inductor + +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/vamericaninductor/height 2}} +{vamericaninductor} +{\ctikzvalof{bipoles/vamericaninductor/height}} +{\ctikzvalof{bipoles/vamericaninductor/width}} +{ + \pgf@circ@res@step=\ctikzvalof{bipoles/vamericaninductor/width}\pgf@circ@Rlen + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgftransformationadjustments + \advance \pgf@circ@res@step by \pgfhorizontaltransformationadjustment\pgflinewidth + \divide \pgf@circ@res@step by \ctikzvalof{bipoles/vamericaninductor/coils} + \divide \pgf@circ@res@step by 2 + \pgf@circ@res@other = \ctikzvalof{bipoles/vamericaninductor/coil height}\pgf@circ@Rlen + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}{-\pgfverticaltransformationadjustment*0.4*\pgfstartlinewidth}}%correct value would be 0.5 but arcs are not really flat, therefore 0.4 is better is (almost) all cases + \foreach \x in {1,...,\ctikzvalof{bipoles/vamericaninductor/coils}} + { + \pgfpatharc{180}{0}{\pgf@circ@res@step and \pgf@circ@res@other} + } + \pgfsetbuttcap + \pgfsetbeveljoin + \pgfusepath{stroke} + + \pgfscope + \pgfsetarrowsend{latexslim} + \pgfpathmoveto{\pgfpoint{.4\pgf@circ@res@left}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{-.4\pgf@circ@res@left}{\pgf@circ@res@up}} + \pgfusepath{draw} + \endpgfscope +} + + +%% Independent voltage source + +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/vsource/height}} +{vsource} +{\ctikzvalof{bipoles/vsource/height}} +{\ctikzvalof{bipoles/vsource/width}} +{ + + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + + \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}} + \pgf@circ@draworfill + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@zero}} + \pgfusepath{draw} +} + + +%% Independent voltage source - American style + +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/vsourceam/height}} +{vsourceAM} +{\ctikzvalof{bipoles/vsourceam/height}} +{\ctikzvalof{bipoles/vsourceam/width}} +{ + + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}} + \pgf@circ@draworfill + \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}} + \ifpgf@circ@oldvoltagedirection + \pgftext[bottom,rotate=90,y=\ctikzvalof{bipoles/vsourceam/margin}\pgf@circ@res@down]{$+$} + \pgftext[top,rotate=90,y=\ctikzvalof{bipoles/vsourceam/margin}\pgf@circ@res@up]{$-$} + \else + \pgftext[bottom,rotate=90,y=\ctikzvalof{bipoles/vsourceam/margin}\pgf@circ@res@down]{$-$} + \pgftext[top,rotate=90,y=\ctikzvalof{bipoles/vsourceam/margin}\pgf@circ@res@up]{$+$} + \fi +} + + + +%% Independent sinusoidal voltage source + +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/vsourcesin/height}} +{vsourcesin} +{\ctikzvalof{bipoles/vsourcesin/height}} +{\ctikzvalof{bipoles/vsourcesin/width}} +{ + + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}} + \pgf@circ@draworfill + + \pgf@circ@res@up = .5\pgf@circ@res@up + \pgfscope + \pgftransformrotate{90} + \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@up}{0cm}} + \pgfpathsine{\pgfpoint{.5\pgf@circ@res@up}{.5\pgf@circ@res@up}} + \pgfpathcosine{\pgfpoint{.5\pgf@circ@res@up}{-.5\pgf@circ@res@up}} + \pgfpathsine{\pgfpoint{.5\pgf@circ@res@up}{-.5\pgf@circ@res@up}} + \pgfpathcosine{\pgfpoint{.5\pgf@circ@res@up}{.5\pgf@circ@res@up}} + \pgfusepath{draw} + \endpgfscope +} + +% Square Voltage source - contributed by Alistair Kwan +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/vsourcesquare/height}} +{vsourcesquare} +{\ctikzvalof{bipoles/vsourcesquare/height}} +{\ctikzvalof{bipoles/vsourcesquare/width}} +{ + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}} + \pgf@circ@draworfill + \pgf@circ@res@up = .5\pgf@circ@res@up + \pgfscope + \pgftransformrotate{90} + \pgfpathmoveto{\pgfpoint{-1\pgf@circ@res@up}{0cm}} + \pgfpathlineto{\pgfpoint{-1\pgf@circ@res@up}{1\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{0\pgf@circ@res@up}{1\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{0\pgf@circ@res@up}{-1\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{1\pgf@circ@res@up}{-1\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{1\pgf@circ@res@up}{0\pgf@circ@res@up}} + \pgfusepath{draw} + \endpgfscope +} + +% Triangle Voltage source - contributed by Ralf Farkas +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/vsourcetri/height}} +{vsourcetri} +{\ctikzvalof{bipoles/vsourcetri/height}} +{\ctikzvalof{bipoles/vsourcetri/width}} +{ + + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}} + \pgf@circ@draworfill + + \pgf@circ@res@up = .5\pgf@circ@res@up + \pgfscope + \pgftransformrotate{90} + \pgfpathmoveto{\pgfpoint{-1\pgf@circ@res@up}{0cm}} + \pgfpathlineto{\pgfpoint{-0.5\pgf@circ@res@up}{0.75\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@up}{-0.75\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{1\pgf@circ@res@up}{0\pgf@circ@res@up}} + \pgfusepath{draw} + \endpgfscope +} + + +%% PV Source +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/pvsource/height}} +{pvsource} +{\ctikzvalof{bipoles/pvsource/height}} +{\ctikzvalof{bipoles/pvsource/width}} +{ + \pgfpointorigin + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}} + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{\pgf@circ@res@up}} + \pgf@circ@draworfill + + \pgfpathmoveto{\pgfpoint{.15\pgf@circ@res@right}{0}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0}} + \pgfpathmoveto{\pgfpoint{.15\pgf@circ@res@left}{0}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{0}} + \pgfusepath{draw} + + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgfpathmoveto{\pgfpoint{.15\pgf@circ@res@left}{.4\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{.15\pgf@circ@res@left}{.4\pgf@circ@res@down}} + + \pgfpathmoveto{\pgfpoint{.15\pgf@circ@res@right}{.6\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{.15\pgf@circ@res@right}{.6\pgf@circ@res@down}} + \pgfusepath{draw} + + %Arrow Part + \pgfscope + \pgfsetarrowsend{latex} + \pgfpathmoveto{\pgfpointadd{\pgfpoint{.3\pgf@circ@res@left}{0}}{\pgfpointpolar{-45}{2.2\pgf@circ@res@up}}} + \pgfpathlineto{\pgfpointadd{\pgfpoint{.3\pgf@circ@res@left}{0}}{\pgfpointpolar{-45}{1.3\pgf@circ@res@up}}} + \pgfusepath{draw} + \pgfpathmoveto{\pgfpointadd{\pgfpoint{0}{0.3\pgf@circ@res@up}}{\pgfpointpolar{-45}{2.2\pgf@circ@res@up}}} + \pgfpathlineto{\pgfpointadd{\pgfpoint{0}{0.3\pgf@circ@res@up}}{\pgfpointpolar{-45}{1.3\pgf@circ@res@up}}} + \pgfusepath{draw} + \endpgfscope + +} + +%% Empty Source +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/esource/height}} +{esource} +{\ctikzvalof{bipoles/esource/height}} +{\ctikzvalof{bipoles/esource/width}} +{ + \pgfpointorigin + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}} + \pgf@circ@draworfill +} + +%% DC Current Source with open shape +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/dcisource/height}} +{dcisource} +{\ctikzvalof{bipoles/dcisource/height}} +{\ctikzvalof{bipoles/dcisource/width}} +{ + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgfpathmoveto{\pgfpointorigin} + \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}} + \pgf@circ@maybefill + \edef\@@angle{\ctikzvalof{bipoles/dcisource/angle}} + \pgfpathmoveto{\pgfpointpolar{\@@angle}{\pgf@circ@res@up}} + \pgfpatharc{\@@angle}{-\@@angle}{\pgf@circ@res@up} + \pgfpathmoveto{\pgfpointpolar{180-\@@angle}{\pgf@circ@res@up}} + \pgfpatharc{180-\@@angle}{180+\@@angle}{\pgf@circ@res@up} + \pgfusepath{draw} + + \pgfpathmoveto{\pgfpoint{.7\pgf@circ@res@left}{\pgf@circ@res@zero}} + \pgfpathlineto{\pgfpoint{.6\pgf@circ@res@right}{\pgf@circ@res@zero}} + \pgfusepath{draw} + \pgfscope + \pgftransformshift{\pgfpoint{.5\pgf@circ@res@right}{\pgf@circ@res@zero}} + \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}} + \endpgfscope +} +%% DC-Voltage source +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/dcvsource/height}} +{dcvsource} +{\ctikzvalof{bipoles/dcvsource/height}} +{\ctikzvalof{bipoles/dcvsource/width}} +{ + \pgfpointorigin + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}} + \pgf@circ@draworfill + \pgfpathmoveto{\pgfpoint{.2\pgf@circ@res@up}{.5\pgf@circ@res@left}} + \pgfpathlineto{\pgfpoint{.2\pgf@circ@res@up}{.5\pgf@circ@res@right}} + \pgfpathmoveto{\pgfpoint{.2\pgf@circ@res@down}{.5\pgf@circ@res@left}} + \pgfpathlineto{\pgfpoint{.2\pgf@circ@res@down}{.5\pgf@circ@res@right}} + \pgfusepath{draw} +} + + +%% Independent current source + +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/isource/height}} +{isource} +{\ctikzvalof{bipoles/isource/height}} +{\ctikzvalof{bipoles/isource/width}} +{ + \pgfpointorigin + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}} + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{\pgf@circ@res@down}} + \pgf@circ@draworfill +} + +%% Independent double oo source + +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/oosource/height}} +{oosource} +{\ctikzvalof{bipoles/oosource/height}} +{\ctikzvalof{bipoles/oosource/width}} +{ + \pgfpointorigin + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgfpathcircle{\pgfpoint{\ctikzvalof{bipoles/oosource/circleoffset}\pgf@circ@res@left}{0}} + {\ctikzvalof{bipoles/oosource/circlesize}\pgf@circ@res@left} + \pgf@circ@maybefill + \pgfpathcircle{\pgfpoint{\ctikzvalof{bipoles/oosource/circleoffset}\pgf@circ@res@right}{0}} + {\ctikzvalof{bipoles/oosource/circlesize}\pgf@circ@res@right} + \pgf@circ@draworfill + \pgfpathcircle{\pgfpoint{\ctikzvalof{bipoles/oosource/circleoffset}\pgf@circ@res@left}{0}} + {\ctikzvalof{bipoles/oosource/circlesize}\pgf@circ@res@left} + \pgfusepath{draw} +} + + +%% Independent current source - American + +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/isourceam/height}} +{isourceAM} +{\ctikzvalof{bipoles/isourceam/height}} +{\ctikzvalof{bipoles/isourceam/width}} +{ + \pgfpointorigin + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}} + \pgf@circ@draworfill + + \pgfpathmoveto{\pgfpoint{.7\pgf@circ@res@left}{\pgf@circ@res@zero}} + \pgfpathlineto{\pgfpoint{.7\pgf@circ@res@right}{\pgf@circ@res@zero}} + \pgfusepath{draw} + \pgfscope + \pgftransformshift{\pgfpoint{.5\pgf@circ@res@right}{\pgf@circ@res@zero}} + \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}} + \endpgfscope +} + + +%% Independent sinusoidal current source + +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/isource/height}} +{isourcesin} +{\ctikzvalof{bipoles/isource/height}} +{\ctikzvalof{bipoles/isource/width}} +{ + \pgfpointorigin + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}} + \pgf@circ@draworfill + + \pgf@circ@res@up = .5\pgf@circ@res@up + \pgfscope + \pgftransformrotate{90} + \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@up}{0cm}} + \pgfpathsine{\pgfpoint{.5\pgf@circ@res@up}{.5\pgf@circ@res@up}} + \pgfpathcosine{\pgfpoint{.5\pgf@circ@res@up}{-.5\pgf@circ@res@up}} + \pgfpathsine{\pgfpoint{.5\pgf@circ@res@up}{-.5\pgf@circ@res@up}} + \pgfpathcosine{\pgfpoint{.5\pgf@circ@res@up}{.5\pgf@circ@res@up}} + \pgfusepath{draw} + \endpgfscope + +} + + +%% Controlled voltage source + +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/cvsource/height}} +{cvsource} +{\ctikzvalof{bipoles/cvsource/height}} +{\ctikzvalof{bipoles/cvsource/width}} +{ + + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@zero}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@zero}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@zero}{\pgf@circ@res@down}} + \pgfpathclose + \pgf@circ@draworfill + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@zero}} + \pgfusepath{draw} +} + + + + +%% Controlled voltage source - American +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/cvsourceam/height}} +{cvsourceAM} +{\ctikzvalof{bipoles/cvsourceam/height}} +{\ctikzvalof{bipoles/cvsourceam/width}} +{ + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@zero}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@zero}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@zero}{\pgf@circ@res@down}} + \pgfpathclose + \pgf@circ@draworfill + + \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}} + \ifpgf@circ@oldvoltagedirection + \pgftext[bottom,rotate=90,y=\ctikzvalof{bipoles/cvsourceam/margin}\pgf@circ@res@left]{$+$} + \pgftext[top,rotate=90,y=\ctikzvalof{bipoles/cvsourceam/margin}\pgf@circ@res@right]{$-$} + \else + \pgftext[bottom,rotate=90,y=\ctikzvalof{bipoles/cvsourceam/margin}\pgf@circ@res@left]{$-$} + \pgftext[top,rotate=90,y=\ctikzvalof{bipoles/cvsourceam/margin}\pgf@circ@res@right]{$+$} + \fi +} + + +%% Controlled sinusoidal voltage source +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/cvsourcesin/height}} +{cvsourcesin} +{\ctikzvalof{bipoles/cvsourcesin/height}} +{\ctikzvalof{bipoles/cvsourcesin/width}} +{ + + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + + \pgfscope + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@zero}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@zero}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@zero}{\pgf@circ@res@down}} + \pgfpathclose + \pgf@circ@draworfill + \endpgfscope + + \pgf@circ@res@up = .5\pgf@circ@res@up + \pgfscope + \pgftransformrotate{90} + \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@up}{0cm}} + \pgfpathsine{\pgfpoint{.5\pgf@circ@res@up}{.5\pgf@circ@res@up}} + \pgfpathcosine{\pgfpoint{.5\pgf@circ@res@up}{-.5\pgf@circ@res@up}} + \pgfpathsine{\pgfpoint{.5\pgf@circ@res@up}{-.5\pgf@circ@res@up}} + \pgfpathcosine{\pgfpoint{.5\pgf@circ@res@up}{.5\pgf@circ@res@up}} + \pgfusepath{draw} + \endpgfscope +} + + + +%% Controlled sinusoidal current source + +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/cvsourcesin/height}} +{cisourcesin} +{\ctikzvalof{bipoles/cvsourcesin/height}} +{\ctikzvalof{bipoles/cvsourcesin/width}} +{ + + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + + \pgfscope + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@zero}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@zero}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@zero}{\pgf@circ@res@down}} + \pgfpathclose + \pgf@circ@draworfill + \endpgfscope + + \pgf@circ@res@up = .5\pgf@circ@res@up + \pgfscope + \pgftransformrotate{90} + \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@up}{0cm}} + \pgfpathsine{\pgfpoint{.5\pgf@circ@res@up}{.5\pgf@circ@res@up}} + \pgfpathcosine{\pgfpoint{.5\pgf@circ@res@up}{-.5\pgf@circ@res@up}} + \pgfpathsine{\pgfpoint{.5\pgf@circ@res@up}{-.5\pgf@circ@res@up}} + \pgfpathcosine{\pgfpoint{.5\pgf@circ@res@up}{.5\pgf@circ@res@up}} + \pgfusepath{draw} + \endpgfscope +} + +%% Controlled current source + +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/cisource/height}} +{cisource} +{\ctikzvalof{bipoles/cisource/height}} +{\ctikzvalof{bipoles/cisource/width}} +{ + + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@zero}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@zero}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@zero}{\pgf@circ@res@down}} + \pgfpathclose + \pgf@circ@draworfill + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@zero}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@zero}{\pgf@circ@res@down}} + \pgfusepath{draw} +} + + +%% Controlled current source - American + +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/cisourceam/height}} +{cisourceAM} +{\ctikzvalof{bipoles/cisourceam/height}} +{\ctikzvalof{bipoles/cisourceam/width}} +{ + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@zero}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@zero}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@zero}{\pgf@circ@res@down}} + \pgfpathclose + \pgf@circ@draworfill + \pgfpathmoveto{\pgfpoint{.7\pgf@circ@res@left}{\pgf@circ@res@zero}} + \pgfpathlineto{\pgfpoint{.7\pgf@circ@res@right}{\pgf@circ@res@zero}} + \pgfusepath{draw} + \pgfscope + \pgftransformshift{\pgfpoint{.5\pgf@circ@res@right}{\pgf@circ@res@zero}} + \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}} + \endpgfscope +} + +%% Cute Independent voltage source + +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/vsource/height}} +{vsourceC} +{\ctikzvalof{bipoles/vsource/height}} +{\ctikzvalof{bipoles/vsource/width}} +{ + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}} + \pgf@circ@draworfill + \pgfmathsetmacro{\@@thicker}{3*\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}} + \pgfsetlinewidth{\@@thicker\pgfstartlinewidth} + \pgfpathmoveto{\pgfpoint{.6\pgf@circ@res@left}{\pgf@circ@res@zero}} + \pgfpathlineto{\pgfpoint{.6\pgf@circ@res@right}{\pgf@circ@res@zero}} + \pgfsetroundcap\pgfusepath{draw} +} +%% Cute Independent current source + +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/isource/height}} +{isourceC} +{\ctikzvalof{bipoles/isource/height}} +{\ctikzvalof{bipoles/isource/width}} +{ + \pgfpointorigin + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}} + \pgf@circ@draworfill + \pgfmathsetmacro{\@@thicker}{3*\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}} + \pgfsetlinewidth{\@@thicker\pgfstartlinewidth} + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{.6\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{.6\pgf@circ@res@down}} + \pgfsetroundcap\pgfusepath{draw} +} +%% Cute Controlled voltage source + +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/cvsource/height}} +{cvsourceC} +{\ctikzvalof{bipoles/cvsource/height}} +{\ctikzvalof{bipoles/cvsource/width}} +{ + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@zero}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@zero}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@zero}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}} + \pgf@circ@draworfill + \pgfmathsetmacro{\@@thicker}{3*\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}} + \pgfsetlinewidth{\@@thicker\pgfstartlinewidth} + \pgfpathmoveto{\pgfpoint{.6\pgf@circ@res@left}{\pgf@circ@res@zero}} + \pgfpathlineto{\pgfpoint{.6\pgf@circ@res@right}{\pgf@circ@res@zero}} + \pgfsetroundcap\pgfusepath{draw} +} + +%% Cute Controlled current source + +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/cisource/height}} +{cisourceC} +{\ctikzvalof{bipoles/cisource/height}} +{\ctikzvalof{bipoles/cisource/width}} +{ + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@zero}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@zero}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@zero}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}} + \pgf@circ@draworfill + \pgfmathsetmacro{\@@thicker}{3*\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}} + \pgfsetlinewidth{\@@thicker\pgfstartlinewidth} + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@zero}{.6\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@zero}{.6\pgf@circ@res@down}} + \pgfsetroundcap\pgfusepath{draw} +} + +%% Noise voltage source + +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/vsource/height}} +{vsourceN} +{\ctikzvalof{bipoles/vsource/height}} +{\ctikzvalof{bipoles/vsource/width}} +{ + \pgfscope + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}} + % + \pgf@circ@res@step=0.125\pgf@circ@Rlen\relax + \edef\pgf@noise@temp{dashed} + \edef\pgf@noise@fill{\pgfkeysvalueof{/tikz/circuitikz/bipoles/noise sources/fillcolor}} + \ifx\pgf@noise@temp\pgf@noise@fill + % fillable in this case + \pgf@circ@draworfillandclip + \pgfmathsetmacro{\thinner}{.5*\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}} + \pgfsetlinewidth{\thinner\pgfstartlinewidth} + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}} + \advance\pgf@circ@res@up by \pgf@circ@res@step\advance\pgf@circ@res@down by \pgf@circ@res@step + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}} + \advance\pgf@circ@res@up by \pgf@circ@res@step\advance\pgf@circ@res@down by \pgf@circ@res@step + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}} + \advance\pgf@circ@res@up by \pgf@circ@res@step\advance\pgf@circ@res@down by \pgf@circ@res@step + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}} + % + \advance\pgf@circ@res@up by -4\pgf@circ@res@step \advance\pgf@circ@res@down by -4\pgf@circ@res@step + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}} + \advance\pgf@circ@res@up by -\pgf@circ@res@step\advance\pgf@circ@res@down by -\pgf@circ@res@step + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}} + \advance\pgf@circ@res@up by -\pgf@circ@res@step\advance\pgf@circ@res@down by -\pgf@circ@res@step + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}} + \pgfusepath{draw} + \else + \pgfsetfillcolor{\pgf@noise@fill} + \pgfusepath{draw,fill} + \fi + \endpgfscope + \pgfmathsetmacro{\@@thicker}{3*\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}} + \pgfsetlinewidth{\@@thicker\pgfstartlinewidth} + \pgfpathmoveto{\pgfpoint{.6\pgf@circ@res@left}{\pgf@circ@res@zero}} + \pgfpathlineto{\pgfpoint{.6\pgf@circ@res@right}{\pgf@circ@res@zero}} + \pgfsetroundcap\pgfusepath{draw} +} +%% Noise current source + +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/isource/height}} +{isourceN} +{\ctikzvalof{bipoles/isource/height}} +{\ctikzvalof{bipoles/isource/width}} +{ + \pgfpointorigin + \pgfscope + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}} + % + \pgf@circ@res@step=0.125\pgf@circ@Rlen\relax + \edef\pgf@noise@temp{dashed} + \edef\pgf@noise@fill{\pgfkeysvalueof{/tikz/circuitikz/bipoles/noise sources/fillcolor}} + \ifx\pgf@noise@temp\pgf@noise@fill + % fillable in this case + \pgf@circ@draworfillandclip + \pgfmathsetmacro{\thinner}{.5*\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}} + \pgfsetlinewidth{\thinner\pgfstartlinewidth} + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}} + \advance\pgf@circ@res@up by \pgf@circ@res@step\advance\pgf@circ@res@down by \pgf@circ@res@step + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}} + \advance\pgf@circ@res@up by \pgf@circ@res@step\advance\pgf@circ@res@down by \pgf@circ@res@step + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}} + \advance\pgf@circ@res@up by \pgf@circ@res@step\advance\pgf@circ@res@down by \pgf@circ@res@step + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}} + % + \advance\pgf@circ@res@up by -4\pgf@circ@res@step \advance\pgf@circ@res@down by -4\pgf@circ@res@step + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}} + \advance\pgf@circ@res@up by -\pgf@circ@res@step\advance\pgf@circ@res@down by -\pgf@circ@res@step + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}} + \advance\pgf@circ@res@up by -\pgf@circ@res@step\advance\pgf@circ@res@down by -\pgf@circ@res@step + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}} + \pgfusepath{draw} + \else + \pgfsetfillcolor{\pgf@noise@fill} + \pgfusepath{draw,fill} + \fi + \endpgfscope + \pgfmathsetmacro{\@@thicker}{3*\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}} + \pgfsetlinewidth{\@@thicker\pgfstartlinewidth} + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{.6\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{.6\pgf@circ@res@down}} + \pgfsetroundcap\pgfusepath{draw} +} +%% Black generic diode + +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/diode/height}} +{fulldiode} +{\ctikzvalof{bipoles/diode/height}} +{\ctikzvalof{bipoles/diode/width}} +{ + + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + + \pgfscope + \pgftransformxshift{\pgf@circ@res@left} + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}} + \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}} + \pgfusepath{draw,fill} + \endpgfscope + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}} + \pgfusepath{draw} +} + +%% Black Zener diode + +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/diode/height}} +{fullzdiode} +{\ctikzvalof{bipoles/diode/height}} +{\ctikzvalof{bipoles/diode/width}} +{ + + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + + \pgfscope + \pgftransformxshift{\pgf@circ@res@left} + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}} + \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}} + \pgfusepath{draw,fill} + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-.6\pgf@circ@res@left}{\pgf@circ@res@up}} + \pgfusepath{draw} + \endpgfscope +} + +%% Black alternative zigzag Zener diode +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/diode/height}} +{fullzzdiode} +{\ctikzvalof{bipoles/diode/height}} +{\ctikzvalof{bipoles/diode/width}} +{ + + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + + \pgfscope + \pgftransformxshift{\pgf@circ@res@left} + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}} + \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}} + \pgfusepath{draw,fill} + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-1.8\pgf@circ@res@left}{\pgf@circ@res@down-0.5\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-0.2\pgf@circ@res@left}{\pgf@circ@res@up-0.5\pgf@circ@res@down}} + \pgfusepath{draw} + \endpgfscope +} + +%% Black Schottky diode + +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/diode/height}} +{fullsdiode} +{\ctikzvalof{bipoles/diode/height}} +{\ctikzvalof{bipoles/diode/width}} +{ + + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgfscope + \pgftransformxshift{\pgf@circ@res@left} + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}} + \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}} + \pgfusepath{draw,fill} + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-.6\pgf@circ@res@left}{.6\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-.6\pgf@circ@res@left}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-1.4\pgf@circ@res@left}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-1.4\pgf@circ@res@left}{.6\pgf@circ@res@up}} + \pgfusepath{draw} + \endpgfscope + +} + +%% Black tunnel diode + +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/diode/height}} +{fulltdiode} +{\ctikzvalof{bipoles/diode/height}} +{\ctikzvalof{bipoles/diode/width}} +{ + + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgfscope + \pgftransformxshift{\pgf@circ@res@left} + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}} + \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}} + \pgfusepath{draw,fill} + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-.6\pgf@circ@res@left}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-.6\pgf@circ@res@left}{\pgf@circ@res@up}} + \pgfusepath{draw} + \endpgfscope +} + +%% Black light emitting diode + +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/diode/height}} +{fulllediode} +{\ctikzvalof{bipoles/diode/height}} +{\ctikzvalof{bipoles/diode/width}} +{ + + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgfscope + \pgftransformxshift{\pgf@circ@res@left} + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}} + \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}} + \pgfusepath{draw,fill} + \endpgfscope + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}} + \pgfusepath{draw} + + \pgfsetlinewidth{\pgfstartlinewidth} + \pgfsetarrowsend{latexslim} + \pgfpathmoveto{\pgfpoint{-0.4\pgf@circ@res@right}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{0.6\pgf@circ@res@right}{2\pgf@circ@res@up}} + \pgfusepath{draw} + \pgfpathmoveto{\pgfpoint{0.2\pgf@circ@res@right}{0.8\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{1.2\pgf@circ@res@right}{1.8\pgf@circ@res@up}} + \pgfusepath{draw} + +} + +%% Black photodiode + +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/diode/height}} +{fullpdiode} +{\ctikzvalof{bipoles/diode/height}} +{\ctikzvalof{bipoles/diode/width}} +{ + + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgfscope + \pgftransformxshift{\pgf@circ@res@left} + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}} + \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}} + \pgfusepath{draw,fill} + \endpgfscope + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}} + \pgfusepath{draw} + + \pgfsetlinewidth{\pgfstartlinewidth} + \pgfsetarrowsstart{latexslim} + \pgfpathmoveto{\pgfpoint{-0.4\pgf@circ@res@right}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{0.6\pgf@circ@res@right}{2\pgf@circ@res@up}} + \pgfusepath{draw} + \pgfpathmoveto{\pgfpoint{0.2\pgf@circ@res@right}{0.8\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{1.2\pgf@circ@res@right}{1.8\pgf@circ@res@up}} + \pgfusepath{draw} +} + +%% Black varcap + +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/varcap/height}} +{fullvarcap} +{\ctikzvalof{bipoles/varcap/height}} +{\ctikzvalof{bipoles/varcap/width}} +{ + \pgf@circ@res@temp=\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth + \pgfsetlinewidth{\pgf@circ@res@temp} + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-2\pgf@circ@res@temp}{0pt}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-2\pgf@circ@res@temp}{0pt}} + \pgfusepath{draw,fill} + % + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-2\pgf@circ@res@temp}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-2\pgf@circ@res@temp}{\pgf@circ@res@up}} + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}} + \pgfusepath{draw} +} + +%% Code for the diode triangle +\def\pgf@circ@basicdiodeshape{ + % \pgfscope + \pgftransformxshift{\pgf@circ@res@left} + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}} + \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}} + \pgfpathclose + \pgf@circ@draworfill + \pgfscope + % to allow filling, we need to draw explicitily the stroke here. + \pgfsetlinewidth{\pgfstartlinewidth} + \ifpgf@circuit@bipole@strokedsymbol + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}} + \pgfpathlineto{\pgfpoint{0pt}{0pt}} + \pgfusepath{draw} + \fi + \endpgfscope + % \endpgfscope +} + + +%% Empty generic diode + +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/diode/height}} +{emptydiode} +{\ctikzvalof{bipoles/diode/height}} +{\ctikzvalof{bipoles/diode/width}} +{ + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgfscope + \pgf@circ@basicdiodeshape + \endpgfscope + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}} + \pgfusepath{draw} +} + +%% Empty Zener diode + +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/diode/height}} +{emptyzdiode} +{\ctikzvalof{bipoles/diode/height}} +{\ctikzvalof{bipoles/diode/width}} +{ + + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + + \pgfscope + \pgf@circ@basicdiodeshape + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-0.6\pgf@circ@res@left}{\pgf@circ@res@up}} + \pgfusepath{draw} + \endpgfscope +} + +%% Empty alternative zigzag Zener diode +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/diode/height}} +{emptyzzdiode} +{\ctikzvalof{bipoles/diode/height}} +{\ctikzvalof{bipoles/diode/width}} +{ + + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + + \pgfscope + \pgf@circ@basicdiodeshape + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-1.8\pgf@circ@res@left}{\pgf@circ@res@down-0.5\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-0.2\pgf@circ@res@left}{\pgf@circ@res@up-0.5\pgf@circ@res@down}} + \pgfusepath{draw} + \endpgfscope +} +%% Empty Schottky diode + +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/diode/height}} +{emptysdiode} +{\ctikzvalof{bipoles/diode/height}} +{\ctikzvalof{bipoles/diode/width}} +{ + + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgfscope + \pgf@circ@basicdiodeshape + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-.6\pgf@circ@res@left}{.6\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-.6\pgf@circ@res@left}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-1.4\pgf@circ@res@left}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-1.4\pgf@circ@res@left}{.6\pgf@circ@res@up}} + \pgfusepath{draw} + \endpgfscope + +} + +%% Empty tunnel diode + +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/diode/height}} +{emptytdiode} +{\ctikzvalof{bipoles/diode/height}} +{\ctikzvalof{bipoles/diode/width}} +{ + + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgfscope + \pgf@circ@basicdiodeshape + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-.6\pgf@circ@res@left}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-.6\pgf@circ@res@left}{\pgf@circ@res@up}} + \pgfusepath{draw} + \endpgfscope +} + +%% Empty light emitting diode + +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/diode/height}} +{emptylediode} +{\ctikzvalof{bipoles/diode/height}} +{\ctikzvalof{bipoles/diode/width}} +{ + + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgfscope + \pgf@circ@basicdiodeshape + \endpgfscope + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}} + \pgfusepath{draw} + + \pgfsetlinewidth{\pgfstartlinewidth} + \pgfsetarrowsend{latexslim} + \pgfpathmoveto{\pgfpoint{-0.4\pgf@circ@res@right}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{0.6\pgf@circ@res@right}{2\pgf@circ@res@up}} + \pgfusepath{draw} + \pgfpathmoveto{\pgfpoint{0.2\pgf@circ@res@right}{0.8\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{1.2\pgf@circ@res@right}{1.8\pgf@circ@res@up}} + \pgfusepath{draw} +} + +%% Empty photodiode + +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/diode/height}} +{emptypdiode} +{\ctikzvalof{bipoles/diode/height}} +{\ctikzvalof{bipoles/diode/width}} +{ + + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgfscope + \pgf@circ@basicdiodeshape + \endpgfscope + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}} + \pgfusepath{draw} + + \pgfsetlinewidth{\pgfstartlinewidth} + \pgfsetarrowsstart{latexslim} + \pgfpathmoveto{\pgfpoint{-0.4\pgf@circ@res@right}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{0.6\pgf@circ@res@right}{2\pgf@circ@res@up}} + \pgfusepath{draw} + \pgfpathmoveto{\pgfpoint{0.2\pgf@circ@res@right}{0.8\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{1.2\pgf@circ@res@right}{1.8\pgf@circ@res@up}} + \pgfusepath{draw} +} + +%% Empty varcap + +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/varcap/height}} +{emptyvarcap} +{\ctikzvalof{bipoles/varcap/height}} +{\ctikzvalof{bipoles/varcap/width}} +{ + \pgf@circ@res@temp=\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth + \pgfsetlinewidth{\pgf@circ@res@temp} + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-2\pgf@circ@res@temp}{0pt}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}} + % \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-2\pgf@circ@res@temp}{0pt}} + \pgfpathclose + \pgf@circ@draworfill + \pgfscope + % to allow filling, we need to draw explicitily the stroke here. + \pgfsetlinewidth{\pgfstartlinewidth} + \ifpgf@circuit@bipole@strokedsymbol + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-2\pgf@circ@res@temp}{0pt}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{0pt}} + \pgfusepath{draw} + \fi + \endpgfscope + % + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-2\pgf@circ@res@temp}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-2\pgf@circ@res@temp}{\pgf@circ@res@up}} + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}} + \pgfusepath{draw} +} + +%% Empty bidirectionaldiode + +\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/bidirectionaldiode/height}}{emptybidirectionaldiode}{\ctikzvalof{bipoles/bidirectionaldiode/height}}{\ctikzvalof{bipoles/bidirectionaldiode/width}} +{ + + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + + \pgf@circ@res@other = \ctikzvalof{bipoles/bidirectionaldiode/diode width left}\pgf@circ@res@left + \pgf@circ@res@step = \ctikzvalof{bipoles/bidirectionaldiode/diode width right}\pgf@circ@res@right + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@other}{0pt}} + \pgfpathlineto{\pgfpoint{0.95\pgf@circ@res@step}{0.707*(\pgf@circ@res@other-\pgf@circ@res@step)}} % sqrt(1/2) + \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{1.414*(\pgf@circ@res@other-\pgf@circ@res@step)}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{-1.414*(\pgf@circ@res@other-\pgf@circ@res@step)}} + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{0pt}} + \pgfpathlineto{\pgfpoint{0.95\pgf@circ@res@other}{-0.707*(\pgf@circ@res@other-\pgf@circ@res@step)}} % sqrt(1/2) + \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{-1.414*(\pgf@circ@res@other-\pgf@circ@res@step)}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{1.414*(\pgf@circ@res@other-\pgf@circ@res@step)}} + + \pgf@circ@draworfill + % \pgfusepath{draw} + + \pgfsetlinewidth{\pgfstartlinewidth} + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@other}{0pt}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{0pt}} + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{0pt}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0pt}} + + \pgfusepath{draw} + +} + + +%% Full bidirectionaldiode + +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/bidirectionaldiode/height}} +{fullbidirectionaldiode} +{\ctikzvalof{bipoles/bidirectionaldiode/height}} +{\ctikzvalof{bipoles/bidirectionaldiode/width}} +{ + + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + + \pgf@circ@res@other = \ctikzvalof{bipoles/bidirectionaldiode/diode width left}\pgf@circ@res@left + \pgf@circ@res@step = \ctikzvalof{bipoles/bidirectionaldiode/diode width right}\pgf@circ@res@right + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@other}{0pt}} + \pgfpathlineto{\pgfpoint{0.95\pgf@circ@res@step}{0.707*(\pgf@circ@res@other-\pgf@circ@res@step)}} % sqrt(1/2) + \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{1.414*(\pgf@circ@res@other-\pgf@circ@res@step)}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{-1.414*(\pgf@circ@res@other-\pgf@circ@res@step)}} + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{0pt}} + \pgfpathlineto{\pgfpoint{0.95\pgf@circ@res@other}{-0.707*(\pgf@circ@res@other-\pgf@circ@res@step)}} % sqrt(1/2) + \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{-1.414*(\pgf@circ@res@other-\pgf@circ@res@step)}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{1.414*(\pgf@circ@res@other-\pgf@circ@res@step)}} + + \pgfusepath{draw, fill} + + \pgfsetlinewidth{\pgfstartlinewidth} + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@other}{0pt}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{0pt}} + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{0pt}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0pt}} + + \pgfusepath{draw} + +} + +%% (Closing) SPST +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/spst/depth}} +{cspst} +{\ctikzvalof{bipoles/spst/height}} +{\ctikzvalof{bipoles/spst/width}} +{ + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}} + \pgfpathlineto{\pgfpoint{.6\pgf@circ@res@right}{\pgf@circ@res@up}} + \pgfusepath{draw} + + \pgfscope + \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}} + \pgfpathmoveto{\pgfpointpolar{90}{1.2\pgf@circ@res@right}} + \pgfpatharc{90}{-20}{1.2\pgf@circ@res@right} + \pgfsetarrowsend{latexslim} + \pgfsetbeveljoin + \pgfusepath{draw} + \endpgfscope +} + +%% Opening SPST +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/spst/depth}} +{ospst} +{\ctikzvalof{bipoles/spst/height}} +{\ctikzvalof{bipoles/spst/width}} +{ + + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}} + \pgfpathlineto{\pgfpoint{.6\pgf@circ@res@right}{\pgf@circ@res@up}} + \pgfusepath{draw} + + \pgfscope + \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}} + \pgfpathmoveto{\pgfpointpolar{-10}{1.2\pgf@circ@res@right}} + \pgfpatharc{-10}{90}{1.2\pgf@circ@res@right} + \pgfsetarrowsend{latexslim} + \pgfsetbeveljoin + \pgfusepath{draw} + \endpgfscope +} + +%% Normal open Switch +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/nos/depth}} +{nos} +{\ctikzvalof{bipoles/nos/height}} +{\ctikzvalof{bipoles/nos/width}} +{ + + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}} + \pgfpathlineto{\pgfpoint{.9\pgf@circ@res@right}{\pgf@circ@res@up}} + \pgfsetbuttcap + \pgfusepath{draw} +} + +%% Normal closed Switch +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/ncs/depth}} +{ncs} +{\ctikzvalof{bipoles/ncs/height}} +{\ctikzvalof{bipoles/ncs/width}} +{ + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}} + \pgfpathlineto{\pgfpoint{.9\pgf@circ@res@right}{\pgf@circ@res@up}} + \pgfusepath{draw} + \pgfsetlinewidth{\pgfstartlinewidth} + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}} + \pgfpathlineto{\pgfpoint{.2\pgf@circ@res@right}{0pt}} + \pgfpathlineto{\pgfpoint{.2\pgf@circ@res@right}{\pgf@circ@res@up}} + \pgfusepath{draw} +} + +%% Push Button +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/pushbutton/height 2}} +{pushbutton} +{\ctikzvalof{bipoles/pushbutton/height}} +{\ctikzvalof{bipoles/pushbutton/width}} +{ + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{.5\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{.5\pgf@circ@res@up}} + \pgfpathmoveto{\pgfpoint{0}{.5\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{0}{\pgf@circ@res@up}} + \pgfusepath{draw} + + \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}} + \pgfnode{ocirc}{center}{}{}{\pgfusepath{draw}} + \pgftransformshift{\pgfpoint{2\pgf@circ@res@right}{0pt}} + \pgfnode{ocirc}{center}{}{}{\pgfusepath{draw}} +} + +%% Normally closed Push Button +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/pushbutton/height 2}} +{ncpushbutton} +{\ctikzvalof{bipoles/pushbutton/height}} +{\ctikzvalof{bipoles/pushbutton/width}} +{ + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + % This is the radius of the "ocirc" shape (see pgfcircshapes.tex) + \pgf@circ@res@temp=\pgfkeysvalueof{/tikz/circuitikz/nodes width}\pgf@circ@Rlen + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{-\pgf@circ@res@temp}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{-\pgf@circ@res@temp}} + \pgfpathmoveto{\pgfpoint{0}{-\pgf@circ@res@temp}} + \pgfpathlineto{\pgfpoint{0}{\pgf@circ@res@up}} + \pgfusepath{draw} + % + \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}} + \pgfnode{ocirc}{center}{}{}{\pgfusepath{draw}} + \pgftransformshift{\pgfpoint{2\pgf@circ@res@right}{0pt}} + \pgfnode{ocirc}{center}{}{}{\pgfusepath{draw}} +} +% cute switch "to" shapes help function +% #1 -> name +% #2 -> barposition +% #3 -> arrowcode +\long\def\pgfcircdeclarecutesw#1#2#3{ + \pgfcircdeclarebipole + { + \savedanchor\midlever{ + % these values are calculated when we create the definition of the shape. + \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/cuteswitch/height}\pgf@circ@Rlen + \pgf@circ@res@temp=\pgfkeysvalueof{/tikz/circuitikz/nodes width}\pgf@circ@Rlen + \pgf@circ@res@temp=\ctikzvalof{bipoles/cuteswitch/thickness}\pgf@circ@res@temp + \pgf@circ@res@down = -.5\pgf@y + \pgf@circ@res@up = .5\pgf@y + \pgfextracty{\pgf@circ@res@other}{#2} + \pgf@x=0pt + \pgf@y=.5\pgf@circ@res@other + } + % radius of the connector + % This is the radius of the "ocirc" shape (see pgfcircshapes.tex) + \saveddimen{\radius}{\pgfmathsetlength\pgf@x{\pgf@circ@Rlen*\ctikzvalof{nodes width}}} + % shapename + \savedmacro{\thisshape}{\def\thisshape{\tikz@fig@name}} + % shape type + \savedmacro{\cshape}{\def\cshape{\ctikzvalof{bipoles/cuteswitch/shape}}} + % mid of the lever, to stack switches + \anchor{mid}{\midlever} + \anchor{cout}{\northeast \pgf@y=0cm} + \anchor{cin}{\southwest\pgf@y=0cm} + \anchor{out}{\northeast \pgf@y=0cm\advance\pgf@x by \radius} + \anchor{in}{\southwest\pgf@y=0cm\advance\pgf@x by -\radius} + } + {\ctikzvalof{bipoles/cuteswitch/height 2}} + {#1} + {\ctikzvalof{bipoles/cuteswitch/height}} + {\ctikzvalof{bipoles/cuteswitch/width}}{ + \pgfscope + % This is the radius of the "ocirc" shape (see pgfcircshapes.tex) + \pgf@circ@res@temp=\pgfkeysvalueof{/tikz/circuitikz/nodes width}\pgf@circ@Rlen + \pgf@circ@res@temp=\ctikzvalof{bipoles/cuteswitch/thickness}\pgf@circ@res@temp + \pgfsetlinewidth{2\pgf@circ@res@temp} + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}} + \pgfpathlineto{#2} + \pgfsetroundcap\pgfusepath{draw} + \endpgfscope + \pgfscope % arrow + #3 + \endpgfscope + \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}} + \pgfnode{\cshape}{center}{}{\thisshape-in}{\pgfusepath{draw}} + \pgftransformshift{\pgfpoint{2\pgf@circ@res@right}{0pt}} + \pgfnode{\cshape}{center}{}{\thisshape-out}{\pgfusepath{draw}} + } +} + +%% closed cute switch +\pgfcircdeclarecutesw{cuteclosedswitch} + {\pgfpoint{\pgf@circ@res@right}{1.5\pgf@circ@res@temp}} + {} + +%% open cute switch +\pgfcircdeclarecutesw{cuteopenswitch} + {\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}} + {} + +%% closing cute switch +\pgfcircdeclarecutesw{cuteclosingswitch} + {\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}} + { + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}} % in node + \pgfpathmoveto{\pgfpointpolar{70}{1.2\pgf@circ@res@right}} + \pgfpatharc{70}{-10}{1.2\pgf@circ@res@right} + \pgfsetarrowsend{latexslim} + \pgfusepath{draw} + } + +%% opening cute switch +\pgfcircdeclarecutesw{cuteopeningswitch} + {\pgfpoint{\pgf@circ@res@right}{1.5\pgf@circ@res@temp}} + { + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}} % in node + \pgfpathmoveto{\pgfpointpolar{-10}{1.2\pgf@circ@res@right}} + \pgfpatharc{-10}{60}{1.2\pgf@circ@res@right} + \pgfsetarrowsend{latexslim} + \pgfusepath{draw} + } + + +% % METERINGSHAPE + \long\def\drawmeteringcircle{ + \def\pgf@circ@temp{right} + \ifx\tikz@res@label@pos\pgf@circ@temp + \pgf@circ@res@step=-1.2\pgf@circ@res@up + \else + \def\pgf@circ@temp{below} + \ifx\tikz@res@label@pos\pgf@circ@temp + \pgf@circ@res@step=-1.2\pgf@circ@res@up + \else + \pgf@circ@res@step=1.2\pgf@circ@res@up + \fi + \fi + %draw connections to circle + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}} + \pgfpathlineto{\pgfpoint{.9\pgf@circ@res@left}{\pgf@circ@res@zero}} + \pgfpathmoveto{\pgfpoint{.9\pgf@circ@res@right}{\pgf@circ@res@zero}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@zero}} + \pgfusepath{draw} + %draw circle + \pgfscope + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgfpathcircle{\pgfpointorigin}{.9\pgf@circ@res@up} + \pgf@circ@draworfill + \endpgfscope + %draw arrow + \pgfscope + \pgfsetarrowsend{latex} + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{-\pgf@circ@res@left}{\pgf@circ@res@up}} + \pgfusepath{draw} + \endpgfscope + } +%AMPEREMETER +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/ammeter/height}} +{ammeter} +{\ctikzvalof{bipoles/ammeter/height}} +{\ctikzvalof{bipoles/ammeter/width}} +{ + \drawmeteringcircle + \pgfnode{circle}{center}{\textbf{A}}{}{} +} +%OHMMETER +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/ohmmeter/height}} +{ohmmeter} +{\ctikzvalof{bipoles/ohmmeter/height}} +{\ctikzvalof{bipoles/ohmmeter/width}} +{ + \drawmeteringcircle + \pgfnode{circle}{center}{\boldmath$\Omega$}{}{} +} +%VOLTMETER +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/voltmeter/height}} +{voltmeter} +{\ctikzvalof{bipoles/voltmeter/height}} +{\ctikzvalof{bipoles/voltmeter/width}} +{ + \drawmeteringcircle + \pgfnode{circle}{center}{\textbf{V}}{}{} + +} + +% oscilloscope, suggested by @nobrl https://github.com/circuitikz/circuitikz/issues/176 +\pgfcircdeclarebipole +{ + \anchor{in 1}{\southwest\pgf@y=0.75\pgf@y\pgf@x=0.4\pgf@x} + \anchor{in 2}{\southwest\pgf@y=0.75\pgf@y\pgf@x=-0.4\pgf@x} + % put the node text above and centered + \anchor{text}{\pgfextracty{\pgf@circ@res@up}{\northeast} + \pgfpoint{-.5\wd\pgfnodeparttextbox}{ + \dimexpr.5\dp\pgfnodeparttextbox+.5\ht\pgfnodeparttextbox+\pgf@circ@res@up\relax + } + } +} +{\ctikzvalof{bipoles/oscope/height}} +{oscope} +{\ctikzvalof{bipoles/oscope/height}} +{\ctikzvalof{bipoles/oscope/width}} +{ + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgfextracty{\pgf@circ@res@up}{\northeast} + \pgfextractx{\pgf@circ@res@right}{\northeast} + \pgfextractx{\pgf@circ@res@left}{\southwest} + \pgfextracty{\pgf@circ@res@down}{\southwest} + \pgfmathsetlength{\pgf@circ@res@step}{0.25*\pgf@circ@res@up} + \pgfscope + \pgfsetcornersarced{\pgfpoint{\pgf@circ@res@step}{\pgf@circ@res@step}} + \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}} + % this would create a round (analog?) scope... + % \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}} + \pgf@circ@draworfill + \endpgfscope + % get the rotation + \pgfgettransformentries\a\b\temp\temp\temp\temp + \pgfmathsetmacro{\rot}{-atan2(\b,\a)} + % and unrotate the scope + \pgfscope + \pgftransformrotate{\rot} + % grid + \pgfscope + \pgfsetlinewidth{0.5\pgfstartlinewidth} + \pgfpathmoveto{\pgfpoint{0.75\pgf@circ@res@left}{0.25\pgf@circ@res@down}} + \pgfpathgrid[stepx=\pgf@circ@res@step, stepy=\pgf@circ@res@step]% + {\pgfpoint{0.75\pgf@circ@res@left}{0.5\pgf@circ@res@down}} + {\pgfpoint{0.75\pgf@circ@res@right}{0.5\pgf@circ@res@up}} + \pgfsetstrokeopacity{0.5} + \pgfusepath{draw} + \endpgfscope + % function displayed, thanks to + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgfpathmoveto{\pgfpoint{0.75\pgf@circ@res@left}{0.25\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{0.05\pgf@circ@res@left}{0.25\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{0.05\pgf@circ@res@left}{0.25\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{0.65\pgf@circ@res@right}{0.25\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{0.65\pgf@circ@res@right}{0.25\pgf@circ@res@down}} + \pgfusepath{draw} + \endpgfscope +} +%% Short circuit + +%%% NOTICE that the short is really NOT drawn; we trust the fact that its +%%% natural length is zero. +\pgfcircdeclarebipole +{} +{0} +{short} +{0} +{0} +{ } + +%% Open circuit + +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/open/height}} +{open} +{\ctikzvalof{bipoles/open/height}} +{\ctikzvalof{bipoles/open/width}} +{ } + +%% Generic bipole - used as resistor by some (bleah) + +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/generic/height}} +{generic} +{\ctikzvalof{bipoles/generic/height}} +{\ctikzvalof{bipoles/generic/width}} +{ + \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}} + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgf@circ@draworfill +} + + +%% fuse + +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/fuse/height}} +{fuse} +{\ctikzvalof{bipoles/fuse/height}} +{\ctikzvalof{bipoles/fuse/width}} +{ + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0}} + \pgfusepath{draw} + + \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}} + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + + \pgf@circ@draworfill +} + + + +%% Generic bipole, filled - used as inductor by some + +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/fullgeneric/height}} +{fullgeneric} +{\ctikzvalof{bipoles/fullgeneric/height}} +{\ctikzvalof{bipoles/fullgeneric/width}} +{ + \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}} + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + + \pgfusepath{draw,fill} +} + +%% Generic sensor, filled - used as inductive sensor by some + +\pgfcircdeclarebipole +{{% anchor for labelling the type of dependency + \anchor{label}{% + \southwest + \pgf@x=0.4\pgf@x + \pgf@y=2\pgf@y + }% +}} +{\ctikzvalof{bipoles/fullgeneric/height}} +{sfullgeneric} +{\ctikzvalof{bipoles/fullgeneric/height}} +{\ctikzvalof{bipoles/fullgeneric/width}} +{ + + \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}} + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgfusepath{draw,fill} + %\pgfscope + \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@left}{-2\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@left}{2\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{2\pgf@circ@res@down}} + \pgfusepath{draw} + %\endpgfscope +} + + +%% Generic asymmetric bipole + +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/ageneric/height}} +{ageneric} +{\ctikzvalof{bipoles/ageneric/height}} +{\ctikzvalof{bipoles/ageneric/width}} +{ + \pgfscope + \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}} + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgf@circ@draworfill + \endpgfscope + + \pgfpathrectanglecorners{\pgfpoint{.7\pgf@circ@res@right}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}} + \pgfusepath{stroke,fill} +} + + +%% asymmetric fuse + +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/afuse/height}} +{afuse} +{\ctikzvalof{bipoles/afuse/height}} +{\ctikzvalof{bipoles/afuse/width}} +{ + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0}} + \pgfusepath{draw} + + \pgfscope + \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}} + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgf@circ@draworfill + \endpgfscope + + \pgfpathrectanglecorners{\pgfpoint{.7\pgf@circ@res@right}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}} + \pgfusepath{stroke,fill} +} + + + + +%% Memristor + +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/memristor/height}} +{memristor} +{\ctikzvalof{bipoles/memristor/height}} +{\ctikzvalof{bipoles/memristor/width}} +{ + \pgf@circ@res@step = \ctikzvalof{bipoles/resistor/width}\pgf@circ@Rlen + \divide \pgf@circ@res@step by 14 + + \pgfscope + \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}} + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgf@circ@draworfill + \endpgfscope + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}} + \pgfpathlineto{\pgfpoint{.72*\pgf@circ@res@left}{0pt}} + \pgfpathlineto{\pgfpoint{.72*\pgf@circ@res@left}{\ctikzvalof{bipoles/memristor/wave height}\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{.35*\pgf@circ@res@left}{\ctikzvalof{bipoles/memristor/wave height}\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{.35*\pgf@circ@res@left}{-\ctikzvalof{bipoles/memristor/wave height}\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{-.05*\pgf@circ@res@left}{-\ctikzvalof{bipoles/memristor/wave height}\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{-.05*\pgf@circ@res@left}{\ctikzvalof{bipoles/memristor/wave height}\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{.42*\pgf@circ@res@right}{\ctikzvalof{bipoles/memristor/wave height}\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{.42*\pgf@circ@res@right}{0pt}} + \pgfpathlineto{\pgfpoint{.8*\pgf@circ@res@right}{0pt}} + + \pgfusepath{draw} + + \pgfpathrectanglecorners{\pgfpoint{.7\pgf@circ@res@right}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}} + \pgfusepath{stroke,fill} +} + + + + +%% Generic empty tunable + +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/tgeneric/height}} +{tgeneric} +{\ctikzvalof{bipoles/tgeneric/height}} +{\ctikzvalof{bipoles/tgeneric/width}} +{ + \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{.4\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{.4\pgf@circ@res@down}} + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgf@circ@draworfill + \pgfscope + \pgfsetarrowsend{latexslim} + \pgfpathmoveto{\pgfpoint{.5\pgf@circ@res@left}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{-.5\pgf@circ@res@left}{\pgf@circ@res@down}} + \pgfusepath{draw} + \endpgfscope +} + +%% Photoresistor + +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/photoresistor/height 2}} +{photoresistor} +{\ctikzvalof{bipoles/photoresistor/height}} +{\ctikzvalof{bipoles/photoresistor/width}} +{ + \pgfscope + \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}{\pgfpoint{\pgf@circ@res@right}{-\pgf@circ@res@down}} + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgf@circ@draworfill + \endpgfscope + + \pgfscope + \pgfsetarrowsend{latexslim} + \pgfpathmoveto{\pgfpoint{.7\pgf@circ@res@right}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{.3\pgf@circ@res@right}{-1.2\pgf@circ@res@down}} + \pgfusepath{draw} + \pgfpathmoveto{\pgfpoint{.45\pgf@circ@res@right}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{.05\pgf@circ@res@right}{-1.2\pgf@circ@res@down}} + \pgfusepath{draw} + \endpgfscope +} + + + + +%% Thermistor +\pgfcircdeclarebipole +{{% anchor for labelling the type of dependency + \anchor{label}{% + \southwest + \pgf@x=0.4\pgf@x + \pgf@y=1.2\pgf@y + }% +}} +{\ctikzvalof{bipoles/thermistor/height}} +{thermistor} +{\ctikzvalof{bipoles/thermistor/height}} +{\ctikzvalof{bipoles/thermistor/width}} +{ + \pgfscope + \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thermistor/main}\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{-\pgfkeysvalueof{/tikz/circuitikz/bipoles/thermistor/main}\pgf@circ@res@up}} + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgf@circ@draworfill + \endpgfscope + + %\pgfscope + \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@left}{-\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@left}{1.2\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{1.2\pgf@circ@res@down}} + \pgfusepath{draw} + %\endpgfscope +} + + +%% Thermistor PTC +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/thermistorptc/height 2}} +{thermistorptc} +{\ctikzvalof{bipoles/thermistorptc/height}} +{\ctikzvalof{bipoles/thermistorptc/width}} +{ + \pgfscope + \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thermistorptc/main}\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{-\pgfkeysvalueof{/tikz/circuitikz/bipoles/thermistorptc/main}\pgf@circ@res@up}} + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgf@circ@draworfill + \endpgfscope + \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@left}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@left}{-\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{-\pgf@circ@res@up}} + \pgfusepath{draw} + + \pgfsetlinewidth{\pgfstartlinewidth} + \pgftext[top,x=.85\pgf@circ@res@left,y=.75\pgf@circ@res@down]{\tiny$\vartheta$} + \pgfsetarrowsend{latexslim} + \pgfpathmoveto{\pgfpoint{.62\pgf@circ@res@left}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{.62\pgf@circ@res@left}{.7\pgf@circ@res@down}} + \pgfusepath{draw} + \pgfpathmoveto{\pgfpoint{.45\pgf@circ@res@left}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{.45\pgf@circ@res@left}{.7\pgf@circ@res@down}} + \pgfusepath{draw} +} + +%% Thermistor NTC +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/thermistorntc/height 2}} +{thermistorntc} +{\ctikzvalof{bipoles/thermistorntc/height}} +{\ctikzvalof{bipoles/thermistorntc/width}} +{ + \pgfscope + \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thermistorntc/main}\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{-\pgfkeysvalueof{/tikz/circuitikz/bipoles/thermistorntc/main}\pgf@circ@res@up}} + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgf@circ@draworfill + \endpgfscope + + \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@left}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@left}{-\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{-\pgf@circ@res@up}} + \pgfusepath{draw} + + \pgfsetlinewidth{\pgfstartlinewidth} + \pgftext[top,x=.85\pgf@circ@res@left,y=.75\pgf@circ@res@down]{\tiny$\vartheta$} + \pgfsetarrowsend{latexslim} + \pgfpathmoveto{\pgfpoint{.62\pgf@circ@res@left}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{.62\pgf@circ@res@left}{.7\pgf@circ@res@down}} + \pgfusepath{draw} + \pgfpathmoveto{\pgfpoint{.45\pgf@circ@res@left}{.7\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{.45\pgf@circ@res@left}{\pgf@circ@res@down}} + \pgfusepath{draw} +} + +%% thermocouple +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/thermocouple/height 2}} +{thermocouple} +{\ctikzvalof{bipoles/thermocouple/height}} +{\ctikzvalof{bipoles/thermocouple/width}} +{ + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{.5\pgf@circ@res@down}} + \pgfusepath{draw} + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{.5\pgf@circ@res@down}} + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgfpathlineto{\pgfpoint{0}{\pgf@circ@res@down}} + \pgfusepath{draw} + \pgfsetlinewidth{\pgfstartlinewidth} + \pgfpathmoveto{\pgfpoint{0}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{.5\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0}} + \pgfusepath{draw} +} + +%% Varistor +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/varistor/height}} +{varistor} +{\ctikzvalof{bipoles/varistor/height}} +{\ctikzvalof{bipoles/varistor/width}} +{ + \pgfscope + \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/bipoles/varistor/main}\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{-\pgfkeysvalueof{/tikz/circuitikz/bipoles/varistor/main}\pgf@circ@res@up}} + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgf@circ@draworfill + \endpgfscope + + \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@left}{-\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@left}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}} + \pgfusepath{draw} + + \pgftext[top,x=.65\pgf@circ@res@left,y=1.2\pgf@circ@res@down]{{\tiny\textsf{U}}} +} + + + +%% Generic full tunable + +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/tfullgeneric/height}} +{tfullgeneric} +{\ctikzvalof{bipoles/tfullgeneric/height}} +{\ctikzvalof{bipoles/tfullgeneric/width}} +{ + \pgf@circ@res@step = \ctikzvalof{bipoles/resistor/width}\pgf@circ@Rlen + \divide \pgf@circ@res@step by 14 + + \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{.4\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{.4\pgf@circ@res@down}} + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgfusepath{draw,fill} + + \pgfscope + \pgfsetarrowsend{latexslim} + \pgfpathmoveto{\pgfpoint{.5\pgf@circ@res@left}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{-.5\pgf@circ@res@left}{\pgf@circ@res@down}} + \pgfusepath{draw} + \endpgfscope +} + + + + + + + +%% Variable Capacitor + +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/vcapacitor/height}} +{vcapacitor} +{\ctikzvalof{bipoles/vcapacitor/height}} +{\ctikzvalof{bipoles/vcapacitor/width}} +{ + %\pgf@circ@res@step = \ctikzvalof{bipoles/vcapacitor/width}\pgf@circ@Rlen + \pgf@circ@res@step = \ctikzvalof{bipoles/vcapacitor/capacitor width} \pgf@circ@res@right + + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@step}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{-\pgf@circ@res@step}{\pgf@circ@res@down}} + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{\pgf@circ@res@down}} + \pgfusepath{draw} + + \pgfscope + \pgfsetarrowsend{latexslim} + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}} + \pgfusepath{draw} + \endpgfscope + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}} + \pgfpathlineto{\pgfpoint{-\pgf@circ@res@step}{0pt}} + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{0pt}} + \pgfsetlinewidth{\pgfstartlinewidth} + \pgfusepath{draw} +} + + +%% Piezoelectric Element + +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/piezoelectric/height}} +{piezoelectric} +{\ctikzvalof{bipoles/piezoelectric/height}} +{\ctikzvalof{bipoles/piezoelectric/width}} +{ + \pgf@circ@res@step = \ctikzvalof{bipoles/piezoelectric/width}\pgf@circ@Rlen + \divide \pgf@circ@res@step by 5 + + %% Outer markings + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}} + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}} + \pgfusepath{draw} + + %% Inner Box + \pgfscope + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left+4}{\pgf@circ@res@up-1}}{\pgfpoint{\pgf@circ@res@right-4}{\pgf@circ@res@down+1}} + \pgf@circ@draworfill + \endpgfscope +} + + + + + + +%% Lamp + +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/lamp/height}} +{lamp} +{\ctikzvalof{bipoles/lamp/height}} +{\ctikzvalof{bipoles/lamp/width}} +{ + + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + + \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}} + \pgf@circ@draworfill + \pgfpathmoveto{\pgfpoint{.7071*\pgf@circ@res@left}{.7071*\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{.7071*\pgf@circ@res@right}{.7071*\pgf@circ@res@down}} + \pgfpathmoveto{\pgfpoint{.7071*\pgf@circ@res@left}{.7071*\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{.7071*\pgf@circ@res@right}{.7071*\pgf@circ@res@up}} + \pgfusepath{draw} +} + +%% bulb +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/bulb/height}} +{bulb} +{\ctikzvalof{bipoles/bulb/height}} +{\ctikzvalof{bipoles/bulb/width}} +{% + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{0.8\pgf@circ@res@up}}{\pgfpoint{0.8\pgf@circ@res@left}{0}} + \pgf@circ@draworfill + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}} + \pgfpathlineto{\pgfpoint{0.4\pgf@circ@res@left}{\pgf@circ@res@zero}} + \pgfpatharc{0}{-180}{0.4*\pgf@circ@res@left} + \pgfsetbeveljoin + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@zero}} + \pgfusepath{draw} +} + + +% transmission line + +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/tline/height}} +{tline} +{\ctikzvalof{bipoles/tline/height}} +{\ctikzvalof{bipoles/tline/width}} +{ + \pgf@circ@res@step=.2\pgf@circ@res@right % half x axis + \begin{pgftransparencygroup} + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@step}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@left+\pgf@circ@res@step}{\pgf@circ@res@up}} + \pgfpatharc{-90}{90}{-\pgf@circ@res@step and -\pgf@circ@res@up} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@step}{\pgf@circ@res@down}} + \pgf@circ@draworfill + \pgfpathellipse{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@step}{0pt}} + {\pgfpoint{\pgf@circ@res@step}{0pt}}{\pgfpoint{0pt}{-\pgf@circ@res@up}} + \pgf@circ@draworfill + \end{pgftransparencygroup} + \pgfsetlinewidth{\pgfstartlinewidth} + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@step}{0pt}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0pt}} + \pgfusepath{stroke} +} + +% microstrip transmission line + +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/mstline/height}} +{mstline} +{\ctikzvalof{bipoles/mstline/height}} +{\ctikzvalof{bipoles/mstline/width}} +{ + \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}} + \pgfsetlinewidth{\ctikzvalof{bipoles/thickness}\pgfstartlinewidth} + \pgf@circ@draworfill +} +%% SQUID added by Cor Molenaar 5 March 2010 + +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/squid/height}} +{squid} +{\ctikzvalof{bipoles/squid/height}} +{\ctikzvalof{bipoles/squid/width}} +{ + + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + + \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}} + \pgfpathmoveto{\pgfpoint{0.35*\pgf@circ@res@left}{1.35*\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{0.35*\pgf@circ@res@right}{0.65*\pgf@circ@res@up}} + \pgfpathmoveto{\pgfpoint{0.35*\pgf@circ@res@left}{0.65*\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{0.35*\pgf@circ@res@right}{1.35*\pgf@circ@res@up}} + \pgfpathmoveto{\pgfpoint{0.35*\pgf@circ@res@left}{1.35*\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{0.35*\pgf@circ@res@right}{0.65*\pgf@circ@res@down}} + \pgfpathmoveto{\pgfpoint{0.35*\pgf@circ@res@left}{0.65*\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{0.35*\pgf@circ@res@right}{1.35*\pgf@circ@res@down}} + + \pgfusepath{draw} +} + + + +% Generic barrier added by Cor Molenaar 5 March 2010 + +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/barrier/height}} +{barrier} +{\ctikzvalof{bipoles/barrier/height}} +{\ctikzvalof{bipoles/barrier/width}} +{ + + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@step}} + \pgfpathmoveto{\pgfpoint{0.35*\pgf@circ@res@left}{0.35*\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{0.35*\pgf@circ@res@right}{0.35*\pgf@circ@res@down}} + \pgfpathmoveto{\pgfpoint{0.35*\pgf@circ@res@left}{0.35*\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{0.35*\pgf@circ@res@right}{0.35*\pgf@circ@res@up}} + + \pgfusepath{draw} +} + + +% Contributed by Danilo Piazzalunga + +\pgfdeclareshape{buffer} +{ + \anchor{center}{\pgfpointorigin} + \savedanchor\northwest{% + \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/buffer/height}\pgf@circ@Rlen + \pgf@y=.5\pgf@y + \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/bipoles/buffer/width}\pgf@circ@Rlen + \pgf@x=.5\pgf@x + } + \anchor{east}{ \northwest \pgf@y=0pt \pgf@x=-\pgf@x } + \anchor{west}{ \northwest \pgf@y=0pt } + \anchor{south}{ \northwest \pgf@x=0pt \pgf@y=-\pgf@y } + \anchor{north}{ \northwest \pgf@x=0pt } + \anchor{south west}{ \northwest \pgf@y=-\pgf@y } + \anchor{north east}{ \northwest \pgf@x=-\pgf@x } + \anchor{north west}{ \northwest } + \anchor{south east}{ \northwest \pgf@x=-\pgf@x \pgf@y=-\pgf@y } + \savedanchor\left{% + \pgf@y=0pt + } + \anchor{in}{ + \northwest + \pgf@y=0pt + } + \anchor{out}{ + \northwest + \pgf@y=0pt + \pgf@x=-\pgf@x + } + + \anchor{text}{\pgfpoint{-.5\wd\pgfnodeparttextbox}{\dimexpr.5\dp\pgfnodeparttextbox-.5\ht\pgfnodeparttextbox}} + + \backgroundpath{ + \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}} + + + \northwest + \pgf@circ@res@up = \pgf@y + \pgf@circ@res@down = -\pgf@y + \pgf@circ@res@right = -\pgf@x + \pgf@circ@res@left = \pgf@x + \pgfscope + \pgfsetlinewidth{2\pgflinewidth} + \pgftransformxshift{.7\pgf@circ@res@left} + \pgf@circ@res@step=\pgf@circ@res@right + \advance\pgf@circ@res@step by -\pgf@circ@res@left + \pgf@circ@res@step=.7\pgf@circ@res@step + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{0pt}} + \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}} + \pgfpathclose + \pgf@circ@draworfill + \endpgfscope + + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}} + \pgfpathlineto{\pgfpoint{.7\pgf@circ@res@left}{0pt}} + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}} + \pgfpathlineto{\pgfpoint{.7\pgf@circ@res@right}{0pt}} + + \pgfusepath{draw} + + } +} + + + + + +\pgfdeclareshape{plain amp} +{ + \anchor{center}{\pgfpointorigin} + \savedanchor\northwest{% + \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/height}\pgf@circ@Rlen + \pgf@y=.5\pgf@y + \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/width}\pgf@circ@Rlen + \pgf@x=.5\pgf@x + } + \anchor{east}{ \northwest \pgf@y=0pt \pgf@x=-\pgf@x } + \anchor{west}{ \northwest \pgf@y=0pt } + \anchor{south}{ \northwest \pgf@x=0pt \pgf@y=-\pgf@y } + \anchor{north}{ \northwest \pgf@x=0pt } + \anchor{south west}{ \northwest \pgf@y=-\pgf@y } + \anchor{north east}{ \northwest \pgf@x=-\pgf@x } + \anchor{north west}{ \northwest } + \anchor{south east}{ \northwest \pgf@x=-\pgf@x \pgf@y=-\pgf@y } + \savedanchor\left{% + \pgf@y=0pt + } + \savedanchor\inOne{% + \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/height}\pgf@circ@Rlen + \pgf@y=.5\pgf@y + \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/input height}\pgf@y + \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/width}\pgf@circ@Rlen + \pgf@x=.5\pgf@x + } + \anchor{-}{ + \inOne + } + \anchor{+}{ + \inOne + \pgf@y=-\pgf@y + } + \savedanchor\up{% + \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/height}\pgf@circ@Rlen + \pgf@y=.5\pgf@y + \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/width}\pgf@circ@Rlen + \pgf@x=.5\pgf@x + \pgf@circ@res@up = \pgf@y + \pgf@circ@res@right = -\pgf@x + \pgf@circ@res@left = \pgf@x + \pgfpointlineattime{ + \pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/up pos}}{ + \pgfpoint{ + \pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/port width}\pgf@circ@res@left} + {\pgf@circ@res@up}} + {\pgfpoint{.7\pgf@circ@res@right}{0pt}} + } + \anchor{up}{ + \up + } + \anchor{down}{ + \up + \pgf@y=-\pgf@y + } + \anchor{out}{ + \northwest + \pgf@y=0pt + \pgf@x=-\pgf@x + } + + \anchor{text}{\pgfpoint{-.5\wd\pgfnodeparttextbox}{\dimexpr.5\dp\pgfnodeparttextbox-.5\ht\pgfnodeparttextbox}} + + \backgroundpath{ + \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}} + + \northwest + \pgf@circ@res@up = \pgf@y + \pgf@circ@res@down = -\pgf@y + \pgf@circ@res@right = -\pgf@x + \pgf@circ@res@left = \pgf@x + + \pgfscope + \pgfsetlinewidth{2\pgflinewidth} + \pgftransformxshift{.7\pgf@circ@res@left} + \pgf@circ@res@step=\pgf@circ@res@right + \advance\pgf@circ@res@step by -\pgf@circ@res@left + \pgf@circ@res@step=.7\pgf@circ@res@step + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{0pt}} + \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}} + \pgfpathclose + \pgf@circ@draworfill + \endpgfscope + \pgfpathmoveto{\pgfpoint + {\pgf@circ@res@left} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/input height}\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/port width}\pgf@circ@res@left} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/input height}\pgf@circ@res@up}} + + + \pgfpathmoveto{\pgfpoint + {\pgf@circ@res@left} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/input height}\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/port width}\pgf@circ@res@left} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/input height}\pgf@circ@res@down}} + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}} + \pgfpathlineto{\pgfpoint{.7\pgf@circ@res@right}{0pt}} + + \pgfusepath{draw} + + + + + + } +} + + +%% Draw the two-port fillable box +\def\pgf@circ@twoportbox{ + \pgfscope + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}} + \pgf@circ@draworfill + \endpgfscope +} + +%% Generic two port box +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/twoport/height}} +{twoport} +{\ctikzvalof{bipoles/twoport/height}} +{\ctikzvalof{bipoles/twoport/width}} +{ + \pgf@circ@res@step = \ctikzvalof{bipoles/twoport/width}\pgf@circ@Rlen + \divide \pgf@circ@res@step by 2 + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}} + \pgf@circ@res@other = \pgf@circ@res@left + \advance\pgf@circ@res@other by \pgf@circ@res@step + \ifpgf@circuit@dashed + \pgfsetdash{{0.1cm}{0.1cm}}{0cm} + \fi + % draw outer box + \pgf@circ@twoportbox + \ifpgf@circuit@inputarrow + { + \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth + \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}} + \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}} + } + \fi + + % rotate inner symbol + \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil} + \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135 + \pgftransformrotate{270} + \fi\fi + \ifnum \pgfcircmathresult > 135 \ifnum \pgfcircmathresult < 225 + \pgftransformrotate{180} + \fi\fi + \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315 + \pgftransformrotate{90} + \fi\fi + + % draw inner symbol + \pgftext[center,x=0,y=0]{\ctikzvalof{bipoles/twoport/text}} + +} + +%% voltage controled oscillator +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/vco/width}} +{vco} +{\ctikzvalof{bipoles/twoport/width}} +{\ctikzvalof{bipoles/vco/width}} +{ + \pgf@circ@res@step = \ctikzvalof{bipoles/vco/width}\pgf@circ@Rlen + \divide \pgf@circ@res@step by 2 + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}} + \pgf@circ@res@other = \pgf@circ@res@left + \advance\pgf@circ@res@other by \pgf@circ@res@step + + \ifpgf@circuit@dashed + \pgfsetdash{{0.1cm}{0.1cm}}{0cm} + \fi + % draw circle + \pgfscope + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgfpathcircle{\pgfpoint{0}{0}} {\pgf@circ@res@step} + \pgf@circ@draworfill + \endpgfscope + \ifpgf@circuit@inputarrow + { + \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth + \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}} + \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}} + } + \fi + + % rotate inner symbol + \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil} + \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135 + \pgftransformrotate{270} + \fi\fi + \ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225 % 134 degree, because >= 135 is not possible + \pgftransformrotate{180} + \fi\fi + \ifnum \pgfcircmathresult > 224 \ifnum \pgfcircmathresult < 315 + \pgftransformrotate{90} + \fi\fi + + % draw inner sine waves + \pgfsetdash{}{0pt} % always draw solid line for inner symbol + \pgfsetlinewidth{\pgfstartlinewidth} + \pgfpathmoveto{\pgfpoint{-.5\pgf@circ@res@step}{0\pgf@circ@res@step}} + \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}} + \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}} + \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}} + \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}} + \pgfusepath{draw} + +} + +%% bandpass filter +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/bandpass/width}} +{bandpass} +{\ctikzvalof{bipoles/bandpass/width}} +{\ctikzvalof{bipoles/bandpass/width}} +{ + + \pgf@circ@res@step = \ctikzvalof{bipoles/bandpass/width}\pgf@circ@Rlen + \divide \pgf@circ@res@step by 2 + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}} + \pgf@circ@res@other = \pgf@circ@res@left + \advance\pgf@circ@res@other by \pgf@circ@res@step + + \ifpgf@circuit@dashed + \pgfsetdash{{0.1cm}{0.1cm}}{0cm} + \fi + + % draw outer box + \pgf@circ@twoportbox + + \ifpgf@circuit@inputarrow + { + \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth + \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}} + \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}} + } + \fi + + % rotate inner symbol + \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil} + \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135 + \pgftransformrotate{270} + \fi\fi + \ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225 % 134 degree, because >= 135 is not possible + \pgftransformrotate{180} + \fi\fi + \ifnum \pgfcircmathresult > 224 \ifnum \pgfcircmathresult < 315 + \pgftransformrotate{90} + \fi\fi + + % draw inner symbol + \pgfsetdash{}{0pt} % always draw solid line for inner symbol + \pgfsetarrows{-} %never draw arrows + \pgfsetlinewidth{\pgfstartlinewidth} + \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{0.5\pgf@circ@res@step}} + \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}} + \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}} + \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}} + \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}} + \pgfusepath{draw} + \pgfpathmoveto{\pgfpoint{-0.15\pgf@circ@res@step}{0.35\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{0.15\pgf@circ@res@step}{0.65\pgf@circ@res@step}} + \pgfusepath{draw} + + \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{0}} + \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}} + \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}} + \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}} + \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}} + \pgfusepath{draw} + + \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{-0.5\pgf@circ@res@step}} + \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}} + \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}} + \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}} + \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}} + \pgfusepath{draw} + \pgfpathmoveto{\pgfpoint{-0.15\pgf@circ@res@step}{-0.65\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{0.15\pgf@circ@res@step}{-0.35\pgf@circ@res@step}} + \pgfusepath{draw} +} + +%% bandstop filter +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/bandstop/width}} +{bandstop} +{\ctikzvalof{bipoles/bandstop/width}} +{\ctikzvalof{bipoles/bandstop/width}} +{ + \pgf@circ@res@step = \ctikzvalof{bipoles/bandstop/width}\pgf@circ@Rlen + \divide \pgf@circ@res@step by 2 + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}} + \pgf@circ@res@other = \pgf@circ@res@left + \advance\pgf@circ@res@other by \pgf@circ@res@step + + \ifpgf@circuit@dashed + \pgfsetdash{{0.1cm}{0.1cm}}{0cm} + \fi + + % draw outer box + \pgf@circ@twoportbox + + \ifpgf@circuit@inputarrow + { + \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth + \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}} + \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}} + } + \fi + + % rotate inner symbol + \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil} + \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135 + \pgftransformrotate{270} + \fi\fi + \ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225% 134 degree, because >= 135 is not possible + \pgftransformrotate{180} + \fi\fi + \ifnum \pgfcircmathresult > 224 \ifnum \pgfcircmathresult < 315 + \pgftransformrotate{90} + \fi\fi + + % draw inner symbol + \pgfsetdash{}{0pt}% always draw solid line for inner symbol + \pgfsetarrows{-}%never draw arrows + \pgfsetlinewidth{\pgfstartlinewidth} + \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{0.5\pgf@circ@res@step}} + \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}} + \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}} + \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}} + \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}} + \pgfusepath{draw} + + \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{0}} + \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}} + \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}} + \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}} + \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}} + \pgfusepath{draw} + \pgfpathmoveto{\pgfpoint{-0.15\pgf@circ@res@step}{-0.15\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{0.15\pgf@circ@res@step}{0.15\pgf@circ@res@step}} + \pgfusepath{draw} + + \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{-0.5\pgf@circ@res@step}} + \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}} + \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}} + \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}} + \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}} + \pgfusepath{draw} +} + +%% highpass filter +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/highpass/width}} +{highpass} +{\ctikzvalof{bipoles/highpass/width}} +{\ctikzvalof{bipoles/highpass/width}} +{ + \pgf@circ@res@step = \ctikzvalof{bipoles/highpass/width}\pgf@circ@Rlen + \divide \pgf@circ@res@step by 2 + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}} + \pgf@circ@res@other = \pgf@circ@res@left + \advance\pgf@circ@res@other by \pgf@circ@res@step + + \ifpgf@circuit@dashed + \pgfsetdash{{0.1cm}{0.1cm}}{0cm} + \fi + + % draw outer box + \pgf@circ@twoportbox + + \ifpgf@circuit@inputarrow + { + \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth + \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}} + \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}} + } + \fi + + % rotate inner symbol + \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil} + \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135 + \pgftransformrotate{270} + \fi\fi + \ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225 % 134 degree, because >= 135 is not possible + \pgftransformrotate{180} + \fi\fi + \ifnum \pgfcircmathresult > 224 \ifnum \pgfcircmathresult < 315 + \pgftransformrotate{90} + \fi\fi + + % draw inner symbol + \pgfsetdash{}{0pt} % always draw solid line for inner symbol + \pgfsetarrows{-} %never draw arrows + \pgfsetlinewidth{\pgfstartlinewidth} + \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{0.5\pgf@circ@res@step}} + \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}} + \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}} + \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}} + \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}} + \pgfusepath{draw} + + \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{0}} + \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}} + \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}} + \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}} + \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}} + \pgfusepath{draw} + \pgfpathmoveto{\pgfpoint{-0.15\pgf@circ@res@step}{-0.15\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{0.15\pgf@circ@res@step}{0.15\pgf@circ@res@step}} + \pgfusepath{draw} + + \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{-0.5\pgf@circ@res@step}} + \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}} + \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}} + \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}} + \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}} + \pgfusepath{draw} + \pgfpathmoveto{\pgfpoint{-0.15\pgf@circ@res@step}{-0.65\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{0.15\pgf@circ@res@step}{-0.35\pgf@circ@res@step}} + \pgfusepath{draw} +} + +%% lowpass filter +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/lowpass/width}} +{lowpass} +{\ctikzvalof{bipoles/lowpass/width}} +{\ctikzvalof{bipoles/lowpass/width}} +{ + \pgf@circ@res@step = \ctikzvalof{bipoles/lowpass/width}\pgf@circ@Rlen + \divide \pgf@circ@res@step by 2 + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}} + \pgf@circ@res@other = \pgf@circ@res@left + \advance\pgf@circ@res@other by \pgf@circ@res@step + + \ifpgf@circuit@dashed + \pgfsetdash{{0.1cm}{0.1cm}}{0cm} + \fi + + % draw outer box + \pgf@circ@twoportbox + + \ifpgf@circuit@inputarrow + { + \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth + \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}} + \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}} + } + \fi + + % rotate inner symbol + \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil} + \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135 + \pgftransformrotate{270} + \fi\fi + \ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225 % 134 degree, because >= 135 is not possible + \pgftransformrotate{180} + \fi\fi + \ifnum \pgfcircmathresult > 224 \ifnum \pgfcircmathresult < 315 + \pgftransformrotate{90} + \fi\fi + + % draw inner symbol + \pgfsetdash{}{0pt} % always draw solid line for inner symbol + \pgfsetarrows{-} %never draw arrows + \pgfsetlinewidth{\pgfstartlinewidth} + \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{0.5\pgf@circ@res@step}} + \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}} + \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}} + \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}} + \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}} + \pgfusepath{draw} + \pgfpathmoveto{\pgfpoint{-0.15\pgf@circ@res@step}{0.35\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{0.15\pgf@circ@res@step}{0.65\pgf@circ@res@step}} + \pgfusepath{draw} + + \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{0}} + \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}} + \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}} + \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}} + \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}} + \pgfusepath{draw} + \pgfpathmoveto{\pgfpoint{-0.15\pgf@circ@res@step}{-0.15\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{0.15\pgf@circ@res@step}{0.15\pgf@circ@res@step}} + \pgfusepath{draw} + + \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{-0.5\pgf@circ@res@step}} + \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}} + \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}} + \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}} + \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}} + \pgfusepath{draw} +} + +%% ADC +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/adc/width}} +{adc} +{\ctikzvalof{bipoles/adc/width}} +{\ctikzvalof{bipoles/adc/width}} +{ + \pgf@circ@res@step = \ctikzvalof{bipoles/adc/width}\pgf@circ@Rlen + \divide \pgf@circ@res@step by 2 + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}} + \pgf@circ@res@other = \pgf@circ@res@left + \advance\pgf@circ@res@other by \pgf@circ@res@step + + \ifpgf@circuit@dashed + \pgfsetdash{{0.1cm}{0.1cm}}{0cm} + \fi + + % draw outer box + \pgf@circ@twoportbox + + \ifpgf@circuit@inputarrow + { + \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth + \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}} + \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}} + } + \fi + + % rotate inner symbol + \def\texti{A} + \def\textii{D} + \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil} + \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135 + \def\texti{D} + \def\textii{A} + \pgftransformrotate{270} + \fi\fi + \ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225 % 134 degree, because >= 135 is not possible + \def\texti{D} + \def\textii{A} + \pgftransformrotate{180} + \fi\fi + \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315 + \pgftransformrotate{90} + \def\texti{A} + \def\textii{D} + \fi\fi + + % draw inner symbol + \pgfsetdash{}{0pt} % always draw solid line for inner symbol + \pgfsetarrows{-} %never draw arrows + \pgfsetlinewidth{\pgfstartlinewidth} + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}} + \pgfusepath{draw} + + \pgftext[center,x=0.45\pgf@circ@res@left,y=0.45\pgf@circ@res@up]{\textsf{\texti}} + \pgftext[center,x=0.45\pgf@circ@res@right,y=0.45\pgf@circ@res@down]{\textsf{\textii}} +} + +%% DAC +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/dac/width}} +{dac} +{\ctikzvalof{bipoles/dac/width}} +{\ctikzvalof{bipoles/dac/width}} +{ + \pgf@circ@res@step = \ctikzvalof{bipoles/dac/width}\pgf@circ@Rlen + \divide \pgf@circ@res@step by 2 + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}} + \pgf@circ@res@other = \pgf@circ@res@left + \advance\pgf@circ@res@other by \pgf@circ@res@step + + \ifpgf@circuit@dashed + \pgfsetdash{{0.1cm}{0.1cm}}{0cm} + \fi + + % draw outer box + \pgf@circ@twoportbox + + \ifpgf@circuit@inputarrow + { + \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth + \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}} + \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}} + } + \fi + + % rotate inner symbol + \def\texti{D} + \def\textii{A} + \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil} + \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135 + \def\texti{A} + \def\textii{D} + \pgftransformrotate{270} + \fi\fi + \ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225 % 134 degree, because >= 135 is not possible + \def\texti{A} + \def\textii{D} + \pgftransformrotate{180} + \fi\fi + \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315 + \pgftransformrotate{90} + \def\texti{D} + \def\textii{A} + \fi\fi + + % draw inner symbol + \pgfsetdash{}{0pt} % always draw solid line for inner symbol + \pgfsetarrows{-} %never draw arrows + \pgfsetlinewidth{\pgfstartlinewidth} + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}} + \pgfusepath{draw} + + \pgftext[center,x=0.45\pgf@circ@res@left,y=0.45\pgf@circ@res@up]{\textsf{\texti}} + \pgftext[center,x=0.45\pgf@circ@res@right,y=0.45\pgf@circ@res@down]{\textsf{\textii}} +} + +%% DSP +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/dsp/width}} +{dsp} +{\ctikzvalof{bipoles/dsp/width}} +{\ctikzvalof{bipoles/dsp/width}} +{ + \pgf@circ@res@step = \ctikzvalof{bipoles/dsp/width}\pgf@circ@Rlen + \divide \pgf@circ@res@step by 2 + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}} + \pgf@circ@res@other = \pgf@circ@res@left + \advance\pgf@circ@res@other by \pgf@circ@res@step + + \ifpgf@circuit@dashed + \pgfsetdash{{0.1cm}{0.1cm}}{0cm} + \fi + + % draw outer box + \pgf@circ@twoportbox + + \ifpgf@circuit@inputarrow + { + \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth + \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}} + \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}} + } + \fi + + % rotate inner symbol + \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil} + \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135 + \pgftransformrotate{270} + \fi\fi + \ifnum \pgfcircmathresult > 135 \ifnum \pgfcircmathresult < 225 + \pgftransformrotate{180} + \fi\fi + \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315 + \pgftransformrotate{90} + \fi\fi + + % draw inner symbol + \pgftext[center,x=0,y=0]{\textsf{DSP}} +} + +%% FFT +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/fft/width}} +{fft} +{\ctikzvalof{bipoles/fft/width}} +{\ctikzvalof{bipoles/fft/width}} +{ + \pgf@circ@res@step = \ctikzvalof{bipoles/fft/width}\pgf@circ@Rlen + \divide \pgf@circ@res@step by 2 + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}} + \pgf@circ@res@other = \pgf@circ@res@left + \advance\pgf@circ@res@other by \pgf@circ@res@step + + \ifpgf@circuit@dashed + \pgfsetdash{{0.1cm}{0.1cm}}{0cm} + \fi + + % draw outer box + \pgf@circ@twoportbox + + \ifpgf@circuit@inputarrow + { + \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth + \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}} + \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}} + } + \fi + + % rotate inner symbol + \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil} + \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135 + \pgftransformrotate{270} + \fi\fi + \ifnum \pgfcircmathresult > 135 \ifnum \pgfcircmathresult < 225 + \pgftransformrotate{180} + \fi\fi + \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315 + \pgftransformrotate{90} + \fi\fi + + % draw inner symbol + \pgftext[center,x=0,y=0]{\textsf{FFT}} +} + +%% Amplifier +\pgfcircdeclarebipole +{} +{ + \ifpgf@circuit@boxed + \ctikzvalof{bipoles/twoport/width} + \else + \ctikzvalof{bipoles/amp/width} + \fi +} +{amp} +{ + \ifpgf@circuit@boxed + \ctikzvalof{bipoles/twoport/width} + \else + \ctikzvalof{bipoles/amp/width} + \fi +} +{ + \ifpgf@circuit@boxed + \ctikzvalof{bipoles/twoport/width} + \else + \ctikzvalof{bipoles/amp/width} + \fi +} +{ + \pgf@circ@res@step = \ctikzvalof{bipoles/amp/width}\pgf@circ@Rlen + + \ifpgf@circuit@dashed + \pgfsetdash{{0.1cm}{0.1cm}}{0cm} + \fi + + % draw outer box + \ifpgf@circuit@boxed + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgfnode{box}{center}{}{pgf@box}{\pgfusepath{draw}} + \pgf@circ@draworfill + \fi + + % draw input arrow + \ifpgf@circuit@inputarrow + { + \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth + \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}} + \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}} + } + \fi + + \ifpgf@circuit@boxed + \pgfsetlinewidth{\pgfstartlinewidth} + \pgfsetdash{}{0pt} % draw solid line for inner symbol if no box is drawn + \pgf@circ@res@step=.7\pgf@circ@res@step % scale amp symbol when inside a box + \else + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \fi + + \pgfsetarrows{-} %never draw arrows + \pgfsetlinewidth{\pgfstartlinewidth} + + \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{0.55\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@step}{0}} + \pgfpathlineto{\pgfpoint{-0.5\pgf@circ@res@step}{-0.55\pgf@circ@res@step}} + + \pgfpathclose + \pgf@circ@draworfill + + % draw inner text + \pgftext[center,x=-0.12\pgf@circ@res@step,y=0]{\ctikzvalof{bipoles/twoport/text}} +} + + +%% variable amplifier +\pgfcircdeclarebipole +{} +{ + \ifpgf@circuit@boxed + \ctikzvalof{bipoles/twoport/width} + \else + \ctikzvalof{bipoles/amp/width} + \fi +} +{vamp} +{ + \ifpgf@circuit@boxed + \ctikzvalof{bipoles/twoport/width} + \else + \ctikzvalof{bipoles/amp/width} + \fi +} +{ + \ifpgf@circuit@boxed + \ctikzvalof{bipoles/twoport/width} + \else + \ctikzvalof{bipoles/amp/width} + \fi +} +{ + \pgf@circ@res@step = \ctikzvalof{bipoles/amp/width}\pgf@circ@Rlen + + \ifpgf@circuit@dashed + \pgfsetdash{{0.1cm}{0.1cm}}{0cm} + \fi + + % draw outer box + \ifpgf@circuit@boxed + \pgfnode{box}{center}{}{pgf@box}{\pgfusepath{draw}} + \fi + + % draw input arrow + \ifpgf@circuit@inputarrow + { + \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth + \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}} + \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}} + } + \fi + + \ifpgf@circuit@boxed + \pgfsetlinewidth{\pgfstartlinewidth} + \pgfsetdash{}{0pt} % draw solid line for inner symbol if no box is drawn + \pgf@circ@res@step=.7\pgf@circ@res@step % scale amp symbol when inside a box + \else + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \fi + + + \pgfsetdash{}{0pt} % always draw solid line for inner symbol + \pgfsetarrows{-} %never draw arrows + \pgfsetlinewidth{\pgfstartlinewidth} + + \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{0.55\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@step}{0}} + \pgfpathlineto{\pgfpoint{-0.5\pgf@circ@res@step}{-0.55\pgf@circ@res@step}} + + \pgfpathclose + \pgf@circ@draworfill + + % draw inner text + \pgftext[center,x=-0.12\pgf@circ@res@step,y=0]{\ctikzvalof{bipoles/twoport/text}} + + % draw arrow + \pgfsetlinewidth{\pgfstartlinewidth} + \pgfsetarrowsend{latex} + \pgfpathmoveto{\pgfpoint{-0.8\pgf@circ@res@step}{-0.5\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{0.6\pgf@circ@res@step}{0.6\pgf@circ@res@step}} + \pgfusepath{draw} +} + +%% pi attenuator +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/piattenuator/width}} +{piattenuator} +{\ctikzvalof{bipoles/piattenuator/width}} +{\ctikzvalof{bipoles/piattenuator/width}} +{ + \pgf@circ@res@step = \ctikzvalof{bipoles/piattenuator/width}\pgf@circ@Rlen + \divide \pgf@circ@res@step by 2 + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}} + \pgf@circ@res@other = \pgf@circ@res@left + \advance\pgf@circ@res@other by \pgf@circ@res@step + + \ifpgf@circuit@dashed + \pgfsetdash{{0.1cm}{0.1cm}}{0cm} + \fi + + % draw outer box + \pgf@circ@twoportbox + + \ifpgf@circuit@inputarrow + { + \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth + \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}} + \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}} + } + \fi + + % rotate inner symbol + \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil} + \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135 + \pgftransformrotate{270} + \fi\fi + \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315 + \pgftransformrotate{90} + \fi\fi + + % draw inner symbol + \pgfsetdash{}{0pt} % always draw solid line for inner symbol + \pgfsetarrows{-} %never draw arrows + \pgfsetlinewidth{\pgfstartlinewidth} + \pgfpathmoveto{\pgfpoint{0.4\pgf@circ@res@left}{0.4\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{0.4\pgf@circ@res@left}{0.4\pgf@circ@res@up}} + \pgfusepath{draw} + \pgfpathmoveto{\pgfpoint{0.4\pgf@circ@res@right}{0.4\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{0.4\pgf@circ@res@right}{0.4\pgf@circ@res@up}} + \pgfusepath{draw} + \pgfpathmoveto{\pgfpoint{0.6\pgf@circ@res@left}{0.4\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{0.6\pgf@circ@res@right}{0.4\pgf@circ@res@up}} + \pgfusepath{draw} +} + +%% variable pi attenuator +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/vpiattenuator/width}} +{vpiattenuator} +{\ctikzvalof{bipoles/vpiattenuator/width}} +{\ctikzvalof{bipoles/vpiattenuator/width}} +{ + \pgf@circ@res@step = \ctikzvalof{bipoles/vpiattenuator/width}\pgf@circ@Rlen + \divide \pgf@circ@res@step by 2 + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}} + \pgf@circ@res@other = \pgf@circ@res@left + \advance\pgf@circ@res@other by \pgf@circ@res@step + + \ifpgf@circuit@dashed + \pgfsetdash{{0.1cm}{0.1cm}}{0cm} + \fi + + % draw outer box + \pgf@circ@twoportbox + + \ifpgf@circuit@inputarrow + { + \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth + \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}} + \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}} + } + \fi + + % rotate inner symbol + \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil} + \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135 + \pgftransformrotate{270} + \fi\fi + \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315 + \pgftransformrotate{90} + \fi\fi + + % draw inner symbol + \pgfsetdash{}{0pt} % always draw solid line for inner symbol + \pgfsetarrows{-} %never draw arrows + \pgfsetlinewidth{\pgfstartlinewidth} + \pgfpathmoveto{\pgfpoint{0.4\pgf@circ@res@left}{0.4\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{0.4\pgf@circ@res@left}{0.4\pgf@circ@res@up}} + \pgfusepath{draw} + \pgfpathmoveto{\pgfpoint{0.4\pgf@circ@res@right}{0.4\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{0.4\pgf@circ@res@right}{0.4\pgf@circ@res@up}} + \pgfusepath{draw} + \pgfpathmoveto{\pgfpoint{0.6\pgf@circ@res@left}{0.4\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{0.6\pgf@circ@res@right}{0.4\pgf@circ@res@up}} + \pgfusepath{draw} + + \pgfsetarrowsend{latex} + \pgfpathmoveto{\pgfpoint{0.7\pgf@circ@res@left}{0.5\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{0.7\pgf@circ@res@right}{0.8\pgf@circ@res@up}} + \pgfusepath{draw} +} + +%% T attenuator +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/tattenuator/width}} +{tattenuator} +{\ctikzvalof{bipoles/tattenuator/width}} +{\ctikzvalof{bipoles/tattenuator/width}} +{ + \pgf@circ@res@step = \ctikzvalof{bipoles/tattenuator/width}\pgf@circ@Rlen + \divide \pgf@circ@res@step by 2 + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}} + \pgf@circ@res@other = \pgf@circ@res@left + \advance\pgf@circ@res@other by \pgf@circ@res@step + + \ifpgf@circuit@dashed + \pgfsetdash{{0.1cm}{0.1cm}}{0cm} + \fi + + % draw outer box + \pgf@circ@twoportbox + + \ifpgf@circuit@inputarrow + { + \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth + \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}} + \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}} + } + \fi + + % rotate inner symbol + \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil} + \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135 + \pgftransformrotate{270} + \fi\fi + \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315 + \pgftransformrotate{90} + \fi\fi + + % draw inner symbol + \pgfsetdash{}{0pt} % always draw solid line for inner symbol + \pgfsetarrows{-} %never draw arrows + \pgfsetlinewidth{\pgfstartlinewidth} + \pgfpathmoveto{\pgfpoint{0pt}{0.4\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{0pt}{0.4\pgf@circ@res@up}} + \pgfusepath{draw} + \pgfpathmoveto{\pgfpoint{0.6\pgf@circ@res@left}{0.4\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{0.6\pgf@circ@res@right}{0.4\pgf@circ@res@up}} + \pgfusepath{draw} +} + +%% variable T attenuator +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/vtattenuator/width}} +{vtattenuator} +{\ctikzvalof{bipoles/vtattenuator/width}} +{\ctikzvalof{bipoles/vtattenuator/width}} +{ + \pgf@circ@res@step = \ctikzvalof{bipoles/vtattenuator/width}\pgf@circ@Rlen + \divide \pgf@circ@res@step by 2 + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}} + \pgf@circ@res@other = \pgf@circ@res@left + \advance\pgf@circ@res@other by \pgf@circ@res@step + + \ifpgf@circuit@dashed + \pgfsetdash{{0.1cm}{0.1cm}}{0cm} + \fi + + % draw outer box + \pgf@circ@twoportbox + + \ifpgf@circuit@inputarrow + { + \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth + \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}} + \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}} + } + \fi + + % rotate inner symbol + \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil} + \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135 + \pgftransformrotate{270} + \fi\fi + \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315 + \pgftransformrotate{90} + \fi\fi + + % draw inner symbol + \pgfsetdash{}{0pt} % always draw solid line for inner symbol + \pgfsetarrows{-} %never draw arrows + \pgfsetlinewidth{\pgfstartlinewidth} + \pgfpathmoveto{\pgfpoint{0pt}{0.4\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{0pt}{0.4\pgf@circ@res@up}} + \pgfusepath{draw} + \pgfpathmoveto{\pgfpoint{0.6\pgf@circ@res@left}{0.4\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{0.6\pgf@circ@res@right}{0.4\pgf@circ@res@up}} + \pgfusepath{draw} + + \pgfsetarrowsend{latex} + \pgfpathmoveto{\pgfpoint{0.7\pgf@circ@res@left}{0.5\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{0.7\pgf@circ@res@right}{0.8\pgf@circ@res@up}} + \pgfusepath{draw} +} + +%% phase shifter +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/phaseshifter/width}} +{phaseshifter} +{\ctikzvalof{bipoles/phaseshifter/width}} +{\ctikzvalof{bipoles/phaseshifter/width}} +{ + \pgf@circ@res@step = \ctikzvalof{bipoles/phaseshifter/width}\pgf@circ@Rlen + \divide \pgf@circ@res@step by 2 + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}} + \pgf@circ@res@other = \pgf@circ@res@left + \advance\pgf@circ@res@other by \pgf@circ@res@step + + \ifpgf@circuit@dashed + \pgfsetdash{{0.1cm}{0.1cm}}{0cm} + \fi + + % draw outer box + \pgf@circ@twoportbox + + \ifpgf@circuit@inputarrow + { + \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth + \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}} + \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}} + } + \fi + + % rotate inner symbol + \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil} + \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135 + \pgftransformrotate{270} + \fi\fi + \ifnum \pgfcircmathresult > 135 \ifnum \pgfcircmathresult < 225 + \pgftransformrotate{180} + \fi\fi + \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315 + \pgftransformrotate{90} + \fi\fi + + % inner symbol + \pgftext[center,x=0,y=0]{\Large$\varphi$} +} + +%% variable phase shifter +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/phaseshifter/width}} +{vphaseshifter} +{\ctikzvalof{bipoles/vphaseshifter/width}} +{\ctikzvalof{bipoles/vphaseshifter/width}} +{ + \pgf@circ@res@step = \ctikzvalof{bipoles/vphaseshifter/width}\pgf@circ@Rlen + \divide \pgf@circ@res@step by 2 + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}} + \pgf@circ@res@other = \pgf@circ@res@left + \advance\pgf@circ@res@other by \pgf@circ@res@step + + \ifpgf@circuit@dashed + \pgfsetdash{{0.1cm}{0.1cm}}{0cm} + \fi + + % draw outer box + \pgf@circ@twoportbox + + \ifpgf@circuit@inputarrow + { + \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth + \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}} + \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}} + } + \fi + + % rotate inner symbol + \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil} + \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135 + \pgftransformrotate{270} + \fi\fi + \ifnum \pgfcircmathresult > 135 \ifnum \pgfcircmathresult < 225 + \pgftransformrotate{180} + \fi\fi + \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315 + \pgftransformrotate{90} + \fi\fi + + % inner symbol + \pgftext[center,x=0,y=0]{\Large$\varphi$} + + \pgfsetdash{}{0pt} % always draw solid line for inner symbol + \pgfsetlinewidth{\pgfstartlinewidth} + \pgfsetarrowsend{latex} + \pgfpathmoveto{\pgfpoint{0.75\pgf@circ@res@left}{0.65\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{0.7\pgf@circ@res@right}{0.65\pgf@circ@res@up}} + \pgfusepath{draw} +} + +%% detector +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/detector/width}} +{detector} +{\ctikzvalof{bipoles/detector/width}} +{\ctikzvalof{bipoles/detector/width}} +{ + \pgf@circ@res@step = \ctikzvalof{bipoles/detector/width}\pgf@circ@Rlen + \divide \pgf@circ@res@step by 2 + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}} + \pgf@circ@res@other = \pgf@circ@res@left + \advance\pgf@circ@res@other by \pgf@circ@res@step + + \ifpgf@circuit@dashed + \pgfsetdash{{0.1cm}{0.1cm}}{0cm} + \fi + + % draw outer box + \pgf@circ@twoportbox + + \ifpgf@circuit@inputarrow + { + \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth + \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}} + \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}} + } + \fi + + % draw inner stuff + \pgfsetdash{}{0pt} % always draw solid line for inner symbol + \pgfsetarrows{-} %never draw arrows + \pgfsetlinewidth{0.8\pgfstartlinewidth} + \pgfpathmoveto{\pgfpoint{0.75\pgf@circ@res@left}{0}} + \pgfpathlineto{\pgfpoint{0.75\pgf@circ@res@right}{0}} + \pgfusepath{draw} + + \ifpgf@circuit@fulldiode + \pgfmathparse{2\pgf@circ@res@up / \pgf@circ@Rlen / \ctikzvalof{bipoles/generic/width}} + \pgftransformscale{\pgfmathresult} + \pgfnode{fulldiodeshape}{center}{}{pgf@fulldiode}{\pgfusepath{fill}} + \else + \pgfmathparse{2\pgf@circ@res@up / \pgf@circ@Rlen / \ctikzvalof{bipoles/resistor/width}} + \pgftransformscale{\pgfmathresult} + \pgfnode{emptydiodeshape}{center}{}{pgf@emptydiode}{\pgfusepath{fill}} + \fi + +} + + + + +%% european gas filled surge arrester + +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/european gas filled surge arrester/height}} +{european gas filled surge arrester} +{\ctikzvalof{bipoles/european gas filled surge arrester/height}} +{\ctikzvalof{bipoles/european gas filled surge arrester/width}} +{ + + %\pgf@circ@res@step = \ctikzvalof{bipoles/resistor/width}\pgf@circ@Rlen + %\divide \pgf@circ@res@step by 14 + + \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}} + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + + \pgf@circ@draworfill + + \pgfscope + \pgfsetarrowsend{latexslim} + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}} + \pgfpathlineto{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/bipoles/european gas filled surge arrester/inside}\pgf@circ@res@left}{0pt}} + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgfusepath{draw} + + \endpgfscope +} + + + + +%% american gas filled surge arrester + +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/american gas filled surge arrester/height}} +{american gas filled surge arrester} +{\ctikzvalof{bipoles/american gas filled surge arrester/height}} +{\ctikzvalof{bipoles/american gas filled surge arrester/width}}{ + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}} + \pgfpointorigin \pgf@circ@res@other = \pgf@x \advance \pgf@circ@res@other by -\pgf@circ@res@up + \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@zero}} + \pgfusepath{draw} + + \pgfscope + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgfpathcircle{\pgfpointorigin}{.9\pgf@circ@res@up} + \pgf@circ@draworfill + \endpgfscope + + \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@zero}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@zero}} + \pgfusepath{draw} + + \pgfscope + \pgfsetarrowsend{latex} + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@zero}} + \pgfpathlineto{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/bipoles/american gas filled surge arrester/inside}\pgf@circ@res@right}{\pgf@circ@res@zero}} + \pgfusepath{draw} + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}} + \pgfpathlineto{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/bipoles/american gas filled surge arrester/inside}\pgf@circ@res@left}{\pgf@circ@res@zero}} + \pgfusepath{draw} + \endpgfscope{} + + \pgfcircle{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/bipoles/american gas filled surge arrester/dot x}\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/bipoles/american gas filled surge arrester/dot y}\pgf@circ@res@down}}{\pgfkeysvalueof{/tikz/circuitikz/bipoles/american gas filled surge arrester/size}\pgf@circ@res@down} + \pgfusepath{fill} +} + +% % MECHANICAL SYMBOLS + +%% mechanical capacitance - stiffness/spring + +\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/spring/height}}{spring}{\ctikzvalof{bipoles/spring/height}}{\ctikzvalof{bipoles/spring/width}}{ + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgftransformationadjustments + + \pgfmathsetlength{\pgf@circ@res@step} + {(\ctikzvalof{bipoles/spring/width}*\pgf@circ@Rlen+\pgfhorizontaltransformationadjustment*.5*\pgflinewidth)/16} + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}{\pgf@circ@res@zero}} + \pgfsetcornersarced{\pgfpoint{.5\pgf@circ@res@up}{.5\pgf@circ@res@up}} + \pgf@circ@res@other = \pgf@circ@res@left + \advance\pgf@circ@res@other by \pgf@circ@res@step + \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@up}} + \advance\pgf@circ@res@other by 2\pgf@circ@res@step + \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@down}} + \advance\pgf@circ@res@other by 2\pgf@circ@res@step + \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@up}} + \advance\pgf@circ@res@other by 2\pgf@circ@res@step + \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@down}} + \advance\pgf@circ@res@other by 2\pgf@circ@res@step + \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@up}} + \advance\pgf@circ@res@other by 2\pgf@circ@res@step + \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@down}} + \advance\pgf@circ@res@other by 2\pgf@circ@res@step + \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@up}} + \advance\pgf@circ@res@other by 2\pgf@circ@res@step + \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@down}} + \advance\pgf@circ@res@other by \pgf@circ@res@step + \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@zero}} + \pgfsetbuttcap + \pgfsetbeveljoin + \pgfusepath{stroke} +} + +%% mechanical inductance - mass +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/mass/box height}} +{mass} +{\ctikzvalof{bipoles/mass/height}} +{\ctikzvalof{bipoles/mass/width}} +{ + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgftransformationadjustments + \pgfpathrectangle{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}} + {\pgfpoint{-2\pgf@circ@res@down}{-2\pgf@circ@res@down}} + \pgf@circ@draworfill + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}} + \pgfsetrectcap + \pgfsetmiterjoin + \pgfusepath{stroke} +} + +%% mechanical resistor - damper +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/damper/height}} +{damper} +{\ctikzvalof{bipoles/damper/height}} +{\ctikzvalof{bipoles/damper/width}} +{ + \pgfpathrectanglecorners{\pgfpoint{\ctikzvalof{bipoles/damper/length}\pgf@circ@res@right}{\pgf@circ@res@down}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}} + \pgf@circ@maybefill + + % line into the damper + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}} + \pgfpathlineto{\pgfpoint{\ctikzvalof{bipoles/damper/length}\pgf@circ@res@right} + {\pgf@circ@res@zero}} + \pgfusepath{stroke} + + % damper box + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}} + + \pgfsetrectcap + \pgfsetmiterjoin + \pgfusepath{stroke} + + % damper vertical element + \pgfpathmoveto{\pgfpoint{\ctikzvalof{bipoles/damper/length}\pgf@circ@res@right} + {.8\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\ctikzvalof{bipoles/damper/length}\pgf@circ@res@right} + {.8\pgf@circ@res@up}} + \pgfsetbuttcap + \pgfusepath{stroke} + +} +%% mechanical viscoelastic element, suggested by @alex +%% in https://tex.stackexchange.com/questions/484268/combined-spring-damper-in-circuitikz +\pgfcircdeclarebipole +{} % extra anchors +{\ctikzvalof{bipoles/damper/height}} % depth (under the path line) +{viscoe} % name +{\ctikzvalof{bipoles/damper/height}} % height (above the path line) +{\ctikzvalof{bipoles/damper/width}} % width +{ % draw the bipole + \pgfpathrectanglecorners{\pgfpoint{\ctikzvalof{bipoles/damper/length}\pgf@circ@res@right}{\pgf@circ@res@down}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}} + \pgf@circ@maybefill + + % spring into the damper + \pgfscope + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}} + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgfsetcornersarced{\pgfpoint{.25\pgf@circ@res@up}{.25\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{.75\pgf@circ@res@left}{.75\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{.5\pgf@circ@res@left}{-.75\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{.25\pgf@circ@res@left}{.75\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{0pt}{-.75\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\ctikzvalof{bipoles/damper/length}\pgf@circ@res@right}{.75\pgf@circ@res@up}} + \pgfusepath{stroke} + \endpgfscope + % damper box + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}} + + \pgfsetrectcap + \pgfsetmiterjoin + \pgfusepath{stroke} + + % damper vertical element + \pgfpathmoveto{\pgfpoint{\ctikzvalof{bipoles/damper/length}\pgf@circ@res@right} + {.8\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\ctikzvalof{bipoles/damper/length}\pgf@circ@res@right} + {.8\pgf@circ@res@up}} + \pgfsetbuttcap + \pgfusepath{stroke} + +} + + +\pgfcircdeclarebipole +{% anchor for labelling the type of dependency + \anchor{label}{% + \southwest + \pgf@x=0.4\pgf@x + }% +} +{\ctikzvalof{bipoles/resistivesens/height}} +{resistivesens} +{\ctikzvalof{bipoles/resistivesens/height}} +{\ctikzvalof{bipoles/resistivesens/width}} +{% + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgftransformationadjustments + \pgfmathsetlength{\pgf@circ@res@step}{\ctikzvalof{bipoles/resistor/width}\pgf@circ@Rlen+\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth} + \divide \pgf@circ@res@step by 12 + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}{\pgf@circ@res@zero}} + + \pgf@circ@res@other = \pgf@circ@res@left + \advance\pgf@circ@res@other by \pgf@circ@res@step + \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{.5\pgf@circ@res@up}} + \advance\pgf@circ@res@other by 2\pgf@circ@res@step + \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{.5\pgf@circ@res@down}} + \advance\pgf@circ@res@other by 2\pgf@circ@res@step + \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{.5\pgf@circ@res@up}} + \advance\pgf@circ@res@other by 2\pgf@circ@res@step + \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{.5\pgf@circ@res@down}} + \advance\pgf@circ@res@other by 2\pgf@circ@res@step + \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{.5\pgf@circ@res@up}} + \advance\pgf@circ@res@other by 2\pgf@circ@res@step + \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{.5\pgf@circ@res@down}} + \advance\pgf@circ@res@other by \pgf@circ@res@step + \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@zero}} + \pgfsetbeveljoin + \pgfusepath{draw} + + \pgfscope + \pgfpathmoveto{\pgfpoint{.4\pgf@circ@res@other}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{-.4\pgf@circ@res@other}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{-.9\pgf@circ@res@other}{\pgf@circ@res@down}} + \pgfusepath{draw} + \endpgfscope +} + +%% crossing bipole (but see also nodes) +\pgfcircdeclarebipole + {} + {\ctikzvalof{bipoles/crossing/size}} + {crossing} + {\ctikzvalof{bipoles/crossing/size}} + {\ctikzvalof{bipoles/crossing/size}}{ + \pgfscope + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}} + \pgfpathlineto{\pgfpoint{0.4\pgf@circ@res@left}{\pgf@circ@res@zero}} + \pgfpatharc{0}{-180}{0.4*\pgf@circ@res@left} + \pgfsetbeveljoin + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@zero}} + \pgfusepath{draw} + \endpgfscope + } + +%% loudspeaker and microphone + +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/loudspeaker/depth}} +{loudspeaker} +{\ctikzvalof{bipoles/loudspeaker/height}} +{\ctikzvalof{bipoles/loudspeaker/width}}{ + + \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{.4\pgf@circ@res@up}} + {\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}} + \pgfpathmoveto{\pgfpoint{0.5\pgf@circ@res@left}{.4\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{0.8\pgf@circ@res@left}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{0.8\pgf@circ@res@right}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@right}{.4\pgf@circ@res@up}} + \pgfpathclose + \pgfsetlinewidth{\ctikzvalof{bipoles/thickness}\pgfstartlinewidth} + \pgf@circ@draworfill +} + +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/mic/depth}} +{mic} +{\ctikzvalof{bipoles/mic/height}} +{\ctikzvalof{bipoles/mic/width}}{ + + \pgfscope + \pgfsetlinewidth{\ctikzvalof{bipoles/thickness}\pgfstartlinewidth} + \pgfpathcircle{\pgfpoint{0pt}{.6\pgf@circ@res@up}}{.4\pgf@circ@res@up} + \pgf@circ@draworfill + \pgfpathmoveto{\pgfpoint{.6\pgf@circ@res@left}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{.6\pgf@circ@res@right}{\pgf@circ@res@up}} + \pgfusepath{draw} + \endpgfscope + \pgfscope + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}} + \pgfpathlineto{\pgfpoint{-.2\pgf@circ@res@up}{0pt}} + % 0.25358 is 0.6-0.4*cos(30) + \pgfpathlineto{\pgfpoint{-.2\pgf@circ@res@up}{.25358\pgf@circ@res@up}} + \pgfpathmoveto{\pgfpoint{.2\pgf@circ@res@up}{.25358\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{.2\pgf@circ@res@up}{0pt}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0pt}} + \pgfusepath{draw} + + \pgfusepath{draw} + \endpgfscope +} + +% generic round meter with always horizontal text, no arrow +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/esource/height}} +{rmeter} +{\ctikzvalof{bipoles/esource/height}} +{\ctikzvalof{bipoles/esource/width}} +{ + \pgfpointorigin + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}} + \pgf@circ@draworfill + % draw the text label + % get the rotation + \pgfgettransformentries\a\b\temp\temp\temp\temp + \pgfmathsetmacro{\rot}{-atan2(\b,\a)} + % and unrotate the scope + \pgfscope + \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}} + \pgftransformrotate{\rot} + \pgftext[center,x=0,y=0]{\ctikzvalof{bipoles/twoport/text}} + \endpgfscope +} + +% generic round meter with always horizontal text, with arrow +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/esource/height}} +{rmeterwa} +{\ctikzvalof{bipoles/esource/height}} +{\ctikzvalof{bipoles/esource/width}} +{ + \pgfpointorigin + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}} + \pgf@circ@draworfill + % draw the text label + % get the rotation + \pgfgettransformentries\a\b\temp\temp\temp\temp + \pgfmathsetmacro{\rot}{-atan2(\b,\a)} + % and unrotate the scope + \pgfscope + \pgftransformrotate{\rot} + \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}} + \pgfsetlinewidth{\pgfstartlinewidth} + % arrow: create a center hole to have better visual + \pgfscope + % clipping path: first a rectangle bigger then the shape + % to avoid problems with the line thickness + \pgfpathrectanglecorners{\pgfpoint{2\pgf@circ@res@left}{2\pgf@circ@res@down}} + {\pgfpoint{2\pgf@circ@res@right}{2\pgf@circ@res@up}} + % next open a circle into it + \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{.6\pgf@circ@res@up}}{\pgfpoint{.6\pgf@circ@res@left}{0}} + % do the difference and clip before drawing + \pgfseteorule + \pgfusepath{clip} + \pgfsetarrowsend{latexslim} + % the arrow is better if it has a bit of breath and it's not 45º + \pgfpathmoveto{\pgfpoint{.8\pgf@circ@res@left}{1.2\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{.8\pgf@circ@res@right}{1.2\pgf@circ@res@up}} + \pgfusepath{draw} + \endpgfscope + \pgftext[center]{\ctikzvalof{bipoles/twoport/text}} + \endpgfscope +} + +% generic square meter with always horizontal text +\pgfcircdeclarebipole +{ + \anchor{in 1}{\southwest\pgf@y=0.75\pgf@y\pgf@x=0.4\pgf@x} + \anchor{in 2}{\southwest\pgf@y=0.75\pgf@y\pgf@x=-0.4\pgf@x} + % put the node text above and centered + \anchor{text}{\pgfextracty{\pgf@circ@res@up}{\northeast} + \pgfpoint{-.5\wd\pgfnodeparttextbox}{ + \dimexpr.5\dp\pgfnodeparttextbox+.5\ht\pgfnodeparttextbox+\pgf@circ@res@up\relax + } + } +} +{\ctikzvalof{bipoles/smeter/height}} +{smeter} +{\ctikzvalof{bipoles/smeter/height}} +{\ctikzvalof{bipoles/smeter/width}} +{ + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgfextracty{\pgf@circ@res@up}{\northeast} + \pgfextractx{\pgf@circ@res@right}{\northeast} + \pgfextractx{\pgf@circ@res@left}{\southwest} + \pgfextracty{\pgf@circ@res@down}{\southwest} + \pgfmathsetlength{\pgf@circ@res@step}{0.25*\pgf@circ@res@up} + \pgfscope + \pgfsetcornersarced{\pgfpoint{\pgf@circ@res@step}{\pgf@circ@res@step}} + \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}} + \pgf@circ@draworfill + \endpgfscope + % get the rotation + \pgfgettransformentries\a\b\temp\temp\temp\temp + \pgfmathsetmacro{\rot}{-atan2(\b,\a)} + % and unrotate the scope + \pgfscope + \pgftransformrotate{\rot} + % the metering window + \pgfscope + \def\@starta{105}\def\@stopa{75} + \pgfsetlinewidth{\pgfstartlinewidth} + \pgftransformshift{\pgfpoint{0pt}{-1.8\pgf@circ@res@up}} + \pgfpathmoveto{\pgfpointpolar{\@starta}{2\pgf@circ@res@up}} + \pgfpatharc{\@starta}{\@stopa}{2\pgf@circ@res@up} + \pgfpathlineto{\pgfpointpolar{\@stopa}{2.5\pgf@circ@res@up}} + \pgfpatharc{\@stopa}{\@starta}{2.5\pgf@circ@res@up} + \pgfclosepath + \pgfpathmoveto{\pgfpointpolar{80}{2\pgf@circ@res@up}} + \pgfpathlineto{\pgfpointpolar{80}{2.4\pgf@circ@res@up}} + \pgfusepath{draw} + \endpgfscope + \pgftext[center, y=0.5\pgf@circ@res@down]{\ctikzvalof{bipoles/twoport/text}} + \endpgfscope +} + +% probles qucs style: +% #1 : name +% #2 : extra code +\long\def\pgfcirc@qucsprobe#1#2{ + \pgfcircdeclarebipole + { + \anchor{v+}{\southwest\pgf@x=0.6\pgf@x} + \anchor{v-}{\southwest\pgf@x=-0.6\pgf@x} + % put the node text above and centered + \anchor{text}{\pgfextracty{\pgf@circ@res@up}{\northeast} + \pgfpoint{-.5\wd\pgfnodeparttextbox}{ + \dimexpr.5\dp\pgfnodeparttextbox+.5\ht\pgfnodeparttextbox+\pgf@circ@res@up\relax + } + } + } + {\ctikzvalof{bipoles/qmeter/depth}} + {#1} + {\ctikzvalof{bipoles/qmeter/height}} + {\ctikzvalof{bipoles/qmeter/width}} + { + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgfextracty{\pgf@circ@res@up}{\northeast} + \pgfextractx{\pgf@circ@res@right}{\northeast} + \pgfextractx{\pgf@circ@res@left}{\southwest} + \pgfextracty{\pgf@circ@res@down}{\southwest} + \pgfmathsetlength{\pgf@circ@res@step}{0.25*\pgf@circ@res@up} + \pgfscope + \pgfscope + \pgfsetcornersarced{\pgfpoint{\pgf@circ@res@step}{\pgf@circ@res@step}} + \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}} + \pgf@circ@draworfill + \endpgfscope + \def\@starta{103}\def\@stopa{77} + \pgfsetlinewidth{\pgfstartlinewidth} + \pgfscope + \pgftransformshift{\pgfpoint{0pt}{-1.7\pgf@circ@res@up}} + \pgfpathmoveto{\pgfpointpolar{\@starta}{2.1\pgf@circ@res@up}} + \pgfpatharc{\@starta}{\@stopa}{2.1\pgf@circ@res@up} + \pgfpathlineto{\pgfpointpolar{\@stopa}{2.5\pgf@circ@res@up}} + \pgfpatharc{\@stopa}{\@starta}{2.5\pgf@circ@res@up} + \pgfclosepath + \pgfpathmoveto{\pgfpointpolar{83}{2.1\pgf@circ@res@up}} + \pgfpathlineto{\pgfpointpolar{83}{2.4\pgf@circ@res@up}} + \pgfusepath{draw} + \pgf@circ@draworfill + \endpgfscope + #2 + \endpgfscope + } +} + +\pgfcirc@qucsprobe{qiprobe}{ + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0pt}} + \pgfusepath{draw} + \pgfnode{currarrow}{center}{}{}{} +} + +\pgfcirc@qucsprobe{qvprobe}{ + \pgfmathsetlength{\pgf@circ@res@other}{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgf@circ@Rlen} + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}} + \pgfpathlineto{\pgfpoint{.6\pgf@circ@res@left}{0pt}} + \pgfpathcircle{\pgfpoint{.6\pgf@circ@res@left+\pgf@circ@res@other}{0pt}}{\pgf@circ@res@other} + \pgfpathmoveto{\pgfpoint{.6\pgf@circ@res@right}{0pt}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0pt}} + \pgfpathcircle{\pgfpoint{.6\pgf@circ@res@right-\pgf@circ@res@other}{0pt}}{\pgf@circ@res@other} + \pgfusepath{draw} + \pgfscope + % "+" and "-", drawn so that they scale correctly + \pgfsetlinewidth{2\pgfstartlinewidth} + \pgfpathmoveto{\pgfpoint{.6\pgf@circ@res@left+\pgf@circ@res@other}{-1.5\pgf@circ@res@other}} + \pgfpathlineto{\pgfpoint{.6\pgf@circ@res@left+\pgf@circ@res@other}{-3.5\pgf@circ@res@other}} + \pgfpathmoveto{\pgfpoint{.6\pgf@circ@res@left+0\pgf@circ@res@other}{-2.5\pgf@circ@res@other}} + \pgfpathlineto{\pgfpoint{.6\pgf@circ@res@left+2\pgf@circ@res@other}{-2.5\pgf@circ@res@other}} + \pgfpathmoveto{\pgfpoint{.6\pgf@circ@res@right+0\pgf@circ@res@other}{-2.5\pgf@circ@res@other}} + \pgfpathlineto{\pgfpoint{.6\pgf@circ@res@right-2\pgf@circ@res@other}{-2.5\pgf@circ@res@other}} + \pgfusepath{draw} + \endpgfscope +} + +\pgfcirc@qucsprobe{qpprobe}{ + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0pt}} + \pgfusepath{draw} + \pgfnode{currarrow}{center}{}{}{} + \pgfmathsetlength{\pgf@circ@res@other}{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgf@circ@Rlen} + \pgfpathcircle{\pgfpoint{.6\pgf@circ@res@left}{-3\pgf@circ@res@other}}{\pgf@circ@res@other} + \pgfpathmoveto{\pgfpoint{.6\pgf@circ@res@left}{-4\pgf@circ@res@other}} + \pgfpathlineto{\pgfpoint{.6\pgf@circ@res@left}{\pgf@circ@res@down}} + \pgfpathcircle{\pgfpoint{.6\pgf@circ@res@right}{-3\pgf@circ@res@other}}{\pgf@circ@res@other} + \pgfpathmoveto{\pgfpoint{.6\pgf@circ@res@right}{-4\pgf@circ@res@other}} + \pgfpathlineto{\pgfpoint{.6\pgf@circ@res@right}{\pgf@circ@res@down}} + \pgfusepath{draw} + \pgfscope + % "+" and "-", drawn so that they scale correctly + \pgfsetlinewidth{2\pgfstartlinewidth} + \pgfpathmoveto{\pgfpoint{.6\pgf@circ@res@left+3\pgf@circ@res@other}{-2\pgf@circ@res@other}} + \pgfpathlineto{\pgfpoint{.6\pgf@circ@res@left+3\pgf@circ@res@other}{-4\pgf@circ@res@other}} + \pgfpathmoveto{\pgfpoint{.6\pgf@circ@res@left+2\pgf@circ@res@other}{-3\pgf@circ@res@other}} + \pgfpathlineto{\pgfpoint{.6\pgf@circ@res@left+4\pgf@circ@res@other}{-3\pgf@circ@res@other}} + \pgfpathmoveto{\pgfpoint{.6\pgf@circ@res@right-4\pgf@circ@res@other}{-3\pgf@circ@res@other}} + \pgfpathlineto{\pgfpoint{.6\pgf@circ@res@right-2\pgf@circ@res@other}{-3\pgf@circ@res@other}} + \pgfusepath{draw} + \endpgfscope +} + + +% current loop for oscope and similar: stylized + +\pgfcircdeclarebipole +{ + \anchor{i}{\northeast\pgf@x=0pt\relax} + \anchor{text}{ + \pgfextracty{\pgf@circ@res@up}{\northeast} + \pgfextractx{\pgf@circ@res@left}{\northeast} + \pgfpoint{-.5\wd\pgfnodeparttextbox+\pgf@circ@res@left}{ + \dimexpr.5\dp\pgfnodeparttextbox+.5\ht\pgfnodeparttextbox+\pgf@circ@res@up\relax + } + } +} +{\ctikzvalof{bipoles/iloop/height}} +{iloop} +{\ctikzvalof{bipoles/iloop/height}} +{\ctikzvalof{bipoles/iloop/width}} +{ + \pgfextracty{\pgf@circ@res@up}{\northeast} + \pgfextractx{\pgf@circ@res@right}{\northeast} + \pgf@circ@res@down=-\pgf@circ@res@up + \pgf@circ@res@left=-\pgf@circ@res@right + \pgfscope + \pgfstartlinewidth=\pgflinewidth + \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}} + % external ellipse + \pgfscope + \pgfsetlinewidth{\ctikzvalof{bipoles/thickness}\pgflinewidth} + % clipping path: first a rectangle bigger then the shape + % to avoid problems with the line thickness + \pgfpathrectanglecorners{\pgfpoint{2\pgf@circ@res@left}{2\pgf@circ@res@down}} + {\pgfpoint{2\pgf@circ@res@right}{2\pgf@circ@res@up}} + % next the opening to the left + \pgfpathrectanglecorners{\pgfpoint{2\pgf@circ@res@left}{.1\pgf@circ@res@down}} + {\pgfpoint{0pt}{.1\pgf@circ@res@up}} + % do the difference and clip before drawing + \pgfseteorule + \pgfusepath{clip} + \pgfpathellipse{\pgfpointorigin}{ + \pgfpoint{0pt}{0.8\pgf@circ@res@up}}{ + \pgfpoint{0.4\pgf@circ@res@right}{0pt}} + \pgfusepath{draw} + \endpgfscope + % internal wire + \pgfsetlinewidth{\pgfstartlinewidth} + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}} + \pgfpathlineto{\pgfpoint{0.3\pgf@circ@res@right}{0pt}} + \pgfpathmoveto{\pgfpoint{0.5\pgf@circ@res@right}{0pt}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0pt}} + % and the contact line up + \pgfpathmoveto{\pgfpoint{0pt}{0.8\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}} + \pgfusepath{draw} + \endpgfscope +} + + +% current loop for oscope and similar: real (double connection) + +\pgfcircdeclarebipole +{ + \anchor{i+}{ + \pgfextracty{\pgf@circ@res@up}{\northeast} + \pgfextractx{\pgf@circ@res@right}{\northeast} + \pgf@circ@res@step=0.4\pgf@circ@res@right + \pgf@circ@res@other=0.8\pgf@circ@res@up + \pgfpointpolar{105}{\pgf@circ@res@step and \pgf@circ@res@other} + \pgf@y=\pgf@circ@res@up + } + \anchor{i-}{ + \pgfextracty{\pgf@circ@res@up}{\northeast} + \pgfextractx{\pgf@circ@res@right}{\northeast} + \pgf@circ@res@step=0.4\pgf@circ@res@right + \pgf@circ@res@other=0.8\pgf@circ@res@up + \pgfpointpolar{75}{\pgf@circ@res@step and \pgf@circ@res@other} + \pgf@y=\pgf@circ@res@up + } + \anchor{text}{ + \pgfextracty{\pgf@circ@res@up}{\northeast} + \pgfextractx{\pgf@circ@res@left}{\northeast} + \pgfpoint{-.5\wd\pgfnodeparttextbox+\pgf@circ@res@left}{ + \dimexpr.5\dp\pgfnodeparttextbox+.5\ht\pgfnodeparttextbox+\pgf@circ@res@up\relax + } + } +} +{\ctikzvalof{bipoles/iloop/height}} +{iloop2} +{\ctikzvalof{bipoles/iloop/height}} +{\ctikzvalof{bipoles/iloop/width}} +{ + \pgfextracty{\pgf@circ@res@up}{\northeast} + \pgfextractx{\pgf@circ@res@right}{\northeast} + \pgf@circ@res@down=-\pgf@circ@res@up + \pgf@circ@res@left=-\pgf@circ@res@right + % must be the same than internal i+ and i- anchors definition + \pgf@circ@res@step=0.4\pgf@circ@res@right + \pgf@circ@res@other=0.8\pgf@circ@res@up + \def\@plus{\pgfpointpolar{105}{\pgf@circ@res@step and \pgf@circ@res@other}} + \def\@minus{\pgfpointpolar{75}{\pgf@circ@res@step and \pgf@circ@res@other}} + \pgfscope + \pgfstartlinewidth=\pgflinewidth + \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}} + % external ellipse + \pgfscope + \pgfsetlinewidth{\ctikzvalof{bipoles/thickness}\pgflinewidth} + % clipping path: first a rectangle bigger then the shape + % to avoid problems with the line thickness + \pgfpathrectanglecorners{\pgfpoint{2\pgf@circ@res@left}{2\pgf@circ@res@down}} + {\pgfpoint{2\pgf@circ@res@right}{2\pgf@circ@res@up}} + % next the opening to the left + \pgfpathrectanglecorners{\pgfpoint{2\pgf@circ@res@left}{.1\pgf@circ@res@down}} + {\pgfpoint{0pt}{.1\pgf@circ@res@up}} + % do the difference and clip before drawing + \pgfseteorule + \pgfusepath{clip} + \pgfpathmoveto{\@plus} + \pgfpatharc{105}{435}{\pgf@circ@res@step and \pgf@circ@res@other} + \pgfusepath{draw} + \endpgfscope + % internal wire + \pgfsetlinewidth{\pgfstartlinewidth} + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}} + \pgfpathlineto{\pgfpoint{0.3\pgf@circ@res@right}{0pt}} + \pgfpathmoveto{\pgfpoint{0.5\pgf@circ@res@right}{0pt}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0pt}} + % and the contact line up + % I use ...left and ---right as temporal lengths here to avoid defining more + \pgfextractx{\pgf@circ@res@left}{\@plus} + \pgfextractx{\pgf@circ@res@right}{\@minus} + \pgfpathmoveto{\@plus} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}} + \pgfpathmoveto{\@minus} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}} + \pgfusepath{draw} + \endpgfscope +} + + +% end of pgfcircbipoles.tex +%%%---------- close: tex/pgfcircbipoles +%%%%%%%%%%% Springe nach tex/pgfcirctripoles +%%%---------- open: tex/pgfcirctripoles.tex +% Copyright 2007-2009 by Massimo Redaelli +% +% This file may be distributed and/or modified +% +% 1. under the LaTeX Project Public License and/or +% 2. under the GNU Public License. +% +% See the files gpl-3.0_license.txt and lppl-1-3c_license.txt for more details. + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Tripoles + +\pgfdeclareshape{spdt}{ + \savedanchor\northwest{% + \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/spdt/height}\pgf@circ@Rlen + \pgf@y=.5\pgf@y + \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/spdt/width}\pgf@circ@Rlen + \pgf@x=.5\pgf@x + } + \anchor{left}{% + \northwest + \pgf@y=0pt + } + \anchor{in}{ + \northwest + \pgf@y=0pt + } + \anchor{out 1}{ + \northwest + \pgf@x=-\pgf@x + } + \anchor{out 2}{ + \northwest + \pgf@x=-\pgf@x + \pgf@y=-\pgf@y + } + \anchor{center}{ + \pgf@y=0pt + \pgf@x=0pt + } + \anchor{east}{ + \northwest + \pgf@y=0pt + \pgf@x=-\pgf@x + } + \anchor{west}{ + \northwest + \pgf@y=0pt + } + \anchor{south}{ + \northwest + \pgf@x=0pt + \pgf@y=-\pgf@y + } + \anchor{north}{ + \northwest + \pgf@x=0pt + } + \anchor{south west}{ + \northwest + \pgf@y=-\pgf@y + } + \anchor{north east}{ + \northwest + \pgf@x=-\pgf@x + } + \anchor{north west}{ + \northwest + } + \anchor{south east}{ + \northwest + \pgf@x=-\pgf@x + \pgf@y=-\pgf@y + } + \backgroundpath{ + \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}} + + + \northwest + \pgf@circ@res@up = \pgf@y + \pgf@circ@res@down = -\pgf@y + \pgf@circ@res@right = -\pgf@x + \pgf@circ@res@left = \pgf@x + \pgf@circ@res@other = \pgfkeysvalueof{/tikz/circuitikz/tripoles/spdt/margin}\pgf@circ@res@left + + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@up}} + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@down}} + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{0pt}} + + \pgfusepath{draw} + + \pgfscope + \pgftransformshift{\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@up}} + \pgfnode{ocirc}{center}{}{spdt1}{\pgfusepath{stroke}} + \endpgfscope + \pgfscope + \pgftransformshift{\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@down}} + \pgfnode{ocirc}{center}{}{}{\pgfusepath{stroke}} + \endpgfscope + \pgfscope + \pgftransformshift{\pgfpoint{\pgf@circ@res@other}{0pt}} + \pgfnode{ocirc}{center}{}{spdt2}{\pgfusepath{stroke}} + \endpgfscope + + + \pgfscope + \pgfpathmoveto{\pgfpointshapeborder{spdt2}{\pgfpointorigin}} + \pgfpathlineto{ + \pgfpointadd{\pgfpointshapeborder{spdt1}{\pgfpoint{-\pgf@circ@res@other}{-100pt}}} + {\pgfpoint{-.05\pgf@circ@res@up}{-.05\pgf@circ@res@up}} + } + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/tripoles/thickness}\pgflinewidth} + \pgfusepath{draw} + \endpgfscope + } +} + + +% cute switch "node" shapes, matching with cute "to" shapes +% #1 -> name +% #2 -> barposition +% #3 -> arrowcode +\long\def\pgfcircdeclarecutespdt#1#2#3{ + \pgfdeclareshape{#1} + { + \savedanchor\northwest{% + \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/cuteswitch/height}\pgf@circ@Rlen + \pgf@y=.5\pgf@y + \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/spdt/width}\pgf@circ@Rlen + \pgf@x=.25\pgf@x + } + \savedanchor\midlever{ + % these values are calculated when we create the definition of the shape. + \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/cuteswitch/height}\pgf@circ@Rlen + \pgf@circ@res@temp=\pgfkeysvalueof{/tikz/circuitikz/nodes width}\pgf@circ@Rlen + \pgf@circ@res@temp=\ctikzvalof{bipoles/cuteswitch/thickness}\pgf@circ@res@temp + \pgf@circ@res@down = -.5\pgf@y + \pgf@circ@res@up = .5\pgf@y + \pgfextracty{\pgf@circ@res@other}{#2} + \pgf@x=0pt + \pgf@y=.5\pgf@circ@res@other + } + % radius of the connector + % This is the radius of the "ocirc" shape (see pgfcircshapes.tex) + \saveddimen{\radius}{\pgfmathsetlength\pgf@x{\pgf@circ@Rlen*\ctikzvalof{nodes width}}} + % shapename + \savedmacro{\thisshape}{\def\thisshape{\tikz@fig@name}} + % shape type + \savedmacro{\cshape}{\def\cshape{\ctikzvalof{bipoles/cuteswitch/shape}}} + % mid of the lever, to stack switches + \anchor{mid}{\midlever} + % center anchors + \anchor{cin}{ \northwest \pgf@y=0pt} + \anchor{cout 1}{ \northwest \pgf@x=-\pgf@x } + \anchor{cout 2}{ \northwest \pgf@x=-\pgf@x \pgf@y=-\pgf@y } + % horizontal angles + \anchor{in}{ \northwest \pgf@y=0pt\advance\pgf@x by -\radius} + \anchor{out 1}{ \northwest \pgf@x=-\pgf@x \advance\pgf@x by \radius} + \anchor{out 2}{ \northwest \pgf@x=-\pgf@x \advance\pgf@x by \radius \pgf@y=-\pgf@y } + + \anchor{center}{ \pgf@y=0pt \pgf@x=0pt } + \anchor{east}{ \northwest \pgf@y=0pt \pgf@x=-\pgf@x } + \anchor{west}{ \northwest \pgf@y=0pt } + \anchor{south}{ \northwest \pgf@x=0pt \pgf@y=-\pgf@y } + \anchor{north}{ \northwest \pgf@x=0pt } + \anchor{south west}{ \northwest \pgf@y=-\pgf@y } + \anchor{north east}{ \northwest \pgf@x=-\pgf@x } + \anchor{north west}{ \northwest } + \anchor{south east}{ \northwest \pgf@x=-\pgf@x \pgf@y=-\pgf@y } + + \backgroundpath{ + \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}} + \northwest + \pgf@circ@res@up = \pgf@y + \pgf@circ@res@down = -\pgf@y + \pgf@circ@res@right = -\pgf@x + \pgf@circ@res@left = \pgf@x + + \pgfscope + % This is the radius of the "ocirc" shape (see pgfcircshapes.tex) + \pgf@circ@res@temp=\radius\relax + \pgf@circ@res@temp=\ctikzvalof{bipoles/cuteswitch/thickness}\pgf@circ@res@temp + \pgfsetlinewidth{2\pgf@circ@res@temp} + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}} + \pgfpathlineto{#2} + \pgfsetroundcap\pgfusepath{draw} + \endpgfscope + \pgfscope % arrow + #3 + \endpgfscope + % terminals + \pgfscope + \pgftransformshift{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}} + \pgfnode{\cshape}{center}{}{\thisshape-out 1}{\pgfusepath{stroke}} + \endpgfscope + \pgfscope + \pgftransformshift{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}} + \pgfnode{\cshape}{center}{}{\thisshape-out 2}{\pgfusepath{stroke}} + \endpgfscope + \pgfscope + \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}} + \pgfnode{\cshape}{center}{}{\thisshape-in}{\pgfusepath{stroke}} + \endpgfscope + + } + } +} + +\pgfcircdeclarecutespdt{cute spdt up} +{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up-1.5\pgf@circ@res@temp}} +{} + +\pgfcircdeclarecutespdt{cute spdt mid} +{\pgfpoint{\pgf@circ@res@right}{0pt}} +{} + +\pgfcircdeclarecutespdt{cute spdt down} +{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down+1.5\pgf@circ@res@temp}} +{} + +\pgfcircdeclarecutespdt{cute spdt up arrow} +{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up-1.5\pgf@circ@res@temp}} +{ + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgflinewidth} + \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}} % in node + \pgfpathmoveto{\pgfpointpolar{70}{1.5\pgf@circ@res@right}} + \pgfpatharc{70}{-50}{1.5\pgf@circ@res@right} + \pgfsetarrowsend{latexslim} + \pgfusepath{draw} +} + +\pgfcircdeclarecutespdt{cute spdt mid arrow} +{\pgfpoint{\pgf@circ@res@right}{0pt}} +{ + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgflinewidth} + \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}} % in node + \pgfsetarrowsstart{latexslim} + \pgfpathmoveto{\pgfpointpolar{-60}{1.5\pgf@circ@res@right}} + \pgfpatharc{-60}{60}{1.5\pgf@circ@res@right} + \pgfsetarrowsend{latexslim} + \pgfusepath{draw} +} + +\pgfcircdeclarecutespdt{cute spdt down arrow} +{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down+1.5\pgf@circ@res@temp}} +{ + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgflinewidth} + \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}} % in node + \pgfpathmoveto{\pgfpointpolar{-50}{1.5\pgf@circ@res@right}} + \pgfpatharc{-50}{70}{1.5\pgf@circ@res@right} + \pgfsetarrowsend{latexslim} + \pgfusepath{draw} +} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% +%% Logic ports +%% +%% Code from John Kormylo at tex.stackexchange.com +%% See https://tex.stackexchange.com/questions/372993/is-it-possible-to-implement-multiple-input-logic-ports-with-circuitikz +%% Integration and fixes from Romano Giannetti and TheTeXnician <38565529+TheTeXnician@users.noreply.github.com> +%% + +\newcount\pgf@circ@res@count% reserve global register + +\def\pgf@circ@logicport@input#1% #1 = \pgfmathcounter +{% + \pgfextracty{\pgf@circ@res@up}{\northeast}% + \step + \pgf@circ@res@step=\dimexpr 2\pgf@y -2\pgf@circ@res@up\relax + \advance\pgf@y by -#1\pgf@circ@res@step\relax +}% + +% #1 = \pgfmathcounter #2=type #3 specificic port +% type is 1 for and,nand; 2 for or,nor; 3 for xor,xnor, 4 for european. +\def\pgf@circ@logicport@baseinput#1#2#3% +{% + % and and nand + \ifnum #2=1\relax + \pgfextracty{\pgf@circ@res@up}{\northeast}% + \pgfextractx{\pgf@circ@res@left}{\southwest}% + \step + \pgf@circ@res@step=\dimexpr 2\pgf@y -2\pgf@circ@res@up\relax + \advance\pgf@y by -#1\pgf@circ@res@step\relax + \pgf@x=\pgfkeysvalueof{/tikz/circuitikz/tripoles/american #3 port/port width}\pgf@circ@res@left + \fi + % or and nor + \ifnum #2=2\relax + \pgfextracty{\pgf@circ@res@up}{\northeast}% + \pgfextractx{\pgf@circ@res@left}{\southwest}% + \pgfextractx{\pgf@circ@res@right}{\northeast}% + \step + \pgf@circ@res@step=\dimexpr 2\pgf@y -2\pgf@circ@res@up\relax + \advance\pgf@y by -#1\pgf@circ@res@step\relax + \edef\pgf@circ@math@angle{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american #3 port/angle}}% + \pgf@circ@res@other=\pgfkeysvalueof{/tikz/circuitikz/tripoles/american #3 port/inner}\pgf@circ@res@right + \pgfmathsetlengthmacro{\pgf@circ@math@xradius}{\pgf@circ@res@other /(1 - cos(\pgf@circ@math@angle)}% + \pgfmathsetlengthmacro{\pgf@circ@math@yradius}{\pgf@circ@res@up /sin(\pgf@circ@math@angle)}% + \pgf@circ@res@other=\pgfkeysvalueof{/tikz/circuitikz/tripoles/american #3 port/port width}\pgf@circ@res@right + \pgfmathsetlengthmacro{\pgf@circ@math@xorigin}{\pgf@circ@res@other + \pgf@circ@math@xradius*cos(\pgf@circ@math@angle)}% + \pgf@circ@res@temp=\pgf@y + \pgfmathsetmacro{\pgf@circ@math@angle}{asin(\pgf@circ@res@temp/\pgf@circ@math@yradius)}% + \pgfmathsetlength{\pgf@circ@res@other}{\pgf@circ@math@xradius*cos(\pgf@circ@math@angle)-\pgf@circ@math@xorigin}% + \pgf@x=\pgf@circ@res@other + \fi + % xor and xnor + \ifnum #2=3\relax + \pgfextracty{\pgf@circ@res@up}{\northeast}% + \pgfextractx{\pgf@circ@res@left}{\southwest}% + \pgfextractx{\pgf@circ@res@right}{\northeast}% + \pgfkeysgetvalue{/tikz/circuitikz/tripoles/american #3 port/angle}{\pgf@circ@math@angle}% + \pgf@circ@res@other=\pgfkeysvalueof{/tikz/circuitikz/tripoles/american #3 port/inner}\pgf@circ@res@right + \pgfmathsetlengthmacro{\pgf@circ@math@xradius}{\pgf@circ@res@other /(1 - cos(\pgf@circ@math@angle)}% + \pgfmathsetlengthmacro{\pgf@circ@math@yradius}{\pgf@circ@res@up / sin(\pgf@circ@math@angle))}% + \pgf@circ@res@other=\pgfkeysvalueof{/tikz/circuitikz/tripoles/american #3 port/port width}\pgf@circ@res@right + \pgfmathsetlengthmacro{\pgf@circ@math@xorigin}{\pgf@circ@res@other + \pgf@circ@math@xradius*cos(\pgf@circ@math@angle)}% + \pgf@circ@res@temp=\pgfkeysvalueof{/tikz/circuitikz/tripoles/american #3 port/distance}\pgf@circ@res@right + \pgfmathsetlengthmacro{\pgf@circ@math@distance}{\pgf@circ@res@temp} + % this compensates for the effect of the line width on the gap between the arcs + \pgfmathsetlengthmacro{\pgf@circ@math@yradiusA}{\pgf@circ@math@yradius -2\pgflinewidth}% + \pgfmathsetlengthmacro{\pgf@circ@math@xradiusA}{\pgf@circ@math@xradius -2\pgflinewidth}% + + \step + \pgf@circ@res@step=\dimexpr 2\pgf@y -2\pgf@circ@res@up\relax + \advance\pgf@y by -#1\pgf@circ@res@step\relax + \pgf@circ@res@temp=\pgf@y + \pgfmathsetmacro{\pgf@circ@math@angle}{asin(\pgf@circ@res@temp / \pgf@circ@math@yradiusA)}% + \pgfmathsetlength{\pgf@circ@res@other}{\pgf@circ@math@xradiusA*cos(\pgf@circ@math@angle)-\pgf@circ@math@xorigin}% + \advance\pgf@circ@res@other by -\pgf@circ@math@distance + \pgf@x=\pgf@circ@res@other + \fi + % european + \ifnum #2=4\relax + \pgfextracty{\pgf@circ@res@up}{\northeast}% + \pgfextractx{\pgf@circ@res@other}{\left}% + \step + \pgf@circ@res@step=\dimexpr 2\pgf@y -2\pgf@circ@res@up\relax + \advance\pgf@y by -#1\pgf@circ@res@step\relax + \pgf@x=\pgf@circ@res@other + \fi +}% + +%%% american +\long\def\pgfcircdeclarelogicport#1#2#3{% + \pgfdeclareshape{american #1 port}% + {% + \savedmacro\resize{% automatic + \pgf@circ@res@up = \pgfkeysvalueof{/tikz/circuitikz/tripoles/american #1 port/height}\pgf@circ@Rlen + \pgf@circ@res@up = .5\pgf@circ@res@up + \pgf@circ@res@down = -\pgf@circ@res@up + \pgf@circ@res@right = \pgfkeysvalueof{/tikz/circuitikz/tripoles/american #1 port/width}\pgf@circ@Rlen + \pgf@circ@res@right = .5\pgf@circ@res@right + \pgf@circ@res@left = -\pgf@circ@res@right + }% + \savedmacro\inputs{% get number of inputs + \pgf@circ@res@count=\pgfkeysvalueof{/tikz/number inputs}\relax% + \ifnum\pgf@circ@res@count=0 + \pgf@circ@res@count=\pgfkeysvalueof{/tikz/circuitikz/tripoles/american #1 port/inputs}\relax% + \fi + \ifnum\pgf@circ@res@count<2 \pgf@circ@res@count=2\fi + \ifnum\pgf@circ@res@count>16 \pgf@circ@res@count=16\fi + \def\inputs{\the\pgf@circ@res@count}% + }% + \savedanchor\step{% 1/2 gap at edges + \pgf@circ@res@step = \pgfkeysvalueof{/tikz/circuitikz/tripoles/american #1 port/height}\pgf@circ@Rlen + \divide\pgf@circ@res@step by \pgf@circ@res@count + \pgfpoint{\pgf@circ@res@left}{\dimexpr\pgf@circ@res@up+0.5\pgf@circ@res@step}% + }% + \savedanchor\northeast{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}} + \savedanchor\southwest{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}} + \savedanchor\left{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american #1 port/port width}\pgf@circ@res@left}{0pt}} + \savedanchor\right{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american #1 port/port width}\pgf@circ@res@right}{0pt}} + \savedanchor\origin{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american #1 port/origin}\pgf@circ@res@right}{0pt}} + + \anchor{center}{\origin}% for backwards compatibility + \anchor{text}{\pgfpoint{-.5\wd\pgfnodeparttextbox}{\dimexpr.5\dp\pgfnodeparttextbox-.5\ht\pgfnodeparttextbox}} + + % create input anchors + \expandafter\pgfutil@g@addto@macro\csname pgf@sh@s@american #1 port\endcsname{% + \pgfmathloop% + \ifnum\pgfmathcounter>\pgf@circ@res@count% + \else% + %\pgfutil@ifundefined{pgf@anchor@american #1 port@in \pgfmathcounter}{% + \expandafter\xdef\csname pgf@anchor@american #1 port@in \pgfmathcounter\endcsname{% + \noexpand\pgf@circ@logicport@input{\pgfmathcounter}% defined above + }% + \expandafter\xdef\csname pgf@anchor@american #1 port@bin \pgfmathcounter\endcsname{% + \noexpand\pgf@circ@logicport@baseinput{\pgfmathcounter}{#2}{#1}% defined above + }% + %}{}% + \repeatpgfmathloop% + } + + \anchor{out}{\northeast\pgf@y=0pt} + \anchor{bout}{\right\pgf@y=0pt} + + + \anchor{left}{\left}% edges of component mius leads + \anchor{right}{\right} + + \anchor{north east}{\northeast}% see \Compass macro + \anchor{south west}{\southwest} + \anchor{north}{\pgfextracty{\pgf@circ@res@up}{\northeast}% + \pgfpoint{0cm}{\pgf@circ@res@up}} + \anchor{north west}{\pgfextracty{\pgf@circ@res@up}{\northeast}% + \pgfextractx{\pgf@circ@res@left}{\southwest}% + \pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}} + \anchor{west}{\pgfextractx{\pgf@circ@res@left}{\southwest}% + \pgfpoint{\pgf@circ@res@left}{0cm}} + \anchor{south}{\pgfextracty{\pgf@circ@res@down}{\southwest}% + \pgfpoint{0cm}{\pgf@circ@res@down}} + \anchor{south east}{\pgfextracty{\pgf@circ@res@down}{\southwest}% + \pgfextractx{\pgf@circ@res@right}{\northeast}% + \pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}} + \anchor{east}{\pgfextractx{\pgf@circ@res@right}{\northeast}% + \pgfpoint{\pgf@circ@res@right}{0cm}} + + \backgroundpath{ + \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}} + #3 + } +} +} +%%% american and %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\pgfcircdeclarelogicport{and}{1}{ + \pgfextracty{\pgf@circ@res@temp}{\step}% + \pgf@circ@res@step = \dimexpr 2\pgf@circ@res@temp -2\pgf@circ@res@up\relax + \pgf@circ@res@count = \inputs\relax + \loop\ifnum\pgf@circ@res@count>0 + \advance\pgf@circ@res@temp by -\pgf@circ@res@step + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@temp}}% + \pgfpathlineto{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/port width}\pgf@circ@res@left} + {\pgf@circ@res@temp}} + \advance\pgf@circ@res@count by -1 + \repeat + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}} + \pgfpathlineto{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/port width}\pgf@circ@res@right} + {0pt}} + + \pgfusepath{draw} + + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/tripoles/thickness}\pgflinewidth} + \pgf@circ@res@other=\pgfkeysvalueof{/tikz/circuitikz/tripoles/american and port/port width}\pgf@circ@res@left + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@down}} + \pgfpatharc{-90}{90}{-2\pgf@circ@res@other and \pgf@circ@res@up} + \pgfpathclose + \pgf@circ@draworfill + } +%%% american nand %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + \pgfcircdeclarelogicport{nand}{1}{ + \pgfextracty{\pgf@circ@res@temp}{\step}% + \pgf@circ@res@step = \dimexpr 2\pgf@circ@res@temp -2\pgf@circ@res@up\relax + \pgf@circ@res@count = \inputs\relax + \loop\ifnum\pgf@circ@res@count>0 + \advance\pgf@circ@res@temp by -\pgf@circ@res@step + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@temp}}% + \pgfpathlineto{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/port width}\pgf@circ@res@left} + {\pgf@circ@res@temp}} + \advance\pgf@circ@res@count by -1 + \repeat + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}} + \pgfpathlineto{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/port width}\pgf@circ@res@right} {0pt}} + + \pgfusepath{draw} + + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/tripoles/thickness}\pgflinewidth} + \pgf@circ@res@step = \pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/circle width}\pgf@circ@res@right + \pgf@circ@res@other = \pgfkeysvalueof{/tikz/circuitikz/tripoles/american nand port/port width}\pgf@circ@res@right + \pgf@circ@res@temp = \dimexpr 2\pgf@circ@res@other - \pgf@circ@res@step\relax + + \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@down}} + \pgfpatharc{-90}{90}{\pgf@circ@res@temp and \pgf@circ@res@up} + \pgfpathclose + + \pgfpathellipse + {\pgfpoint{\pgf@circ@res@other-.5\pgf@circ@res@step}{0pt}} + {\pgfpoint{.5\pgf@circ@res@step}{0pt}} + {\pgfpoint{0pt}{.5\pgf@circ@res@step}} + + \pgf@circ@draworfill +} +%%% american nor %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\pgfcircdeclarelogicport{nor}{2}{ + \edef\pgf@circ@math@angle{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/angle}}% + \pgf@circ@res@other=\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/inner}\pgf@circ@res@right + \pgfmathsetlengthmacro{\pgf@circ@math@xradius}{\pgf@circ@res@other /(1 - cos(\pgf@circ@math@angle)}% + \pgfmathsetlengthmacro{\pgf@circ@math@yradius}{\pgf@circ@res@up /sin(\pgf@circ@math@angle)}% + \pgf@circ@res@other=\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/port width}\pgf@circ@res@right + \pgfmathsetlengthmacro{\pgf@circ@math@xorigin}{\pgf@circ@res@other + \pgf@circ@math@xradius*cos(\pgf@circ@math@angle)}% + + \pgfextracty{\pgf@circ@res@temp}{\step}% + \pgf@circ@res@step = \dimexpr 2\pgf@circ@res@temp -2\pgf@circ@res@up\relax + \pgf@circ@res@count = \inputs\relax + \loop\ifnum\pgf@circ@res@count>0 + \advance\pgf@circ@res@temp by -\pgf@circ@res@step + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@temp}}% + \pgfmathsetmacro{\pgf@circ@math@angle}{asin(\pgf@circ@res@temp/\pgf@circ@math@yradius)}% + \pgfmathsetlength{\pgf@circ@res@other}{\pgf@circ@math@xradius*cos(\pgf@circ@math@angle)-\pgf@circ@math@xorigin}% + \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@temp}}% + \advance\pgf@circ@res@count by -1 + \repeat + + \pgf@circ@res@other=\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/port width}\pgf@circ@res@right + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{0pt}} + + \pgfusepath{draw} + + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/tripoles/thickness}\pgflinewidth} + + \edef\pgf@circ@math@angle{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/angle}}% + \pgf@circ@res@step = \pgfkeysvalueof{/tikz/circuitikz/tripoles/american nor port/circle width}\pgf@circ@res@right + \pgf@circ@res@temp = \dimexpr 2\pgf@circ@res@other - \pgf@circ@res@step\relax + \advance\pgf@circ@res@other by -\pgf@circ@res@step + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@other}{0pt}}% for symmetry + \pgfpatharc{0}{90}{\pgf@circ@res@temp and \pgf@circ@res@up}% + \pgfpatharc{\pgf@circ@math@angle}{-\pgf@circ@math@angle}{\pgf@circ@math@xradius and \pgf@circ@math@yradius}% + \pgfpatharc{-90}{0}{\pgf@circ@res@temp and \pgf@circ@res@up}% + \pgfpathclose + + \pgfpathellipse + {\pgfpoint{\pgf@circ@res@other+.5\pgf@circ@res@step}{0pt}} + {\pgfpoint{.5\pgf@circ@res@step}{0pt}} + {\pgfpoint{0pt}{.5\pgf@circ@res@step}} + + \pgf@circ@draworfill +} +%%% american or %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\pgfcircdeclarelogicport{or}{2}{ + \edef\pgf@circ@math@angle{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/angle}}% + \pgf@circ@res@other=\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/inner}\pgf@circ@res@right + \pgfmathsetlengthmacro{\pgf@circ@math@xradius}{\pgf@circ@res@other /(1 - cos(\pgf@circ@math@angle)}% + \pgfmathsetlengthmacro{\pgf@circ@math@yradius}{\pgf@circ@res@up /sin(\pgf@circ@math@angle)}% + \pgf@circ@res@other=\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/port width}\pgf@circ@res@right + \pgfmathsetlengthmacro{\pgf@circ@math@xorigin}{\pgf@circ@res@other + \pgf@circ@math@xradius*cos(\pgf@circ@math@angle)}% + + \pgfextracty{\pgf@circ@res@temp}{\step}% + \pgf@circ@res@step = \dimexpr 2\pgf@circ@res@temp -2\pgf@circ@res@up\relax + \pgf@circ@res@count = \inputs\relax + \loop\ifnum\pgf@circ@res@count>0 + \advance\pgf@circ@res@temp by -\pgf@circ@res@step + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@temp}}% + \pgfmathsetmacro{\pgf@circ@math@angle}{asin(\pgf@circ@res@temp/\pgf@circ@math@yradius)}% + \pgfmathsetlength{\pgf@circ@res@other}{\pgf@circ@math@xradius*cos(\pgf@circ@math@angle)-\pgf@circ@math@xorigin}% + \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@temp}}% + \advance\pgf@circ@res@count by -1 + \repeat + + \pgf@circ@res@other=\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/port width}\pgf@circ@res@right + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{0pt}} + + \pgfusepath{draw} + + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/tripoles/thickness}\pgflinewidth} + + \edef\pgf@circ@math@angle{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/angle}}% + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@other}{0pt}}% for symmetry + \pgfpatharc{0}{90}{2\pgf@circ@res@other and \pgf@circ@res@up}% + \pgfpatharc{\pgf@circ@math@angle}{-\pgf@circ@math@angle}{\pgf@circ@math@xradius and \pgf@circ@math@yradius}% + \pgfpatharc{-90}{0}{2\pgf@circ@res@other and \pgf@circ@res@up}% + \pgfpathclose + + \pgf@circ@draworfill +} +%%% american xor %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\pgfcircdeclarelogicport{xor}{3}{ + \pgfkeysgetvalue{/tikz/circuitikz/tripoles/american xor port/angle}{\pgf@circ@math@angle}% + \pgf@circ@res@other=\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/inner}\pgf@circ@res@right + \pgfmathsetlengthmacro{\pgf@circ@math@xradius}{\pgf@circ@res@other /(1 - cos(\pgf@circ@math@angle)}% + \pgfmathsetlengthmacro{\pgf@circ@math@yradius}{\pgf@circ@res@up / sin(\pgf@circ@math@angle))}% + \pgf@circ@res@other=\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/port width}\pgf@circ@res@right + \pgfmathsetlengthmacro{\pgf@circ@math@xorigin}{\pgf@circ@res@other + \pgf@circ@math@xradius*cos(\pgf@circ@math@angle)}% + \pgf@circ@res@temp=\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/distance}\pgf@circ@res@right + \pgfmathsetlengthmacro{\pgf@circ@math@distance}{\pgf@circ@res@temp} + % this compensates for the effect of the line width on the gap between the arcs + \pgfmathsetlengthmacro{\pgf@circ@math@yradiusA}{\pgf@circ@math@yradius -2\pgflinewidth}% + \pgfmathsetlengthmacro{\pgf@circ@math@xradiusA}{\pgf@circ@math@xradius -2\pgflinewidth}% + + \pgfextracty{\pgf@circ@res@temp}{\step}% + \pgf@circ@res@step = \dimexpr 2\pgf@circ@res@temp -2\pgf@circ@res@up\relax + \pgf@circ@res@count = \inputs\relax + \loop\ifnum\pgf@circ@res@count>0 + \advance\pgf@circ@res@temp by -\pgf@circ@res@step + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@temp}}% + \pgfmathsetmacro{\pgf@circ@math@angle}{asin(\pgf@circ@res@temp / \pgf@circ@math@yradiusA)}% + \pgfmathsetlength{\pgf@circ@res@other}{\pgf@circ@math@xradiusA*cos(\pgf@circ@math@angle)-\pgf@circ@math@xorigin}% + \advance\pgf@circ@res@other by -\pgf@circ@math@distance + \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@temp}}% + \advance\pgf@circ@res@count by -1 + \repeat + + \pgf@circ@res@other=\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/port width}\pgf@circ@res@right + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{0pt}} + + \pgfusepath{draw} + + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/tripoles/thickness}\pgflinewidth} + + \edef\pgf@circ@math@angle{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/angle}}% + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@other}{0pt}}% for symmetry + \pgfpatharc{0}{90}{2\pgf@circ@res@other and \pgf@circ@res@up}% + \pgfpatharc{\pgf@circ@math@angle}{-\pgf@circ@math@angle}{\pgf@circ@math@xradius and \pgf@circ@math@yradius}% + \pgfpatharc{-90}{0}{2\pgf@circ@res@other and \pgf@circ@res@up}% + \pgfpathclose + \pgf@circ@draworfill + + \pgfmathsetlength{\pgf@circ@res@temp}{(\pgf@circ@math@yradiusA)*sin(\pgf@circ@math@angle)}% + + \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@other-\pgf@circ@math@distance}{\pgf@circ@res@temp}}% first arc + \pgfpatharc{\pgf@circ@math@angle}{-\pgf@circ@math@angle}{\pgf@circ@math@xradiusA and \pgf@circ@math@yradiusA}% + + \pgfusepath{draw} +} +%%% american xnor %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\pgfcircdeclarelogicport{xnor}{3}{ + \pgfkeysgetvalue{/tikz/circuitikz/tripoles/american xnor port/angle}{\pgf@circ@math@angle}% + \pgf@circ@res@other=\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/inner}\pgf@circ@res@right + \pgfmathsetlengthmacro{\pgf@circ@math@xradius}{\pgf@circ@res@other /(1 - cos(\pgf@circ@math@angle)}% + \pgfmathsetlengthmacro{\pgf@circ@math@yradius}{\pgf@circ@res@up / sin(\pgf@circ@math@angle))}% + \pgf@circ@res@other=\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/port width}\pgf@circ@res@right + \pgfmathsetlengthmacro{\pgf@circ@math@xorigin}{\pgf@circ@res@other + \pgf@circ@math@xradius*cos(\pgf@circ@math@angle)}% + \pgf@circ@res@temp=\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xor port/distance}\pgf@circ@res@right + \pgfmathsetlengthmacro{\pgf@circ@math@distance}{\pgf@circ@res@temp} + % this compensates for the effect of the line width on the gap between the arcs + \pgfmathsetlengthmacro{\pgf@circ@math@yradiusA}{\pgf@circ@math@yradius -2\pgflinewidth}% + \pgfmathsetlengthmacro{\pgf@circ@math@xradiusA}{\pgf@circ@math@xradius -2\pgflinewidth}% + + \pgfextracty{\pgf@circ@res@temp}{\step}% + \pgf@circ@res@step = \dimexpr 2\pgf@circ@res@temp -2\pgf@circ@res@up\relax + \pgf@circ@res@count = \inputs\relax + \loop\ifnum\pgf@circ@res@count>0 + \advance\pgf@circ@res@temp by -\pgf@circ@res@step + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@temp}}% + \pgfmathsetmacro{\pgf@circ@math@angle}{asin(\pgf@circ@res@temp / \pgf@circ@math@yradiusA)}% + \pgfmathsetlength{\pgf@circ@res@other}{\pgf@circ@math@xradiusA*cos(\pgf@circ@math@angle)-\pgf@circ@math@xorigin}% + \advance\pgf@circ@res@other by -\pgf@circ@math@distance + \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@temp}}% + \advance\pgf@circ@res@count by -1 + \repeat + + \pgf@circ@res@other=\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/port width}\pgf@circ@res@right + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{0pt}} + + \pgfusepath{draw} + + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/tripoles/thickness}\pgflinewidth} + + \edef\pgf@circ@math@angle{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/angle}}% + \pgf@circ@res@step = \pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/circle width}\pgf@circ@res@right + \pgf@circ@res@temp = \dimexpr 2\pgf@circ@res@other - \pgf@circ@res@step\relax + \advance\pgf@circ@res@other by -\pgf@circ@res@step + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@other}{0pt}}% for symmetry + \pgfpatharc{0}{90}{\pgf@circ@res@temp and \pgf@circ@res@up}% + \pgfpatharc{\pgf@circ@math@angle}{-\pgf@circ@math@angle}{\pgf@circ@math@xradius and \pgf@circ@math@yradius}% + \pgfpatharc{-90}{0}{\pgf@circ@res@temp and \pgf@circ@res@up}% + \pgfpathclose + + \pgfpathellipse + {\pgfpoint{\pgf@circ@res@other+.5\pgf@circ@res@step}{0pt}} + {\pgfpoint{.5\pgf@circ@res@step}{0pt}} + {\pgfpoint{0pt}{.5\pgf@circ@res@step}} + \pgf@circ@draworfill + + \pgf@circ@res@other=\pgfkeysvalueof{/tikz/circuitikz/tripoles/american xnor port/port width}\pgf@circ@res@left + \pgfmathsetlength{\pgf@circ@res@temp}{(\pgf@circ@math@yradiusA)*sin(\pgf@circ@math@angle)}% + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@other-\pgf@circ@math@distance}{\pgf@circ@res@temp}}% first arc + \pgfpatharc{\pgf@circ@math@angle}{-\pgf@circ@math@angle}{\pgf@circ@math@xradiusA and \pgf@circ@math@yradiusA}% + + \pgfusepath{draw} +} + +%%% Original one-input ports + +\pgfdeclareshape{american not port}{ + \anchor{center}{\pgfpointorigin} + \savedanchor\northwest{% + \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/not port/height}\pgf@circ@Rlen + \pgf@y=.5\pgf@y + \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/bipoles/not port/width}\pgf@circ@Rlen + \pgf@x=.5\pgf@x + } + \savedanchor\left{% + \pgf@y=0pt + } + \anchor{in}{ + \northwest + \pgf@y=0pt + } + \anchor{out}{ + \northwest + \pgf@y=0pt + \pgf@x=-\pgf@x + } + \anchor{center}{ + \pgfpointorigin + } + \anchor{east}{ + \left + \pgf@x=-.8\pgf@x + } + \anchor{west}{ + \left + } + \anchor{south}{ + \northwest + \pgf@x=0pt + \pgf@y=-\pgf@y + } + \anchor{north}{ + \northwest + \pgf@x=0pt + } + \anchor{south west}{ + \northwest + \pgf@y=-\pgf@y + } + \anchor{north east}{ + \northwest + \pgf@x=-\pgf@x + } + \anchor{north west}{ + \northwest + } + \anchor{south east}{ + \northwest + \pgf@x=-\pgf@x + \pgf@y=-\pgf@y + } + \backgroundpath{ + \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}} + + + \northwest + \pgf@circ@res@up = \pgf@y + \pgf@circ@res@down = -\pgf@y + \pgf@circ@res@right = -\pgf@x + \pgf@circ@res@left = \pgf@x + + \pgf@circ@res@other = \pgfkeysvalueof{/tikz/circuitikz/bipoles/not port/circle width}\pgf@circ@res@right + + \pgfscope + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/tripoles/thickness}\pgflinewidth} + \pgftransformxshift{.7\pgf@circ@res@left} + \pgf@circ@res@step=\pgf@circ@res@right + \advance\pgf@circ@res@step by -\pgf@circ@res@left + \pgf@circ@res@step=.7\pgf@circ@res@step + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step-\pgf@circ@res@other}{0pt}} + \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@step-\pgf@circ@res@other}{0pt}} + \pgf@circ@draworfill + \pgfpathellipse + {\pgfpoint{\pgf@circ@res@step-.5\pgf@circ@res@other}{0pt}} + {\pgfpoint{.5\pgf@circ@res@other}{0pt}} + {\pgfpoint{0pt}{.5\pgf@circ@res@other}} + \pgf@circ@draworfill + \endpgfscope + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}} + \pgfpathlineto{\pgfpoint{.7\pgf@circ@res@left}{0pt}} + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}} + \pgfpathlineto{\pgfpoint{.7\pgf@circ@res@right}{0pt}} + + \pgfusepath{draw} + + } +} + +\pgfdeclareshape{invschmitt}{ + \anchor{center}{\pgfpointorigin} + \savedanchor\northwest{% + \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/not port/height}\pgf@circ@Rlen + \pgf@y=.5\pgf@y + \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/bipoles/not port/width}\pgf@circ@Rlen + \pgf@x=.5\pgf@x + } + \savedanchor\left{% + \pgf@y=0pt + } + \anchor{in}{ + \northwest + \pgf@y=0pt + } + \anchor{out}{ + \northwest + \pgf@y=0pt + \pgf@x=-\pgf@x + } + \anchor{center}{ + \pgfpointorigin + } + \anchor{east}{ + \left + \pgf@x=-.8\pgf@x + } + \anchor{west}{ + \left + } + \anchor{south}{ + \northwest + \pgf@x=0pt + \pgf@y=-\pgf@y + } + \anchor{north}{ + \northwest + \pgf@x=0pt + } + \anchor{south west}{ + \northwest + \pgf@y=-\pgf@y + } + \anchor{north east}{ + \northwest + \pgf@x=-\pgf@x + } + \anchor{north west}{ + \northwest + } + \anchor{south east}{ + \northwest + \pgf@x=-\pgf@x + \pgf@y=-\pgf@y + } + \backgroundpath{ + \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}} + + \northwest + \pgf@circ@res@up = \pgf@y + \pgf@circ@res@down = -\pgf@y + \pgf@circ@res@right = -\pgf@x + \pgf@circ@res@left = \pgf@x + + \pgf@circ@res@other = \pgfkeysvalueof{/tikz/circuitikz/bipoles/not port/circle width}\pgf@circ@res@right + + \pgfscope + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/tripoles/thickness}\pgflinewidth} + \pgftransformxshift{.7\pgf@circ@res@left} + \pgf@circ@res@step=\pgf@circ@res@right + \advance\pgf@circ@res@step by -\pgf@circ@res@left + \pgf@circ@res@step=.7\pgf@circ@res@step + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step-\pgf@circ@res@other}{0pt}} + \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}} + \pgfpathclose + \pgf@circ@draworfill + \pgfpathellipse + {\pgfpoint{\pgf@circ@res@step-.5\pgf@circ@res@other}{0pt}} + {\pgfpoint{.5\pgf@circ@res@other}{0pt}} + {\pgfpoint{0pt}{.5\pgf@circ@res@other}} + \pgf@circ@draworfill + \endpgfscope + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}} + \pgfpathlineto{\pgfpoint{.7\pgf@circ@res@left}{0pt}} + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}} + \pgfpathlineto{\pgfpoint{.7\pgf@circ@res@right}{0pt}} + \pgfusepath{draw} + %draw inner shape + + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/tripoles/thickness}\pgflinewidth} + + \pgfpathmoveto{\pgfpoint{.6\pgf@circ@res@left}{.3\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@left}{.3\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@left}{.3\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{.05\pgf@circ@res@left}{.3\pgf@circ@res@up}} + \pgfpathmoveto{\pgfpoint{.4\pgf@circ@res@left}{.3\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{.25\pgf@circ@res@left}{.3\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{.25\pgf@circ@res@left}{.3\pgf@circ@res@up}} + \pgfusepath{draw} + + } +} + +\pgfdeclareshape{schmitt}{ + \anchor{center}{\pgfpointorigin} + \savedanchor\northwest{% + \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/not port/height}\pgf@circ@Rlen + \pgf@y=.5\pgf@y + \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/bipoles/not port/width}\pgf@circ@Rlen + \pgf@x=.5\pgf@x + } + \savedanchor\left{% + \pgf@y=0pt + } + \anchor{in}{ + \northwest + \pgf@y=0pt + } + \anchor{out}{ + \northwest + \pgf@y=0pt + \pgf@x=-\pgf@x + } + \anchor{center}{ + \pgfpointorigin + } + \anchor{east}{ + \left + \pgf@x=-.8\pgf@x + } + \anchor{west}{ + \left + } + \anchor{south}{ + \northwest + \pgf@x=0pt + \pgf@y=-\pgf@y + } + \anchor{north}{ + \northwest + \pgf@x=0pt + } + \anchor{south west}{ + \northwest + \pgf@y=-\pgf@y + } + \anchor{north east}{ + \northwest + \pgf@x=-\pgf@x + } + \anchor{north west}{ + \northwest + } + \anchor{south east}{ + \northwest + \pgf@x=-\pgf@x + \pgf@y=-\pgf@y + } + \backgroundpath{ + \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}} + + + \northwest + \pgf@circ@res@up = \pgf@y + \pgf@circ@res@down = -\pgf@y + \pgf@circ@res@right = -\pgf@x + \pgf@circ@res@left = \pgf@x + + \pgf@circ@res@other = \pgfkeysvalueof{/tikz/circuitikz/bipoles/not port/circle width}\pgf@circ@res@right + + \pgfscope + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/tripoles/thickness}\pgflinewidth} + \pgftransformxshift{.7\pgf@circ@res@left} + \pgf@circ@res@step=\pgf@circ@res@right + \advance\pgf@circ@res@step by -\pgf@circ@res@left + \pgf@circ@res@step=.7\pgf@circ@res@step + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step-\pgf@circ@res@other}{0pt}} + \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}} + \pgfpathclose + \pgf@circ@draworfill + \endpgfscope + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}} + \pgfpathlineto{\pgfpoint{.7\pgf@circ@res@left}{0pt}} + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}} + \pgfpathlineto{\pgfpoint{.7\pgf@circ@res@right-\pgf@circ@res@other}{0pt}} + \pgfusepath{draw} + %draw inner shape + + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/tripoles/thickness}\pgflinewidth} + + \pgfpathmoveto{\pgfpoint{.6\pgf@circ@res@left}{.3\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@left}{.3\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@left}{.3\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{.05\pgf@circ@res@left}{.3\pgf@circ@res@up}} + \pgfpathmoveto{\pgfpoint{.4\pgf@circ@res@left}{.3\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{.25\pgf@circ@res@left}{.3\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{.25\pgf@circ@res@left}{.3\pgf@circ@res@up}} + \pgfusepath{draw} + + } +} + + +%%% start european logic ports, from John Kormylo +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% + +% #1 - name +% #2 - text inside +% #3 - number of inputs +% #4 = is it a not? + +\long\def\pgfcircdeclareeurologicport#1#2#3#4{ + \pgfdeclareshape{european #1 port} + { + \savedmacro\resize{% automatic + \pgf@circ@res@up = \pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/height}\pgf@circ@Rlen + \pgf@circ@res@up = .5\pgf@circ@res@up + \pgf@circ@res@down = -\pgf@circ@res@up + \pgf@circ@res@right = \pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/width}\pgf@circ@Rlen + \pgf@circ@res@right = .5\pgf@circ@res@right + \pgf@circ@res@left = -\pgf@circ@res@right + }% + \savedmacro\inputs{% get number of inputs + \pgf@circ@res@count=\pgfkeysvalueof{/tikz/number inputs}\relax% + \ifnum\pgf@circ@res@count=0 + \pgf@circ@res@count=\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/inputs}\relax% + \fi + \ifnum\pgf@circ@res@count<2 \pgf@circ@res@count=2\fi + \ifnum\pgf@circ@res@count>16 \pgf@circ@res@count=16\fi + \def\inputs{\the\pgf@circ@res@count}% + }% + \savedanchor\step{% 1/2 gap at edges + \pgf@circ@res@step = \pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/height}\pgf@circ@Rlen + \divide\pgf@circ@res@step by #3 + \pgfpoint{\pgf@circ@res@left}{\dimexpr\pgf@circ@res@up+0.5\pgf@circ@res@step}% + }% + \savedanchor\northeast{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}% + \savedanchor\southwest{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}% + \savedanchor\left{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/reserved}\pgf@circ@res@left}{0pt}}% + \savedanchor\right{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/reserved}\pgf@circ@res@right}{0pt}}% + \savedanchor\origin{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/origin}\pgf@circ@res@right}{0pt}}% + + \anchor{center}{\origin}% for backwards compatibility + % the text anchor overlaps the logic symbol + \anchor{text}{\pgfpoint{-.5\wd\pgfnodeparttextbox}{\dimexpr.5\dp\pgfnodeparttextbox-.5\ht\pgfnodeparttextbox}}% + % create input anchors + \ifnum#3=1\relax + \anchor{in}{\pgfpoint{\pgf@circ@res@left}{0pt}}% or \step + \else + \expandafter\pgfutil@g@addto@macro\csname pgf@sh@s@european #1 port\endcsname{% + \pgfmathloop% + \ifnum\pgfmathcounter>#3% + \else% + %\pgfutil@ifundefined{pgf@anchor@european #1 port@in \pgfmathcounter}{% redundant + \expandafter\xdef\csname pgf@anchor@european #1 port@in \pgfmathcounter\endcsname{% + \noexpand\pgf@circ@logicport@input{\pgfmathcounter}% defined above + }% + \expandafter\xdef\csname pgf@anchor@european #1 port@bin \pgfmathcounter\endcsname{% + \noexpand\pgf@circ@logicport@baseinput{\pgfmathcounter}{4}{#1}% defined above + }% + %}{}% + \repeatpgfmathloop% + } + \fi + \anchor{out}{\northeast\pgf@y=0pt} + \anchor{bout}{\right\pgf@y=0pt} + + \anchor{left}{\left}% edges of component minus leads + \anchor{right}{\right} + + \anchor{north east}{\northeast}% see \Compass macro + \anchor{south west}{\southwest} + \anchor{north}{\pgfextracty{\pgf@circ@res@up}{\northeast}% + \pgfpoint{0cm}{\pgf@circ@res@up}} + \anchor{north west}{\pgfextracty{\pgf@circ@res@up}{\northeast}% + \pgfextractx{\pgf@circ@res@left}{\southwest}% + \pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}} + \anchor{west}{\pgfextractx{\pgf@circ@res@left}{\southwest}% + \pgfpoint{\pgf@circ@res@left}{0cm}} + \anchor{south}{\pgfextracty{\pgf@circ@res@down}{\southwest}% + \pgfpoint{0cm}{\pgf@circ@res@down}} + \anchor{south east}{\pgfextracty{\pgf@circ@res@down}{\southwest}% + \pgfextractx{\pgf@circ@res@right}{\northeast}% + \pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}} + \anchor{east}{\pgfextractx{\pgf@circ@res@right}{\northeast}% + \pgfpoint{\pgf@circ@res@right}{0cm}} + + \backgroundpath{ + \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}} + \pgfscope + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/tripoles/thickness}\pgflinewidth} + \pgfpathrectanglecorners + {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/reserved}\pgf@circ@res@left}{\pgf@circ@res@up}} + {\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/reserved}\pgf@circ@res@right}{\pgf@circ@res@down}} + \pgf@circ@draworfill + \endpgfscope + \ifnum#3=1\relax + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}}% + \pgfpathlineto{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/reserved}\pgf@circ@res@left}{0pt}}% + \else + \pgfextracty{\pgf@circ@res@temp}{\step}% + \pgf@circ@res@step = \dimexpr 2\pgf@circ@res@temp -2\pgf@circ@res@up\relax + %\pgf@circ@res@count = #3\relax% redundant + \loop\ifnum\pgf@circ@res@count>0 + \advance\pgf@circ@res@temp by -\pgf@circ@res@step + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@temp}}% + \pgfpathlineto{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/reserved}\pgf@circ@res@left} + {\pgf@circ@res@temp}} + \advance\pgf@circ@res@count by -1 + \repeat + \fi + % + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}} + \pgfpathlineto{% + \pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/reserved}\pgf@circ@res@right}{0pt}} + % + \edef\pgf@temp{not} + \edef\pgf@circ@temp{#4} + \ifx\pgf@temp\pgf@circ@temp % is a not + \pgfpathmoveto{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/not width}\pgf@circ@res@right}{0pt}} + \pgfpathlineto{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/reserved}\pgf@circ@res@right}% + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/not height}\pgf@circ@res@up}} + \fi + % + \pgfusepath{draw} + % + \pgfpathmoveto{\pgfpointorigin} + \pgftext{#2} + % + % + % + } + } +} +\pgfcircdeclareeurologicport{and}{\&}{\pgf@circ@res@count}{} +\pgfcircdeclareeurologicport{or}{$\ge 1$}{\pgf@circ@res@count}{} +\pgfcircdeclareeurologicport{xor}{$=1$}{\pgf@circ@res@count}{} +\pgfcircdeclareeurologicport{not}{$1$}{1}{not} +\pgfcircdeclareeurologicport{nand}{\&}{\pgf@circ@res@count}{not} +\pgfcircdeclareeurologicport{nor}{$\ge 1$}{\pgf@circ@res@count}{not} +\pgfcircdeclareeurologicport{xnor}{$=1$}{\pgf@circ@res@count}{not} + +%% end european logic ports + +\long\def\pgfcircdeclaretransistor#1#2#3{ + \pgfdeclareshape{#1} + { + \anchor{center}{ + \pgfpointorigin + } + \savedanchor\northeast{% upper right + \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/height}\pgf@circ@Rlen + \pgf@y=.5\pgf@y + \pgf@x=0pt + } + \savedanchor\left{%center left + \pgf@y=0pt + \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/width}\pgf@circ@Rlen + } + \anchor{text}{ + \northeast + \pgf@y=.7\pgf@y + \pgf@x= \pgf@circ@Rlen + \pgf@x=0.1\pgf@x + } + \anchor{pathstart}{ % south + \northeast + \pgf@y=-\pgf@y + } + \anchor{pathend}{ + \northeast + } + \anchor{north}{ + \northeast + \pgf@circ@res@step=\pgf@y + \left + \pgf@y=\pgf@circ@res@step + \pgf@x=.5\pgf@x + } + \anchor{west}{ + \left + } + \anchor{east}{ + \northeast + \pgf@y=0pt + } + \anchor{south}{ + \northeast + \pgf@circ@res@step=\pgf@y + \left + \pgf@y=-\pgf@circ@res@step + \pgf@x=.5\pgf@x + } + \anchor{south west}{ + \northeast + \pgf@circ@res@step=\pgf@y + \left + \pgf@y=-\pgf@circ@res@step + } + \anchor{north east}{ + \northeast + } + \anchor{north west}{ + \northeast + \pgf@circ@res@step=\pgf@y + \left + \pgf@y=\pgf@circ@res@step + } + \anchor{south east}{ + \northeast + \pgf@y=-\pgf@y + } + \anchor{B}{ + \northeast + \pgf@circ@res@step=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/conn height}\pgf@y + \left + \pgf@y=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction}\pgf@circ@res@step + } + \anchor{base}{ + \northeast + \pgf@circ@res@step=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/conn height}\pgf@y + \left + \pgf@y=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction}\pgf@circ@res@step + } + \anchor{G}{ + \northeast + \pgf@circ@res@step=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/conn height}\pgf@y + \left + \pgf@y=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction}\pgf@circ@res@step + } + \anchor{gate}{ + \northeast + \pgf@circ@res@step=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/conn height}\pgf@y + \left + \pgf@y=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction}\pgf@circ@res@step + } + \anchor{nobase}{ + \left + \pgf@x=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@x + } + \anchor{nogate}{ + \left + \pgf@x=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate width}\pgf@x + } + \anchor{E}{ + \northeast + \pgf@y=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction}\pgf@y + } + \anchor{emitter}{ + \northeast + \pgf@y=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction}\pgf@y + } + \anchor{C}{ + \northeast + \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction}\pgf@y + } + \anchor{collector}{ + \northeast + \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction}\pgf@y + } + \anchor{S}{ + \northeast + \pgf@y=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction}\pgf@y + } + \anchor{source}{ + \northeast + \pgf@y=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction}\pgf@y + } + \anchor{D}{ + \northeast + \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction}\pgf@y + } + \anchor{drain}{ + \northeast + \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction}\pgf@y + } + #2 + \backgroundpath{ + \pgftransformationadjustments + \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}} + % + \ifnum \pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction} > 0 + \pgf@circuit@trans@ntypetrue + \else + \pgf@circuit@trans@ntypefalse + \fi + \northeast + \pgf@circ@res@up = \pgf@y + \pgf@circ@res@down = -\pgf@y + \pgf@circ@res@right = \pgf@x + \left + \pgf@circ@res@left = \pgf@x + % + #3 + % BODY DIODE + \ifpgf@circuit@fet@bodydiode + \drawbodydiode{#1} + \fi + % + } +} +} + +\long\def\drawbodydiode#1{ + \pgfscope + \pgftransformshift{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/bodydiode distance}\pgf@circ@res@left}{\pgf@circ@res@up+\pgf@circ@res@down}} + \pgftransformrotate{90} + \pgftransformscale{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/bodydiode scale}} + \ifpgf@circuit@fulldiode + \pgfnode{fulldiodeshape}{center}{}{pgf@bodydiode}{\pgfusepath{fill}} + \else + \pgfnode{emptydiodeshape}{center}{}{pgf@bodydiode}{\pgfusepath{fill}} + \fi + \endpgfscope + % Draw stroke line + \ifpgf@circuit@strokediode + \pgfpathmoveto{\pgfpointanchor{pgf@bodydiode}{west}} + \pgfpathlineto{\pgfpointanchor{pgf@bodydiode}{east}} + \pgfusepath{stroke} + \fi + %Draw upper connection to body diode + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/bodydiode conn}\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/bodydiode distance}\pgf@circ@res@left} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/bodydiode conn}\pgf@circ@res@up}} + \pgfpathlineto{\pgfpointanchor{pgf@bodydiode}{east}} + \pgfusepath{draw} + \pgfscope + \pgftransformshift{\pgfpoint{\pgf@circ@res@right} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/bodydiode conn}\pgf@circ@res@up}} + \pgftransformscale{0.5} + \pgfnode{circ}{center}{}{}{\pgfusepath{fill}} + \endpgfscope{} + %Draw lower connection to body diode + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/bodydiode conn}\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/bodydiode distance}\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/bodydiode conn}\pgf@circ@res@down}} + \pgfpathlineto{\pgfpointanchor{pgf@bodydiode}{west}} + \pgfusepath{draw} + \pgfscope + \pgftransformshift{\pgfpoint{\pgf@circ@res@right} {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/bodydiode conn}\pgf@circ@res@down}} + \pgftransformscale{0.5} + \pgfnode{circ}{center}{}{}{\pgfusepath{fill}} + \endpgfscope +} + +\long\def\declarebpt#1{ + \pgfcircdeclaretransistor{#1}{}{ + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height 2}\pgf@circ@res@up}} + \pgfusepath{draw} + + \pgfscope + \pgfpathmoveto{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf@circ@res@down}} + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/tripoles/thickness}\pgflinewidth} + \pgfusepath{draw} + \endpgfscope + + \pgfpathmoveto{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height 2}\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down-\pgfverticaltransformationadjustment*.5*\pgflinewidth}} + \pgfusepath{draw} + %draw arrow depending on type of transistor + \pgfscope + \pgfslopedattimetrue + \pgfallowupsidedownattimetrue + \pgfresetnontranslationattimefalse + \ifpgf@circuit@trans@ntype + \pgftransformlineattime{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/arrow pos}}{% + \pgfpoint% + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}% + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height 2}\pgf@circ@res@down}% + }{% + \pgfpoint{\pgf@circ@res@right}% + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf@circ@res@down}% + } + \else + \pgftransformlineattime{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/arrow pos}}{% + \pgfpoint{\pgf@circ@res@right}% + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf@circ@res@up}% + }{% + \pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}% + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height 2}\pgf@circ@res@up}% + } + \fi + \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}} + \endpgfscope + + \ifpgf@circuit@bpt@drawphoto + \pgfscope + \pgfsetarrowsstart{latexslim} + \pgfpathmoveto{\pgfpointadd{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left} + {\pgf@circ@res@up+\pgf@circ@res@down}} + {\pgfpoint{0.05\pgf@circ@res@left}{0.1\pgf@circ@res@up}}} + \pgfpathlineto{\pgfpointadd{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left} + {\pgf@circ@res@up+\pgf@circ@res@down}} + {\pgfpoint{0.5\pgf@circ@res@left}{0.3\pgf@circ@res@up}}} + \pgfusepath{draw} + \pgfpathmoveto{\pgfpointadd{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left} + {\pgf@circ@res@up+\pgf@circ@res@down}} + {\pgfpoint{0.05\pgf@circ@res@left}{-0.1\pgf@circ@res@up}}} + \pgfpathlineto{\pgfpointadd{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left} + {\pgf@circ@res@up+\pgf@circ@res@down}} + {\pgfpoint{0.5\pgf@circ@res@left}{0.1\pgf@circ@res@up}}} + \pgfusepath{draw} + \endpgfscope + \else + \ifpgf@circuit@bpt@drawbase + \pgfpathmoveto{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left} + {\pgf@circ@res@up+\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}{\pgf@circ@res@up+\pgf@circ@res@down}} + \pgfusepath{draw} + \fi + \fi + } +} + +\declarebpt{npn} +\declarebpt{pnp} + +\long\def\declareigbt#1{ + \pgfcircdeclaretransistor{#1}{} + { + %draw upper connection + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height}\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height 2}\pgf@circ@res@up}} + \pgfusepath{draw} + + %draw thicker gate lines + \pgfscope + \pgfpathmoveto{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate width}\pgf@circ@res@left} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf@circ@res@up+\pgfverticaltransformationadjustment*.5\pgflinewidth}} + \pgfpathlineto{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate width}\pgf@circ@res@left} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf@circ@res@down-\pgfverticaltransformationadjustment*.5\pgflinewidth}} + \pgfpathmoveto{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf@circ@res@up+\pgfverticaltransformationadjustment*.5\pgflinewidth}} + \pgfpathlineto{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf@circ@res@down-\pgfverticaltransformationadjustment*.5\pgflinewidth}} + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/tripoles/thickness}\pgflinewidth} + \pgfusepath{draw} + \endpgfscope + %draw lower connection + \pgfpathmoveto{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height 2}\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height}\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down-\pgfverticaltransformationadjustment*.5*\pgflinewidth}} + \pgfusepath{draw} + %draw arrow depending on type of transiytor + \pgfscope + \pgfslopedattimetrue + \pgfallowupsidedownattimetrue + \pgfresetnontranslationattimefalse + \ifpgf@circuit@trans@ntype + \pgftransformlineattime{.5}{% + \pgfpoint% + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}% + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height 2}\pgf@circ@res@down}% + }{% + \pgfpoint{\pgf@circ@res@right}% + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height}\pgf@circ@res@down}% + } + \else + \pgftransformlineattime{.5}{% + \pgfpoint{\pgf@circ@res@right}% + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height}\pgf@circ@res@up}% + }{% + \pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}% + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height 2}\pgf@circ@res@up}% + } + \fi + \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}} + \endpgfscope + %draw gate + \ifpgf@circuit@trans@ntype + \pgfpathmoveto{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate width}\pgf@circ@res@left} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/conn height}\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}% + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/conn height}\pgf@circ@res@down}} + \else + \pgfpathmoveto{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate width}\pgf@circ@res@left} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/conn height}\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}% + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/conn height}\pgf@circ@res@up}} + \fi + \pgfusepath{draw} + } +} + +\declareigbt{pigbt} +\declareigbt{nigbt} +\declareigbt{Lnigbt} +\declareigbt{Lpigbt} + + +\pgfcircdeclaretransistor{nmos}{}{% + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/base width}\pgf@circ@res@left} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf@circ@res@up}} + + \pgfpathmoveto{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/base width}\pgf@circ@res@left} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down-\pgfverticaltransformationadjustment*.5*\pgflinewidth}} + \pgfusepath{draw} + + \pgfscope + \pgfpathmoveto{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/base width}\pgf@circ@res@left} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/base height}\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/base width}\pgf@circ@res@left} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/base height}\pgf@circ@res@down}} + \pgfpathmoveto{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate width}\pgf@circ@res@left} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate width}\pgf@circ@res@left} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf@circ@res@down}} + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/tripoles/thickness}\pgflinewidth} + \pgfusepath{draw} + \endpgfscope + \ifpgf@circuit@mos@arrows + \pgfscope + \pgfslopedattimetrue + \pgfallowupsidedownattimetrue + \pgfresetnontranslationattimefalse + \pgftransformlineattime{\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/arrow pos}}{% + \pgfpoint% + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate width}\pgf@circ@res@left}% + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf@circ@res@down}% + }{% + \pgfpoint + {\pgf@circ@res@right}% + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf@circ@res@down}% + } + \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}} + \endpgfscope + \fi + + \ifpgf@circuit@bpt@drawgate + \pgfpathmoveto{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate width}\pgf@circ@res@left} + {\pgf@circ@res@up+\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}{\pgf@circ@res@up+\pgf@circ@res@down}} + \pgfusepath{draw} + \fi +} + + +\pgfcircdeclaretransistor{pmos}{}{% + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/base width}\pgf@circ@res@left} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf@circ@res@up}} + \pgfusepath{draw} + + \ifpgf@circuit@mos@arrows + \pgfscope + \pgfslopedattimetrue + \pgfallowupsidedownattimetrue + \pgfresetnontranslationattimefalse + \pgftransformlineattime{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/arrow pos}}{% + \pgfpoint% + {\pgf@circ@res@right}% + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf@circ@res@up}% + }{% + \pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate width}\pgf@circ@res@left}% + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf@circ@res@up}% + } + \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}} + \endpgfscope + \fi + + \pgfscope + \pgfpathmoveto{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/base width}\pgf@circ@res@left} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/base height}\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/base width}\pgf@circ@res@left} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/base height}\pgf@circ@res@down}} + \pgfpathmoveto{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate width}\pgf@circ@res@left} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate width}\pgf@circ@res@left} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf@circ@res@down}} + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/tripoles/thickness}\pgflinewidth} + \pgfusepath{draw} + \endpgfscope + + \pgfpathmoveto{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/base width}\pgf@circ@res@left} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down-\pgfverticaltransformationadjustment*.5*\pgflinewidth}} + + + \pgfusepath{draw} + \ifpgf@circuit@bpt@drawgate + \pgfpathmoveto{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate width}\pgf@circ@res@left} + {\pgf@circ@res@up+\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}{\pgf@circ@res@up+\pgf@circ@res@down}} + \pgfusepath{draw} + \fi + \ifpgf@circuit@pmos@nocircle\else + \pgfpathcircle{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate width}\pgf@circ@res@left - \pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgf@circ@Rlen} + {\pgf@circ@res@up+\pgf@circ@res@down}}{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgf@circ@Rlen} + \ifpgf@circuit@pmos@emptycircle + \pgfsetfillcolor{white} + \fi + \pgfusepath{draw,fill} + \fi +} + +%% HEMT FET Transistor +\pgfcircdeclaretransistor{hemt}{}{% + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/hemt/gate height}\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/hemt/base width}\pgf@circ@res@left} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/hemt/gate height}\pgf@circ@res@up}} + + \pgfpathmoveto{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/hemt/base width}\pgf@circ@res@left} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/hemt/gate height}\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/hemt/gate height}\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down-\pgfverticaltransformationadjustment*.5*\pgflinewidth}} + \pgfusepath{draw} + + \pgfscope + \pgfpathmoveto{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/hemt/base width}\pgf@circ@res@left} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/hemt/base height}\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/hemt/base width}\pgf@circ@res@left} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/hemt/base height}\pgf@circ@res@down}} + \pgfsetlinewidth{2\pgflinewidth} + \pgfusepath{draw} + \endpgfscope + + \pgfpathmoveto{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/hemt/base width}\pgf@circ@res@left} + {\pgf@circ@res@up+\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}{\pgf@circ@res@up+\pgf@circ@res@down}} + \pgfusepath{draw} +} + +\long\def\drawfetcore#1{ + \pgftransformationadjustments + %top connection + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height}\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height}\pgf@circ@res@up}} + \pgfusepath{draw} + \pgfscope + \pgfpathmoveto{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf@circ@res@up}} + \ifpgf@circuit@trans@depletiontype + \pgfpathlineto{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf@circ@res@down}} + \else + + \pgfpathlineto{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf@circ@res@up*0.45}} + \pgfpathmoveto{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf@circ@res@up*0.25}} + \pgfpathlineto{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf@circ@res@down*0.25}} + \pgfpathmoveto{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/base height}\pgf@circ@res@down*0.45}} + \pgfpathlineto{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf@circ@res@down}} + \fi + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/tripoles/thickness}\pgflinewidth} + \pgfusepath{draw} + \endpgfscope + %Bulk connection line + \pgfpathmoveto{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left} + {\pgf@circ@res@up+\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right+\pgfhorizontaltransformationadjustment*.5*\pgflinewidth} + {\pgf@circ@res@up+\pgf@circ@res@down}} + + %bottom connection + \pgfpathmoveto{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height}\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height}\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down-\pgfverticaltransformationadjustment*.5*\pgflinewidth}} + \pgfusepath{draw} + + %draw thick gate line + \pgfscope + \pgfpathmoveto{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate width}\pgf@circ@res@left} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height}\pgf@circ@res@up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}} + \pgfpathlineto{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate width}\pgf@circ@res@left} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height}\pgf@circ@res@down-\pgfverticaltransformationadjustment*.5*\pgflinewidth}} + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/tripoles/thickness}\pgflinewidth} + \pgfusepath{draw} + \endpgfscope + + \pgfscope + \pgfslopedattimetrue + \pgfallowupsidedownattimetrue + \pgfresetnontranslationattimefalse + + \pgftransformlineattime{.6}{% + \pgfpoint + {\pgf@circ@res@right}% + {\pgf@circ@res@up+\pgf@circ@res@down}% + }{% + \pgfpoint% + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}% + {\pgf@circ@res@up+\pgf@circ@res@down}% + } + \ifpgf@circuit@trans@ntype + \else + \pgftransformrotate{180} + \fi + \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}} +\endpgfscope + +% GATE CONNECTION +\ifpgf@circuit@bpt@drawgate + \ifpgf@circuit@trans@ntype + \pgfpathmoveto{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate width}\pgf@circ@res@left} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/conn height}\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/conn height}\pgf@circ@res@down}} + \else + \pgfpathmoveto{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate width}\pgf@circ@res@left} + {-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/conn height}\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/conn height}\pgf@circ@res@down}} + \fi + \pgfusepath{draw} +\fi + +} + +\long\def\pgfdeclaretransistorwrapperaddbulk#1#2#3 +{\pgfcircdeclaretransistor{#1}{ + \anchor{bulk}{\left\pgf@x=0pt} + \anchor{B}{\left\pgf@x=0pt}%override Base anchor from npn&igbt + #2 + } + {#3} +} + + +\pgfdeclaretransistorwrapperaddbulk{nfet}{}{% + \pgf@circuit@trans@depletiontypefalse + \drawfetcore{nfet} +} + + +\pgfdeclaretransistorwrapperaddbulk{pfet}{}{% + \pgf@circuit@trans@depletiontypefalse + \drawfetcore{pfet} +} + +% N-CHANNEL IGFET ENHANCEMENT TYPE +\pgfdeclaretransistorwrapperaddbulk{nigfete}{}{% + \pgf@circuit@trans@depletiontypefalse + \drawfetcore{nigfete} + + % SOURCE CONNECTION + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}} + \pgfusepath{draw} + + % SOLDER DOT at source-bulk connection + \ifpgf@circuit@fet@solderdot + \pgfscope + \pgftransformshift{\pgfpoint{\pgf@circ@res@right}{ + \pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf@circ@res@down}} + \pgfnode{circ}{center}{}{}{} + \endpgfscope{} +\fi +} + + + + +% N-CHANNEL IGFET ENHANCEMENT TYPE with Bulk connector +\pgfdeclaretransistorwrapperaddbulk{nigfetebulk}{}{% + \pgf@circuit@trans@depletiontypefalse + \drawfetcore{nigfetebulk} + % SOLDER DOT at source-bulk connection + \ifpgf@circuit@fet@solderdot + \pgfscope + \pgftransformshift{\pgfpoint{\pgf@circ@res@right}{ + \pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetebulk/gate height}\pgf@circ@res@down}} + \pgfnode{circ}{center}{}{}{} + \endpgfscope{} + \fi +} + + + +% N-CHANNEL IGFET DEPLETION TYPE +\pgfdeclaretransistorwrapperaddbulk{nigfetd}{}{% + \pgf@circuit@trans@depletiontypetrue + \drawfetcore{nigfetd} + + % SOURCE CONNECTION + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}} + \pgfusepath{draw} + + % SOLDER DOT at source-bulk connection + \ifpgf@circuit@fet@solderdot + \pgfscope + \pgftransformshift{\pgfpoint{\pgf@circ@res@right}{ + \pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf@circ@res@down}} + \pgfnode{circ}{center}{}{}{} + \endpgfscope{} + \fi +} + +% P-CHANNEL IGFET ENHANCEMENT TYPE +\pgfdeclaretransistorwrapperaddbulk{pigfete}{}{% + \pgf@circuit@trans@depletiontypefalse + \drawfetcore{pigfete} + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}} + + % SOURCE CONNECTION + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}} + \pgfusepath{draw} + + + % SOLDER DOT at source-bulk connection + \ifpgf@circuit@fet@solderdot + \pgfscope + \pgftransformshift{\pgfpoint{\pgf@circ@res@right}{ + \pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/gate height}\pgf@circ@res@up}} + \pgfnode{circ}{center}{}{}{} + \endpgfscope + \fi +} + +% P-CHANNEL IGFET ENHANCEMENT TYPE with bulk connector +\pgfdeclaretransistorwrapperaddbulk{pigfetebulk}{}{% + \pgf@circuit@trans@depletiontypefalse + \drawfetcore{pigfetebulk} +} + + +% P-CHANNEL IGFET DEPLETION TYPE +\pgfdeclaretransistorwrapperaddbulk{pigfetd}{}{% + \pgf@circuit@trans@depletiontypetrue + \drawfetcore{pigfetd} + + % SOURCE CONNECTION + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}} + \pgfusepath{draw} + + + % SOLDER DOT at source-bulk connection + \ifpgf@circuit@fet@solderdot + \pgfscope + \pgftransformshift{\pgfpoint{\pgf@circ@res@right}{ + \pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf@circ@res@up}} + \pgfnode{circ}{center}{}{}{} + \endpgfscope{} + \fi +} + +\pgfcircdeclaretransistor{njfet}{}{% + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height 2}\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate width}\pgf@circ@res@left} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height 2}\pgf@circ@res@up}} + + \pgfpathmoveto{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate width}\pgf@circ@res@left} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height 2}\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height 2}\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down-\pgfverticaltransformationadjustment*.5*\pgflinewidth}} + \pgfusepath{draw} + + \pgfscope + \pgfpathmoveto{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate width}\pgf@circ@res@left} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height}\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate width}\pgf@circ@res@left} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height}\pgf@circ@res@down}} + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/tripoles/thickness}\pgflinewidth} + \pgfusepath{draw} + \endpgfscope + + \pgfscope + \pgfslopedattimetrue + \pgfallowupsidedownattimetrue + \pgfresetnontranslationattimefalse + \pgftransformlineattime{.6}{% + \pgfpoint{\pgf@circ@res@left}% + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height 2}\pgf@circ@res@down}% + }{% + \pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate width}\pgf@circ@res@left}% + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height 2}\pgf@circ@res@down}% + } + \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}} + \endpgfscope + + \pgfpathmoveto{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate width}\pgf@circ@res@left} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height 2}\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*.5*\pgflinewidth} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height 2}\pgf@circ@res@down}} + \pgfusepath{draw} +} + + +\pgfcircdeclaretransistor{pjfet}{}{% + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height 2}\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate width}\pgf@circ@res@left} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height 2}\pgf@circ@res@up}} + + \pgfpathmoveto{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate width}\pgf@circ@res@left} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height 2}\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height 2}\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down-\pgfverticaltransformationadjustment*.5*\pgflinewidth}} + \pgfusepath{draw} + + \pgfscope + \pgfpathmoveto{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate width}\pgf@circ@res@left} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height}\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate width}\pgf@circ@res@left} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height}\pgf@circ@res@down}} + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/tripoles/thickness}\pgflinewidth} + \pgfusepath{draw} + \endpgfscope + + \pgfscope + \pgfslopedattimetrue + \pgfallowupsidedownattimetrue + \pgfresetnontranslationattimefalse + \pgftransformlineattime{.4}{% + \pgfpoint% + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate width}\pgf@circ@res@left}% + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height 2}\pgf@circ@res@up}% + }{% + \pgfpoint{\pgf@circ@res@left}% + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height 2}\pgf@circ@res@up}% + } + \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}} + \endpgfscope + + + \pgfpathmoveto{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate width}\pgf@circ@res@left} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height 2}\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*.5*\pgflinewidth} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height 2}\pgf@circ@res@up}} + \pgfusepath{draw} +} + + +\pgfdeclaretransistorwrapperaddbulk{isfet}{}{% + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}} + % DRAIN CONNECTION + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/gate height}\pgf@circ@res@up}} + % DRAIN + \pgfpathlineto{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/base width}\pgf@circ@res@left} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/gate height}\pgf@circ@res@up}} + \pgfusepath{draw} + + % GATE, DEPLETION TYPE + \pgfscope %% added + \pgfpathmoveto{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/base width}\pgf@circ@res@left} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/base height}\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/base width}\pgf@circ@res@left} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/base height}\pgf@circ@res@down}} + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/tripoles/thickness}\pgflinewidth} %% added + \pgfusepath{draw} %% added + \endpgfscope %% added + + % BULK + \pgfpathmoveto{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/base width}\pgf@circ@res@left} + {\pgf@circ@res@up+\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right+.5\pgflinewidth} + {\pgf@circ@res@up+\pgf@circ@res@down}} + + % SOURCE + \pgfpathmoveto{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/base width}\pgf@circ@res@left} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/gate height}\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/gate height}\pgf@circ@res@down}} + % SOURCE CONNECTION + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down-\pgfverticaltransformationadjustment*.5*\pgflinewidth}} + \pgfusepath{draw} + + + % SOLDER DOT at source-bulk connection + \ifpgf@circuit@fet@solderdot + \pgfscope + \pgftransformshift{\pgfpoint{\pgf@circ@res@right}{ + \pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf@circ@res@down}} + \pgfnode{circ}{center}{}{}{} + \endpgfscope{} + \fi + % ARROW + \pgfscope + \pgfslopedattimetrue + \pgfallowupsidedownattimetrue + \pgfresetnontranslationattimefalse + \pgftransformlineattime{.6}{% + \pgfpoint + {\pgf@circ@res@right}% + {\pgf@circ@res@up+\pgf@circ@res@down}% + }{% + \pgfpoint% + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/base width}\pgf@circ@res@left}% + {\pgf@circ@res@up+\pgf@circ@res@down}% + } + \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}} + \endpgfscope + \pgfusepath{draw} + + % Wavy lines + \pgfscope + \pgfpathmoveto{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/waves x sep}\pgf@circ@res@up}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/waves y sep}\pgf@circ@res@up}} + \pgfpathsine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf@circ@res@up}{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf@circ@res@up}} + \pgfpathcosine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf@circ@res@up}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf@circ@res@up}} + \pgfpathsine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf@circ@res@up}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf@circ@res@up}} + \pgfpathcosine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf@circ@res@up}{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf@circ@res@up}} + \pgfusepath{draw} + + \pgfpathmoveto{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/waves x sep}\pgf@circ@res@up}{0cm}} + \pgfpathsine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf@circ@res@up}{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf@circ@res@up}} + \pgfpathcosine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf@circ@res@up}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf@circ@res@up}} + \pgfpathsine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf@circ@res@up}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf@circ@res@up}} + \pgfpathcosine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf@circ@res@up}{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf@circ@res@up}} + \pgfusepath{draw} + + \pgfpathmoveto{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/waves x sep}\pgf@circ@res@up}{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/waves y sep}\pgf@circ@res@up}} + \pgfpathsine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf@circ@res@up}{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf@circ@res@up}} + \pgfpathcosine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf@circ@res@up}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf@circ@res@up}} + \pgfpathsine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf@circ@res@up}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf@circ@res@up}} + \pgfpathcosine{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave width}\pgf@circ@res@up}{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/wave amp}\pgf@circ@res@up}} + \pgfusepath{draw} + \endpgfscope + +} + + +%% Black thyristor + +\pgfcircdeclarebipole{ + \anchor{gate}{ + \northeast + } + \anchor{anode}{ + \southwest + \pgf@y=0cm + } + \anchor{G}{ + \northeast + } + \anchor{cathode}{ + \northeast + \pgf@y=0cm + } +} +{\ctikzvalof{tripoles/thyristor/height 2}} +{fullthyristor}{\ctikzvalof{tripoles/thyristor/height}} +{\ctikzvalof{tripoles/thyristor/width}} +{ + + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + + \pgf@circ@res@other = \ctikzvalof{tripoles/thyristor/diode width left}\pgf@circ@res@left + \pgf@circ@res@step = \ctikzvalof{tripoles/thyristor/diode width right}\pgf@circ@res@right + + \pgfscope + \pgftransformxshift{\pgf@circ@res@other} + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step-\pgf@circ@res@other}{0pt}} + + \pgfpathlineto{\pgfpoint{0pt}{-\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@step-\pgf@circ@res@other}{0pt}} + \pgfusepath{draw,fill} + + \pgfsetlinewidth{\pgfstartlinewidth} + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step-\pgf@circ@res@other}{0pt}} + \pgfpathlineto{\pgfpoint{2*\pgf@circ@res@step-2*\pgf@circ@res@other}{\ctikzvalof{tripoles/thyristor/diode height}\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{2*\pgf@circ@res@step-2*\pgf@circ@res@other}{\pgf@circ@res@up}} + \pgfusepath{draw} + \endpgfscope + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{-\pgf@circ@res@down}} + + \pgfusepath{draw} + + \pgfsetlinewidth{\pgfstartlinewidth} + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@other}{0pt}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{0pt}} + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{0pt}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0pt}} + + \pgfusepath{draw} + +} + +%% Empty thyristor + +\pgfcircdeclarebipole{ + \anchor{gate}{ + \northeast + } + \anchor{anode}{ + \southwest + \pgf@y=0cm + } + \anchor{G}{ + \northeast + } + \anchor{cathode}{ + \northeast + \pgf@y=0cm + } +} +{\ctikzvalof{tripoles/thyristor/height 2}} +{emptythyristor}{\ctikzvalof{tripoles/thyristor/height}} +{\ctikzvalof{tripoles/thyristor/width}} +{ + + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + + \pgf@circ@res@other = \ctikzvalof{tripoles/thyristor/diode width left}\pgf@circ@res@left + \pgf@circ@res@step = \ctikzvalof{tripoles/thyristor/diode width right}\pgf@circ@res@right + + \pgfscope + \pgftransformxshift{\pgf@circ@res@other} + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step-\pgf@circ@res@other}{0pt}} + + \pgfpathlineto{\pgfpoint{0pt}{-\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}} + \pgfpathclose + \pgf@circ@draworfill + \pgfscope + % to allow filling, we need to draw explicitily the stroke here. + \pgfsetlinewidth{\pgfstartlinewidth} + \ifpgf@circuit@bipole@strokedsymbol + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step-\pgf@circ@res@other}{0pt}} + \pgfpathlineto{\pgfpoint{0pt}{0pt}} + \pgfusepath{draw} + \fi + \endpgfscope + + \pgfsetlinewidth{\pgfstartlinewidth} + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step-\pgf@circ@res@other}{0pt}} + \pgfpathlineto{\pgfpoint{2*\pgf@circ@res@step-2*\pgf@circ@res@other}{\ctikzvalof{tripoles/thyristor/diode height}\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{2*\pgf@circ@res@step-2*\pgf@circ@res@other}{\pgf@circ@res@up}} + \pgfusepath{draw} + \endpgfscope + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{-\pgf@circ@res@down}} + + \pgfusepath{draw} + + \pgfsetlinewidth{\pgfstartlinewidth} + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@other}{0pt}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{0pt}} + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{0pt}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0pt}} + + \pgfusepath{draw} + +} + +%% Empty triac + +\pgfcircdeclarebipole{ + \anchor{gate}{ + \northeast + } + \anchor{G}{ + \northeast + } + \anchor{anode}{ + \southwest + \pgf@y=0cm + } + \anchor{cathode}{ + \northeast + \pgf@y=0cm + } +} +{\ctikzvalof{tripoles/triac/height}} +{emptytriac} +{\ctikzvalof{tripoles/triac/height}} +{\ctikzvalof{tripoles/triac/width}} +{ + + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + + \pgf@circ@res@other = \ctikzvalof{tripoles/triac/diode width left}\pgf@circ@res@left + \pgf@circ@res@step = \ctikzvalof{tripoles/triac/diode width right}\pgf@circ@res@right + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@other}{0pt}} + \pgfpathlineto{\pgfpoint{0.95\pgf@circ@res@step}{0.707*(\pgf@circ@res@other-\pgf@circ@res@step)}} % sqrt(1/2) + \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{1.414*(\pgf@circ@res@other-\pgf@circ@res@step)}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{-1.414*(\pgf@circ@res@other-\pgf@circ@res@step)}} + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{0pt}} + \pgfpathlineto{\pgfpoint{0.95\pgf@circ@res@other}{-0.707*(\pgf@circ@res@other-\pgf@circ@res@step)}} % sqrt(1/2) + \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{-1.414*(\pgf@circ@res@other-\pgf@circ@res@step)}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{1.414*(\pgf@circ@res@other-\pgf@circ@res@step)}} + + \pgf@circ@draworfill + + \pgfsetlinewidth{\pgfstartlinewidth} + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{-0.707*(\pgf@circ@res@other-\pgf@circ@res@step)}} % sqrt(1/2) + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{-1.414*(\pgf@circ@res@other-\pgf@circ@res@step)}} % sqrt(1/2) + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}} % sqrt(1/2) + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@other}{0pt}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{0pt}} + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{0pt}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0pt}} + + \pgfusepath{draw} + +} + +%% Full triac + +\pgfcircdeclarebipole{ + \anchor{gate}{ + \northeast + } + \anchor{G}{ + \northeast + } + \anchor{anode}{ + \southwest + \pgf@y=0cm + } + \anchor{cathode}{ + \northeast + \pgf@y=0cm + } +} +{\ctikzvalof{tripoles/triac/height}} +{fulltriac} +{\ctikzvalof{tripoles/triac/height}} +{\ctikzvalof{tripoles/triac/width}} +{ + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + + \pgf@circ@res@other = \ctikzvalof{tripoles/triac/diode width left}\pgf@circ@res@left + \pgf@circ@res@step = \ctikzvalof{tripoles/triac/diode width right}\pgf@circ@res@right + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@other}{0pt}} + \pgfpathlineto{\pgfpoint{0.95\pgf@circ@res@step}{0.707*(\pgf@circ@res@other-\pgf@circ@res@step)}} % sqrt(1/2) + \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{1.414*(\pgf@circ@res@other-\pgf@circ@res@step)}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{-1.414*(\pgf@circ@res@other-\pgf@circ@res@step)}} + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{0pt}} + \pgfpathlineto{\pgfpoint{0.95\pgf@circ@res@other}{-0.707*(\pgf@circ@res@other-\pgf@circ@res@step)}} % sqrt(1/2) + \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{-1.414*(\pgf@circ@res@other-\pgf@circ@res@step)}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{1.414*(\pgf@circ@res@other-\pgf@circ@res@step)}} + + \pgfusepath{draw,fill} + + \pgfsetlinewidth{\pgfstartlinewidth} + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{-0.707*(\pgf@circ@res@other-\pgf@circ@res@step)}} % sqrt(1/2) + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{-1.414*(\pgf@circ@res@other-\pgf@circ@res@step)}} % sqrt(1/2) + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}} % sqrt(1/2) + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@other}{0pt}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{0pt}} + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{0pt}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0pt}} + + \pgfusepath{draw} + +} + +\pgfcircdeclarebipole{ + \anchor{out 1}{ + \northeast + \pgf@y=0cm + } + \anchor{out 2}{ + \northeast + \pgf@y=.8\pgf@y + } +} +{\ctikzvalof{tripoles/toggleswitch/height 2}} +{toggleswitch} +{\ctikzvalof{tripoles/toggleswitch/height}} +{\ctikzvalof{tripoles/toggleswitch/width}} +{ + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}} + \pgfpathlineto{\pgfpoint{.3\pgf@circ@res@left}{0pt}} + \pgfusepath{draw} + \pgfscope + \pgfpathmoveto{\pgfpoint{.3\pgf@circ@res@left}{0pt}} + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgfpathlineto{\pgfpoint{.7\pgf@circ@res@right}{.5\pgf@circ@res@up}} + \pgfusepath{draw} + \endpgfscope + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}} + \pgfpathlineto{\pgfpoint{.5\pgf@circ@res@right}{0}} + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{.8\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{.5\pgf@circ@res@right}{.8\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{.5\pgf@circ@res@right}{.15\pgf@circ@res@up}} + \pgfusepath{draw} + + + \pgfpathmoveto{\pgfpoint{.2\pgf@circ@res@left}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{.2\pgf@circ@res@right}{\pgf@circ@res@up}} + \pgfusepath{draw} + + \pgfsetdash{{.08\pgf@circ@res@up}{.04\pgf@circ@res@up}{.7\pgf@circ@res@up}{.04\pgf@circ@res@up}{.8\pgf@circ@res@up}}{0cm} + \pgfpathmoveto{\pgfpoint{0}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{0}{.8\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{.2\pgf@circ@res@left}{.6\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{0}{.4\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{0}{.2\pgf@circ@res@up}} + \pgfusepath{draw} + \pgfsetdash{}{0cm} +} + +%% operational and instrumentation amplifiers + +\pgfdeclareshape{op amp} +{ + \anchor{center}{\pgfpointorigin} + \savedanchor\northwest{% + \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/height}\pgf@circ@Rlen + \pgf@y=.5\pgf@y + \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/width}\pgf@circ@Rlen + \pgf@x=.5\pgf@x + } + \anchor{south}{ + \northwest + \pgf@y=-\pgf@y + \pgf@x=0pt + } + \anchor{north}{ + \northwest + \pgf@x=0pt + } + \savedanchor\left{% + \pgf@y=0pt + } + \anchor{leftedge} + {\left + \pgf@x = \pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf@x + } + \savedanchor\inOneFixed{% + \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/height}\pgf@circ@Rlen + \pgf@y=.5\pgf@y + \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@y + \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/width}\pgf@circ@Rlen + \pgf@x=.5\pgf@x + } + \anchor{in up}{ + \inOneFixed + } + \anchor{in down}{ + \inOneFixed + \pgf@y=-\pgf@y + } + + \savedanchor\inOne{% + \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/height}\pgf@circ@Rlen + \pgf@y=.5\pgf@y + \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@y + \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/width}\pgf@circ@Rlen + \pgf@x=.5\pgf@x + \ifpgf@circuit@oa@iplusup\pgf@y=-\pgf@y\fi + } + \anchor{-}{ + \inOne + } + \anchor{+}{ + \inOne + \pgf@y=-\pgf@y + } + \savedanchor\up{% + \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/height}\pgf@circ@Rlen + \pgf@y=.5\pgf@y + \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/width}\pgf@circ@Rlen + \pgf@x=.5\pgf@x + \pgf@circ@res@up = \pgf@y + \pgf@circ@res@right = -\pgf@x + \pgf@circ@res@left = \pgf@x + \pgfpointlineattime{ + \pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/up pos}}{ + \pgfpoint{ + \pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf@circ@res@left} + {\pgf@circ@res@up}} + {\pgfpoint{.7\pgf@circ@res@right}{0pt}} + } + \anchor{up}{ + \up + } + \anchor{down}{ + \up + \pgf@y=-\pgf@y + } + \anchor{out}{ + \northwest + \pgf@y=0pt + \pgf@x=-\pgf@x + } + \anchor{west}{ + \left + } + \anchor{east}{ + \left + \pgf@x=-\pgf@x + } + + \anchor{south west}{ \northwest \pgf@y=-\pgf@y } + \anchor{north east}{ \northwest \pgf@x=-\pgf@x } + \anchor{north west}{ \northwest } + \anchor{south east}{ \northwest \pgf@x=-\pgf@x \pgf@y=-\pgf@y } + + \anchor{text}{\pgfpoint{-.5\wd\pgfnodeparttextbox}{\dimexpr.5\dp\pgfnodeparttextbox-.5\ht\pgfnodeparttextbox}} + + \backgroundpath{ + \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}} + + + \northwest + \pgf@circ@res@up = \pgf@y + \pgf@circ@res@down = -\pgf@y + \pgf@circ@res@right = -\pgf@x + \pgf@circ@res@left = \pgf@x + + \pgfscope + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/tripoles/thickness}\pgflinewidth} + \pgftransformxshift{.7\pgf@circ@res@left} + \pgf@circ@res@step=\pgf@circ@res@right + \advance\pgf@circ@res@step by -\pgf@circ@res@left + \pgf@circ@res@step=.7\pgf@circ@res@step + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{0pt}} + \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}} + \pgfpathclose + \pgf@circ@draworfill + \endpgfscope + + \pgfpathmoveto{\pgfpoint + {\pgf@circ@res@left} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf@circ@res@left} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@up}} + \pgftext[left, at=\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@up}]{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/font} \ifpgf@circuit@oa@iplusup$+$\else$-$\fi} + + + \pgfpathmoveto{\pgfpoint + {\pgf@circ@res@left} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf@circ@res@left} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@down}} + \pgftext[left, at=\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@down}]{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/font} \ifpgf@circuit@oa@iplusup$-$\else$+$\fi} + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}} + \pgfpathlineto{\pgfpoint{.7\pgf@circ@res@right}{0pt}} + \pgfsetrectcap + \pgfusepath{draw} + + + } +} + +%op amp shape as in european standard en 60617 +\pgfdeclareshape{en amp} +{ + \anchor{center}{\pgfpointorigin} + \savedanchor\northwest{% + \pgf@y=\ctikzvalof{tripoles/en amp/height}\pgf@circ@Rlen + \pgf@y=.5\pgf@y + \pgf@x=-\ctikzvalof{tripoles/en amp/width}\pgf@circ@Rlen + \pgf@x=.5\pgf@x + } + \anchor{south}{ + \northwest + \pgf@y=-\pgf@y + \pgf@x=0pt + } + \anchor{north}{ + \northwest + \pgf@x=0pt + } + \savedanchor\left{% + \pgf@y=0pt + } + \anchor{leftedge} + { + \left + \pgf@x = \ctikzvalof{tripoles/en amp/port width}\pgf@x + } + \savedanchor\inOneFixed{% + \pgf@y=\ctikzvalof{tripoles/op amp/height}\pgf@circ@Rlen + \pgf@y=.5\pgf@y + \pgf@y=\ctikzvalof{tripoles/op amp/input height}\pgf@y + \pgf@x=-\ctikzvalof{tripoles/op amp/width}\pgf@circ@Rlen + \pgf@x=.5\pgf@x + } + \anchor{in up}{ + \inOneFixed + } + \anchor{in down}{ + \inOneFixed + \pgf@y=-\pgf@y + } + \savedanchor\inOne{% + \pgf@y=\ctikzvalof{tripoles/en amp/height}\pgf@circ@Rlen + \pgf@y=.5\pgf@y + \pgf@y=\ctikzvalof{tripoles/en amp/input height}\pgf@y + \pgf@x=-\ctikzvalof{tripoles/en amp/width}\pgf@circ@Rlen + \pgf@x=.5\pgf@x + \ifpgf@circuit@oa@iplusup\pgf@y=-\pgf@y\fi + } + \anchor{-}{ + \inOne + } + \anchor{+}{ + \inOne + \pgf@y=-\pgf@y + } + \anchor{up}{ + \northwest + \pgf@x=0pt + } + \anchor{down}{ + \northwest + \pgf@x=0pt + \pgf@y=-\pgf@y + } + \anchor{out}{ + \northwest + \pgf@y=0pt + \pgf@x=-\pgf@x + } + \anchor{west}{ + \left + } + \anchor{east}{ + \left + \pgf@x=-\pgf@x + } + \anchor{south west}{ \northwest \pgf@y=-\pgf@y } + \anchor{north east}{ \northwest \pgf@x=-\pgf@x } + \anchor{north west}{ \northwest } + \anchor{south east}{ \northwest \pgf@x=-\pgf@x \pgf@y=-\pgf@y } + \anchor{text}{\pgfpoint{-.5\wd\pgfnodeparttextbox}{\dimexpr.5\dp\pgfnodeparttextbox-.5\ht\pgfnodeparttextbox}} + + \backgroundpath{ + \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}} + \northwest + \pgf@circ@res@up = \pgf@y + \pgf@circ@res@down = -\pgf@y + \pgf@circ@res@right = -\pgf@x + \pgf@circ@res@left = \pgf@x + + \pgfscope + \pgfsetlinewidth{\ctikzvalof{tripoles/thickness}\pgflinewidth} + \pgfpathmoveto{\pgfpoint{\ctikzvalof{tripoles/en amp/port width}\pgf@circ@res@left}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\ctikzvalof{tripoles/en amp/port width}\pgf@circ@res@left}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\ctikzvalof{tripoles/en amp/port width}\pgf@circ@res@right}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\ctikzvalof{tripoles/en amp/port width}\pgf@circ@res@right}{\pgf@circ@res@down}} + \pgfpathclose + \pgf@circ@draworfill + \endpgfscope + + \pgfpathmoveto{\pgfpoint + {\pgf@circ@res@left} + {\ctikzvalof{tripoles/en amp/input height}\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint + {\ctikzvalof{tripoles/en amp/port width}\pgf@circ@res@left} + {\ctikzvalof{tripoles/en amp/input height}\pgf@circ@res@up}} + \pgftext[left, at=\pgfpoint{\ctikzvalof{tripoles/en amp/port width}\pgf@circ@res@left}{\ctikzvalof{tripoles/en amp/input height}\pgf@circ@res@up}]{\ctikzvalof{tripoles/en amp/font} \ifpgf@circuit@oa@iplusup$+$\else$-$\fi} + + \pgfpathmoveto{\pgfpoint + {\pgf@circ@res@left} + {\ctikzvalof{tripoles/en amp/input height}\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint + {\ctikzvalof{tripoles/en amp/port width}\pgf@circ@res@left} + {\ctikzvalof{tripoles/en amp/input height}\pgf@circ@res@down}} + \pgftext[left, at=\pgfpoint{\ctikzvalof{tripoles/en amp/port width}\pgf@circ@res@left}{\ctikzvalof{tripoles/en amp/input height}\pgf@circ@res@down}]{\ctikzvalof{tripoles/en amp/font} \ifpgf@circuit@oa@iplusup$-$\else$+$\fi} + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}} + \pgfpathlineto{\pgfpoint{.7\pgf@circ@res@right}{0pt}} + \pgfsetrectcap + \pgfusepath{draw} + + + \pgftext[top, y=-.5ex, at=\pgfpoint{0pt}{\pgf@circ@res@up}]{\hbox{\ctikzvalof{tripoles/en amp/font2}\ctikzvalof{tripoles/en amp/text}}} + % \pgftext[top, y=-.5ex, at=\pgfpoint{0pt}{\pgf@circ@res@up}]{\ctikzvalof{tripoles/en amp/font2}$\mathstrut{\triangleright}\,\mathrm{A}$} + } +} + +%%Transkonduktanzverstärker +\pgfdeclareshape{gm amp} +{ + \anchor{center}{\pgfpointorigin} + \savedanchor\northwest{% + \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/height}\pgf@circ@Rlen + \pgf@y=.5\pgf@y + \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/width}\pgf@circ@Rlen + \pgf@x=.5\pgf@x + } + \anchor{south}{ + \northwest + \pgf@y=-\pgf@y + } + \anchor{north}{ + \northwest + } + \savedanchor\left{% + \pgf@y=0pt + } + \anchor{leftedge} + {\left + \pgf@x = \pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf@x + } + \savedanchor\inOneFixed{% + \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/height}\pgf@circ@Rlen + \pgf@y=.5\pgf@y + \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@y + \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/width}\pgf@circ@Rlen + \pgf@x=.5\pgf@x + } + \anchor{in up}{ + \inOneFixed + } + \anchor{in down}{ + \inOneFixed + \pgf@y=-\pgf@y + } + \savedanchor\inOne{% + \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/height}\pgf@circ@Rlen + \pgf@y=.5\pgf@y + \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/input height}\pgf@y + \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/width}\pgf@circ@Rlen + \pgf@x=.5\pgf@x + \ifpgf@circuit@oa@iplusup\pgf@y=-\pgf@y\fi + } + \anchor{-}{ + \inOne + } + \anchor{+}{ + \inOne + \pgf@y=-\pgf@y + } + \savedanchor\up{% + \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/height}\pgf@circ@Rlen + \pgf@y=.5\pgf@y + \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/width}\pgf@circ@Rlen + \pgf@x=.5\pgf@x + \pgf@circ@res@up = \pgf@y + \pgf@circ@res@right = -\pgf@x + \pgf@circ@res@left = \pgf@x + \pgfpointlineattime{ + \pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/up pos}}{ + \pgfpoint{ + \pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/port width}\pgf@circ@res@left} + {\pgf@circ@res@up}} + {\pgfpoint{.7\pgf@circ@res@right}{0pt}} + } + \anchor{up}{ + \up + } + \anchor{down}{ + \up + \pgf@y=-\pgf@y + } + \anchor{out}{ + \northwest + \pgf@y=0pt + \pgf@x=-\pgf@x + } + \anchor{west}{ + \left + } + \anchor{east}{ + \left + \pgf@x=-\pgf@x + } + \anchor{south west}{ \northwest \pgf@y=-\pgf@y } + \anchor{north east}{ \northwest \pgf@x=-\pgf@x } + \anchor{north west}{ \northwest } + \anchor{south east}{ \northwest \pgf@x=-\pgf@x \pgf@y=-\pgf@y } + + \anchor{text}{\northwest + \pgf@x=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf@x + \pgfpoint{-.5\wd\pgfnodeparttextbox+.25\pgf@x}{\dimexpr.5\dp\pgfnodeparttextbox-.5\ht\pgfnodeparttextbox}} + + \backgroundpath{ + \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}} + + \northwest + \pgf@circ@res@up = \pgf@y + \pgf@circ@res@down = -\pgf@y + \pgf@circ@res@right = -\pgf@x + \pgf@circ@res@left = \pgf@x + + \pgfscope + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/tripoles/thickness}\pgflinewidth} + \pgftransformxshift{.7\pgf@circ@res@left} + \pgf@circ@res@step=\pgf@circ@res@right + \advance\pgf@circ@res@step by -\pgf@circ@res@left + \pgf@circ@res@step=.7\pgf@circ@res@step + %Umrandung: + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0}} %geändert startpunkt neu am ausgangsstrich + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{.5\pgf@circ@res@up}}%vom Ausgang nach oben + \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}} %neu ecke links oben nach rechts oben + \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}} %bei deneigängen runter + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{.5\pgf@circ@res@down}}%ecke links unten nach rechts unten + \pgfpathclose + \pgf@circ@draworfill + \endpgfscope + + \pgfpathmoveto{\pgfpoint + {\pgf@circ@res@left} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/input height}\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/port width}\pgf@circ@res@left} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/input height}\pgf@circ@res@up}} + \pgftext[left, at=\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/port width}\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/input height}\pgf@circ@res@up}]{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/font} \ifpgf@circuit@oa@iplusup$+$\else$-$\fi} + + + \pgfpathmoveto{\pgfpoint + {\pgf@circ@res@left} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/input height}\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/port width}\pgf@circ@res@left} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/input height}\pgf@circ@res@down}} + \pgftext[left, at=\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/port width}\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/input height}\pgf@circ@res@down}]{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/font} \ifpgf@circuit@oa@iplusup$-$\else$+$\fi} + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}} + \pgfpathlineto{\pgfpoint{.3\pgf@circ@res@right}{0pt}} % + \pgfsetrectcap + \pgfusepath{draw} + + } +} + +%% instrumentation amplifier + +\pgfdeclareshape{inst amp} +{ + % when tikz calls the anchor it wants the relative position in the lengths + % \pgf@x \pgf@y + % \pgfpoint* functions set that variables + % anchors are visible outside and run on use + \anchor{center}{\pgfpointorigin} + % savedanchors are internals and run on node creation (not use) + % bounding-box top left + \savedanchor\northwest{% + \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/inst amp/height}\pgf@circ@Rlen + \pgf@y=.5\pgf@y + \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/inst amp/width}\pgf@circ@Rlen + \pgf@x=.5\pgf@x + } + \anchor{nw}{ + \northwest + } + \anchor{south}{ + \northwest + \pgf@y=-\pgf@y + } + \anchor{north}{ + \northwest + } + \savedanchor\left{% + \pgf@y=0pt + } + \anchor{leftedge} + {\left + \pgf@x = \pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf@x + } + \savedanchor\inOneFixed{% + \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/height}\pgf@circ@Rlen + \pgf@y=.5\pgf@y + \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@y + \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/width}\pgf@circ@Rlen + \pgf@x=.5\pgf@x + } + \anchor{in up}{ + \inOneFixed + } + \anchor{in down}{ + \inOneFixed + \pgf@y=-\pgf@y + } + \savedanchor\inOne{% + \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/inst amp/height}\pgf@circ@Rlen + \pgf@y=.5\pgf@y + \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/inst amp/input height}\pgf@y + \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/inst amp/width}\pgf@circ@Rlen + \pgf@x=.5\pgf@x + \ifpgf@circuit@oa@iplusup\pgf@y=-\pgf@y\fi + } + \anchor{-}{ + \inOne + } + \anchor{+}{ + \inOne + \pgf@y=-\pgf@y + } + \savedanchor\up{% + \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/inst amp/height}\pgf@circ@Rlen + \pgf@y=.5\pgf@y + \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/inst amp/width}\pgf@circ@Rlen + \pgf@x=.5\pgf@x + \pgf@circ@res@up = \pgf@y + \pgf@circ@res@right = -\pgf@x + \pgf@circ@res@left = \pgf@x + \pgfpointlineattime{ + \pgfkeysvalueof{/tikz/circuitikz/tripoles/inst amp/up pos}}{ + \pgfpoint{ + \pgfkeysvalueof{/tikz/circuitikz/tripoles/inst amp/port width}\pgf@circ@res@left} + {\pgf@circ@res@up}} + {\pgfpoint{.7\pgf@circ@res@right}{.6\pgf@circ@res@up}} + } + \anchor{up}{ + \up + } + \anchor{down}{ + \up + \pgf@y=-\pgf@y + } + % reference voltage input anchors. + \savedanchor\refv{% + \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/inst amp/height}\pgf@circ@Rlen + \pgf@y=.5\pgf@y + \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/inst amp/width}\pgf@circ@Rlen + \pgf@x=.5\pgf@x + \pgf@circ@res@up = \pgf@y + \pgf@circ@res@right = -\pgf@x + \pgf@circ@res@left = \pgf@x + \pgfpointlineattime{ + \pgfkeysvalueof{/tikz/circuitikz/tripoles/inst amp/refv pos}}{ + \pgfpoint{ + \pgfkeysvalueof{/tikz/circuitikz/tripoles/inst amp/port width}\pgf@circ@res@left} + {\pgf@circ@res@up}} + {\pgfpoint{.7\pgf@circ@res@right}{.6\pgf@circ@res@up}} + } + % we need both because they are normally drawn under the amp, and if you + % mirror it vertically you need them + \anchor{refv up}{ + \refv + } + \anchor{refv down}{ + \refv + \pgf@y=-\pgf@y + } + \anchor{out}{ + \northwest + \pgf@y=0pt + \pgf@x=-\pgf@x + } + \anchor{west}{ + \left + } + \anchor{east}{ + \left + \pgf@x=-\pgf@x + } + \anchor{south west}{ \northwest \pgf@y=-\pgf@y } + \anchor{north east}{ \northwest \pgf@x=-\pgf@x } + \anchor{north west}{ \northwest } + \anchor{south east}{ \northwest \pgf@x=-\pgf@x \pgf@y=-\pgf@y } + + \anchor{text}{\pgfpoint{-.5\wd\pgfnodeparttextbox}{\dimexpr.5\dp\pgfnodeparttextbox-.5\ht\pgfnodeparttextbox}} + + % let's start drawing the component + \backgroundpath{ + \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}} + % + \northwest + \pgf@circ@res@up = \pgf@y + \pgf@circ@res@down = -\pgf@y + \pgf@circ@res@right = -\pgf@x + \pgf@circ@res@left = \pgf@x + % main component, normally in thicker lines + \pgfscope + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/tripoles/thickness}\pgflinewidth} + \pgftransformxshift{.7\pgf@circ@res@left} + \pgf@circ@res@step=\pgf@circ@res@right + \advance\pgf@circ@res@step by -\pgf@circ@res@left + \pgf@circ@res@step=.7\pgf@circ@res@step + %first point (near output) + \pgfpathmoveto{\pgfpoint{1.4\pgf@circ@res@right}{0}} + %from the exit to the top (short side)... (note that the .6 must be copied in \up and \refv anchors + \pgfpathlineto{\pgfpoint{1.4\pgf@circ@res@right}{.6\pgf@circ@res@up}} + % and then to the input "front up", "down", to the output short side "down" + \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{1.4\pgf@circ@res@right}{.6\pgf@circ@res@down}} + % ...and close + \pgfpathclose + \pgf@circ@draworfill + \endpgfscope + % input terminal - + \pgfpathmoveto{\pgfpoint + {\pgf@circ@res@left} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/inst amp/input height}\pgf@circ@res@up}} + % + \pgfpathlineto{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/inst amp/port width}\pgf@circ@res@left} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/inst amp/input height}\pgf@circ@res@up}} + % + \pgftext[left, at=\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/inst amp/port width}\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/inst amp/input height}\pgf@circ@res@up}]{\pgfkeysvalueof{/tikz/circuitikz/tripoles/inst amp/font} \ifpgf@circuit@oa@iplusup$+$\else$-$\fi} + + % input terminal + + \pgfpathmoveto{\pgfpoint + {\pgf@circ@res@left} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/inst amp/input height}\pgf@circ@res@down}} + % + \pgfpathlineto{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/inst amp/port width}\pgf@circ@res@left} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/inst amp/input height}\pgf@circ@res@down}} + \pgftext[left, at=\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/inst amp/port width}\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/inst amp/input height}\pgf@circ@res@down}]{\pgfkeysvalueof{/tikz/circuitikz/tripoles/inst amp/font} \ifpgf@circuit@oa@iplusup$-$\else$+$\fi} + % output lead + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}} + \pgfpathlineto{\pgfpoint{.7\pgf@circ@res@right}{0pt}} % + % + \pgfsetrectcap + \pgfusepath{draw} + } +} + +% instrumentation amplifier, with terminals for gain resistance between inputs +\pgfdeclareshape{inst amp ra} +{ + \anchor{center}{\pgfpointorigin} + % bounding-box top left + \savedanchor\northwest{% + \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/inst amp ra/height}\pgf@circ@Rlen + \pgf@y=.5\pgf@y + \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/inst amp ra/width}\pgf@circ@Rlen + \pgf@x=.5\pgf@x + } + \anchor{nw}{ + \northwest + } + \anchor{south}{ + \northwest + \pgf@y=-\pgf@y\pgf@x=0pt\relax + } + \anchor{north}{ + \northwest\pgf@x=0pt\relax + } + \savedanchor\left{% + \pgf@y=0pt + } + \anchor{leftedge} + {\left + \pgf@x = \pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf@x + } + % inputs (+-) + \savedanchor\inOneFixed{% + \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/height}\pgf@circ@Rlen + \pgf@y=.5\pgf@y + \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@y + \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/width}\pgf@circ@Rlen + \pgf@x=.5\pgf@x + } + \anchor{in up}{ + \inOneFixed + } + \anchor{in down}{ + \inOneFixed + \pgf@y=-\pgf@y + } + \savedanchor\inOne{% + \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/inst amp ra/height}\pgf@circ@Rlen + \pgf@y=.5\pgf@y + \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/inst amp ra/input height}\pgf@y + \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/inst amp ra/width}\pgf@circ@Rlen + \pgf@x=.5\pgf@x + \ifpgf@circuit@oa@iplusup\pgf@y=-\pgf@y\fi + } + \anchor{-}{ + \inOne + } + \anchor{+}{ + \inOne + \pgf@y=-\pgf@y + } + % R ampli anchors. They are by default at 20% more than R-length distance + % you can change that with the `ra pos` key (use 0.5 for one-R). + \savedanchor\raOneFixed{% + \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/height}\pgf@circ@Rlen + \pgf@y=.5\pgf@y + \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@y + \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/width}\pgf@circ@Rlen + \pgf@x=.5\pgf@x + } + \anchor{ra up}{ + \inOneFixed + } + \anchor{ra down}{ + \inOneFixed + \pgf@y=-\pgf@y + } + \savedanchor\raOne{% + \pgf@y=\pgf@circ@Rlen + \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/inst amp ra/ra pos}\pgf@y + \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/inst amp ra/width}\pgf@circ@Rlen + \pgf@x=.5\pgf@x + \ifpgf@circuit@oa@iplusup\pgf@y=-\pgf@y\fi + } + \anchor{ra-}{ + \raOne + } + \anchor{ra+}{ + \raOne + \pgf@y=-\pgf@y + } + % power supplies + \savedanchor\up{% + \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/inst amp ra/height}\pgf@circ@Rlen + \pgf@y=.5\pgf@y + \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/inst amp ra/width}\pgf@circ@Rlen + \pgf@x=.5\pgf@x + \pgf@circ@res@up = \pgf@y + \pgf@circ@res@right = -\pgf@x + \pgf@circ@res@left = \pgf@x + \pgfpointlineattime{ + \pgfkeysvalueof{/tikz/circuitikz/tripoles/inst amp ra/up pos}}{ + \pgfpoint{ + \pgfkeysvalueof{/tikz/circuitikz/tripoles/inst amp ra/port width}\pgf@circ@res@left} + {\pgf@circ@res@up}} + {\pgfpoint{.7\pgf@circ@res@right}{.4\pgf@circ@res@up}} + } + \anchor{up}{ + \up + } + \anchor{down}{ + \up + \pgf@y=-\pgf@y + } + % reference voltage input anchors. + \savedanchor\refv{% + \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/inst amp ra/height}\pgf@circ@Rlen + \pgf@y=0.5\pgf@y + \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/inst amp ra/width}\pgf@circ@Rlen + \pgf@x=0.5\pgf@x + \pgf@circ@res@up = \pgf@y + \pgf@circ@res@right = -\pgf@x + \pgf@circ@res@left = \pgf@x + \pgfpointlineattime{ + \pgfkeysvalueof{/tikz/circuitikz/tripoles/inst amp ra/refv pos}}{ + \pgfpoint{ + \pgfkeysvalueof{/tikz/circuitikz/tripoles/inst amp ra/port width}\pgf@circ@res@left} + {\pgf@circ@res@up}} + {\pgfpoint{.7\pgf@circ@res@right}{.4\pgf@circ@res@up}} + } + % we need both because they are normally drawn under the amp, and if you + % mirror it vertically you need them + \anchor{refv up}{ + \refv + } + \anchor{refv down}{ + \refv + \pgf@y=-\pgf@y + } + \anchor{out}{ + \northwest + \pgf@y=0pt + \pgf@x=-\pgf@x + } + \anchor{west}{ + \left + } + \anchor{east}{ + \left + \pgf@x=-\pgf@x + } + \anchor{south west}{ \northwest \pgf@y=-\pgf@y } + \anchor{north east}{ \northwest \pgf@x=-\pgf@x } + \anchor{north west}{ \northwest } + \anchor{south east}{ \northwest \pgf@x=-\pgf@x \pgf@y=-\pgf@y } + + \anchor{text}{\pgfpoint{-.5\wd\pgfnodeparttextbox}{\dimexpr.5\dp\pgfnodeparttextbox-.5\ht\pgfnodeparttextbox}} + + % drawing of the component + \backgroundpath{ + \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}} + + \northwest + \pgf@circ@res@up = \pgf@y + \pgf@circ@res@down = -\pgf@y + \pgf@circ@res@right = -\pgf@x + \pgf@circ@res@left = \pgf@x + + % main component, normally in thicker lines + \pgfscope + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/tripoles/thickness}\pgflinewidth} + \pgftransformxshift{.7\pgf@circ@res@left} + \pgf@circ@res@step=\pgf@circ@res@right + \advance\pgf@circ@res@step by -\pgf@circ@res@left + \pgf@circ@res@step=.7\pgf@circ@res@step + %primer punto: la linea de salida (lado componente) + \pgfpathmoveto{\pgfpoint{1.4\pgf@circ@res@right}{0}} + %from the exit to the top (short side)... (note that the .4 must be copied in \up anchor + \pgfpathlineto{\pgfpoint{1.4\pgf@circ@res@right}{.4\pgf@circ@res@up}} + % and then to the input "front up", "down", to the output short side "down" + \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{1.4\pgf@circ@res@right}{.4\pgf@circ@res@down}} + % ...and close + \pgfpathclose + \pgf@circ@draworfill + \endpgfscope + + % ra terminal - + \pgfpathmoveto{\pgfpoint + {\pgf@circ@res@left} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/inst amp ra/ra pos}\pgf@circ@Rlen}} + % + \pgfpathlineto{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/inst amp ra/port width}\pgf@circ@res@left} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/inst amp ra/ra pos}\pgf@circ@Rlen}} + % ra terminal + + \pgfpathmoveto{\pgfpoint + {\pgf@circ@res@left} + {-\pgfkeysvalueof{/tikz/circuitikz/tripoles/inst amp ra/ra pos}\pgf@circ@Rlen}} + % + \pgfpathlineto{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/inst amp ra/port width}\pgf@circ@res@left} + {-\pgfkeysvalueof{/tikz/circuitikz/tripoles/inst amp ra/ra pos}\pgf@circ@Rlen}} + % input terminal - + \pgfpathmoveto{\pgfpoint + {\pgf@circ@res@left} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/inst amp ra/input height}\pgf@circ@res@up}} + % + \pgfpathlineto{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/inst amp ra/port width}\pgf@circ@res@left} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/inst amp ra/input height}\pgf@circ@res@up}} + % + \pgftext[left, at=\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/inst amp ra/port width}\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/inst amp ra/input height}\pgf@circ@res@up}]{\pgfkeysvalueof{/tikz/circuitikz/tripoles/inst amp ra/font} \ifpgf@circuit@oa@iplusup$+$\else$-$\fi} + + % input terminal + + \pgfpathmoveto{\pgfpoint + {\pgf@circ@res@left} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/inst amp ra/input height}\pgf@circ@res@down}} + % + \pgfpathlineto{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/inst amp ra/port width}\pgf@circ@res@left} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/inst amp ra/input height}\pgf@circ@res@down}} + \pgftext[left, at=\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/inst amp ra/port width}\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/inst amp ra/input height}\pgf@circ@res@down}]{\pgfkeysvalueof{/tikz/circuitikz/tripoles/inst amp ra/font} \ifpgf@circuit@oa@iplusup$-$\else$+$\fi} + % output lead + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}} + \pgfpathlineto{\pgfpoint{.7\pgf@circ@res@right}{0pt}} % + % + \pgfsetrectcap + \pgfusepath{draw} + } +} +%% Potentiometer +\pgfcircdeclarebipole{ + \anchor{wiper}{ + \northeast + \pgfpoint{0pt}{\pgf@y} + } + \anchor{W}{ + \northeast + \pgfpoint{0pt}{\pgf@y} + } +} +{\ctikzvalof{bipoles/potentiometer/height 2}} +{potentiometer}{\ctikzvalof{bipoles/potentiometer/height}} +{\ctikzvalof{bipoles/potentiometer/width}} +{ + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgftransformationadjustments + \pgfmathsetlength{\pgf@circ@res@step}{\ctikzvalof{bipoles/resistor/width}\pgf@circ@Rlen+\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth} + \divide \pgf@circ@res@step by 12 + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}{\pgf@circ@res@zero}} + + \pgf@circ@res@other = \pgf@circ@res@left + \advance\pgf@circ@res@other by \pgf@circ@res@step + \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{-\pgf@circ@res@down}} + \advance\pgf@circ@res@other by 2\pgf@circ@res@step + \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@down}} + \advance\pgf@circ@res@other by 2\pgf@circ@res@step + \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{-\pgf@circ@res@down}} + \advance\pgf@circ@res@other by 2\pgf@circ@res@step + \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@down}} + \advance\pgf@circ@res@other by 2\pgf@circ@res@step + \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{-\pgf@circ@res@down}} + \advance\pgf@circ@res@other by 2\pgf@circ@res@step + \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@down}} + \advance\pgf@circ@res@other by \pgf@circ@res@step + \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@zero}} + \pgfsetbeveljoin + \pgfusepath{draw} + + \pgfscope + %\pgfsetlinewidth{\pgfstartlinewidth} + \pgfsetarrowsend{latexslim} + \pgfpathmoveto{\pgfpoint{0pt}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{0pt}{-\pgf@circ@res@down}} + \pgfusepath{draw} + \endpgfscope +} + + + + + +%% Generic tunable + +\pgfcircdeclarebipole{ + \anchor{wiper}{ + \northeast + \pgfpoint{0pt}{\pgf@y} + } +} +{\ctikzvalof{bipoles/generic potentiometer/height 2}} +{genericpotentiometer} +{\ctikzvalof{bipoles/generic potentiometer/height}} +{\ctikzvalof{bipoles/generic potentiometer/width}} +{ + + \pgf@circ@res@step = \ctikzvalof{bipoles/resistor/width}\pgf@circ@Rlen + \divide \pgf@circ@res@step by 14 + + \pgfscope + \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{-\pgf@circ@res@down}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}} + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgf@circ@draworfill + \endpgfscope + \pgfscope + %\pgfsetlinewidth{\pgfstartlinewidth} + \pgfsetarrowsend{latexslim} + \pgfpathmoveto{\pgfpoint{0pt}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{0pt}{-\pgf@circ@res@down}} + \pgfusepath{draw} + \endpgfscope +} + + +\pgfdeclareshape{mixer} +{ + \savedanchor\northwest{ + \ifpgf@circuit@boxed + \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/twoport/width}\pgf@circ@Rlen + \pgf@y=.5\pgf@y + \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/bipoles/twoport/width}\pgf@circ@Rlen + \pgf@x=.5\pgf@x + \else + \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/mixer/width}\pgf@circ@Rlen + \pgf@y=.5\pgf@y + \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/mixer/width}\pgf@circ@Rlen + \pgf@x=.5\pgf@x + \fi + } + \anchor{center}{ + \pgfpointorigin + } + \anchor{left}{% + \northwest + \pgf@y=0pt + } + \anchor{1}{ + \northwest + \pgf@y=0pt + } + \anchor{2}{ + \northwest + \pgf@y=-\pgf@y + \pgf@x=0pt + } + \anchor{3}{ + \northwest + \pgf@y=0pt + \pgf@x=-\pgf@x + } + \anchor{4}{ + \northwest + \pgf@y=\pgf@y + \pgf@x=0pt + } + \anchor{in 1}{ + \northwest + \pgf@y=0pt + } + \anchor{in1}{ + \northwest + \pgf@y=0pt + } + \anchor{in}{ + \northwest + \pgf@y=0pt + } + \anchor{in 2}{ + \northwest + \pgf@y=-\pgf@y + \pgf@x=0pt + } + \anchor{in2}{ + \northwest + \pgf@y=-\pgf@y + \pgf@x=0pt + } + \anchor{out}{ + \northwest + \pgf@y=0pt + \pgf@x=-\pgf@x + } + \anchor{center}{ + \pgf@y=0pt + \pgf@x=0pt + } + \anchor{east}{ + \northwest + \pgf@y=0pt + \pgf@x=-\pgf@x + } + \anchor{west}{ + \northwest + \pgf@y=0pt + } + \anchor{south}{ + \northwest + \pgf@x=0pt + \pgf@y=-\pgf@y + } + \anchor{north}{ + \northwest + \pgf@x=0pt + } + \anchor{south west}{ + \northwest + \pgf@y=-\pgf@y + } + \anchor{north east}{ + \northwest + \pgf@x=-\pgf@x + } + \anchor{north west}{ + \northwest + } + \anchor{south east}{ + \northwest + \pgf@x=-\pgf@x + \pgf@y=-\pgf@y + } + \backgroundpath{ + \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}} + + \pgf@circ@res@step=\ctikzvalof{tripoles/mixer/width}\pgf@circ@Rlen + + \pgfscope + \pgfstartlinewidth=\pgflinewidth + + % draw outer box + \ifpgf@circuit@boxed + \pgfnode{box}{center}{}{pgf@box}{\pgfusepath{draw}} + \fi + + % draw outer circle + \ifpgf@circuit@boxed + \pgf@circ@res@step=.7\pgf@circ@res@step + \pgfsetdash{}{0pt} % draw solid circle if boxed + \else + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \fi + \pgfpathcircle{\pgfpoint{0}{0}} {0.5\pgf@circ@res@step} + \pgf@circ@draworfill + + % draw inner stuff + \pgfsetdash{}{0pt} % always draw solid line for inner symbol + \pgfsetlinewidth{\pgfstartlinewidth} + \pgfpathmoveto{\pgfpointorigin} + \pgfpathmoveto{\pgfpointpolar{135}{0.5\pgf@circ@res@step}} + \pgfpathlineto{\pgfpointpolar{-45}{0.5\pgf@circ@res@step}} + \pgfpathmoveto{\pgfpointorigin} + \pgfpathmoveto{\pgfpointpolar{45}{0.5\pgf@circ@res@step}} + \pgfpathlineto{\pgfpointpolar{-135}{0.5\pgf@circ@res@step}} + \pgfusepath{draw} + + \endpgfscope + } +} + +\pgfdeclareshape{adder} +{ + \savedanchor\northwest{ + \ifpgf@circuit@boxed + \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/twoport/width}\pgf@circ@Rlen + \pgf@y=.5\pgf@y + \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/bipoles/twoport/width}\pgf@circ@Rlen + \pgf@x=.5\pgf@x + \else + \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/adder/width}\pgf@circ@Rlen + \pgf@y=.5\pgf@y + \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/adder/width}\pgf@circ@Rlen + \pgf@x=.5\pgf@x + \fi + } + \anchor{center}{ + \pgfpointorigin + } + \anchor{left}{% + \northwest + \pgf@y=0pt + } + \anchor{1}{ + \northwest + \pgf@y=0pt + } + \anchor{2}{ + \northwest + \pgf@y=-\pgf@y + \pgf@x=0pt + } + \anchor{3}{ + \northwest + \pgf@y=0pt + \pgf@x=-\pgf@x + } + \anchor{4}{ + \northwest + \pgf@y=\pgf@y + \pgf@x=0pt + } + \anchor{in 1}{ + \northwest + \pgf@y=0pt + } + \anchor{in1}{ + \northwest + \pgf@y=0pt + } + \anchor{in}{ + \northwest + \pgf@y=0pt + } + \anchor{in 2}{ + \northwest + \pgf@y=-\pgf@y + \pgf@x=0pt + } + \anchor{in2}{ + \northwest + \pgf@y=-\pgf@y + \pgf@x=0pt + } + \anchor{out}{ + \northwest + \pgf@y=0pt + \pgf@x=-\pgf@x + } + \anchor{center}{ + \pgf@y=0pt + \pgf@x=0pt + } + \anchor{east}{ + \northwest + \pgf@y=0pt + \pgf@x=-\pgf@x + } + \anchor{west}{ + \northwest + \pgf@y=0pt + } + \anchor{south}{ + \northwest + \pgf@x=0pt + \pgf@y=-\pgf@y + } + \anchor{north}{ + \northwest + \pgf@x=0pt + } + \anchor{south west}{ + \northwest + \pgf@y=-\pgf@y + } + \anchor{north east}{ + \northwest + \pgf@x=-\pgf@x + } + \anchor{north west}{ + \northwest + } + \anchor{south east}{ + \northwest + \pgf@x=-\pgf@x + \pgf@y=-\pgf@y + } + \backgroundpath{ + \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}} + + \pgf@circ@res@step=\ctikzvalof{tripoles/adder/width}\pgf@circ@Rlen + + \pgfscope + \pgfstartlinewidth=\pgflinewidth + + % draw outer box + \ifpgf@circuit@boxed + \pgfnode{box}{center}{}{pgf@box}{\pgfusepath{draw}} + \fi + + % draw outer circle + \ifpgf@circuit@boxed + \pgf@circ@res@step=.7\pgf@circ@res@step{} + \pgfsetdash{}{0pt} % draw solid circle if boxed + \else + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \fi + \pgfpathcircle{\pgfpoint{0}{0}} {0.5\pgf@circ@res@step} + \pgf@circ@draworfill + + % draw inner stuff + \pgfsetdash{}{0pt} % always draw solid line for inner symbol + \pgfsetlinewidth{\pgfstartlinewidth} + + \pgfpathmoveto{\pgfpointorigin} + \pgfpathmoveto{\pgfpointpolar{0}{0.3\pgf@circ@res@step}} + \pgfpathlineto{\pgfpointpolar{180}{0.3\pgf@circ@res@step}} + \pgfpathmoveto{\pgfpointorigin} + \pgfpathmoveto{\pgfpointpolar{90}{0.3\pgf@circ@res@step}} + \pgfpathlineto{\pgfpointpolar{270}{0.3\pgf@circ@res@step}} + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/tripoles/thickness}\pgflinewidth} + \pgfusepath{draw} + + \endpgfscope + } +} + +\pgfdeclareshape{oscillator} +{ + \savedanchor\northwest{ + \ifpgf@circuit@boxed + \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/twoport/width}\pgf@circ@Rlen + \pgf@y=.5\pgf@y + \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/bipoles/twoport/width}\pgf@circ@Rlen + \else + \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/oscillator/width}\pgf@circ@Rlen + \pgf@y=.5\pgf@y + \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/oscillator/width}\pgf@circ@Rlen + \fi + } + \anchor{center}{ + \pgfpointorigin + } + \anchor{north}{ + \northwest + \pgf@x=.5\pgf@x + } + \anchor{south}{ + \northwest + \pgf@x=.5\pgf@x + \pgf@y=-\pgf@y + } + \anchor{east}{ + \northwest + \pgf@y=0pt + \pgf@x=0pt + } + \anchor{west}{ + \northwest + \pgf@y=0pt + } + \anchor{south west}{ \northwest \pgf@y=-\pgf@y} + \anchor{north east}{ \northwest \pgf@x=0pt\relax} + \anchor{north west}{ \northwest } + \anchor{south east}{ \northwest \pgf@x=0pt \pgf@y=-\pgf@y } + \anchor{text}{ + \pgf@x=-2\pgf@x + \advance \pgf@x by -.5\wd\pgfnodeparttextbox + \advance \pgf@y by -1.5\ht\pgfnodeparttextbox + } + \backgroundpath{ + \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}} + + \pgf@circ@res@step=\ctikzvalof{tripoles/oscillator/width}\pgf@circ@Rlen{} + + \pgfscope + \pgfstartlinewidth=\pgflinewidth + + \pgftransformxshift{-0.5\pgf@circ@res@step} % The oscillator is shifted to the left, so a connection comes out of the anchor "east" + + % draw outer box + \ifpgf@circuit@boxed{} + \pgfnode{box}{center}{}{pgf@box}{\pgfusepath{draw}} + \fi + + % draw outer circle + \ifpgf@circuit@boxed + \pgf@circ@res@step=.7\pgf@circ@res@step{} + \pgfsetdash{}{0pt} % draw solid circle if boxed + \else + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \fi + \pgfpathcircle{\pgfpoint{0}{0}} {0.5\pgf@circ@res@step} + \pgf@circ@draworfill + + % draw inner sine waves + \pgfsetdash{}{0pt} % always draw solid line for inner symbol + \pgfsetlinewidth{\pgfstartlinewidth} + \pgfsetcornersarced{\pgfpointorigin}% do not use rounded corners! + \pgfpathmoveto{\pgfpoint{-0.3\pgf@circ@res@step}{0\pgf@circ@res@step}} + \pgfpathsine{\pgfpoint{.15\pgf@circ@res@step}{.15\pgf@circ@res@step}} + \pgfpathcosine{\pgfpoint{.15\pgf@circ@res@step}{-.15\pgf@circ@res@step}} + \pgfpathsine{\pgfpoint{.15\pgf@circ@res@step}{-.15\pgf@circ@res@step}} + \pgfpathcosine{\pgfpoint{.15\pgf@circ@res@step}{.15\pgf@circ@res@step}} + + \pgfusepath{draw} + + \endpgfscope + } +} + +\pgfdeclareshape{circulator} +{ + \savedanchor\northwest{ + \ifpgf@circuit@boxed + \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/twoport/width}\pgf@circ@Rlen + \pgf@y=.5\pgf@y + \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/bipoles/twoport/width}\pgf@circ@Rlen + \pgf@x=.5\pgf@x + \else + \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/circulator/width}\pgf@circ@Rlen + \pgf@y=.5\pgf@y + \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/circulator/width}\pgf@circ@Rlen + \pgf@x=.5\pgf@x + \fi + } + \anchor{center}{ + \pgfpointorigin + } + \anchor{left}{% + \northwest + \pgf@y=0pt + } + \anchor{1}{ + \northwest + \pgf@y=0pt + } + \anchor{2}{ + \northwest + \pgf@y=0pt + \pgf@x=-\pgf@x + } + \anchor{3}{ + \northwest + \pgf@y=-\pgf@y + \pgf@x=0pt + } + \anchor{east}{ + \northwest + \pgf@y=0pt + \pgf@x=-\pgf@x + } + \anchor{west}{ + \northwest + \pgf@y=0pt + } + \anchor{south}{ + \northwest + \pgf@x=0pt + \pgf@y=-\pgf@y + } + \anchor{north}{ + \northwest + \pgf@x=0pt + } + \anchor{south west}{ + \northwest + \pgf@y=-\pgf@y + } + \anchor{north east}{ + \northwest + \pgf@x=-\pgf@x + } + \anchor{north west}{ + \northwest + } + \anchor{south east}{ + \northwest + \pgf@x=-\pgf@x + \pgf@y=-\pgf@y + } + \backgroundpath{ + \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}} + + \pgf@circ@res@step=\ctikzvalof{tripoles/circulator/width}\pgf@circ@Rlen + + \pgfscope + \pgfstartlinewidth=\pgflinewidth + + % draw outer box + \ifpgf@circuit@boxed + \pgfnode{box}{center}{}{pgf@box}{\pgfusepath{draw}} + \fi + + % draw outer circle + \ifpgf@circuit@boxed{} + \pgf@circ@res@step=.7\pgf@circ@res@step{} + \pgfsetdash{}{0pt} % draw solid circle if boxed + \else + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \fi + \pgfpathcircle{\pgfpoint{0}{0}} {0.5\pgf@circ@res@step} + \pgf@circ@draworfill + + % inner arrow + \pgfsetdash{}{0pt} % always draw solid line for inner symbol + \pgfsetlinewidth{\pgfstartlinewidth} + + \pgfsetarrowsend{latex} + \pgfpathmoveto{\pgfpoint{-0.25\pgf@circ@res@step}{0}} + \pgfpatharc{180}{-90} {0.25\pgf@circ@res@step} + \pgfpathlineto{\pgfpoint{-5pt}{-0.2\pgf@circ@res@step}} + \pgfusepath{draw} + + \endpgfscope + } +} + + +% Wilkinson divider +\pgfdeclareshape{wilkinson}{ + \anchor{center}{ + \northwest + \pgf@x=0pt + \pgf@y=0pt + } + \savedanchor\northwest{% + \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/wilkinson/height}\pgf@circ@Rlen + \pgf@y=.5\pgf@y + \pgf@x= \pgf@circ@Rlen + \pgf@x=.5\pgf@x + \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/wilkinson/width}\pgf@x + } + \anchor{north}{ + \northwest + \pgf@x=0pt + } + \anchor{south}{ + \northwest + \pgf@x=0pt + \pgf@y=-\pgf@y + } + \anchor{west}{ + \northwest + \pgf@y=0pt + } + \anchor{east}{ + \northwest + \pgf@y=0pt + \pgf@x=-\pgf@x + } + \anchor{south west}{ + \northwest + \pgf@y=-\pgf@y + } + \anchor{north east}{ + \northwest + \pgf@x=-\pgf@x + } + \anchor{north west}{ + \northwest + } + \anchor{south east}{ + \northwest + \pgf@x=-\pgf@x + \pgf@y=-\pgf@y + } + \anchor{in}{ + \northwest + \pgf@y=0pt + } + \anchor{out1}{ + \northwest + \pgf@x=-\pgf@x + \pgf@y=-0.5\pgf@y + } + \anchor{out2}{ + \northwest + \pgf@x=-\pgf@x + \pgf@y=0.5\pgf@y + } + \anchor{text}{ + \northwest + \advance \pgf@y by 0.5\ht\pgfnodeparttextbox + \pgf@x=-.5\wd\pgfnodeparttextbox + } + \backgroundpath{ + \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}} + + \northwest + \pgf@circ@res@up = \pgf@y + \pgf@circ@res@down = -\pgf@y + \pgf@circ@res@right = -\pgf@x + \pgf@circ@res@left = \pgf@x + + \pgfstartlinewidth=\pgflinewidth + + % draw outer box + \pgf@circ@twoportbox + + % draw inner stuff + \pgfsetdash{}{0pt} % always draw solid line for inner symbol + \pgfsetarrows{-} %never draw arrows + \pgfsetlinewidth{\pgfstartlinewidth} + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}} + \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@left}{0pt}} + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0.5\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@right}{0.5\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@left}{0pt}} + \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@right}{0.5\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0.5\pgf@circ@res@down}} + + \pgfusepath{draw} + + \pgfsetdash{}{0pt} % always draw solid line for inner symbol + % draw inner resisitor - european or american style is recognised + { + \pgftransformshift{\pgfpoint{0.5\pgf@circ@res@right}{0pt}} + \pgftransformrotate{90} + + % calculate size of resistor + \ifpgf@circuit@europeanresistor + \pgfmathparse{\pgf@circ@res@up / \pgf@circ@Rlen / \ctikzvalof{bipoles/generic/width} / 2} + \pgftransformscale{\pgfmathresult} + \pgfnode{genericshape}{center}{}{pgf@generic}{\pgfusepath{fill}} + \else + \pgfmathparse{\pgf@circ@res@up / \pgf@circ@Rlen / \ctikzvalof{bipoles/resistor/width} / 2} + \pgftransformscale{\pgfmathresult} + \pgfnode{resistorshape}{center}{}{pgf@resistor}{\pgfusepath{fill}} + \fi + } + + \pgfpathmoveto{\pgfpoint{0.5\pgf@circ@res@right}{0.5\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@right}{0.25\pgf@circ@res@up}} + + \pgfpathmoveto{\pgfpoint{0.5\pgf@circ@res@right}{0.25\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@right}{0.5\pgf@circ@res@down}} + \pgfusepath{draw} + + } +} + +% electromechanical device (motor/generator) +\pgfdeclareshape{elmech} +{ + \savedanchor\northwest{ + \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/elmech/height}\pgf@circ@Rlen + \pgf@y=.5\pgf@y + \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/elmech/width}\pgf@circ@Rlen + \pgf@x=.5\pgf@x + } + \anchor{center}{ + \pgfpointorigin + } + \anchor{text}{ + \pgfpointorigin + \advance \pgf@x by -.5\wd\pgfnodeparttextbox + \advance \pgf@y by -.5\ht\pgfnodeparttextbox + } + \anchor{left}{% + \northwest + \pgf@y=0pt + } + \anchor{right}{% + \northwest + \pgf@y=0pt + \pgf@x=-\pgf@x + } + \anchor{top}{ + \northwest + \pgf@x=0pt + } + \anchor{pathstart}{ + \northwest + \pgf@x=0pt + } + \anchor{pathend}{ + \northwest + \pgf@x=0pt + \pgf@y=-\pgf@y + } + \anchor{bottom}{ + \northwest + \pgf@x=0pt + \pgf@y=-\pgf@y + } + \anchor{center}{ + \pgf@y=0pt + \pgf@x=0pt + } + \anchor{east}{ + \northwest + \pgf@y=0pt + \pgf@x=-\pgf@x + } + \anchor{west}{ + \northwest + \pgf@y=0pt + } + \anchor{south}{ + \northwest + \pgf@x=0pt + \pgf@y=-\pgf@y + } + \anchor{north}{ + \northwest + \pgf@x=0pt + } + \anchor{south west}{ \northwest \pgf@y=-\pgf@y } + \anchor{north east}{ \northwest \pgf@x=-\pgf@x } + \anchor{north west}{ \northwest } + \anchor{south east}{ \northwest \pgf@x=-\pgf@x \pgf@y=-\pgf@y } + \backgroundpath{ + \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}} + \pgf@circ@res@step=\ctikzvalof{tripoles/elmech/width}\pgf@circ@Rlen + \pgf@circ@res@up=\ctikzvalof{tripoles/elmech/height}\pgf@circ@Rlen + \pgfscope + \pgfstartlinewidth=\pgflinewidth + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgfscope % clip the bar: whole size minus the circle + \pgfpathrectanglecorners{\pgfpoint{-.5\pgf@circ@res@step}{-.5\pgf@circ@res@up}}{\pgfpoint{.5\pgf@circ@res@step}{.5\pgf@circ@res@up}} + \pgfpathcircle{\pgfpoint{0}{0}} {0.5\pgf@circ@res@step} + \pgfseteorule + \pgfusepath{clip} + \pgfpathrectangle{\pgfpoint{-.25\pgf@circ@res@step}{-.5\pgf@circ@res@up}}{\pgfpoint{.5\pgf@circ@res@step}{\pgf@circ@res@up}} + \pgfsetfillcolor{black} + \pgfusepath{fill, draw} + \endpgfscope + \pgfpathcircle{\pgfpoint{0}{0}} {0.5\pgf@circ@res@step} + \ifx\tikz@fillcolor\pgfutil@empty + \pgfsetfillcolor{white} + \else + \pgfsetfillcolor{\tikz@fillcolor} + \fi + \pgfusepath{draw, fill} + \endpgfscope + } +} + +\pgfdeclareshape{magnetron} +{ + \savedanchor\northwest{ + \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/magnetron/width}\pgf@circ@Rlen + \pgf@y=.5\pgf@y + \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/magnetron/width}\pgf@circ@Rlen + \pgf@x=.5\pgf@x + } + \anchor{center}{ + \pgfpointorigin + } + \anchor{anode}{ + \northwest + \pgf@x=0pt + \pgf@y=-\pgf@y + } + \anchor{cathode1}{ + \northwest + \pgf@circ@res@step=\pgf@y + \pgfmathparse{cos(105)} + \pgf@x=\pgfmathresult\pgf@circ@res@step + \pgfmathparse{sin(105)} + \pgf@y=\pgfmathresult\pgf@circ@res@step + %\pgfpointorigin + %\pgfpathmoveto{\pgfpointpolar{105}{\pgf@circ@res@step}}%not working in a scaled tikzpicture + } + \anchor{cathode2}{ + \northwest + \pgf@circ@res@step=\pgf@y + \pgfmathparse{cos(75)} + \pgf@x=\pgfmathresult\pgf@circ@res@step + \pgfmathparse{sin(75)} + \pgf@y=\pgfmathresult\pgf@circ@res@step + %\pgfpointorigin + %\pgfpathmoveto{\pgfpointpolar{75}{\pgf@circ@res@step}}%not working in a scaled tikzpicture + } + \anchor{text}{ + \pgfpointorigin + \advance \pgf@x by -.5\wd\pgfnodeparttextbox + \advance \pgf@y by -.5\ht\pgfnodeparttextbox + } + \anchor{left}{% + \northwest + \pgf@y=0pt + } + \anchor{right}{% + \northwest + \pgf@y=0pt + \pgf@x=-\pgf@x + } + \anchor{top}{ + \northwest + \pgf@x=0pt + } + \anchor{pathstart}{ + \northwest + \pgf@x=0pt + } + \anchor{pathend}{ + \northwest + \pgf@x=0pt + \pgf@y=-\pgf@y + } + \anchor{bottom}{ + \northwest + \pgf@x=0pt + \pgf@y=-\pgf@y + } + \anchor{center}{ + \pgf@y=0pt + \pgf@x=0pt + } + \anchor{east}{ + \northwest + \pgf@y=0pt + \pgf@x=-\pgf@x + } + \anchor{west}{ + \northwest + \pgf@y=0pt + } + \anchor{south}{ + \northwest + \pgf@x=0pt + \pgf@y=-\pgf@y + } + \anchor{north}{ + \northwest + \pgf@x=0pt + } + \anchor{south west}{ \northwest \pgf@y=-\pgf@y } + \anchor{north east}{ \northwest \pgf@x=-\pgf@x } + \anchor{north west}{ \northwest } + \anchor{south east}{ \northwest \pgf@x=-\pgf@x \pgf@y=-\pgf@y } + \backgroundpath{ + \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}} + \pgf@circ@res@step=\ctikzvalof{tripoles/magnetron/width}\pgf@circ@Rlen + \northwest + \pgf@circ@res@up = \pgf@y + \pgf@circ@res@down = -\pgf@y + \pgf@circ@res@right = -\pgf@x + \pgf@circ@res@left = \pgf@x + \pgfmathsetlength{\pgf@circ@res@other}{sin(15)*\pgf@circ@res@up} + + \pgfscope + \pgfstartlinewidth=\pgflinewidth + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + %create outer circle + \pgfpathcircle{\pgfpoint{0}{0}} {\pgf@circ@res@right} + \pgf@circ@draworfill + %create chambers + \foreach \angle in {45,135,225,315}{ + \pgfpathmoveto{ \pgfpointpolar{\angle}{0.6\pgf@circ@res@right}} + \pgfpathlineto{ \pgfpointpolar{\angle}{\pgf@circ@res@right}} + } + \pgfsetroundcap + \pgfusepath{draw} + \pgfscope + %draw connection from outside + %anode + \pgfsetlinewidth{\pgfstartlinewidth} + \pgfpathmoveto{\pgfpoint{0\pgf@circ@res@left}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{0\pgf@circ@res@right}{.5\pgf@circ@res@down}} + %cathodes + \pgfpathmoveto{\pgfpointpolar{105}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{-\pgf@circ@res@other}{.5\pgf@circ@res@up}} + \pgfpathmoveto{\pgfpointpolar{75}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{.5\pgf@circ@res@up}} + \pgfsetbuttcap + \pgfusepath{draw} + \endpgfscope + %create cathode + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@other}{.5\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{0}{.15\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{-\pgf@circ@res@other}{.5\pgf@circ@res@up}} + \pgfusepath{draw} + %create anode + \pgfpathmoveto{\pgfpoint{0.3\pgf@circ@res@left}{.5\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{0.3\pgf@circ@res@right}{.5\pgf@circ@res@down}} + + \pgfsetbuttcap + \pgfusepath{draw} + \endpgfscope + } +} + +% Electronic tubes, submitted by J. op den Brouw + +% Draw tube outline +\def\pgf@circ@tubes@drawtube{% + \ifdim\ctikzvalof{tubes/width}pt>\ctikzvalof{tubes/height}pt\relax + \pgfpathmoveto{\pgfpoint{0pt}{\pgf@circ@res@up}} + \pgfutil@tempdima=\pgf@circ@res@right + \advance\pgfutil@tempdima by -\pgf@circ@res@up + \pgfpathlineto{\pgfpoint{\pgfutil@tempdima}{\pgf@circ@res@up}} + \pgfpatharc{90}{-90}{\pgf@circ@res@up} + \pgfpathlineto{\pgfpoint{-\pgfutil@tempdima}{-\pgf@circ@res@up}} + \pgfpatharc{270}{90}{\pgf@circ@res@up} + \else + \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@right}{0pt}} + \pgfutil@tempdima=\pgf@circ@res@up + \advance\pgfutil@tempdima by -\pgf@circ@res@right + \pgfpathlineto{\pgfpoint{-\pgf@circ@res@right}{\pgfutil@tempdima}} + \pgfpatharc{180}{0}{\pgf@circ@res@right} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{-\pgfutil@tempdima}} + \pgfpatharc{180}{0}{-\pgf@circ@res@right} + \fi + \pgfpathclose +} + +%% The diode (tube), triode, tetrode and pentode only differ in the +%% number of grids. So we construct a generic declare function in +%% which we can put code for the grid anchors and grid drawing code +%% \pgfcircdeclaretube{tube name}{grid anchors}{grid drawing code} +\long\def\pgfcircdeclaretube#1#2#3{% + \pgfdeclareshape{#1}{ + \anchor{center}{ + \pgfpointorigin + } + \savedanchor\northwest{% + \pgf@circ@res@up=\ctikzvalof{tubes/height}\pgf@circ@Rlen + \pgf@circ@res@right=\ctikzvalof{tubes/width}\pgf@circ@Rlen + % x and y should be half the Rlen + \pgf@y=\pgf@circ@res@up + \pgf@y=.5\pgf@y + \pgf@x=-\pgf@circ@res@right + \pgf@x=.5\pgf@x + } + \anchor{north} {% + \northwest + \pgf@x=0pt + } + \anchor{east}{% + \northwest + \pgf@x=-\pgf@x + \pgf@y=0pt + } + \anchor{south}{% + \northwest + \pgf@y=-\pgf@y + \pgf@x=0pt + } + \anchor{west}{% + \northwest + \pgf@y=0pt + } + \anchor{north west}{% + \northwest + } + \anchor{north east}{% + \northwest + \pgf@x=-\pgf@x + } + \anchor{south east}{ + \northwest + \pgf@x=-\pgf@x + \pgf@y=-\pgf@y + } + \anchor{south west}{ + \northwest + \pgf@y=-\pgf@y + } + \anchor{anode} {% + \northwest + \pgf@x=0pt + } + \anchor{cathode}{% + \northwest + \pgf@y=-\pgf@y + \pgf@x=\ctikzvalof{tubes/cathode width}\pgf@x + } + \anchor{cathode 1}{% + \northwest + \pgf@y=-\pgf@y + \pgf@x=\ctikzvalof{tubes/cathode width}\pgf@x + } + \anchor{cathode 2}{% + \northwest + \pgf@y=-\pgf@y + \pgf@x=-\ctikzvalof{tubes/cathode width}\pgf@x + } + \anchor{filament 1}{% + \northwest + \pgfmathparse{(\ctikzvalof{tubes/tube radius}*sin(\ctikzvalof{tubes/filament angle})} + \pgf@x=\pgfmathresult\pgf@x + \pgf@y=-\pgf@y + } + \anchor{filament 2}{% + \northwest + \pgfmathparse{(\ctikzvalof{tubes/tube radius}*sin(\ctikzvalof{tubes/filament angle})} + \pgf@x=-\pgfmathresult\pgf@x + \pgf@y=-\pgf@y + } + + % Extra anchors + #2 + + \backgroundpath{ + \pgfscope + % Line width for tripoles + \pgfsetlinewidth{\ctikzvalof{tripoles/thickness}\pgflinewidth} + + % Setup to draw tube + \pgf@circ@res@up=\ctikzvalof{tubes/height}\pgf@circ@Rlen + \pgf@circ@res@right=\ctikzvalof{tubes/width}\pgf@circ@Rlen + \pgf@circ@res@up=\ctikzvalof{tubes/tube radius}\pgf@circ@res@up + \pgf@circ@res@right=\ctikzvalof{tubes/tube radius}\pgf@circ@res@right + + % Tube fill color (if any) + \ifx\tikz@fillcolor\pgfutil@empty + \else + \pgfscope + \pgfsetfillcolor{\tikz@fillcolor} + \pgf@circ@tubes@drawtube + \pgfusepath{fill} + \endpgfscope + \fi + + % Tube outline + \pgf@circ@tubes@drawtube + + % Setup to draw grid, filament, anode and cathode + \pgf@circ@res@up=\ctikzvalof{tubes/height}\pgf@circ@Rlen + \pgf@circ@res@right=\ctikzvalof{tubes/width}\pgf@circ@Rlen + \pgf@circ@res@up=0.5\pgf@circ@res@up + \pgf@circ@res@right=0.5\pgf@circ@res@right + + % Grid drawing + #3 + + % Filament (is not drawn by default) + \ifpgf@circuit@tubes@filament + \pgf@circ@res@temp=-\ctikzvalof{tubes/cathode distance}\pgf@circ@res@up + \advance\pgf@circ@res@temp by -\ctikzvalof{tubes/filament distance}\pgf@circ@res@up + \pgfmathparse{(\ctikzvalof{tubes/tube radius}*sin(\ctikzvalof{tubes/filament angle})} + \pgf@xa=\pgfmathresult\pgf@circ@res@right + \pgfmathparse{\ctikzvalof{tubes/tube radius}+\ctikzvalof{tubes/tube radius}*cos(\ctikzvalof{tubes/filament angle}} + \pgf@ya=\pgfmathresult\pgf@circ@res@up + \pgfpathmoveto{\pgfpoint{0pt}{\pgf@circ@res@temp}} + \pgfpathlineto{\pgfpoint{-\pgf@xa}{-\pgf@ya}} + \pgfpathlineto{\pgfpoint{-\pgf@xa}{-\pgf@circ@res@up}} + \pgfpathmoveto{\pgfpoint{0pt}{\pgf@circ@res@temp}} + \pgfpathlineto{\pgfpoint{\pgf@xa}{-\pgf@ya}} + \pgfpathlineto{\pgfpoint{\pgf@xa}{-\pgf@circ@res@up}} + \pgf@circuit@tubes@filamentfalse + \fi + + % Anode (or plate) + \pgfpathmoveto{\pgfpoint{0pt}{\pgf@circ@res@up}} % north + \pgfpathlineto{\pgfpoint{0pt}{\ctikzvalof{tubes/anode distance}\pgf@circ@res@up}} + \pgfpathmoveto{\pgfpoint{-\ctikzvalof{tubes/anode width}\pgf@circ@res@right}{\ctikzvalof{tubes/anode distance}\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\ctikzvalof{tubes/anode width}\pgf@circ@res@right}{\ctikzvalof{tubes/anode distance}\pgf@circ@res@up}} + + % Cathode + \ifpgf@circuit@tubes@nocathode + \pgf@circuit@tubes@nocathodefalse + \else + \pgfsetcornersarced{\pgfpoint{\ctikzvalof{tubes/cathode corners}\pgf@circ@res@up}{\ctikzvalof{tubes/cathode corners}\pgf@circ@res@up}} + \pgfpathmoveto{\pgfpoint{-\ctikzvalof{tubes/cathode width}\pgf@circ@res@right}{-\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{-\ctikzvalof{tubes/cathode width}\pgf@circ@res@right}{-\ctikzvalof{tubes/cathode distance}\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\ctikzvalof{tubes/cathode width}\pgf@circ@res@right}{-\ctikzvalof{tubes/cathode distance}\pgf@circ@res@up}} + \ifpgf@circuit@tubes@fullcathode + \pgfpathlineto{\pgfpoint{\ctikzvalof{tubes/cathode width}\pgf@circ@res@right}{-\pgf@circ@res@up}} + \pgf@circuit@tubes@fullcathodefalse + \else + \pgfpathlineto{\pgfpoint{\ctikzvalof{tubes/cathode width}\pgf@circ@res@right}{-\ctikzvalof{tubes/cathode distance}\pgf@circ@res@up-\ctikzvalof{tubes/cathode right extend}\pgf@circ@res@up}} + \fi + \fi + + % Draw the background + \pgfusepath{draw} + + \endpgfscope + } + } +} + +\pgfcircdeclaretube{diodetube}{}{} % shape diode already exists + +\pgfcircdeclaretube{triode} +{ + \anchor{grid} {% should not be used + \northwest + \pgf@y=\ctikzvalof{tubes/grid shift}\pgf@y + } + \anchor{control} {% + \northwest + \pgf@y=\ctikzvalof{tubes/grid shift}\pgf@y + } +} +{ + % Grid protrusion + \pgf@xa=-\ctikzvalof{tubes/tube radius}\pgf@circ@res@right + \advance\pgf@xa by -\ctikzvalof{tubes/grid protrusion}\pgf@circ@res@right + \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@right}{\ctikzvalof{tubes/grid shift}\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\pgf@xa}{\ctikzvalof{tubes/grid shift}\pgf@circ@res@up}} + % Grid dashes: calculations + \pgf@xb=2\pgf@circ@res@right + \pgf@circ@res@step=\ctikzvalof{tubes/tube radius}\pgf@xb + \pgf@circ@count@a=\ctikzvalof{tubes/grid dashes} % dashes*2+1 + \multiply\pgf@circ@count@a by 2\relax + \advance\pgf@circ@count@a by 1\relax + \advance\pgf@circ@res@step by -\pgf@xa + \divide\pgf@circ@res@step by \pgf@circ@count@a + % Grid dashes: draw + \pgf@circ@res@temp=\pgf@xa + \pgf@circ@count@a=\ctikzvalof{tubes/grid dashes} + \loop + \advance\pgf@circ@res@temp by\pgf@circ@res@step + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@temp}{\ctikzvalof{tubes/grid shift}\pgf@circ@res@up}} + \advance\pgf@circ@res@temp by\pgf@circ@res@step + \pgfpathlineto{\pgfpoint{\pgf@circ@res@temp}{\ctikzvalof{tubes/grid shift}\pgf@circ@res@up}} + \advance\pgf@circ@count@a by-1 + \ifnum\pgf@circ@count@a>0\relax + \repeat +} + +\pgfcircdeclaretube{tetrode} +{ + \anchor{grid} {% should not be used + \northwest + \pgfutil@tempdima=\pgf@y + \pgf@y=-\ctikzvalof{tubes/grid separation}\pgf@y + \pgf@y=0.5\pgf@y + \advance\pgf@y by \ctikzvalof{tubes/grid shift}\pgfutil@tempdima + } + \anchor{control} {% + \northwest + \pgfutil@tempdima=\pgf@y + \pgf@y=-\ctikzvalof{tubes/grid separation}\pgf@y + \pgf@y=0.5\pgf@y + \advance\pgf@y by \ctikzvalof{tubes/grid shift}\pgfutil@tempdima + } + \anchor{screen} {% + \northwest + \pgfutil@tempdima=\pgf@y + \pgf@y=\ctikzvalof{tubes/grid separation}\pgf@y + \pgf@y=0.5\pgf@y + \advance\pgf@y by \ctikzvalof{tubes/grid shift}\pgfutil@tempdima + } +} +{ + % Grid x/y points + \pgf@xa=-\ctikzvalof{tubes/tube radius}\pgf@circ@res@right + \advance\pgf@xa by -\ctikzvalof{tubes/grid protrusion}\pgf@circ@res@right + \pgfutil@tempdima=\ctikzvalof{tubes/grid separation}\pgf@circ@res@up + \pgfutil@tempdimb=-\pgfutil@tempdima + \pgfutil@tempdima=0.5\pgfutil@tempdima + \advance\pgfutil@tempdima by \ctikzvalof{tubes/grid shift}\pgf@circ@res@up + \pgfutil@tempdimb=0.5\pgfutil@tempdimb + \advance\pgfutil@tempdimb by \ctikzvalof{tubes/grid shift}\pgf@circ@res@up + % Grid protrusion + \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@right}{\pgfutil@tempdimb}} + \pgfpathlineto{\pgfpoint{\pgf@xa}{\pgfutil@tempdimb}} + \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@right}{\pgfutil@tempdima}} + \pgfpathlineto{\pgfpoint{\pgf@xa}{\pgfutil@tempdima}} + % Grid dashes: calculations + \pgf@xb=2\pgf@circ@res@right + \pgf@circ@res@step=\ctikzvalof{tubes/tube radius}\pgf@xb + \pgf@circ@count@a=\ctikzvalof{tubes/grid dashes} % dashes*2+1 + \multiply\pgf@circ@count@a by 2\relax + \advance\pgf@circ@count@a by 1\relax + \advance\pgf@circ@res@step by -\pgf@xa + \divide\pgf@circ@res@step by \pgf@circ@count@a + % Grid dashes: draw + \pgf@circ@res@temp=\pgf@xa + \pgf@circ@count@a=\ctikzvalof{tubes/grid dashes} + \loop + \advance\pgf@circ@res@temp by\pgf@circ@res@step + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@temp}{\pgfutil@tempdima}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@temp+\pgf@circ@res@step}{\pgfutil@tempdima}} + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@temp}{\pgfutil@tempdimb}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@temp+\pgf@circ@res@step}{\pgfutil@tempdimb}} + \advance\pgf@circ@res@temp by\pgf@circ@res@step + \advance\pgf@circ@count@a by-1 + \ifnum\pgf@circ@count@a>0\relax + \repeat +} + +\pgfcircdeclaretube{pentode} +{ + \anchor{grid} {% should not be used + \northwest + \pgfutil@tempdima=\pgf@y + \pgf@y=-\ctikzvalof{tubes/grid separation}\pgf@y + \advance\pgf@y by \ctikzvalof{tubes/grid shift}\pgfutil@tempdima + } + \anchor{control} {% + \northwest + \pgfutil@tempdima=\pgf@y + \pgf@y=-\ctikzvalof{tubes/grid separation}\pgf@y + \advance\pgf@y by \ctikzvalof{tubes/grid shift}\pgfutil@tempdima + } + \anchor{screen} {% + \northwest + \pgf@y=\ctikzvalof{tubes/grid shift}\pgf@y + } + \anchor{suppressor} {% + \northwest + \pgfutil@tempdima=\pgf@y + \pgf@y=\ctikzvalof{tubes/grid separation}\pgf@y + \advance\pgf@y by \ctikzvalof{tubes/grid shift}\pgfutil@tempdima + } +} +{ + % Grid x/y points + \pgf@xa=-\ctikzvalof{tubes/tube radius}\pgf@circ@res@right + \advance\pgf@xa by -\ctikzvalof{tubes/grid protrusion}\pgf@circ@res@right + \pgfutil@tempdima=\ctikzvalof{tubes/grid separation}\pgf@circ@res@up + \pgfutil@tempdimb=-\pgfutil@tempdima + \advance\pgfutil@tempdima by \ctikzvalof{tubes/grid shift}\pgf@circ@res@up + \advance\pgfutil@tempdimb by \ctikzvalof{tubes/grid shift}\pgf@circ@res@up + \pgf@circ@res@other=\ctikzvalof{tubes/grid shift}\pgf@circ@res@up + % Grid protrusion + \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@right}{\pgfutil@tempdimb}} + \pgfpathlineto{\pgfpoint{\pgf@xa}{\pgfutil@tempdimb}} + \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@right}{\pgfutil@tempdima}} + \pgfpathlineto{\pgfpoint{\pgf@xa}{\pgfutil@tempdima}} + \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@right}{\pgf@circ@res@other}} + \pgfpathlineto{\pgfpoint{\pgf@xa}{\pgf@circ@res@other}} + % Grid dashes: calculations + \pgf@xb=2\pgf@circ@res@right + \pgf@circ@res@step=\ctikzvalof{tubes/tube radius}\pgf@xb + \pgf@circ@count@a=\ctikzvalof{tubes/grid dashes} % dashes*2+1 + \multiply\pgf@circ@count@a by 2\relax + \advance\pgf@circ@count@a by 1\relax + \advance\pgf@circ@res@step by -\pgf@xa + \divide\pgf@circ@res@step by \pgf@circ@count@a + % Grid dashes: draw + \pgf@circ@res@temp=\pgf@xa + \pgf@circ@count@a=\ctikzvalof{tubes/grid dashes} + \loop + \advance\pgf@circ@res@temp by\pgf@circ@res@step + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@temp}{\pgfutil@tempdima}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@temp+\pgf@circ@res@step}{\pgfutil@tempdima}} + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@temp}{\pgfutil@tempdimb}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@temp+\pgf@circ@res@step}{\pgfutil@tempdimb}} + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@temp}{\pgf@circ@res@other}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@temp+\pgf@circ@res@step}{\pgf@circ@res@other}} + \advance\pgf@circ@res@temp by\pgf@circ@res@step + \advance\pgf@circ@count@a by-1 + \ifnum\pgf@circ@count@a>0\relax + \repeat +} + +\pgfcircdeclaretube{pentode suppressor to cathode} +{ + \anchor{grid} {% should not be used + \northwest + \pgfutil@tempdima=\pgf@y + \pgf@y=-\ctikzvalof{tubes/grid separation}\pgf@y + \advance\pgf@y by \ctikzvalof{tubes/grid shift}\pgfutil@tempdima + } + \anchor{control} {% + \northwest + \pgfutil@tempdima=\pgf@y + \pgf@y=-\ctikzvalof{tubes/grid separation}\pgf@y + \advance\pgf@y by \ctikzvalof{tubes/grid shift}\pgfutil@tempdima + } + \anchor{screen} {% + \northwest + \pgf@y=\ctikzvalof{tubes/grid shift}\pgf@y + } +} +{ + % Grid x/y points + \pgf@xa=-\ctikzvalof{tubes/tube radius}\pgf@circ@res@right + \advance\pgf@xa by -\ctikzvalof{tubes/grid protrusion}\pgf@circ@res@right + \pgfutil@tempdima=\ctikzvalof{tubes/grid separation}\pgf@circ@res@up + \pgfutil@tempdimb=-\pgfutil@tempdima + \advance\pgfutil@tempdima by \ctikzvalof{tubes/grid shift}\pgf@circ@res@up + \advance\pgfutil@tempdimb by \ctikzvalof{tubes/grid shift}\pgf@circ@res@up + \pgf@circ@res@other=\ctikzvalof{tubes/grid shift}\pgf@circ@res@up + % Grid protrusion + \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@right}{\pgfutil@tempdimb}} + \pgfpathlineto{\pgfpoint{\pgf@xa}{\pgfutil@tempdimb}} + \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@right}{\pgf@circ@res@other}} + \pgfpathlineto{\pgfpoint{\pgf@xa}{\pgf@circ@res@other}} + % Grid dashes: calculations + \pgf@xb=2\pgf@circ@res@right + \pgf@circ@res@step=\ctikzvalof{tubes/tube radius}\pgf@xb + \pgf@circ@count@a=\ctikzvalof{tubes/grid dashes} % dashes*2+1 + \multiply\pgf@circ@count@a by 2\relax + \advance\pgf@circ@count@a by 1\relax + \advance\pgf@circ@res@step by -\pgf@xa + \divide\pgf@circ@res@step by \pgf@circ@count@a + % Grid dashes: draw + \pgf@circ@res@temp=\pgf@xa + \pgf@circ@count@a=\ctikzvalof{tubes/grid dashes} + \loop + \advance\pgf@circ@res@temp by\pgf@circ@res@step + \ifnum\pgf@circ@count@a>1\relax + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@temp}{\pgfutil@tempdimb}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@temp+\pgf@circ@res@step}{\pgfutil@tempdimb}} + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@temp}{\pgf@circ@res@other}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@temp+\pgf@circ@res@step}{\pgf@circ@res@other}} + \fi + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@temp}{\pgfutil@tempdima}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@temp+\pgf@circ@res@step}{\pgfutil@tempdima}} + \advance\pgf@circ@res@temp by\pgf@circ@res@step + \advance\pgf@circ@count@a by-1 + \ifnum\pgf@circ@count@a>0\relax + \repeat + % Grid: connection from suppressor to cathode + \pgfsetcornersarced{\pgfpoint{\ctikzvalof{tubes/cathode corners}\pgf@circ@res@up}{\ctikzvalof{tubes/cathode corners}\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@temp}{\pgfutil@tempdima-2*\ctikzvalof{tubes/grid separation}\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\ctikzvalof{tubes/cathode width}\pgf@circ@res@right-0.4142136*\ctikzvalof{tubes/cathode corners}\pgf@circ@res@right}{-\ctikzvalof{tubes/cathode distance}\pgf@circ@res@up-0.4142136*\ctikzvalof{tubes/cathode corners}\pgf@circ@res@up}} + +} + +%%%---------- close: tex/pgfcirctripoles +%%%%%%%%%%% Springe nach tex/pgfcircquadpoles +%%%---------- open: tex/pgfcircquadpoles.tex +% Copyright 2007-2009 by Massimo Redaelli +% +% This file may be distributed and/or modified +% +% 1. under the LaTeX Project Public License and/or +% 2. under the GNU Public License. +% +% See the files gpl-3.0_license.txt and lppl-1-3c_license.txt for more details. + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Quadripoles + +\long\def\pgfcircdeclarequadpole#1#2#3{ + \pgfdeclareshape{#1} + { + \anchor{center}{ + \northwest + \pgf@x=0pt + \pgf@y=0pt + } + \savedmacro{\stretto}{\def\stretto{\ctikzvalof{quadpoles/#1/inner}}} + \savedanchor\northwest{% + \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/#1/height}\pgf@circ@Rlen + \pgf@y=.5\pgf@y + \pgf@x=.5\pgf@circ@Rlen + \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/quadpoles/#1/width}\pgf@x + } + \anchor{A2}{ + \northwest + \pgf@y=-\pgf@y + } + \anchor{B1}{ + \northwest + \pgf@x=-\pgf@x + } + \anchor{A1}{ + \northwest + } + \anchor{B2}{ + \northwest + \pgf@x=-\pgf@x + \pgf@y=-\pgf@y + } + %% notice for the dot anchors: I use the cute inductors as reference + %% size; if you change one you have to change all of them. + \anchor{inner dot A1}{ + \northwest + \pgfmathsetlength\pgf@x{\stretto*\pgf@x + + \ctikzvalof{bipoles/cuteinductor/height}*\pgf@circ@Rlen/2} + \pgfmathsetlength\pgf@y{0.5*\pgf@circ@Rlen} + } + \anchor{outer dot A1}{ + \northwest + \pgfmathsetlength\pgf@x{\stretto*\pgf@x - + \ctikzvalof{bipoles/cuteinductor/height}*\pgf@circ@Rlen/2} + \pgfmathsetlength\pgf@y{0.5*\pgf@circ@Rlen} + } + \anchor{inner dot A2}{ + \northwest + \pgfmathsetlength\pgf@x{\stretto*\pgf@x + + \ctikzvalof{bipoles/cuteinductor/height}*\pgf@circ@Rlen/2} + \pgfmathsetlength\pgf@y{-0.5*\pgf@circ@Rlen} + } + \anchor{outer dot A2}{ + \northwest + \pgfmathsetlength\pgf@x{\stretto*\pgf@x - + \ctikzvalof{bipoles/cuteinductor/height}*\pgf@circ@Rlen/2} + \pgfmathsetlength\pgf@y{-0.5*\pgf@circ@Rlen} + } + \anchor{inner dot B1}{ + \northwest + \pgfmathsetlength\pgf@x{-\stretto*\pgf@x - + \ctikzvalof{bipoles/cuteinductor/height}*\pgf@circ@Rlen/2} + \pgfmathsetlength\pgf@y{0.5*\pgf@circ@Rlen} + } + \anchor{outer dot B1}{ + \northwest + \pgfmathsetlength\pgf@x{-\stretto*\pgf@x + + \ctikzvalof{bipoles/cuteinductor/height}*\pgf@circ@Rlen/2} + \pgfmathsetlength\pgf@y{0.5*\pgf@circ@Rlen} + } + \anchor{inner dot B2}{ + \northwest + \pgfmathsetlength\pgf@x{-\stretto*\pgf@x - + \ctikzvalof{bipoles/cuteinductor/height}*\pgf@circ@Rlen/2} + \pgfmathsetlength\pgf@y{-0.5*\pgf@circ@Rlen} + } + \anchor{outer dot B2}{ + \northwest + \pgfmathsetlength\pgf@x{-\stretto*\pgf@x + + \ctikzvalof{bipoles/cuteinductor/height}*\pgf@circ@Rlen/2} + \pgfmathsetlength\pgf@y{-0.5*\pgf@circ@Rlen} + } + \anchor{north}{ + \northwest + \pgf@x=0pt + } + \anchor{south}{ + \northwest + \pgf@x=0pt + \pgf@y=-\pgf@y + } + \anchor{west}{ + \northwest + \pgf@y=0pt + } + \anchor{east}{ + \northwest + \pgf@y=0pt + \pgf@x=-\pgf@x + } + \anchor{south west}{ + \northwest + \pgf@y=-\pgf@y + } + \anchor{north east}{ + \northwest + \pgf@x=-\pgf@x + } + \anchor{north west}{ + \northwest + } + \anchor{south east}{ + \northwest + \pgf@x=-\pgf@x + \pgf@y=-\pgf@y + } + \anchor{base}{ + \northwest + \pgf@x=0pt + } + #3 + \backgroundpath{ + \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}} + + \northwest + \pgf@circ@res@up = \pgf@y + \pgf@circ@res@down = -\pgf@y + \pgf@circ@res@right = -\pgf@x + \pgf@circ@res@left = \pgf@x + #2 + } + } +} + + +\def\pgf@circ@drawtransformerbasicanchor{ + \pgfkeysvalueof{/tikz/circuitikz/quadpoles/trans/height} + \anchor{AA2}{ + \northwest + \pgf@x=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/width1}\pgf@x + \pgf@x=.7\pgf@x + \pgf@y=-\pgf@y + \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/height1}\pgf@y + } + \anchor{BB1}{ + \northwest + \pgf@x=-\pgf@x + \pgf@x=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/width1}\pgf@x + \pgf@x=.7\pgf@x + \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/height1}\pgf@y + } + \anchor{AA1}{ + \northwest + \pgf@x=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/width1}\pgf@x + \pgf@x=.7\pgf@x + \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/height1}\pgf@y + } + \anchor{BB2}{ + \northwest + \pgf@x=-\pgf@x + \pgf@x=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/width1}\pgf@x + \pgf@x=.7\pgf@x + \pgf@y=-\pgf@y + \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/height1}\pgf@y + } +} + +\def\pgf@circ@drawtransformerbasicbody{ + \pgfscope + \pgfslopedattimetrue + \pgfallowupsidedownattimetrue + \pgftransformlineattime{.5}{% + \pgfpoint% + {\stretto\pgf@circ@res@left}% + {\pgf@circ@res@up}% + }{% + \pgfpoint + {\stretto\pgf@circ@res@left}% + {\pgf@circ@res@down}% + } + + \edef\pgf@circ@temp{\ctikzvalof{inductor}}% + \def\pgf@temp{european}% + \ifx\pgf@temp\pgf@circ@temp% + \pgfnode{fullgenericshape}{center}{}{pgf@inductor1}{\pgfusepath{stroke}} + \else% + \def\pgf@temp{cute} + \ifx\pgf@temp\pgf@circ@temp% + \pgfnode{cuteinductorshape}{center}{}{pgf@inductor1}{\pgfusepath{stroke}} + \else% + \pgfnode{americaninductorshape}{center}{}{pgf@inductor1}{\pgfusepath{stroke}} + \fi% + \fi% + + + \endpgfscope + \pgfscope + \pgfslopedattimetrue + \pgfallowupsidedownattimetrue + \pgftransformlineattime{.5}{% + \pgfpoint% + {\stretto\pgf@circ@res@right}% + {\pgf@circ@res@down}% + }{% + \pgfpoint + {\stretto\pgf@circ@res@right}% + {\pgf@circ@res@up}% + } + + \edef\pgf@circ@temp{\ctikzvalof{inductor}}% + \def\pgf@temp{european}% + \ifx\pgf@temp\pgf@circ@temp% + \pgfnode{fullgenericshape}{center}{}{pgf@inductor2}{\pgfusepath{stroke}} + \else% + \def\pgf@temp{cute} + \ifx\pgf@temp\pgf@circ@temp% + \pgfnode{cuteinductorshape}{center}{}{pgf@inductor2}{\pgfusepath{stroke}} + \else% + \pgfnode{americaninductorshape}{center}{}{pgf@inductor2}{\pgfusepath{stroke}} + \fi% + \fi% + + \endpgfscope + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\stretto\pgf@circ@res@left}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpointanchor{pgf@inductor1}{b}} + + \pgfpathmoveto{\pgfpointanchor{pgf@inductor1}{a}} + \pgfpathlineto{\pgfpoint{\stretto\pgf@circ@res@left}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}} + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\stretto\pgf@circ@res@right}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpointanchor{pgf@inductor2}{a}} + + \pgfpathmoveto{\pgfpointanchor{pgf@inductor2}{b}} + \pgfpathlineto{\pgfpoint{\stretto\pgf@circ@res@right}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}} + + \pgfusepath{draw} + +} + + +\pgfcircdeclarequadpole{transformer}{ + \pgf@circ@drawtransformerbasicbody +}{\pgf@circ@drawtransformerbasicanchor} + +\pgfcircdeclarequadpole{transformer core}{ + + \pgf@circ@drawtransformerbasicbody + + \pgfmoveto{\pgfpoint% + {\ctikzvalof{quadpoles/transformer core/core width}\pgf@circ@res@right}% + {\ctikzvalof{quadpoles/transformer core/core height}\pgf@circ@res@down}% + } + \pgflineto{ + \pgfpoint + {\ctikzvalof{quadpoles/transformer core/core width}\pgf@circ@res@right}% + {\ctikzvalof{quadpoles/transformer core/core height}\pgf@circ@res@up}% + } + + \pgfmoveto{\pgfpoint% + {\ctikzvalof{quadpoles/transformer core/core width}\pgf@circ@res@left}% + {\ctikzvalof{quadpoles/transformer core/core height}\pgf@circ@res@down}% + } + \pgflineto{ + \pgfpoint + {\ctikzvalof{quadpoles/transformer core/core width}\pgf@circ@res@left}% + {\ctikzvalof{quadpoles/transformer core/core height}\pgf@circ@res@up}% + } + + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgflinewidth} + \pgfusepath{draw} +}{\pgf@circ@drawtransformerbasicanchor} + + +\pgfcircdeclarequadpole{gyrator}{ + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\stretto\pgf@circ@res@left}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\stretto\pgf@circ@res@left}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}} + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\stretto\pgf@circ@res@right}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\stretto\pgf@circ@res@right}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}} + + \pgfusepath{draw} + + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/quadpoles/thickness}\pgflinewidth} + \pgfpathmoveto{\pgfpoint{\stretto\pgf@circ@res@left}{.7*\stretto\pgf@circ@res@down}} + \pgfpatharc{90}{270}{.7*\stretto\pgf@circ@res@down} + + \pgfpathmoveto{\pgfpoint{\stretto\pgf@circ@res@right}{.7*\stretto\pgf@circ@res@up}} + \pgfpatharc{-90}{90}{.7*\stretto\pgf@circ@res@down} + \pgfusepath{draw} + +}{} + +%% four-port +% defines a general outer box for four-ports +% TikZ usage: +% \draw (0,0) node[coupler](coup){\SI{-3}{dB}} +% (coup.port1) to[short,-o] ++(-1,0) +% + +\long\def\pgfcircdeclarefourport#1#2{ + \pgfdeclareshape{#1}{ + \anchor{center}{ + \northwest + \pgf@x=0pt + \pgf@y=0pt + } + \savedanchor\northwest{% + \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/#1/height}\pgf@circ@Rlen + \pgf@y=.5\pgf@y + \pgf@x=.5\pgf@circ@Rlen + \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/quadpoles/#1/width}\pgf@x + } + \anchor{north}{ + \northwest + \pgf@x=0pt + } + \anchor{south}{ + \northwest + \pgf@x=0pt + \pgf@y=-\pgf@y + } + \anchor{west}{ + \northwest + \pgf@y=0pt + } + \anchor{east}{ + \northwest + \pgf@y=0pt + \pgf@x=-\pgf@x + } + \anchor{south west}{ + \northwest + \pgf@y=-\pgf@y + } + \anchor{north east}{ + \northwest + \pgf@x=-\pgf@x + } + \anchor{north west}{ + \northwest + } + \anchor{south east}{ + \northwest + \pgf@x=-\pgf@x + \pgf@y=-\pgf@y + } + \anchor{port1}{ + \northwest + \pgf@y=-0.5\pgf@y + } + \anchor{port2}{ + \northwest + \pgf@x=-\pgf@x + \pgf@y=-0.5\pgf@y + } + \anchor{port3}{ + \northwest + \pgf@x=-\pgf@x + \pgf@y=0.5\pgf@y + } + \anchor{port4}{ + \northwest + \pgf@y=0.5\pgf@y + } + \anchor{1}{ + \northwest + \pgf@y=-0.5\pgf@y + } + \anchor{2}{ + \northwest + \pgf@x=-\pgf@x + \pgf@y=-0.5\pgf@y + } + \anchor{3}{ + \northwest + \pgf@x=-\pgf@x + \pgf@y=0.5\pgf@y + } + \anchor{4}{ + \northwest + \pgf@y=0.5\pgf@y + } + + \anchor{text}{ + \northwest + \advance \pgf@y by 0.5\ht\pgfnodeparttextbox + \pgf@x=-.5\wd\pgfnodeparttextbox + } + \backgroundpath{ + \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}} + + \northwest + \pgf@circ@res@up = \pgf@y + \pgf@circ@res@down = -\pgf@y + \pgf@circ@res@right = -\pgf@x + \pgf@circ@res@left = \pgf@x + + \pgfstartlinewidth=\pgflinewidth + + % draw outer box + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}} + \pgfusepath{draw} + + % draw inner stuff + #2 + + % draw inner text + \pgftext[center,x=-0.15\pgf@circ@res@step,y=0]{\ctikzvalof{bipoles/twoport/text}} + } + } +} + +% four-port +\pgfcircdeclarefourport{fourport}{} + + +% straight coupler +\pgfcircdeclarefourport{coupler}{ + \pgfsetlinewidth{\pgfstartlinewidth} + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0.5\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0.5\pgf@circ@res@up}} + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0.5\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0.5\pgf@circ@res@down}} + \pgfusepath{draw} + + \pgfpathmoveto{\pgfpoint{0.7\pgf@circ@res@left}{0.4\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{0.7\pgf@circ@res@right}{0.4\pgf@circ@res@up}} + \pgfsetarrows{latex-latex} + \pgfusepath{draw} + \pgfpathmoveto{\pgfpoint{0.7\pgf@circ@res@left}{0.4\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{0.7\pgf@circ@res@right}{0.4\pgf@circ@res@down}} + \pgfsetarrows{latex-latex} + \pgfusepath{draw} +} + +% "bended" coupler +\pgfcircdeclarefourport{coupler2}{ + \pgfsetlinewidth{\pgfstartlinewidth} + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0.5\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0.5\pgf@circ@res@up}} + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0.5\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0.5\pgf@circ@res@down}} + \pgfusepath{draw} + + \pgfscope + \pgfpathmoveto{\pgfpoint{0.1\pgf@circ@res@left}{0pt}} + \pgfpatharc{0}{90} {0.4\pgf@circ@res@up} + \pgfsetarrowsend{latex} + \pgfusepath{draw} + \endpgfscope + \pgfscope + \pgfpathmoveto{\pgfpoint{0.1\pgf@circ@res@left}{0pt}} + \pgfpatharc{0}{-90} {0.4\pgf@circ@res@up} + \pgfsetarrowsend{latex} + \pgfusepath{draw} + \endpgfscope + \pgfscope + \pgfpathmoveto{\pgfpoint{0.1\pgf@circ@res@right}{0pt}} + \pgfpatharc{180}{90} {0.4\pgf@circ@res@up} + \pgfsetarrowsend{latex} + \pgfusepath{draw} + \endpgfscope + \pgfscope + \pgfpathmoveto{\pgfpoint{0.1\pgf@circ@res@right}{0pt}} + \pgfpatharc{-180}{-90} {0.4\pgf@circ@res@up} + \pgfsetarrowsend{latex} + \pgfusepath{draw} + \endpgfscope +} + +% contrib Kristofer M. Monisit + +\pgfdeclareshape{fd op amp} +{ + \anchor{center}{\pgfpointorigin} + \savedanchor\northwest{% + \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/height}\pgf@circ@Rlen + \pgf@y=.5\pgf@y + \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/width}\pgf@circ@Rlen + \pgf@x=.5\pgf@x + } + \savedanchor\outline{% + \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/height}\pgf@circ@Rlen + \pgf@y=.5\pgf@y + \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/width}\pgf@circ@Rlen + \pgf@x=.5\pgf@x + \ifpgf@circuit@oa@oplusup\else\pgf@y=-\pgf@y\fi + } + \anchor{south}{ + \northwest + \pgf@y=-\pgf@y\pgf@x=0pt\relax + } + \anchor{north}{ + \northwest\pgf@x=0pt\relax + } + \savedanchor\left{% + \pgf@y=0pt + } + \savedanchor\inOneFixed{% + \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/height}\pgf@circ@Rlen + \pgf@y=.5\pgf@y + \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@y + \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/width}\pgf@circ@Rlen + \pgf@x=.5\pgf@x + } + \anchor{in up}{ + \inOneFixed + } + \anchor{in down}{ + \inOneFixed + \pgf@y=-\pgf@y + } + \savedanchor\inOne{% + \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/height}\pgf@circ@Rlen + \pgf@y=.5\pgf@y + \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@y + \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/width}\pgf@circ@Rlen + \pgf@x=.5\pgf@x + \ifpgf@circuit@oa@iplusup\pgf@y=-\pgf@y\fi + } + \anchor{-}{ + \inOne + } + \anchor{+}{ + \inOne + \pgf@y=-\pgf@y + } + \savedanchor\up{% + \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/height}\pgf@circ@Rlen + \pgf@y=.5\pgf@y + \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/width}\pgf@circ@Rlen + \pgf@x=.5\pgf@x + \pgf@circ@res@up = \pgf@y + \pgf@circ@res@right = -\pgf@x + \pgf@circ@res@left = \pgf@x + \pgfpointlineattime{ + \pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/up pos}}{ + \pgfpoint{ + \pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf@circ@res@left} + {\pgf@circ@res@up}} + {\pgfpoint{.7\pgf@circ@res@right}{0pt}} + } + \anchor{up}{ + \up + } + \anchor{down}{ + \up + \pgf@y=-\pgf@y + } + \anchor{out up}{ + \northwest + \pgf@y=.5\pgf@y + \pgf@x=-.7\pgf@x + } + \anchor{out down}{ + \northwest + \pgf@y=-.5\pgf@y + \pgf@x=-.7\pgf@x + } + \anchor{out +}{ + \outline + \pgf@y=.5\pgf@y + \pgf@x=-.7\pgf@x + } + \anchor{out -}{ + \outline + \pgf@y=-.5\pgf@y + \pgf@x=-.7\pgf@x + } + \anchor{west}{ + \left + } + \anchor{east}{ + \left + \pgf@x=-.7\pgf@x + } + + \anchor{south west}{ \northwest \pgf@y=-\pgf@y } + \anchor{north east}{ \northwest \pgf@x=-.7\pgf@x } + \anchor{north west}{ \northwest } + \anchor{south east}{ \northwest \pgf@x=-.7\pgf@x \pgf@y=-\pgf@y } + \backgroundpath{ + \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}} + + \northwest + \pgf@circ@res@up = \pgf@y + \pgf@circ@res@down = -\pgf@y + \pgf@circ@res@right = -\pgf@x + \pgf@circ@res@left = \pgf@x + + % Triangle + \pgfscope + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/quadpoles/thickness}\pgflinewidth} + \pgftransformxshift{.7\pgf@circ@res@left} + \pgf@circ@res@step=\pgf@circ@res@right + \advance\pgf@circ@res@step by -\pgf@circ@res@left + \pgf@circ@res@step=.7\pgf@circ@res@step + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{0pt}} + \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{0pt}} + \pgfpathclose + \pgf@circ@draworfill + \endpgfscope + % Negative input terminal + \pgfpathmoveto{\pgfpoint + {\pgf@circ@res@left} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf@circ@res@left} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@up}} + \pgftext[left, at=\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@up}]{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/font} \ifpgf@circuit@oa@iplusup$+$\else$-$\fi} + + % Positive input terminal + \pgfpathmoveto{\pgfpoint + {\pgf@circ@res@left} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf@circ@res@left} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@down}} + \pgftext[left, at=\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@down}]{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/font} \ifpgf@circuit@oa@iplusup$-$\else$+$\fi} + + % Negative output terminal + \pgfpathmoveto{\pgfpoint + {0.7\pgf@circ@res@right} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@down}} + \pgftext[left, at=\pgfpoint{0.3\pgf@circ@res@left}{.3\pgf@circ@res@down}]{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/font} \ifpgf@circuit@oa@oplusup$-$\else$+$\fi} + + % Positive output terminal + \pgfpathmoveto{\pgfpoint + {0.7\pgf@circ@res@right} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@up}} + \pgftext[left, at=\pgfpoint{0.3\pgf@circ@res@left}{.3\pgf@circ@res@up}]{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/font} \ifpgf@circuit@oa@oplusup$+$\else$-$\fi} + + \pgfsetrectcap + % Draw them all! + \pgfusepath{draw} + + } +} + + +%% instrumentation amplifier diff output + +\pgfdeclareshape{fd inst amp} +{ + % when tikz calls the anchor it wants the relative position in the lengths + % \pgf@x \pgf@y + % \pgfpoint* functions set that variables + % anchors are visible outside and run on use + \anchor{center}{\pgfpointorigin} + % savedanchors are internals and run on node creation (not use) + % bounding-box top left + \savedanchor\northwest{% + \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/fd inst amp/height}\pgf@circ@Rlen + \pgf@y=.5\pgf@y + \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/fd inst amp/width}\pgf@circ@Rlen + \pgf@x=.5\pgf@x + } + \anchor{nw}{ + \northwest + } + \anchor{south}{ + \northwest + \pgf@y=-\pgf@y\pgf@x=0pt\relax + } + \anchor{north}{ + \northwest\pgf@x=0pt\relax + } + \savedanchor\left{% + \pgf@y=0pt + } + \anchor{leftedge} + {\left + \pgf@x = \pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf@x + } + \savedanchor\inOneFixed{% + \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/height}\pgf@circ@Rlen + \pgf@y=.5\pgf@y + \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@y + \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/width}\pgf@circ@Rlen + \pgf@x=.5\pgf@x + } + \anchor{in up}{ + \inOneFixed + } + \anchor{in down}{ + \inOneFixed + \pgf@y=-\pgf@y + } + \savedanchor\inOne{% + \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/fd inst amp/height}\pgf@circ@Rlen + \pgf@y=.5\pgf@y + \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/fd inst amp/input height}\pgf@y + \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/fd inst amp/width}\pgf@circ@Rlen + \pgf@x=.5\pgf@x + \ifpgf@circuit@oa@iplusup\pgf@y=-\pgf@y\fi + } + \anchor{-}{ + \inOne + } + \anchor{+}{ + \inOne + \pgf@y=-\pgf@y + } + \savedanchor\up{% + \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/fd inst amp/height}\pgf@circ@Rlen + \pgf@y=.5\pgf@y + \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/fd inst amp/width}\pgf@circ@Rlen + \pgf@x=.5\pgf@x + \pgf@circ@res@up = \pgf@y + \pgf@circ@res@right = -\pgf@x + \pgf@circ@res@left = \pgf@x + \pgfpointlineattime{ + \pgfkeysvalueof{/tikz/circuitikz/tripoles/fd inst amp/up pos}}{ + \pgfpoint{ + \pgfkeysvalueof{/tikz/circuitikz/tripoles/fd inst amp/port width}\pgf@circ@res@left} + {\pgf@circ@res@up}} + {\pgfpoint{.7\pgf@circ@res@right}{.6\pgf@circ@res@up}} + } + \anchor{up}{ + \up + } + \anchor{down}{ + \up + \pgf@y=-\pgf@y + } + % reference voltage input anchors. + \savedanchor\refv{% + \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/fd inst amp/height}\pgf@circ@Rlen + \pgf@y=.5\pgf@y + \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/fd inst amp/width}\pgf@circ@Rlen + \pgf@x=.5\pgf@x + \pgf@circ@res@up = \pgf@y + \pgf@circ@res@right = -\pgf@x + \pgf@circ@res@left = \pgf@x + \pgfpointlineattime{ + \pgfkeysvalueof{/tikz/circuitikz/tripoles/fd inst amp/refv pos}}{ + \pgfpoint{ + \pgfkeysvalueof{/tikz/circuitikz/tripoles/fd inst amp/port width}\pgf@circ@res@left} + {\pgf@circ@res@up}} + {\pgfpoint{.7\pgf@circ@res@right}{.6\pgf@circ@res@up}} + } + % we need both because they are normally drawn under the amp, and if you + % mirror it vertically you need them + \anchor{refv up}{ + \refv + } + \anchor{refv down}{ + \refv + \pgf@y=-\pgf@y + } + \savedanchor\outport{ + \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/fd inst amp/height}\pgf@circ@Rlen + \pgf@y=.5\pgf@y + \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/fd inst amp/input height}\pgf@y + \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/fd inst amp/width}\pgf@circ@Rlen + \pgf@x=-.5\pgf@x + \ifpgf@circuit@oa@oplusup\else\pgf@y=-\pgf@y\fi + } + \anchor{out}{ + \outport + \pgf@y=0pt + } + \anchor{out +}{ + \outport + } + \anchor{out -}{ + \outport + \pgf@y=-\pgf@y + } + \savedanchor\outportfixed{ + \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/fd inst amp/height}\pgf@circ@Rlen + \pgf@y=.5\pgf@y + \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/fd inst amp/input height}\pgf@y + \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/fd inst amp/width}\pgf@circ@Rlen + \pgf@x=-.5\pgf@x + } + \anchor{out up}{ + \outportfixed + } + \anchor{out down}{ + \outportfixed + \pgf@y=-\pgf@y + } + % + \anchor{west}{ + \left + } + \anchor{east}{ + \left + \pgf@x=-\pgf@x + } + \anchor{south west}{ \northwest \pgf@y=-\pgf@y } + \anchor{north east}{ \northwest \pgf@x=-\pgf@x } + \anchor{north west}{ \northwest } + \anchor{south east}{ \northwest \pgf@x=-\pgf@x \pgf@y=-\pgf@y } + \anchor{text}{\pgfpoint{-.5\wd\pgfnodeparttextbox}{\dimexpr.5\dp\pgfnodeparttextbox-.5\ht\pgfnodeparttextbox}} + + % let's start drawing the component + \backgroundpath{ + \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}} + % + \northwest + \pgf@circ@res@up = \pgf@y + \pgf@circ@res@down = -\pgf@y + \pgf@circ@res@right = -\pgf@x + \pgf@circ@res@left = \pgf@x + % main component, normally in thicker lines + \pgfscope + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/tripoles/thickness}\pgflinewidth} + \pgftransformxshift{.7\pgf@circ@res@left} + \pgf@circ@res@step=\pgf@circ@res@right + \advance\pgf@circ@res@step by -\pgf@circ@res@left + \pgf@circ@res@step=.7\pgf@circ@res@step + %first point (near output) + \pgfpathmoveto{\pgfpoint{1.4\pgf@circ@res@right}{0}} + %from the exit to the top (short side)... (note that the .6 must be copied in \up and \refv anchors + \pgfpathlineto{\pgfpoint{1.4\pgf@circ@res@right}{.6\pgf@circ@res@up}} + % and then to the input "front up", "down", to the output short side "down" + \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{1.4\pgf@circ@res@right}{.6\pgf@circ@res@down}} + % ...and close + \pgfpathclose + \pgf@circ@draworfill + \endpgfscope + % input terminal up + \pgfpathmoveto{\pgfpoint + {\pgf@circ@res@left} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/fd inst amp/input height}\pgf@circ@res@up}} + % + \pgfpathlineto{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/fd inst amp/port width}\pgf@circ@res@left} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/fd inst amp/input height}\pgf@circ@res@up}} + % + \pgftext[left, at=\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/fd inst amp/port width}\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/fd inst amp/input height}\pgf@circ@res@up}]{\pgfkeysvalueof{/tikz/circuitikz/tripoles/fd inst amp/font} \ifpgf@circuit@oa@iplusup$+$\else$-$\fi} + + % input terminal down + \pgfpathmoveto{\pgfpoint + {\pgf@circ@res@left} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/fd inst amp/input height}\pgf@circ@res@down}} + % + \pgfpathlineto{\pgfpoint + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/fd inst amp/port width}\pgf@circ@res@left} + {\pgfkeysvalueof{/tikz/circuitikz/tripoles/fd inst amp/input height}\pgf@circ@res@down}} + \pgftext[left, at=\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/fd inst amp/port width}\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/fd inst amp/input height}\pgf@circ@res@down}]{\pgfkeysvalueof{/tikz/circuitikz/tripoles/fd inst amp/font} \ifpgf@circuit@oa@iplusup$-$\else$+$\fi} + % output leads down and up + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/fd inst amp/input height}\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{.7\pgf@circ@res@right}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/fd inst amp/input height}\pgf@circ@res@down}} % + \pgftext[right, at=\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/fd inst amp/port width}\pgf@circ@res@right}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/fd inst amp/input height}\pgf@circ@res@down}]{\pgfkeysvalueof{/tikz/circuitikz/tripoles/fd inst amp/font}\ifpgf@circuit@oa@oplusup$-\;$\else$+\;$\fi} + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/fd inst amp/input height}\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{.7\pgf@circ@res@right}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/fd inst amp/input height}\pgf@circ@res@up}} % + \pgftext[right, at=\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/fd inst amp/port width}\pgf@circ@res@right}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/fd inst amp/input height}\pgf@circ@res@up}]{\pgfkeysvalueof{/tikz/circuitikz/tripoles/fd inst amp/font}\ifpgf@circuit@oa@oplusup$+\;$\else$-\;$\fi} + % + \pgfsetrectcap + \pgfusepath{draw} + } +} +%%%---------- close: tex/pgfcircquadpoles +%%%%%%%%%%% Springe nach tex/pgfcircmultipoles +%%%---------- open: tex/pgfcircmultipoles.tex +% Copyright 2007-2009 by Massimo Redaelli +% Copyright 2019 by Romano Giannetti +% +% This file may be distributed and/or modified +% +% 1. under the LaTeX Project Public License and/or +% 2. under the GNU Public License. +% +% See the files gpl-3.0_license.txt and lppl-1-3c_license.txt for more details. + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Multipoles +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% counters for pin accounting... +\def\pgf@circ@dip@pin@shift{0.5} +\def\pgf@circ@qfp@pin@shift{0.25} + +% derived from https://tex.stackexchange.com/a/146753/38080 +% original author Mark Wibrow +% Thanks also to John Kormylo https://tex.stackexchange.com/a/372996/38080 +% a lot of thanks to @marmot for the un-rotation hint +% https://tex.stackexchange.com/a/473571/38080 + +% DIP (dual in line package) chips + +\pgfdeclareshape{dipchip}{ + \savedmacro\numpins{% + \pgf@circ@count@a=\pgfkeysvalueof{/tikz/circuitikz/multipoles/dipchip/num pins}% + \def\numpins{\the\pgf@circ@count@a} + } + \savedanchor\centerpoint{% + \pgf@x=-.5\wd\pgfnodeparttextbox% + \pgf@y=-.5\ht\pgfnodeparttextbox% + \advance\pgf@y by+.5\dp\pgfnodeparttextbox% + }% + \savedanchor\origin{\pgfpoint{0pt}{0pt}} + \anchor{center}{\origin} + \anchor{text}{\centerpoint}% to adjust text + \saveddimen\height{% + \pgfmathsetlength\pgf@x{((\numpins) + *\pgfkeysvalueof{/tikz/circuitikz/multipoles/dipchip/pin spacing})*\pgf@circ@Rlen/2}% + }% + \saveddimen{\chipspacing}{\pgfmathsetlength\pgf@x{\pgf@circ@Rlen*\pgfkeysvalueof{/tikz/circuitikz/multipoles/dipchip/pin spacing}}} + \saveddimen{\width}{\pgfmathsetlength\pgf@x{\pgf@circ@Rlen*\pgfkeysvalueof{/tikz/circuitikz/multipoles/dipchip/width}}} + \saveddimen{\extshift}{\pgfmathsetlength\pgf@x{\pgf@circ@Rlen*\pgfkeysvalueof{/tikz/circuitikz/multipoles/external pins width}}} + % standard anchors + \savedanchor\northwest{% + \pgfmathsetlength\pgf@y{0.5*((\numpins) + *\pgfkeysvalueof{/tikz/circuitikz/multipoles/dipchip/pin spacing})*\pgf@circ@Rlen/2}% + \pgfmathsetlength\pgf@x{-0.5*\pgf@circ@Rlen*\pgfkeysvalueof{/tikz/circuitikz/multipoles/dipchip/width}} + } + \anchor{dot}{\northwest + \pgfmathsetlength\pgf@x{\pgf@x + 0.3*\chipspacing} + \pgfmathsetlength\pgf@y{\pgf@y - 0.3*\chipspacing} + } + \anchor{nw}{\northwest} + \anchor{ne}{\northwest\pgf@x=-\pgf@x} + \anchor{se}{\northwest\pgf@x=-\pgf@x\pgf@y=-\pgf@y} + \anchor{sw}{\northwest\pgf@y=-\pgf@y} + \anchor{north west}{\northwest} + \anchor{north east}{\northwest\pgf@x=-\pgf@x} + \anchor{south east}{\northwest\pgf@x=-\pgf@x \pgf@y=-\pgf@y} + \anchor{south west}{\northwest\pgf@y=-\pgf@y} + \anchor{n}{\northwest\pgf@x=0pt } + \anchor{e}{\northwest\pgf@x=-\pgf@x\pgf@y=0pt } + \anchor{s}{\northwest\pgf@x=0pt\pgf@y=-\pgf@y} + \anchor{w}{\northwest\pgf@y=0pt } + \anchor{north}{\northwest\pgf@x=0pt } + \anchor{east}{\northwest\pgf@x=-\pgf@x\pgf@y=0pt } + \anchor{south}{\northwest\pgf@x=0pt\pgf@y=-\pgf@y} + \anchor{west}{\northwest\pgf@y=0pt } + % start drawing + \backgroundpath{% + \northwest + \pgf@circ@res@up = \pgf@y + \pgf@circ@res@down = -\pgf@y + \pgf@circ@res@right = -\pgf@x + \pgf@circ@res@left = \pgf@x + \pgf@circ@res@step = \pgfkeysvalueof{/tikz/circuitikz/multipoles/dipchip/pin spacing}\pgf@circ@Rlen + \pgf@circ@res@other = \pgfkeysvalueof{/tikz/circuitikz/multipoles/external pins width}\pgf@circ@Rlen + \pgfscope% (for the line width) + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/multipoles/thickness}\pgflinewidth} + \pgfpathrectanglecorners{\pgfpoint{-\width/2}{-\height/2}}{\pgfpoint{\width/2}{\height/2}}% + \pgf@circ@draworfill + %% upside mark + \ifpgf@circuit@chip@topmark + \pgfpathmoveto{\pgfpoint{0.2*\pgf@circ@res@left}{\pgf@circ@res@up}} + \pgfpatharc{0}{180}{0.2*\pgf@circ@res@left} + \fi + \pgfusepath{stroke}% + \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}} + % Adding the pin number + \ifpgf@circuit@chip@shownumbers + \pgf@circ@count@a=\numpins\relax + \divide\pgf@circ@count@a by 2 \pgf@circ@count@b=\pgf@circ@count@a + % thanks to @marmot: https://tex.stackexchange.com/a/473571/38080 + \ifpgf@circuit@chip@straightnumbers + \pgfgettransformentries\a\b\temp\temp\temp\temp + \pgfmathsetmacro{\rot}{-atan2(\b,\a)} + \pgfmathtruncatemacro{\quadrant}{mod(4+int(360+(\rot+45)/90),4)} + \else + \pgfmathsetmacro{\rot}{0} + \pgfmathsetmacro{\quadrant}{0} + \fi + \def\pgf@circ@strut{\vrule width 0pt height 1em depth 0.4em\relax} + \def\mytext{\pgfkeysvalueof{/tikz/circuitikz/multipoles/font}\space\pgf@circ@strut\the\pgf@circ@count@c\space} + \pgfmathloop% + \ifnum\pgf@circ@count@a>0 + \ifcase\quadrant % rotation 0 + % left + \pgf@circ@count@c=\pgf@circ@count@a + \pgftext[left, + at=\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up+(\pgf@circ@dip@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}, + rotate=\rot]{\mytext} + % right + \pgf@circ@count@c=\numexpr2*\pgf@circ@count@b-\pgf@circ@count@a+1\relax + \pgftext[right, + at=\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up+(\pgf@circ@dip@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}, + rotate=\rot]{\mytext} + \or % rotation -90 + % left + \pgf@circ@count@c=\pgf@circ@count@a + \pgftext[top, + at=\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up+(\pgf@circ@dip@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}, + rotate=\rot]{\mytext} + % right + \pgf@circ@count@c=\numexpr2*\pgf@circ@count@b-\pgf@circ@count@a+1\relax + \pgftext[bottom, + at=\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up+(\pgf@circ@dip@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}, + rotate=\rot]{\mytext} + \or %rotation 180 + % left + \pgf@circ@count@c=\pgf@circ@count@a + \pgftext[right, + at=\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up+(\pgf@circ@dip@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}, + rotate=\rot]{\mytext} + % right + \pgf@circ@count@c=\numexpr2*\pgf@circ@count@b-\pgf@circ@count@a+1\relax + \pgftext[left, + at=\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up+(\pgf@circ@dip@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}, + rotate=\rot]{\mytext} + \or % rotation +90 + % left + \pgf@circ@count@c=\pgf@circ@count@a + \pgftext[bottom, + at=\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up+(\pgf@circ@dip@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}, + rotate=\rot]{\mytext} + % right + \pgf@circ@count@c=\numexpr2*\pgf@circ@count@b-\pgf@circ@count@a+1\relax + \pgftext[top, + at=\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up+(\pgf@circ@dip@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}, + rotate=\rot]{\mytext} + \fi + \advance\pgf@circ@count@a-1\relax% + \repeatpgfmathloop + \fi + \endpgfscope + \ifdim\pgf@circ@res@other>0pt + \pgfscope + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/multipoles/external pins thickness}\pgflinewidth} + \pgf@circ@count@a=\numpins\relax + \divide\pgf@circ@count@a by 2 \pgf@circ@count@b=\pgf@circ@count@a + \pgfmathloop% + \ifnum\pgf@circ@count@a>0 + \edef\padfrac{\pgfkeysvalueof{/tikz/circuitikz/multipoles/external pad fraction}} + \ifnum\padfrac>0 + \pgf@circ@res@temp=\pgf@circ@res@step\divide\pgf@circ@res@temp by \padfrac + % left side pads + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@temp+\pgf@circ@res@up+(\pgf@circ@dip@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@left-\pgf@circ@res@other}{\pgf@circ@res@temp+\pgf@circ@res@up+(\pgf@circ@dip@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@left-\pgf@circ@res@other}{-\pgf@circ@res@temp+\pgf@circ@res@up+(\pgf@circ@dip@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{-\pgf@circ@res@temp+\pgf@circ@res@up+(\pgf@circ@dip@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}} + % right side pads + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@temp+\pgf@circ@res@up+(\pgf@circ@dip@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right+\pgf@circ@res@other}{\pgf@circ@res@temp+\pgf@circ@res@up+(\pgf@circ@dip@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right+\pgf@circ@res@other}{-\pgf@circ@res@temp+\pgf@circ@res@up+(\pgf@circ@dip@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{-\pgf@circ@res@temp+\pgf@circ@res@up+(\pgf@circ@dip@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}} + \else + % left side pins + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up+(\pgf@circ@dip@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@left-\pgf@circ@res@other}{\pgf@circ@res@up+(\pgf@circ@dip@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}} + % right side pins + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up+(\pgf@circ@dip@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right+\pgf@circ@res@other}{\pgf@circ@res@up+(\pgf@circ@dip@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}} + \fi + \advance\pgf@circ@count@a by -1\relax% + \repeatpgfmathloop + \pgfusepath{stroke} + \endpgfscope + \fi + }% + % \pgf@sh@s@ contains all the code for the shape + % and is executed just before a node is drawn. + \pgfutil@g@addto@macro\pgf@sh@s@dipchip{% + % Start with the maximum pin number and go backwards. + \pgf@circ@count@a=\numpins\relax + \pgfmathloop% + \ifnum\pgf@circ@count@a>0 + % we will create two anchors per pin: the "normal one" like `pin 1` for the + % electrical contact, and the "border one" like `bpin 1` for labels. + % they will coincide if `external pins width` is set to 0. + \expandafter\xdef\csname pgf@anchor@dipchip@pin\space\the\pgf@circ@count@a\endcsname{% + \noexpand\pgf@circ@dippinanchor{\the\pgf@circ@count@a}{1}% + } + \expandafter\xdef\csname pgf@anchor@dipchip@bpin\space\the\pgf@circ@count@a\endcsname{% + \noexpand\pgf@circ@dippinanchor{\the\pgf@circ@count@a}{0}% + } + \advance\pgf@circ@count@a by -1\relax% + \repeatpgfmathloop% + }% + } + +% QFP (quad flat package) chips + +\pgfdeclareshape{qfpchip}{ + \savedmacro\numpins{% + \pgf@circ@count@a=\pgfkeysvalueof{/tikz/circuitikz/multipoles/qfpchip/num pins}% + \def\numpins{\the\pgf@circ@count@a} + } + \savedanchor\centerpoint{% + \pgf@x=-.5\wd\pgfnodeparttextbox% + \pgf@y=-.5\ht\pgfnodeparttextbox% + \advance\pgf@y by+.5\dp\pgfnodeparttextbox% + }% + \savedanchor\origin{\pgfpoint{0pt}{0pt}} + \anchor{center}{\origin} + \anchor{text}{\centerpoint}% to adjust text + \saveddimen\height{% + \pgfmathsetlength\pgf@x{((\numpins+2) + *\pgfkeysvalueof{/tikz/circuitikz/multipoles/qfpchip/pin spacing})*\pgf@circ@Rlen/4}% + }% + \saveddimen\width{% + \pgfmathsetlength\pgf@x{((\numpins+2) + *\pgfkeysvalueof{/tikz/circuitikz/multipoles/qfpchip/pin spacing})*\pgf@circ@Rlen/4}% + }% + \saveddimen{\chipspacing}{\pgfmathsetlength\pgf@x{\pgf@circ@Rlen*\pgfkeysvalueof{/tikz/circuitikz/multipoles/qfpchip/pin spacing}}} + \saveddimen{\extshift}{\pgfmathsetlength\pgf@x{\pgf@circ@Rlen*\pgfkeysvalueof{/tikz/circuitikz/multipoles/external pins width}}} + % standard anchors + \savedanchor\northwest{% + \pgfmathsetlength\pgf@y{0.5*((\numpins+2) + *\pgfkeysvalueof{/tikz/circuitikz/multipoles/qfpchip/pin spacing})*\pgf@circ@Rlen/4}% + \pgf@x=-\pgf@y + } + \anchor{dot}{\northwest + \pgfmathsetlength\pgf@x{\pgf@x + 0.3*\chipspacing} + \pgfmathsetlength\pgf@y{\pgf@y - 0.3*\chipspacing} + } + \anchor{nw}{\northwest} + \anchor{ne}{\northwest\pgf@x=-\pgf@x} + \anchor{se}{\northwest\pgf@x=-\pgf@x\pgf@y=-\pgf@y} + \anchor{sw}{\northwest\pgf@y=-\pgf@y} + \anchor{north west}{\northwest} + \anchor{north east}{\northwest\pgf@x=-\pgf@x} + \anchor{south east}{\northwest\pgf@x=-\pgf@x \pgf@y=-\pgf@y} + \anchor{south west}{\northwest\pgf@y=-\pgf@y} + \anchor{n}{\northwest\pgf@x=0pt } + \anchor{e}{\northwest\pgf@x=-\pgf@x\pgf@y=0pt } + \anchor{s}{\northwest\pgf@x=0pt\pgf@y=-\pgf@y} + \anchor{w}{\northwest\pgf@y=0pt } + \anchor{north}{\northwest\pgf@x=0pt } + \anchor{east}{\northwest\pgf@x=-\pgf@x\pgf@y=0pt } + \anchor{south}{\northwest\pgf@x=0pt\pgf@y=-\pgf@y} + \anchor{west}{\northwest\pgf@y=0pt } + % start drawing + \backgroundpath{% + \northwest + \pgf@circ@res@up = \pgf@y + \pgf@circ@res@down = -\pgf@y + \pgf@circ@res@right = -\pgf@x + \pgf@circ@res@left = \pgf@x + \pgf@circ@res@step = \pgfkeysvalueof{/tikz/circuitikz/multipoles/qfpchip/pin spacing}\pgf@circ@Rlen + \pgf@circ@res@other = \pgfkeysvalueof{/tikz/circuitikz/multipoles/external pins width}\pgf@circ@Rlen + \pgfscope% (for the line width) + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/multipoles/thickness}\pgflinewidth} + %% upside mark + \ifpgf@circuit@chip@topmark + \pgfpathmoveto{\pgfpoint{-\width/2}{\height/2-\pgf@circ@res@step/2}} + \pgfpathlineto{\pgfpoint{-\width/2+\pgf@circ@res@step/2}{\height/2}} + \else + \pgfpathmoveto{\pgfpoint{-\width/2}{\height/2}} + \fi + %% rest of the shape + \pgfpathlineto{\pgfpoint{\width/2}{\height/2}} + \pgfpathlineto{\pgfpoint{\width/2}{-\height/2}} + \pgfpathlineto{\pgfpoint{-\width/2}{-\height/2}} + \pgfpathclose + \pgf@circ@draworfill + % Adding the pin number + \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}} + \ifpgf@circuit@chip@shownumbers + \pgf@circ@count@a=\numpins% + \divide\pgf@circ@count@a by 4 \pgf@circ@count@b=\pgf@circ@count@a + % thanks to @marmot: https://tex.stackexchange.com/a/473571/38080 + \ifpgf@circuit@chip@straightnumbers + \pgfgettransformentries\a\b\temp\temp\temp\temp + \pgfmathsetmacro{\rot}{-atan2(\b,\a)} + \pgfmathtruncatemacro{\quadrant}{mod(4+int(360+(\rot+45)/90),4)} + \else + \pgfmathsetmacro{\rot}{0} + \pgfmathsetmacro{\quadrant}{0} + \fi + \def\pgf@circ@strut{\vrule width 0pt height 1em depth 0.4em\relax} + \def\mytext{\pgfkeysvalueof{/tikz/circuitikz/multipoles/font}\space\pgf@circ@strut\the\pgf@circ@count@c\space} + \pgfmathloop% + \ifnum\pgf@circ@count@a>0 + \ifcase\quadrant % rotation 0 + % left + \pgf@circ@count@c=\pgf@circ@count@a + \pgftext[left, + at=\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up+(\pgf@circ@qfp@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}, + rotate=\rot]{\mytext} + % bottom + \pgf@circ@count@c=\numexpr\pgf@circ@count@b+\pgf@circ@count@a\relax + \pgftext[bottom, + at=\pgfpoint{\pgf@circ@res@left-(\pgf@circ@qfp@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}{\pgf@circ@res@down}, + rotate=\rot]{\mytext} + % right + \pgf@circ@count@c=\numexpr3*\pgf@circ@count@b-\pgf@circ@count@a+1\relax + \pgftext[right, + at=\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up+(\pgf@circ@qfp@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}, + rotate=\rot]{\mytext} + % top + \pgf@circ@count@c=\numexpr3*\pgf@circ@count@b+\pgf@circ@count@a\relax + \pgftext[top, + at=\pgfpoint{\pgf@circ@res@right+(\pgf@circ@qfp@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}{\pgf@circ@res@up}, + rotate=\rot]{\mytext} + \or % rotation -90 + % left + \pgf@circ@count@c=\pgf@circ@count@a + \pgftext[top, + at=\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up+(\pgf@circ@qfp@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}, + rotate=\rot]{\mytext} + % bottom + \pgf@circ@count@c=\numexpr\pgf@circ@count@b+\pgf@circ@count@a\relax + \pgftext[left, + at=\pgfpoint{\pgf@circ@res@left-(\pgf@circ@qfp@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}{\pgf@circ@res@down}, + rotate=\rot]{\mytext} + % right + \pgf@circ@count@c=\numexpr3*\pgf@circ@count@b-\pgf@circ@count@a+1\relax + \pgftext[bottom, + at=\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up+(\pgf@circ@qfp@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}, + rotate=\rot]{\mytext} + % top + \pgf@circ@count@c=\numexpr3*\pgf@circ@count@b+\pgf@circ@count@a\relax + \pgftext[right, + at=\pgfpoint{\pgf@circ@res@right+(\pgf@circ@qfp@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}{\pgf@circ@res@up}, + rotate=\rot]{\mytext} + \or %rotation 180 + % left + \pgf@circ@count@c=\pgf@circ@count@a + \pgftext[right, + at=\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up+(\pgf@circ@qfp@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}, + rotate=\rot]{\mytext} + % bottom + \pgf@circ@count@c=\numexpr\pgf@circ@count@b+\pgf@circ@count@a\relax + \pgftext[top, + at=\pgfpoint{\pgf@circ@res@left-(\pgf@circ@qfp@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}{\pgf@circ@res@down}, + rotate=\rot]{\mytext} + % right + \pgf@circ@count@c=\numexpr3*\pgf@circ@count@b-\pgf@circ@count@a+1\relax + \pgftext[left, + at=\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up+(\pgf@circ@qfp@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}, + rotate=\rot]{\mytext} + % top + \pgf@circ@count@c=\numexpr3*\pgf@circ@count@b+\pgf@circ@count@a\relax + \pgftext[bottom, + at=\pgfpoint{\pgf@circ@res@right+(\pgf@circ@qfp@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}{\pgf@circ@res@up}, + rotate=\rot]{\mytext} + \or % rotation +90 + % left + \pgf@circ@count@c=\pgf@circ@count@a + \pgftext[bottom, + at=\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up+(\pgf@circ@qfp@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}, + rotate=\rot]{\mytext} + % bottom + \pgf@circ@count@c=\numexpr\pgf@circ@count@b+\pgf@circ@count@a\relax + \pgftext[right, + at=\pgfpoint{\pgf@circ@res@left-(\pgf@circ@qfp@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}{\pgf@circ@res@down}, + rotate=\rot]{\mytext} + % right + \pgf@circ@count@c=\numexpr3*\pgf@circ@count@b-\pgf@circ@count@a+1\relax + \pgftext[top, + at=\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up+(\pgf@circ@qfp@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}, + rotate=\rot]{\mytext} + % top + \pgf@circ@count@c=\numexpr3*\pgf@circ@count@b+\pgf@circ@count@a\relax + \pgftext[left, + at=\pgfpoint{\pgf@circ@res@right+(\pgf@circ@qfp@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}{\pgf@circ@res@up}, + rotate=\rot]{\mytext} + \fi + \advance\pgf@circ@count@a-1\relax% + \repeatpgfmathloop + \fi + \endpgfscope + \ifdim\pgf@circ@res@other>0pt + \pgfscope + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/multipoles/external pins thickness}\pgflinewidth} + \pgf@circ@count@a=\numpins% + \divide\pgf@circ@count@a by 4 \pgf@circ@count@b=\pgf@circ@count@a + \pgfmathloop% + \ifnum\pgf@circ@count@a>0 + \edef\padfrac{\pgfkeysvalueof{/tikz/circuitikz/multipoles/external pad fraction}} + \ifnum\padfrac>0 + \pgf@circ@res@temp=\pgf@circ@res@step\divide\pgf@circ@res@temp by \padfrac + % left side pads + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@temp+\pgf@circ@res@up+(\pgf@circ@qfp@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@left-\pgf@circ@res@other}{\pgf@circ@res@temp+\pgf@circ@res@up+(\pgf@circ@qfp@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@left-\pgf@circ@res@other}{-\pgf@circ@res@temp+\pgf@circ@res@up+(\pgf@circ@qfp@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{-\pgf@circ@res@temp+\pgf@circ@res@up+(\pgf@circ@qfp@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}} + % bottom side pads + \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@temp+\pgf@circ@res@left-(\pgf@circ@qfp@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{-\pgf@circ@res@temp+\pgf@circ@res@left-(\pgf@circ@qfp@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}{\pgf@circ@res@down-\pgf@circ@res@other}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@temp+\pgf@circ@res@left-(\pgf@circ@qfp@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}{\pgf@circ@res@down-\pgf@circ@res@other}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@temp+\pgf@circ@res@left-(\pgf@circ@qfp@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}{\pgf@circ@res@down}} + % right side pads + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@temp+\pgf@circ@res@up+(\pgf@circ@qfp@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right+\pgf@circ@res@other}{\pgf@circ@res@temp+\pgf@circ@res@up+(\pgf@circ@qfp@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right+\pgf@circ@res@other}{-\pgf@circ@res@temp+\pgf@circ@res@up+(\pgf@circ@qfp@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{-\pgf@circ@res@temp+\pgf@circ@res@up+(\pgf@circ@qfp@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}} + % top side pads + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@temp+\pgf@circ@res@right+(\pgf@circ@qfp@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@temp+\pgf@circ@res@right+(\pgf@circ@qfp@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}{\pgf@circ@res@up+\pgf@circ@res@other}} + \pgfpathlineto{\pgfpoint{-\pgf@circ@res@temp+\pgf@circ@res@right+(\pgf@circ@qfp@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}{\pgf@circ@res@up+\pgf@circ@res@other}} + \pgfpathlineto{\pgfpoint{-\pgf@circ@res@temp+\pgf@circ@res@right+(\pgf@circ@qfp@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}{\pgf@circ@res@up}} + \else + % left side pins + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up+(\pgf@circ@qfp@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@left-\pgf@circ@res@other}{\pgf@circ@res@up+(\pgf@circ@qfp@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}} + % bottom side pins + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left-(\pgf@circ@qfp@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@left-(\pgf@circ@qfp@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}{\pgf@circ@res@down-\pgf@circ@res@other}} + % right side pins + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up+(\pgf@circ@qfp@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right+\pgf@circ@res@other}{\pgf@circ@res@up+(\pgf@circ@qfp@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}} + % top side pins + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right+(\pgf@circ@qfp@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right+(\pgf@circ@qfp@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}{\pgf@circ@res@up+\pgf@circ@res@other}} + \fi + \advance\pgf@circ@count@a-1\relax% + \repeatpgfmathloop + \pgfusepath{stroke} + \endpgfscope + \fi + }% + % \pgf@sh@s@ contains all the code for the shape + % and is executed just before a node is drawn. + \pgfutil@g@addto@macro\pgf@sh@s@qfpchip{% + % Start with the maximum pin number and go backwards. + \pgf@circ@count@a=\numpins% + \pgfmathloop% + \ifnum\pgf@circ@count@a>0 + \expandafter\xdef\csname pgf@anchor@qfpchip@pin\space\the\pgf@circ@count@a\endcsname{% + \noexpand\pgf@circ@qfppinanchor{\the\pgf@circ@count@a}{1}% + } + \expandafter\xdef\csname pgf@anchor@qfpchip@bpin\space\the\pgf@circ@count@a\endcsname{% + \noexpand\pgf@circ@qfppinanchor{\the\pgf@circ@count@a}{0}% + } + \advance\pgf@circ@count@a-1\relax% + \repeatpgfmathloop% + }% + } + +%% anchors for DIP +\def\pgf@circ@dippinanchor#1#2{% #1: pin number #2: 0 for border pin, 1 for external pin + \c@pgf@countc=\numpins\relax + \divide\c@pgf@countc by 2 + \ifnum #1 > \the\c@pgf@countc + % right side + \pgfpoint{\width/2+#2*\extshift}{-\height/2+(\pgf@circ@dip@pin@shift-\c@pgf@countc+#1-1)*\chipspacing} + \else + \pgfpoint{-\width/2-#2*\extshift}{\height/2+(\pgf@circ@dip@pin@shift-#1)*\chipspacing} +\fi +} + +%% anchors for QFP +\def\pgf@circ@qfppinanchor#1#2{% #1: pin number #2: 0 for border pin, 1 for external pin + \c@pgf@countc=\numpins\relax + \divide\c@pgf@countc by 4 + \ifnum #1 > \the\c@pgf@countc + \c@pgf@countb=\c@pgf@countc \multiply \c@pgf@countb by 2 + \ifnum #1 > \the\c@pgf@countb + \c@pgf@countb=\c@pgf@countc \multiply \c@pgf@countb by 3 + \ifnum #1 > \the\c@pgf@countb + % 3*npins/4 < pin, top side + \pgfpoint{\width/2+(\pgf@circ@qfp@pin@shift+\c@pgf@countb-#1)*\chipspacing}{\height/2+#2*\extshift}% + \else + % 2*npins/4 < pin <= 3*npins/4, right side + \pgfpoint{\width/2+#2*\extshift}{\height/2+(\pgf@circ@qfp@pin@shift-\c@pgf@countb+#1-1)*\chipspacing}% + \fi + \else + % npins/4 < pin <= 2*npins/4, bottom side + \pgfpoint{\width/2+(\pgf@circ@qfp@pin@shift-\c@pgf@countb+#1-1)*\chipspacing}{-\height/2-#2*\extshift}% + \fi + \else + % <= npins/4, left side + \pgfpoint{-\width/2-#2*\extshift}{\height/2+(\pgf@circ@qfp@pin@shift-#1)*\chipspacing}% + \fi +} + + +%% Rotary Switch + +\pgfdeclareshape{rotaryswitch} +{ + \savedanchor\northeast{% + % this strange value makes the 2-pole rotary switch equal to the 2 poles cute spdt + % the magic number is 0.25/cos(35) + % try to recalculate it for the actual switch + \pgf@circ@res@temp=\ctikzvalof{tripoles/spdt/width}\pgf@circ@Rlen + \pgf@circ@res@temp=.3052\pgf@circ@res@temp + \edef\a{\ctikzvalof{multipoles/rotary/angle}} + \edef\r{\ctikzvalof{nodes width}} + \pgfmathsetlength{\pgf@y}{\r*\pgf@circ@Rlen +(\a>90 ? 2 : 2*sin(\a))*\pgf@circ@res@temp} + \pgfmathsetlength{\pgf@x}{\r*\pgf@circ@Rlen + \pgf@circ@res@temp} + } + \savedanchor\northwest{% + % this strange value makes the 2-pole rotary switch equal to the 2 poles cute spdt + % the magic number is 0.25/cos(35) + % try to recalculate it for the actual switch + \pgf@circ@res@temp=\ctikzvalof{tripoles/spdt/width}\pgf@circ@Rlen + \pgf@circ@res@temp=.3052\pgf@circ@res@temp + \edef\a{\ctikzvalof{multipoles/rotary/angle}} + \edef\r{\ctikzvalof{nodes width}} + \pgfmathsetlength{\pgf@y}{\r*\pgf@circ@Rlen +(\a>90 ? 2 : 2*sin(\a))*\pgf@circ@res@temp} + \pgfmathsetlength{\pgf@x}{-\r*\pgf@circ@Rlen - (\a<90 ? 1 : 1-2*cos(\a))*\pgf@circ@res@temp} + } + \savedanchor\central{% + % this strange value makes the 2-pole rotary switch equal to the 2 poles cute spdt + % the magic number is 0.25/cos(35) + % try to recalculate it for the actual switch + \pgf@circ@res@temp=\ctikzvalof{tripoles/spdt/width}\pgf@circ@Rlen + \pgf@circ@res@temp=.3052\pgf@circ@res@temp + \edef\a{\ctikzvalof{multipoles/rotary/angle}} + \edef\r{\ctikzvalof{nodes width}} + \pgfmathsetlength{\pgf@y}{\r*\pgf@circ@Rlen +(\a>90 ? 2 : 2*sin(\a))*\pgf@circ@res@temp} + \pgfmathsetlength{\pgf@x}{(\a<90 ? 0 : cos(\a))*\pgf@circ@res@temp} + } + % external square limits + \savedanchor\extnorthwest{% + \pgf@x=-\ctikzvalof{tripoles/spdt/width}\pgf@circ@Rlen + % this strange value makes the 2-pole rotary switch equal to the 2 poles cute spdt + \pgf@x=.3052\pgf@x % the magic number is 0.25/cos(35) + \pgf@x=2.5\pgf@x % external square size + \pgf@y=-\pgf@x %square thing when angle=180? + } + \saveddimen{\width}{\pgfmathsetlength\pgf@x{0.3052*\pgf@circ@Rlen*\ctikzvalof{tripoles/spdt/width}}} + % radius of the connector + % This is the radius of the "ocirc" shape (see pgfcircshapes.tex) + \saveddimen{\radius}{\pgfmathsetlength\pgf@x{\pgf@circ@Rlen*\ctikzvalof{nodes width}}} + % shapename + \savedmacro{\thisshape}{\def\thisshape{\tikz@fig@name}} + % shape type + \savedmacro{\cshape}{\def\cshape{\ctikzvalof{multipoles/rotary/shape}}} + \savedmacro{\channels}{\def\channels{\ctikzvalof{multipoles/rotary/channels}}} + \savedmacro{\angle}{\def\angle{\ctikzvalof{multipoles/rotary/angle}}} + \savedmacro{\wiper}{\def\wiper{\ctikzvalof{multipoles/rotary/wiper}}} + \savedmacro{\stepa}{\pgfmathsetmacro{\stepa}{2*\ctikzvalof{multipoles/rotary/angle}/(\ctikzvalof{multipoles/rotary/channels}-1)}} + % mid of the lever, to stack switches + %\anchor{mid}{\midlever} + \anchor{mid}{\northwest + \pgf@circ@res@temp=-\pgf@x + \pgfmathsetlength{\pgf@x}{\pgf@circ@res@temp*(-1+cos(\wiper))} + \pgfmathsetlength{\pgf@y}{\pgf@circ@res@temp*sin(\wiper)} + } + % center anchors + \anchor{cin}{ \northwest \pgf@y=0pt\advance\pgf@x by \radius} + % horizontal angles + \anchor{in}{ \northwest \pgf@y=0pt} + \anchor{ain}{ \northwest \pgf@y=0pt} + + \anchor{center}{ \central \pgf@y=0pt } + \anchor{east}{ \northeast \pgf@y=0pt } + \anchor{west}{ \northwest \pgf@y=0pt } + \anchor{south}{ \central \pgf@y=-\pgf@y } + \anchor{north}{ \central } + \anchor{south west}{ \northwest \pgf@y=-\pgf@y } + \anchor{north east}{ \northeast } + \anchor{north west}{ \northwest } + \anchor{south east}{ \northeast \pgf@y=-\pgf@y } + + \anchor{ext center}{ \pgf@y=0pt \pgf@x=0pt \advance\pgf@x by -\width} + \anchor{ext east}{ \extnorthwest \pgf@y=0pt \pgf@x=-\pgf@x \advance\pgf@x by -\width} + \anchor{ext west}{ \extnorthwest \pgf@y=0pt \advance\pgf@x by -\width} + \anchor{ext south}{ \extnorthwest \pgf@x=0pt \pgf@y=-\pgf@y \advance\pgf@x by -\width} + \anchor{ext north}{ \extnorthwest \pgf@x=0pt \advance\pgf@x by -\width} + \anchor{ext south west}{ \extnorthwest \pgf@y=-\pgf@y \advance\pgf@x by -\width} + \anchor{ext north east}{ \extnorthwest \pgf@x=-\pgf@x \advance\pgf@x by -\width} + \anchor{ext north west}{ \extnorthwest \advance\pgf@x by -\width} + \anchor{ext south east}{ \extnorthwest \pgf@x=-\pgf@x \pgf@y=-\pgf@y \advance\pgf@x by -\width} + + \backgroundpath{ + \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}} + \pgf@circ@res@right = \width + \pgf@circ@res@left = -\width + + \pgfscope %wiper + % This is the radius of the "ocirc" shape (see pgfcircshapes.tex) + \pgf@circ@res@temp=\radius\relax + \pgf@circ@res@temp=\ctikzvalof{multipoles/rotary/thickness}\pgf@circ@res@temp + \pgfsetlinewidth{2\pgf@circ@res@temp} + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}} + \pgfpathlineto{\pgfpointadd{\pgfpoint{\pgf@circ@res@left}{0pt}}{\pgfpointpolar{\wiper}{2\pgf@circ@res@right}}} + \pgfsetroundcap\pgfusepath{draw} + \endpgfscope + + \ifpgf@circ@rotaryarrow + \pgfscope % arrow + \ifpgf@circ@rotaryarrow@ccw\pgfsetarrowsstart{latexslim}\fi + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgflinewidth} + \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}} % center of cin node + \pgftransformrotate{\wiper} + \pgfpathmoveto{\pgfpointpolar{50}{1.0\pgf@circ@res@right}} + \pgfpatharc{50}{-50}{1.0\pgf@circ@res@right} + \ifpgf@circ@rotaryarrow@cw\pgfsetarrowsend{latexslim}\fi + \pgfusepath{draw} + \endpgfscope + \fi + + % \typeout{CHANNELS\space\channels\space ANGLE\space\angle STEPA\space\stepa} + \pgf@circ@count@a=\channels\relax + \pgfmathsetmacro{\currenta}{-\angle} + \pgfmathloop% + \ifnum\pgf@circ@count@a>0 + % \typeout{LOOPIN\space\space\the\pgf@circ@count@a\space CURRENTA\space\currenta\space RIGHT\space\the\pgf@circ@res@right} + \pgfscope + \pgftransformshift{\pgfpointadd{\pgfpoint{\pgf@circ@res@left}{0pt}}{\pgfpointpolar{\currenta}{2\pgf@circ@res@right}}} + \pgfnode{\cshape}{center}{}{\thisshape-out \the\pgf@circ@count@a}{\pgfusepath{stroke}} + \endpgfscope + \pgfmathsetmacro{\currenta}{\currenta+\stepa} + % \typeout{LOOPOUT\space\the\pgf@circ@count@a\space CURRENTA\space\currenta\space RIGHT\space\the\pgf@circ@res@right} + \advance\pgf@circ@count@a by -1\relax% + \repeatpgfmathloop + + \pgfscope % input + \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}} + \pgfnode{\cshape}{center}{}{\thisshape-in}{\pgfusepath{stroke}} + \endpgfscope + } + % \pgf@sh@s@ contains all the code for the shape + % and is executed just before a node is drawn. + \pgfutil@g@addto@macro\pgf@sh@s@rotaryswitch{% + % Start with the maximum pin number and go backwards. + \pgf@circ@count@a=\channels\relax + \pgfmathloop% + \ifnum\pgf@circ@count@a>0 + % we will create two anchors per pin: the "normal one" like `pin 1` for the + % electrical contact, and the "border one" like `bpin 1` for labels. + % they will coincide if `external pins width` is set to 0. + \expandafter\xdef\csname pgf@anchor@rotaryswitch@out\space\the\pgf@circ@count@a\endcsname{% + \noexpand\pgf@circ@rotaryanchor{\the\pgf@circ@count@a}{1}{0}% + } + \expandafter\xdef\csname pgf@anchor@rotaryswitch@cout\space\the\pgf@circ@count@a\endcsname{% + \noexpand\pgf@circ@rotaryanchor{\the\pgf@circ@count@a}{0}{0}% + } + \expandafter\xdef\csname pgf@anchor@rotaryswitch@aout\space\the\pgf@circ@count@a\endcsname{% + \noexpand\pgf@circ@rotaryanchor{\the\pgf@circ@count@a}{0}{1}% + } + \expandafter\xdef\csname pgf@anchor@rotaryswitch@sqout\space\the\pgf@circ@count@a\endcsname{% + \noexpand\pgf@circ@rotarysqanchor{\the\pgf@circ@count@a}{0}% + } + \advance\pgf@circ@count@a by -1\relax% + \repeatpgfmathloop% + }% +} + +\def\pgf@circ@rotaryanchor#1#2#3{% #1: numero del pin; #2: 1 - x pos, 0 - center; #3 0: inner, 1 outer + \pgf@circ@res@temp=\width + \pgfmathsetmacro{\myangle}{\angle-(#1-1)*\stepa} + \pgfmathsetlength{\pgf@x}{2*(\pgf@circ@res@temp+#3*\radius/2)*cos(\myangle))+#2*\radius} + \pgfmathsetlength{\pgf@y}{2*(\pgf@circ@res@temp+#3*\radius/2)*sin(\myangle)} + \advance\pgf@x by -\pgf@circ@res@temp +} + +\def\pgf@circ@rotarysqanchor#1{% external square anchors + \pgf@circ@res@temp=\width + \pgfmathsetmacro{\myangle}{\angle-(#1-1)*\stepa} + \pgfpointborderrectangle{\pgfpointpolar{\myangle}{1pt}}{\pgfpoint{2.5\pgf@circ@res@temp}{2.5\pgf@circ@res@temp}} + \advance\pgf@x by -\pgf@circ@res@temp +} + +% Seven segments displays + +\pgfdeclareshape{bare7seg}{ + \savedmacro{\dotstatus}{\edef\dotstatus{\pgf@circ@sevenseg@dotstate}} + \saveddimen{\dotspace}{% the dot is on the right, and occupy the same as the thickness + \ifpgf@circ@sevenseg@dot + \pgfmathsetlength{\pgf@x}{\ctikzvalof{seven seg/thickness}} + \else + \pgf@x=0pt + \fi + } + % The object extension is more or less (-width/2,-width) to (width/2,width) + % and adjusted for line thickness (both sides) and eventually the dot + \saveddimen{\width}{\pgfmathsetlength{\pgf@x}{\ctikzvalof{seven seg/width}*\pgf@circ@Rlen}} + \saveddimen{\gap}{\pgfmathsetlength{\pgf@x}{\ctikzvalof{seven seg/segment sep}}} + \saveddimen{\boxgap}{\pgfmathsetlength{\pgf@x}{\ctikzvalof{seven seg/box sep}}} + \savedanchor{\southwest}{% both negative + \pgfmathsetlength{\pgf@x}{-0.5*\ctikzvalof{seven seg/width}*\pgf@circ@Rlen + -0.5*\ctikzvalof{seven seg/thickness}-\ctikzvalof{seven seg/box sep}} + \pgfmathsetlength{\pgf@y}{-\ctikzvalof{seven seg/width}*\pgf@circ@Rlen + -0.5*\ctikzvalof{seven seg/thickness}-\ctikzvalof{seven seg/box sep}} + } + \savedanchor{\northeast}{% both positive + \ifpgf@circ@sevenseg@dot + \pgfmathsetlength{\pgf@circ@res@other}{\ctikzvalof{seven seg/thickness}} + \else + \pgf@circ@res@other=0pt + \fi + \pgfmathsetlength{\pgf@x}{0.5*\ctikzvalof{seven seg/width}*\pgf@circ@Rlen + +0.5*\ctikzvalof{seven seg/thickness}+\pgf@circ@res@other+\ctikzvalof{seven seg/box sep}} + \pgfmathsetlength{\pgf@y}{\ctikzvalof{seven seg/width}*\pgf@circ@Rlen + +0.5*\ctikzvalof{seven seg/thickness}+\ctikzvalof{seven seg/box sep}} + } + \savedanchor{\topright}{% anchor without the box sep and the thickness + \pgfmathsetlength{\pgf@x}{0.5*\ctikzvalof{seven seg/width}*\pgf@circ@Rlen} + \pgfmathsetlength{\pgf@y}{\ctikzvalof{seven seg/width}*\pgf@circ@Rlen} + } + \anchor{center}{\pgfpointorigin} + \anchor{north west}{\southwest\pgf@y=-\pgf@y} + \anchor{north east}{\northeast} + \anchor{south east}{\northeast\pgf@y=-\pgf@y} + \anchor{south west}{\southwest} + \anchor{north}{\northeast\pgf@x=0pt} + \anchor{east}{\northeast\pgf@y=0pt} + \anchor{south}{\southwest\pgf@x=0pt} + \anchor{west}{\southwest\pgf@y=0pt} + \anchor{a}{\topright\pgf@x=0pt} + \anchor{b}{\topright\pgf@y=0.5\pgf@y} + \anchor{c}{\topright\pgf@y=-0.5\pgf@y} + \anchor{d}{\topright\pgf@y=-\pgf@y\pgf@x=0pt} + \anchor{e}{\topright\pgf@x=-\pgf@x\pgf@y=-0.5\pgf@y} + \anchor{f}{\topright\pgf@x=-\pgf@x\pgf@y=0.5\pgf@y} + \anchor{g}{\pgfpointorigin} + \anchor{dot}{\topright\pgf@y=-\pgf@y\advance\pgf@x by \dotspace} + \behindbackgroundpath{% + \southwest % I do not want the dot here, it will stick out + \pgf@circ@res@up = -\pgf@y + \pgf@circ@res@down = \pgf@y + \pgf@circ@res@right = \pgf@x + \pgf@circ@res@left = -\pgf@x + \pgfscope + \pgfsetlinewidth{\ctikzvalof{multipoles/thickness}\pgflinewidth} + \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}} + \pgfpathrectanglecorners% + {\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}} + {\pgfpoint{\pgf@circ@res@left+\dotspace}{\pgf@circ@res@up}} + \ifpgf@circ@sevenseg@box + \pgf@circ@draworfill + \else + \pgf@circ@maybefill + \fi + \endpgfscope + \edef\bits{\ctikzvalof{seven seg/bits}} + \pgfscope + \pfg@circ@sseg@drawbits{\bits} + \endpgfscope + \pgfscope + \ifpgf@circ@sevenseg@dot + \pgf@circ@sseg@drawdots + \fi + \endpgfscope + } +} + +\def\pgf@circ@sseg@splitbits#1#2#3#4#5#6#7\relax{%split the seven bits + \edef\@@a{#1}\edef\@@b{#2}\edef\@@c{#3}\edef\@@d{#4}\edef\@@e{#5}\edef\@@f{#6}\edef\@@g{#7}% +} +\def\pgf@circ@sseg@drawone#1#2#3#4#5{% #1 on off the x1, y1, x2 , y2 + \ifnum #1 > 0\relax + \pgfsetcolor{\ctikzvalof{seven seg/color on}} + \else + \pgfsetcolor{\ctikzvalof{seven seg/color off}} + \fi + \pgfpathmoveto{\pgfpoint{#2}{#3}} + \pgfpathlineto{\pgfpoint{#4}{#5}} + \pgfusepath{draw} +} +\def\pfg@circ@sseg@drawbits#1{% #1 must be 7 bits + \expandafter\pgf@circ@sseg@splitbits#1\relax% a bit of magic... + \pgfmathsetlength{\pgf@circ@res@other}{0.5*\ctikzvalof{seven seg/thickness}} + \pgfsetlinewidth{\ctikzvalof{seven seg/thickness}} + % \pgfsetroundcap + \pgfsetarrowsstart{Triangle Cap[]} + \pgfsetarrowsend{Triangle Cap[]} + % segments + \pgf@circ@sseg@drawone{\@@a}{-\width/2+\gap}{\width}{\width/2-\gap}{\width} + \pgf@circ@sseg@drawone{\@@b}{\width/2}{\width-\gap}{\width/2}{0pt+\gap} + \pgf@circ@sseg@drawone{\@@c}{\width/2}{0pt-\gap}{\width/2}{-\width+\gap} + \pgf@circ@sseg@drawone{\@@d}{\width/2-\gap}{-\width}{-\width/2+\gap}{-\width} + \pgf@circ@sseg@drawone{\@@e}{-\width/2}{-\width+\gap}{-\width/2}{0pt-\gap} + \pgf@circ@sseg@drawone{\@@f}{-\width/2}{0pt+\gap}{-\width/2}{\width-\gap} + \pgf@circ@sseg@drawone{\@@g}{-\width/2+\gap}{0pt}{\width/2-\gap}{0pt} +} +\def\pgf@circ@sseg@drawdots{% dots + \edef\what{empty} + \ifx\what\pgf@circ@sevenseg@dotstate + % do nothing + \else + \pgfmathsetlength{\pgf@circ@res@other}{0.5*\ctikzvalof{seven seg/thickness}} + \edef\what{off} + \ifx\what\pgf@circ@sevenseg@dotstate + % dot off + \pgfsetfillcolor{\ctikzvalof{seven seg/color off}} + \pgfsetcolor{\ctikzvalof{seven seg/color off}} + \else + % dot on + \pgfsetfillcolor{\ctikzvalof{seven seg/color on}} + \pgfsetcolor{\ctikzvalof{seven seg/color on}} + \fi + \pgfpathcircle{\pgfpoint{\width/2+2*\pgf@circ@res@other}{-\width}}{\pgf@circ@res@other} + \pgfusepath{draw,fill} + \fi +} +%%%---------- close: tex/pgfcircmultipoles + +%%%%%%%%%%% Springe nach tex/pgfcirclabel +%%%---------- open: tex/pgfcirclabel.tex +% Copyright 2007-2009 by Massimo Redaelli +% +% This file may be distributed and/or modified +% +% 1. under the LaTeX Project Public License and/or +% 2. under the GNU Public License. +% +% See the files gpl-3.0_license.txt and lppl-1-3c_license.txt for more details. + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Bipole label positioning + +%% Options +\ctikzset{label/.style = { l=#1 } } +\ctikzset{l/.code = { + \pgfkeys{/tikz/circuitikz/bipole/label/name=#1} + \ctikzsetvalof{bipole/label/unit}{} + \ifpgf@circ@siunitx + \pgf@circ@handleSI{#1} + \ifpgf@circ@siunitx@res + \edef\pgf@temp{\pgf@circ@handleSI@val} + \pgfkeyslet{/tikz/circuitikz/bipole/label/name}{\pgf@temp} + \edef\pgf@temp{\pgf@circ@handleSI@unit} + \pgfkeyslet{/tikz/circuitikz/bipole/label/unit}{\pgf@temp} + \else + \fi + \else + \fi +}} + +\ctikzset{label above/.code = { + l=#1, + \circuitikzbasekey/bipole/label/position=90 } +} + +\ctikzset{l^/.style = { + l=#1, + \circuitikzbasekey/bipole/label/position=90 } +} + +\ctikzset{label below/.code = { + l=#1, + \circuitikzbasekey/bipole/label/position=-90 } +} + +\ctikzset{l_/.style = { + l=#1, + \circuitikzbasekey/bipole/label/position=-90 } +} + +\ctikzset{annotation/.style = { a=#1 } } +\ctikzset{a/.code = { + \pgfkeys{/tikz/circuitikz/bipole/annotation/name=#1} + \ctikzsetvalof{bipole/annotation/unit}{} + \ifpgf@circ@siunitx + \pgf@circ@handleSI{#1} + \ifpgf@circ@siunitx@res + \edef\pgf@temp{\pgf@circ@handleSI@val} + \pgfkeyslet{/tikz/circuitikz/bipole/annotation/name}{\pgf@temp} + \edef\pgf@temp{\pgf@circ@handleSI@unit} + \pgfkeyslet{/tikz/circuitikz/bipole/annotation/unit}{\pgf@temp} + \else + \fi + \else + \fi +}} + +\ctikzset{annotation above/.code = { + a=#1, + \circuitikzbasekey/bipole/annotation/position=90 } +} + +\ctikzset{a^/.style = { + a=#1, + \circuitikzbasekey/bipole/annotation/position=90 } +} + +\ctikzset{annotation below/.code = { + a=#1, + \circuitikzbasekey/bipole/annotation/position=-90 } +} +\ctikzset{a_/.style = { + a=#1, + \circuitikzbasekey/bipole/annotation/position=-90 } +} + +% This is to adjust spacing for the labels so that they are not cramped on components +\def\pgf@circ@ls{.75ex} % labelspace to have just one point to change + +\def\pgf@circ@drawlabels#1{ + \pgfextra{ + % This function will be called with argument #1 equal + % to "label" or "annotation" form pgfcircpath.tex. + % pgf@circ@direction is the direction of the path, + % its value is set in pgfcircpath.tex + \pgfmathsubtract{\pgf@circ@direction}{90} + \pgfmathround{\pgfmathresult} % avoid precision loss errors + \edef\pgf@circ@labanc{\expandafter\pgf@circ@stripdecimals\pgfmathresult\pgf@nil} + + \edef\pgf@circ@temp{\ctikzvalof{bipole/#1/position}} + \ifnum \pgf@circ@temp < 0 + \pgfmathadd{\pgf@circ@labanc}{180} + \edef\pgf@circ@labanc{\expandafter\pgf@circ@stripdecimals\pgfmathresult\pgf@nil} + \fi + % \typeout{INI: TEMP\space\pgf@circ@temp\space LABANC\space\pgf@circ@labanc} + % + % normalize the angle values + % + \pgfmathmod{\pgf@circ@labanc}{360} + \edef\pgf@circ@labanc{\expandafter\pgf@circ@stripdecimals\pgfmathresult\pgf@nil} + % + \ifpgf@circuit@bipole@inverted + \pgfmathadd{\pgf@circ@temp}{180} %If shape is inverted, use opposite anchor + \edef\pgf@circ@temp{\expandafter\pgf@circ@stripdecimals\pgfmathresult\pgf@nil} + \fi + % + \ifnum \ctikzvalof{mirror value} = -1 + \pgfmathadd{\pgf@circ@temp}{180} %If shape is mirrored, use opposite anchor + \edef\pgf@circ@temp{\expandafter\pgf@circ@stripdecimals\pgfmathresult\pgf@nil} + \fi + % \typeout{FIN: TEMP\space\pgf@circ@temp\space LABANC\space\pgf@circ@labanc} + } + %Firstly, place a coordinate directly at the edge of the shape + (\ctikzvalof{bipole/name}.\pgf@circ@temp) coordinate (labelcoor) + %now decide, which labels should be drawn + \pgfextra{ + \edef\pgf@temp{\ctikzvalof{label/align}} + \def\pgf@circ@temp{straight} + } + \ifx\pgf@temp\pgf@circ@temp %straight + \pgf@circ@drawreglabels{#1} + \else + \pgfextra{\def\pgf@circ@temp{rotate}} + \ifx\pgf@temp\pgf@circ@temp %rotate + \pgf@circ@drawrotlabels{#1} + \else% smart + \pgf@circ@drawsmartlabels{#1} + \fi + \fi +} + + +\def\pgf@circ@drawsmartlabels#1{ + \pgfextra{ + \pgfmathmod{\pgf@circ@direction}{90} + \edef\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgfmathresult\pgf@nil} + } + \ifnum \pgfcircmathresult > 20 + \ifnum \pgfcircmathresult < 70 + \pgf@circ@drawrotlabels{#1} + \else + \pgf@circ@drawreglabels{#1} + \fi + \else + \pgf@circ@drawreglabels{#1} + \fi + } + + +\def\pgf@circ@drawrotlabels#1{ + \pgfextra{ + % scale the distances in function of zoom, so that they are not + % dependent on it but on font size. Thanks to @marmot + % https://tex.stackexchange.com/a/476018/38080 + % the coeffcient is adjusted so that the distance is more or less + % the same for rotated labels and straight ones (although it will + % depend on the font, so it's not exact). + \pgfgettransformentries{\tmp}{\tmp}{\tmp}{\myscale}{\tmp}{\tmp} + \pgfmathsetlength\pgf@circ@res@temp{1.5*\pgf@circ@ls/\myscale} + \ifnum \ctikzvalof{bipole/#1/position}>0 + %we need some more space for placement below, due to mid-anchor + \else % we do not have <= in \ifnum... + \pgf@circ@res@temp=1.5\pgf@circ@res@temp + \fi + %Calculate rotation of the label from direction and strip decimals + \edef\pgfcirclabrot{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil} + % rotate the label at second or third quadrant: + \ifnum \pgfcirclabrot > 90 \ifnum \pgfcirclabrot < 270 + \pgfmathsubtract{\pgf@circ@direction}{180} + \edef\pgfcirclabrot{\expandafter\pgf@circ@stripdecimals\pgfmathresult\pgf@nil} + %invert the space relationships due to rotated strings + \ifnum \ctikzvalof{bipole/#1/position}>0 + \pgf@circ@res@temp=1.5\pgf@circ@res@temp + \fi + \fi\fi + \pgfmathparse{\ctikzvalof{bipole/#1/position}>0?\pgf@circ@direction+90:\pgf@circ@direction-90} + \edef\pgf@circ@labposangle{\expandafter\pgf@circ@stripdecimals\pgfmathresult\pgf@nil} + } + % reset cm is not working correctly here + (labelcoor)++(\pgf@circ@labposangle:\the\pgf@circ@res@temp) coordinate(labelcoor) + node[anchor=mid, rotate=\pgfcirclabrot](\ctikzvalof{bipole/name}#1){\pgf@circ@finallabels{#1}} +} + +\def\pgf@circ@drawreglabels#1{ + %Now calculate all shape positions + %Use mid-anchor at x-axis and base-anchor at y-axis, respectively. + %All points between will be addressed by angled-anchors: + \pgfextra{ + % scale ex-distance to make it independent on scale + % thanks @marmot see https://tex.stackexchange.com/a/476018/38080 + \pgfgettransformentries{\tmp}{\tmp}{\tmp}{\myscale}{\tmp}{\tmp} + \pgfmathsetlength\pgf@circ@res@temp{\pgf@circ@ls/\myscale} + \pgfmathadd{\pgf@circ@labanc}{90} + \pgfmathround{\pgfmathresult} + \def\pgf@circ@labanctext{\pgf@circ@labanc} + \edef\pgf@circ@temp{\expandafter\pgf@circ@stripdecimals\pgfmathresult\pgf@nil} + \pgfmathparse{mod(\pgf@circ@temp,180)>135?mod(\pgf@circ@temp,180)-180:mod(\pgf@circ@temp,180)} + \edef\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgfmathresult\pgf@nil} + } + %Values around 90 are at both y-axis + \ifnum \pgfcircmathresult > 84 \ifnum \pgfcircmathresult< 96 + \pgfextra{\edef\pgf@circ@labpos{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}} + \ifnum \pgf@circ@labpos > 180 + \ifnum \ctikzvalof{bipole/#1/position} > 0 + \pgfextra{\def\pgf@circ@labanctext{mid west}} + \else + \pgfextra{\def\pgf@circ@labanctext{mid east}} + \fi + \else + \ifnum \ctikzvalof{bipole/#1/position} > 0 + \pgfextra{\def\pgf@circ@labanctext{mid east}} + \else + \pgfextra{\def\pgf@circ@labanctext{mid west}} + \fi + \fi + \fi\fi + %Values between -5 and 5 are at pos /neg x-axis + \pgfextra{\def\uffa{}\newdimen\realshift\realshift=\dimexpr1pt\relax} + \ifnum \pgfcircmathresult <6 \ifnum \pgfcircmathresult > -6 + \ifnum \ctikzvalof{bipole/#1/position} < 0 + \ifnum \pgf@circ@labanc > 90 + % using base coordinate instead of south to naturally align + % symbols with descendants; but this invalidate the effect of + % the inner sep, so recover it by shifting the anchor + % reset cm is not working sometime, use @marmot solution + % see https://tex.stackexchange.com/a/476018/38080 + (labelcoor) ++(-\pgf@circ@labanc:\pgf@circ@res@temp) coordinate(labelcoor) + \pgfextra{\def\pgf@circ@labanctext{base}}%base + \else + \pgfextra{\def\pgf@circ@labanctext{north}}%north + \fi + \else + \ifnum \pgf@circ@labanc < 90 + % shift, as above + (labelcoor) ++(-\pgf@circ@labanc:\pgf@circ@res@temp) coordinate(labelcoor) + \pgfextra{\def\pgf@circ@labanctext{base}}%base + \else + \ifnum \pgf@circ@labanc > 180 + % this shouldn't happen, but somehow it does (270 degree anchors) + % shift, as above + (labelcoor) ++(-\pgf@circ@labanc:\pgf@circ@res@temp) coordinate(labelcoor) + \pgfextra{\def\pgf@circ@labanctext{base}}%base + \else + \pgfextra{\def\pgf@circ@labanctext{north}}%north + \fi + \fi + \fi + \fi\fi + (labelcoor) node[anchor=\pgf@circ@labanctext, + inner sep=0.5\pgf@circ@res@temp, outer sep=0pt, + ](\ctikzvalof{bipole/name}#1){\strut\pgf@circ@finallabels{#1}% + } +} + +\def\pgf@circ@finallabels#1{% + \edef\pgf@temp{}% + \edef\pgf@circ@temp{\ctikzvalof{bipole/#1/unit}}% + \ifx\pgf@temp\pgf@circ@temp% + \ctikzvalof{bipole/#1/name}% + \else% + $\SI{\ctikzvalof{bipole/#1/name}}{\ctikzvalof{bipole/#1/unit}}$% + \fi% +} + +\ctikzset{text/.style = { t=#1 } } +\ctikzset{t/.code = { + \ctikzsetvalof{bipoles/twoport/text}{#1} +}} + +%%%% Stacked labels +% +% stacked labels by Romano Giannetti romano@rgtti.com +% heavily based on Claudo Fiandrinos's https://tex.stackexchange.com/a/65792/38080 +% \expandafter trick inspired by Matthew Leingang's https://tex.stackexchange.com/a/12272/38080 +% +% labels are in a tabular, globally aligned: +% vertically with key l2 valign (default c) +% c: center t: top b: bottom +% horizontally with key l2 align (default l) +% l: left c: centered r: right +% you can switch sides using l2_=... and l2^=... +% syntax is l2_ = line1 and line2 (same for l2^) +% +\ctikzset{% + l2 valign/.store in=\ltwo@valign, l2 valign=c, + l2 halign/.store in=\ltwo@halign, l2 halign=l, +} +\ctikzset{l2base/.code n args={2}{ + \pgfkeys{/tikz/circuitikz/bipole/label/name=% + \bgroup + \setlength{\tabcolsep}{2pt}% + \def\ltwo@tabu{\tabular[\ltwo@valign]}% + \expandafter\ltwo@tabu\expandafter{\ltwo@halign}% + #1\\ #2% + \endtabular + \egroup + }% + \ctikzsetvalof{bipole/label/unit}{} + \ifpgf@circ@siunitx + \pgf@circ@handleSI{#2} + \ifpgf@circ@siunitx@res + \edef\pgf@temp{\pgf@circ@handleSI@val} + \pgfkeyslet{/tikz/circuitikz/bipole/label/name}{\pgf@temp} + \edef\pgf@temp{\pgf@circ@handleSI@unit} + \pgfkeyslet{/tikz/circuitikz/bipole/label/unit}{\pgf@temp} + \else + \fi + \else + \fi +}} +\ctikzset{l2/.style args={#1 and #2}{ + l2base={#1}{#2}, + \circuitikzbasekey/bipole/label/position=90 } +} +\ctikzset{l2 above/.style args={#1 and #2}{ + l2base={#1}{#2}, + \circuitikzbasekey/bipole/label/position=90 } +} +\ctikzset{l2^/.style args={#1 and #2}{ + l2base={#1}{#2}, + \circuitikzbasekey/bipole/label/position=90 } +} +\ctikzset{l2 below/.style args={#1 and #2}{ + l2base={#1}{#2}, + \circuitikzbasekey/bipole/label/position=-90 } +} +\ctikzset{l2_/.style args={#1 and #2}{ + l2base={#1}{#2}, + \circuitikzbasekey/bipole/label/position=-90 } +} + +%%%---------- close: tex/pgfcirclabel +%%%%%%%%%%% Springe nach tex/pgfcircvoltage +%%%---------- open: tex/pgfcircvoltage.tex +% Copyright 2007-2009 by Massimo Redaelli +% +% This file may be distributed and/or modified +% +% 1. under the LaTeX Project Public License and/or +% 2. under the GNU Public License. +% +% See the files gpl-3.0_license.txt and lppl-1-3c_license.txt for more details. + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Voltage management + + +\ctikzset{v^>/.style = { + v = #1, + \circuitikzbasekey/bipole/voltage/direction = forward, + \circuitikzbasekey/bipole/voltage/position = above + } +} + +\ctikzset{v^/.style = { + v = #1, + \circuitikzbasekey/bipole/voltage/direction = forward, + \circuitikzbasekey/bipole/voltage/position = below + } +} + +\ctikzset{v_/.style = {v = #1, \circuitikzbasekey/bipole/voltage/direction = forward} } +\ctikzset{v4 \ifnum\pgfcircmathresult <86 + \ifpgf@circuit@bipole@voltage@below + \def\pgf@circ@bipole@voltage@label@anchor{north west} + \else + \def\pgf@circ@bipole@voltage@label@anchor{south east} + \fi + \fi\fi + \ifnum\pgfcircmathresult >85 \ifnum\pgfcircmathresult <95 + \ifpgf@circuit@bipole@voltage@below + \def\pgf@circ@bipole@voltage@label@anchor{west} + \else + \def\pgf@circ@bipole@voltage@label@anchor{east} + \fi + \fi\fi + \ifnum\pgfcircmathresult >94 \ifnum\pgfcircmathresult <176 + \ifpgf@circuit@bipole@voltage@below + \def\pgf@circ@bipole@voltage@label@anchor{south west} + \else \def\pgf@circ@bipole@voltage@label@anchor{north east} + \fi + \fi\fi + \ifnum\pgfcircmathresult >175 \ifnum\pgfcircmathresult <185 + \ifpgf@circuit@bipole@voltage@below + \def\pgf@circ@bipole@voltage@label@anchor{south} + \else\def\pgf@circ@bipole@voltage@label@anchor{north} + \fi + \fi\fi + \ifnum\pgfcircmathresult >184 \ifnum\pgfcircmathresult <266 + \ifpgf@circuit@bipole@voltage@below + \def\pgf@circ@bipole@voltage@label@anchor{south east} + \else\def\pgf@circ@bipole@voltage@label@anchor{north west} + \fi + \fi\fi + \ifnum\pgfcircmathresult >265 \ifnum\pgfcircmathresult <275 + \ifpgf@circuit@bipole@voltage@below + \def\pgf@circ@bipole@voltage@label@anchor{east} + \else \def\pgf@circ@bipole@voltage@label@anchor{west} + \fi + \fi\fi + \ifnum\pgfcircmathresult >274 \ifnum\pgfcircmathresult <356 + \ifpgf@circuit@bipole@voltage@below + \def\pgf@circ@bipole@voltage@label@anchor{north east} + \else\def\pgf@circ@bipole@voltage@label@anchor{south west} + \fi + \fi\fi + \ifnum\pgfcircmathresult >-1 \ifnum\pgfcircmathresult <5 + \ifpgf@circuit@bipole@voltage@below + \def\pgf@circ@bipole@voltage@label@anchor{north} + \else\def\pgf@circ@bipole@voltage@label@anchor{south} + \fi + \fi\fi + \ifnum\pgfcircmathresult >355 \ifnum\pgfcircmathresult <361 + \ifpgf@circuit@bipole@voltage@below + \def\pgf@circ@bipole@voltage@label@anchor{north} + \else\def\pgf@circ@bipole@voltage@label@anchor{south} + \fi + \fi\fi + + \ifnum \ctikzvalof{mirror value}=-1 + \ifpgf@circuit@bipole@voltage@below + \pgf@circuit@bipole@voltage@belowfalse + \else + \pgf@circuit@bipole@voltage@belowtrue + \fi + \fi + + \ifpgf@circuit@bipole@inverted + \ifpgf@circuit@bipole@voltage@below + \pgf@circuit@bipole@voltage@belowfalse + \else + + \pgf@circuit@bipole@voltage@belowtrue + \fi + \fi + + \ifpgf@circuit@bipole@voltage@below + \def\pgf@circ@bipole@voltage@label@where{-90} + \else + \def\pgf@circ@bipole@voltage@label@where{90} + \fi + + + \edef\pgf@temp{/tikz/circuitikz/bipoles/\pgfkeysvalueof{/tikz/circuitikz/bipole/kind}/voltage/european label distance} + \pgfkeysifdefined{\pgf@temp} + { \edef\eudist{\ctikzvalof{bipoles/\pgfkeysvalueof{/tikz/circuitikz/bipole/kind}/voltage/european label distance}} } + { \edef\eudist{\ctikzvalof{voltage/european label distance}} } + \edef\shiftv{\ctikzvalof{voltage/shift}} + % adjust the label distance to the shift. + \pgfmathsetmacro{\eudistplus}{\eudist+\shiftv} + + \pgfsetcornersarced{\pgfpointorigin}% do not use rounded corners! + }%end pgfextra + + \ifpgf@circuit@bipole@isvoltage + \pgf@circ@drawvoltagegenerator + \else + \pgf@circ@drawvoltagegeneric + \fi + + % (\ctikzvalof{bipole/name}.\pgf@circ@bipole@voltage@label@where) %Zeile sinnlos!? + \ifpgf@circuit@bipole@voltage@straight + coordinate (Vlab) at ($(pgfcirc@Vto)!0.5!(pgfcirc@Vfrom) $) + node [anchor=\pgf@circ@bipole@voltage@label@anchor, inner sep=2pt] + at (Vlab) { \pgf@circ@finallabels{voltage/label} } + \else + coordinate (Vlab) at ($(\ctikzvalof{bipole/name}.center) ! + \ifpgf@circuit@europeanvoltage + \eudistplus + \else + \ctikzvalof{voltage/american label distance} + \fi ! + (\ctikzvalof{bipole/name}.\pgf@circ@bipole@voltage@label@where)$) + node [anchor=\pgf@circ@bipole@voltage@label@anchor, inner sep=2pt] at (Vlab) { \pgf@circ@finallabels{voltage/label} } + \fi +}%end drawvoltages +%%%---------- close: tex/pgfcircvoltage +%%%%%%%%%%% Springe nach tex/pgfcirccurrent +%%%---------- open: tex/pgfcirccurrent.tex +% Copyright 2007-2009 by Massimo Redaelli +% +% This file may be distributed and/or modified +% +% 1. under the LaTeX Project Public License and/or +% 2. under the GNU Public License. +% +% See the files gpl-3.0_license.txt and lppl-1-3c_license.txt for more details. + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Current handling + +%% Options +\ctikzset{i^>/.style = { + i = #1, + \circuitikzbasekey/bipole/current/direction = forward, + \circuitikzbasekey/bipole/current/x position = after, + \circuitikzbasekey/bipole/current/y position = above + } +} + +\ctikzset{i_>/.style = { + i = #1, + \circuitikzbasekey/bipole/current/direction = forward, + \circuitikzbasekey/bipole/current/x position = after, + \circuitikzbasekey/bipole/current/y position = below + } +} + +\ctikzset{i>^/.style = { + i = #1, + \circuitikzbasekey/bipole/current/direction = forward, + \circuitikzbasekey/bipole/current/x position = before, + \circuitikzbasekey/bipole/current/y position = above + } +} + +\ctikzset{i>_/.style = { + i = #1, + \circuitikzbasekey/bipole/current/direction = forward, + \circuitikzbasekey/bipole/current/x position = before, + \circuitikzbasekey/bipole/current/y position = below + } +} + +\ctikzset{i^/.style = {i = #1, \circuitikzbasekey/bipole/current/direction = forward } } +\ctikzset{i^/.style = { i= #1, \circuitikzbasekey/bipole/current/y position = above } } + +%% Output routine +\def\pgf@circ@drawcurrent{ + \pgfextra{ + \edef\pgf@circ@ffffff{\pgf@circ@direction} + \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@ffffff\pgf@nil} + + \ifnum\pgfcircmathresult >4 \ifnum\pgfcircmathresult <86 + \ifpgf@circuit@bipole@current@below + \def\pgf@circ@dir{north west} \else \def\pgf@circ@dir{south east} + \fi + \fi\fi + \ifnum\pgfcircmathresult >85 \ifnum\pgfcircmathresult <95 + \ifpgf@circuit@bipole@current@below + \def\pgf@circ@dir{west} \else \def\pgf@circ@dir{east} + \fi + \fi\fi + \ifnum\pgfcircmathresult >94 \ifnum\pgfcircmathresult <176 + \ifpgf@circuit@bipole@current@below + \def\pgf@circ@dir{south west}\else \def\pgf@circ@dir{north east} + \fi + \fi\fi + \ifnum\pgfcircmathresult >175 \ifnum\pgfcircmathresult <185 + \ifpgf@circuit@bipole@current@below + \def\pgf@circ@dir{south}\else\def\pgf@circ@dir{north} + \fi + \fi\fi + \ifnum\pgfcircmathresult >184 \ifnum\pgfcircmathresult <266 + \ifpgf@circuit@bipole@current@below + \def\pgf@circ@dir{south east}\else\def\pgf@circ@dir{north west} + \fi + \fi\fi + \ifnum\pgfcircmathresult >265 \ifnum\pgfcircmathresult <275 + \ifpgf@circuit@bipole@current@below + \def\pgf@circ@dir{east}\else \def\pgf@circ@dir{west} + \fi + \fi\fi + \ifnum\pgfcircmathresult >274 \ifnum\pgfcircmathresult <356 + \ifpgf@circuit@bipole@current@below + \def\pgf@circ@dir{north east}\else\def\pgf@circ@dir{south west} + \fi + \fi\fi + \ifnum\pgfcircmathresult <5 + \ifpgf@circuit@bipole@current@below + \def\pgf@circ@dir{north}\else\def\pgf@circ@dir{south} + \fi + \fi + \ifnum\pgfcircmathresult >355 + \ifpgf@circuit@bipole@current@below + \def\pgf@circ@dir{north}\else\def\pgf@circ@dir{south} + \fi + \fi + + \ifpgf@circuit@bipole@current@below + \def\pgf@circ@bipole@current@label@where{-90} + \else + \def\pgf@circ@bipole@current@label@where{+90} + \fi + } + + \pgfextra{\def\pgf@temp{short}\edef\pgf@circ@temp{\ctikzvalof{bipole/kind}}} + \ifx\pgf@circ@temp\pgf@temp%draw current at a short at middle of the line + (\tikztostart)--(\tikztotarget) + \else% normal bipole or source + \ifpgf@circuit@bipole@current@before + (\tikztostart)--(anchorstartnode) + \else + (anchorendnode)--(\tikztotarget) + \fi + \fi + \ifpgf@circuit@bipole@current@backward + \pgfextra{ + \pgfmathsubtract{\pgf@circ@ffffff}{180} + \edef\pgf@circ@ffffff{\expandafter\pgf@circ@stripdecimals\pgfmathresult\pgf@nil} + } + \fi + coordinate[currarrow,pos=\ctikzvalof{current/distance},rotate=\pgf@circ@ffffff](Iarrow) + (Iarrow.\pgf@circ@bipole@current@label@where) node[anchor=\pgf@circ@dir]{\pgf@circ@finallabels{current/label}} +} + +%%%---------- close: tex/pgfcirccurrent +%%%%%%%%%%% Springe nach tex/pgfcircflow +%%%---------- open: tex/pgfcircflow.tex +% Copyright 2007-2009 by Massimo Redaelli +% +% This file may be distributed and/or modified +% +% 1. under the LaTeX Project Public License and/or +% 2. under the GNU Public License. +% +% See the files gpl-3.0_license.txt and lppl-1-3c_license.txt for more details. + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% flow handling + +%% Options +\ctikzset{f^>/.style = { + f = #1, + \circuitikzbasekey/bipole/flow/direction = forward, + \circuitikzbasekey/bipole/flow/x position = after, + \circuitikzbasekey/bipole/curflowrent/y position = above + } +} + +\ctikzset{f_>/.style = { + f = #1, + \circuitikzbasekey/bipole/flow/direction = forward, + \circuitikzbasekey/bipole/flow/x position = after, + \circuitikzbasekey/bipole/flow/y position = below + } +} + +\ctikzset{f>^/.style = { + f = #1, + \circuitikzbasekey/bipole/flow/direction = forward, + \circuitikzbasekey/bipole/flow/x position = before, + \circuitikzbasekey/bipole/flow/y position = above + } +} + +\ctikzset{f>_/.style = { + f = #1, + \circuitikzbasekey/bipole/flow/direction = forward, + \circuitikzbasekey/bipole/flow/x position = before, + \circuitikzbasekey/bipole/flow/y position = below + } +} + +\ctikzset{f^/.style = { f = #1, \circuitikzbasekey/bipole/flow/direction = forward } } +\ctikzset{f^/.style = { f = #1, \circuitikzbasekey/bipole/flow/y position = above } } + +\ctikzset{f/.code = { + \pgfkeys{\circuitikzbasekey/bipole/flow/direction = forward, + \circuitikzbasekey/bipole/flow/x position = after, + \circuitikzbasekey/bipole/flow/y position = above } + \pgfkeys{/tikz/circuitikz/bipole/flow/label/name=#1} + \ctikzsetvalof{bipole/flow/label/unit}{} + \ifpgf@circ@siunitx + \pgf@circ@handleSI{#1} + \ifpgf@circ@siunitx@res + \edef\pgf@temp{\pgf@circ@handleSI@val} + \pgfkeyslet{/tikz/circuitikz/bipole/flow/label/name}{\pgf@temp} + \edef\pgf@temp{\pgf@circ@handleSI@unit} + \pgfkeyslet{/tikz/circuitikz/bipole/flow/label/unit}{\pgf@temp} + \else + \fi + \else + \fi +} +} + +%% Output routine +\def\pgf@circ@drawflow{ + \pgfextra{ + \edef\pgf@circ@ffffff{\pgf@circ@direction} + \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@ffffff\pgf@nil} + + \ifnum\pgfcircmathresult >4 \ifnum\pgfcircmathresult <86 + \ifpgf@circuit@bipole@flow@below + \def\pgf@circ@dir{north west} \else \def\pgf@circ@dir{south east} + \fi + \fi\fi + \ifnum\pgfcircmathresult >85 \ifnum\pgfcircmathresult <95 + \ifpgf@circuit@bipole@flow@below + \def\pgf@circ@dir{west} \else \def\pgf@circ@dir{east} + \fi + \fi\fi + \ifnum\pgfcircmathresult >94 \ifnum\pgfcircmathresult <176 + \ifpgf@circuit@bipole@flow@below + \def\pgf@circ@dir{south west}\else \def\pgf@circ@dir{north east} + \fi + \fi\fi + \ifnum\pgfcircmathresult >175 \ifnum\pgfcircmathresult <185 + \ifpgf@circuit@bipole@flow@below + \def\pgf@circ@dir{south}\else\def\pgf@circ@dir{north} + \fi + \fi\fi + \ifnum\pgfcircmathresult >184 \ifnum\pgfcircmathresult <266 + \ifpgf@circuit@bipole@flow@below + \def\pgf@circ@dir{south east}\else\def\pgf@circ@dir{north west} + \fi + \fi\fi + \ifnum\pgfcircmathresult >265 \ifnum\pgfcircmathresult <275 + \ifpgf@circuit@bipole@flow@below + \def\pgf@circ@dir{east}\else \def\pgf@circ@dir{west} + \fi + \fi\fi + \ifnum\pgfcircmathresult >274 \ifnum\pgfcircmathresult <356 + \ifpgf@circuit@bipole@flow@below + \def\pgf@circ@dir{north east}\else\def\pgf@circ@dir{south west} + \fi + \fi\fi + \ifnum\pgfcircmathresult <5 + \ifpgf@circuit@bipole@flow@below + \def\pgf@circ@dir{north}\else\def\pgf@circ@dir{south} + \fi + \fi + \ifnum\pgfcircmathresult >355 + \ifpgf@circuit@bipole@flow@below + \def\pgf@circ@dir{north}\else\def\pgf@circ@dir{south} + \fi + \fi + + \ifpgf@circuit@bipole@flow@below + \def\pgf@circ@bipole@flow@label@where{-90} + \else + \def\pgf@circ@bipole@flow@label@where{+90} + \fi + } + + \pgfextra{\def\pgf@temp{short}\edef\pgf@circ@temp{\ctikzvalof{bipole/kind}}} + \ifx\pgf@circ@temp\pgf@temp%draw flow at a short at middle of the line + (\tikztostart)--(\tikztotarget) + \else% normal bipole or source + \ifpgf@circuit@bipole@flow@before + (\tikztostart)--(anchorstartnode) + \else + (anchorendnode)--(\tikztotarget) + \fi + \fi + \pgfextra{ + \ifpgf@circuit@bipole@flow@backward + \ifpgf@circuit@bipole@flow@below + \def\flow@offset{\ctikzvalof{flow/offset}\pgf@circ@Rlen} + \else + \def\flow@offset{-\ctikzvalof{flow/offset}\pgf@circ@Rlen} + \fi + \pgfmathsubtract{\pgf@circ@ffffff}{180} + \edef\pgf@circ@ffffff{\expandafter\pgf@circ@stripdecimals\pgfmathresult\pgf@nil} + \else + \ifpgf@circuit@bipole@flow@below + \def\flow@offset{-\ctikzvalof{flow/offset}\pgf@circ@Rlen} + \else + \def\flow@offset{\ctikzvalof{flow/offset}\pgf@circ@Rlen} + \fi + \fi + } + coordinate[flowarrow,pos=\ctikzvalof{flow/distance},rotate=\pgf@circ@ffffff,yshift=\flow@offset](Farrowpos) + (Farrowpos.\pgf@circ@bipole@flow@label@where) node[anchor=\pgf@circ@dir]{ \pgf@circ@finallabels{flow/label}} +} + +%%%---------- close: tex/pgfcircflow + +% notice that the default is nooldvoltagedirection; it's not explicitly set to allow for the warning +\ExecuteOptions{nofetbodydiode, nofetsolderdot, europeancurrents, europeanvoltages,americanports, americanresistors, cuteinductors ,europeangfsurgearrester, nosiunitx, noarrowmos, smartlabels} + +\ProcessOptions\relax + +%%%%%%%%%%% Springe nach tex/pgfcircpath +%%%---------- open: tex/pgfcircpath.tex + +\def\pgf@circ@direction{0.0} + +% Names +\ctikzset{name/.style = { n=#1 } } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@@@ +\ctikzset{n/.code = { + \pgfkeys{/tikz/circuitikz/bipole/name=#1} +}} + +% Reflect the node along +\ctikzset{mirrored/.is choice} +\ctikzset{mirror value/.initial=1} +\ctikzset{mirrored/true/.code = {\ctikzsetvalof{mirror value}{-1}} } +\ctikzset{mirrored/false/.code = {\ctikzsetvalof{mirror value}{1}} } +\ctikzset{mirror/.style = {/tikz/circuitikz/mirrored=true}} + +% Invert node along path +\ctikzset{inverted/.is choice} +\ctikzset{invert value/.initial=1} +\ctikzset{inverted/true/.code = {\ctikzsetvalof{invert value}{-1}\pgf@circuit@bipole@invertedtrue}} +\ctikzset{inverted/false/.code = {\ctikzsetvalof{invert value}{1}\pgf@circuit@bipole@invertedfalse}} +\ctikzset{invert/.style = {/tikz/circuitikz/inverted=true}} +\newif\ifpgf@circuit@bipole@inverted +\ctikzset{bipole/inverted/.is if=pgf@circuit@bipole@inverted} + +\newif\ifpgf@circuit@bipole@voltage@backward +\ctikzset{bipole/voltage/direction/.is choice} +\ctikzset{bipole/voltage/direction/forward/.code={\pgf@circuit@bipole@voltage@backwardfalse}} +\ctikzset{bipole/voltage/direction/backward/.code={\pgf@circuit@bipole@voltage@backwardtrue}} + +% Initialize paths +\def\pgfcircresetpath{ + \ctikzset{bipole/name=, bipole/label/name=, bipole/label/position=90, ,bipole/annotation/name=, bipole/annotation/position=-90, + bipole/inverted=false, bipole/kind=, + bipole/voltage/direction=backward, bipole/voltage/label/name=, bipole/voltage/position=below, + bipole/nodes/left=none, bipole/nodes/right=none, bipole/is voltage=false,bipole/is voltageoutsideofsymbol=false,bipole/is strokedsymbol=false, + bipole/is current=false, bipole/current/label/name=, bipole/current/x position=after, + bipole/current/y position=above, bipole/current/direction=forward, + mirrored=false + } +} + +%% Helper function for path-function to ensure using anchors between nodes +\def\set@explicit@center@anchor#1{ + \pgfutil@ifundefined{pgf@sh@ns@#1} + { + %This coordinate is no node(but a relative position or a coordinate), no further handling needed + }{ + \pgfutil@in@.{#1} + \ifpgfutil@in@ + % Anchor is used, do nothing! + \else% + \let\tikz@moveto@waiting=\relax + \pgfpathmoveto{\tikz@last@position}%force movement, because tikz@moveto@waiting + \edef#1{#1.center}%ensure using center anchor + \fi +} +} + + +%% Generic bipole path +\def\pgf@circ@bipole@path#1#2{ + + \pgfextra{ + \set@explicit@center@anchor{\tikztostart} + \set@explicit@center@anchor{\tikztotarget} + \pgfsyssoftpath@getcurrentpath{\myp@th}%% save current path to extend after calculation of correct start/end coordinates + \ctikzset{bipole/kind = #1} + \edef\pgf@temp{\ctikzvalof{bipole/name}} + \def\pgf@circ@temp{} + \ifx\pgf@temp\pgf@circ@temp % if it has not a name + \pgfmathrandominteger{\pgf@circ@rand}{1000}{9999} + \ctikzset{bipole/name = #2\pgf@circ@rand} % create it + \fi + } + + (\tikztostart) coordinate (\ctikzvalof{bipole/name}start)%necessary to get correct coordinates in the case of relative start/end or constructions like ((node1)-|(node2)) + (\tikztotarget) coordinate (\ctikzvalof{bipole/name}end) + \pgfextra{ + \pgfmathanglebetweenpoints{\pgfpointanchor{\ctikzvalof{bipole/name}start}{center}} + {\pgfpointanchor{\ctikzvalof{bipole/name}end}{center}} + \pgfmathround{\pgfmathresult} + \edef\pgf@circ@direction{\pgfmathresult}%Calculate direction(angle) of path + \pgfsyssoftpath@setcurrentpath{\myp@th} + } + \pgfextra{\def\pgf@temp{open}\def\pgf@circ@temp{#1}} + \ifx\pgf@temp\pgf@circ@temp % if it is an open + \else + --($(\ctikzvalof{bipole/name}start) ! .5\pgflinewidth ! (\ctikzvalof{bipole/name}end)$) %ugly workaround to get correct linejoins(node breaks path?) + \fi + ($(\tikztostart) ! .5 ! (\tikztotarget)$)%%positio of middle node + node[#1shape, rotate=\pgf@circ@direction, yscale=\ctikzvalof{mirror value}, xscale=\ctikzvalof{invert value}] + (\ctikzvalof{bipole/name}) {} + \ifpgf@circuit@bipole@inverted + \ifcsname pgf@anchor@#1shape@pathstart\endcsname%if special path-anchors are defined, use them! + coordinate (anchorstartnode) at (\ctikzvalof{bipole/name}.pathend) + coordinate (anchorendnode) at (\ctikzvalof{bipole/name}.pathstart) + \else + coordinate (anchorstartnode) at (\ctikzvalof{bipole/name}.right) + coordinate (anchorendnode) at (\ctikzvalof{bipole/name}.left) + \fi + \else + \ifcsname pgf@anchor@#1shape@pathstart\endcsname%if special path-anchors are defined, use them! + coordinate (anchorstartnode) at (\ctikzvalof{bipole/name}.pathstart) + coordinate (anchorendnode) at (\ctikzvalof{bipole/name}.pathend) + \else + coordinate (anchorstartnode) at (\ctikzvalof{bipole/name}.left) + coordinate (anchorendnode) at (\ctikzvalof{bipole/name}.right) + \fi + \fi + \pgfextra{\def\pgf@temp{open}\def\pgf@circ@temp{#1}} + \ifx\pgf@temp\pgf@circ@temp % if it is an open + \else + (\ctikzvalof{bipole/name}start.center) -- (anchorstartnode) + (anchorendnode) -- (\ctikzvalof{bipole/name}end.center) + \fi + + \drawpoles + \pgf@circ@ifkeyempty{bipole/label/name}\else\pgf@circ@drawlabels{label}\fi + \pgf@circ@ifkeyempty{bipole/annotation/name}\else\pgf@circ@drawlabels{annotation}\fi + \pgf@circ@ifkeyempty{bipole/voltage/label/name}\else\pgf@circ@drawvoltage\fi + \pgf@circ@ifkeyempty{bipole/current/label/name}\else\pgf@circ@drawcurrent\fi + \pgf@circ@ifkeyempty{bipole/flow/label/name}\else\pgf@circ@drawflow\fi + \pgfextra{\def\pgf@temp{open}\def\pgf@circ@temp{#1}} + \ifx\pgf@temp\pgf@circ@temp % if it is an open + (\ctikzvalof{bipole/name}end)%Move to end of path + \else + ($(\ctikzvalof{bipole/name}end) ! .5\pgflinewidth ! (\ctikzvalof{bipole/name}start)$) -- (\ctikzvalof{bipole/name}end)%ugly workaround to get correct linejoins(node breaks path?) + %tikztostart and tikztotarget could not be used, because it would break if target coordinate is something like (node1-|node2) + + \fi + % reset + \pgfextra{ + \pgfcircresetpath + } + \tikztonodes%draw pending nodes an path +} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Handling of terminals + +\ctikzset{bipole/nodes/.is family} +\ctikzset{bipole/nodes/left/.initial=none} +\ctikzset{bipole/nodes/right/.initial=none} +\tikzset{bipole nodes/.style n args={2}{% + \circuitikzbasekey/bipole/nodes/left=#1, + \circuitikzbasekey/bipole/nodes/right=#2 + } +} + +%% Easily usable styles + +\ctikzset{o-o/.style = {\circuitikzbasekey/bipole/nodes/left=ocirc, \circuitikzbasekey/bipole/nodes/right=ocirc}} +\ctikzset{-o/.style = {\circuitikzbasekey/bipole/nodes/left=none, \circuitikzbasekey/bipole/nodes/right=ocirc}} +\ctikzset{o-/.style = {\circuitikzbasekey/bipole/nodes/left=ocirc, \circuitikzbasekey/bipole/nodes/right=none}} +\ctikzset{*-o/.style = {\circuitikzbasekey/bipole/nodes/left=circ, \circuitikzbasekey/bipole/nodes/right=ocirc}} +\ctikzset{o-*/.style = {\circuitikzbasekey/bipole/nodes/left=ocirc, \circuitikzbasekey/bipole/nodes/right=circ}} +\ctikzset{d-o/.style = {\circuitikzbasekey/bipole/nodes/left=diamondpole, \circuitikzbasekey/bipole/nodes/right=ocirc}} +\ctikzset{o-d/.style = {\circuitikzbasekey/bipole/nodes/left=ocirc, \circuitikzbasekey/bipole/nodes/right=diamondpole}} +\ctikzset{*-/.style = {\circuitikzbasekey/bipole/nodes/left=circ, \circuitikzbasekey/bipole/nodes/right=none}} +\ctikzset{-*/.style = {\circuitikzbasekey/bipole/nodes/left=none, \circuitikzbasekey/bipole/nodes/right=circ}} +\ctikzset{d-/.style = {\circuitikzbasekey/bipole/nodes/left=diamondpole, \circuitikzbasekey/bipole/nodes/right=none}} +\ctikzset{-d/.style = {\circuitikzbasekey/bipole/nodes/left=none, \circuitikzbasekey/bipole/nodes/right=diamondpole}} +\ctikzset{*-*/.style = {\circuitikzbasekey/bipole/nodes/left=circ, \circuitikzbasekey/bipole/nodes/right=circ}} +\ctikzset{d-*/.style = {\circuitikzbasekey/bipole/nodes/left=diamondpole, \circuitikzbasekey/bipole/nodes/right=circ}} +\ctikzset{*-d/.style = {\circuitikzbasekey/bipole/nodes/left=circ, \circuitikzbasekey/bipole/nodes/right=diamondpole}} +\ctikzset{d-d/.style = {\circuitikzbasekey/bipole/nodes/left=diamondpole, \circuitikzbasekey/bipole/nodes/right=diamondpole}} + +% rectjoinfill workarounds + +\ctikzset{.-/.style = {\circuitikzbasekey/bipole/nodes/left=rectjoinfill, \circuitikzbasekey/bipole/nodes/right=none}} +\ctikzset{.-*/.style = {\circuitikzbasekey/bipole/nodes/left=rectjoinfill, \circuitikzbasekey/bipole/nodes/right=circ}} +\ctikzset{.-o/.style = {\circuitikzbasekey/bipole/nodes/left=rectjoinfill, \circuitikzbasekey/bipole/nodes/right=ocirc}} +\ctikzset{.-d/.style = {\circuitikzbasekey/bipole/nodes/left=rectjoinfill, \circuitikzbasekey/bipole/nodes/right=diamondpole}} +\ctikzset{-./.style = {\circuitikzbasekey/bipole/nodes/left=none, \circuitikzbasekey/bipole/nodes/right=rectjoinfill}} +\ctikzset{o-./.style = {\circuitikzbasekey/bipole/nodes/left=ocirc, \circuitikzbasekey/bipole/nodes/right=rectjoinfill}} +\ctikzset{*-./.style = {\circuitikzbasekey/bipole/nodes/left=circ, \circuitikzbasekey/bipole/nodes/right=rectjoinfill}} +\ctikzset{d-./.style = {\circuitikzbasekey/bipole/nodes/left=diamondpole, \circuitikzbasekey/bipole/nodes/right=rectjoinfill}} +\ctikzset{.-./.style = {\circuitikzbasekey/bipole/nodes/left=rectjoinfill, \circuitikzbasekey/bipole/nodes/right=rectjoinfill}} + +\tikzset{reversed/.style = {\circuitikzbasekey/bipole/inverted=true}} + +\def\drawpoles{ + \pgfextra{ \edef\pgf@circ@temp{\ctikzvalof{bipole/nodes/left}} \def\pgf@temp{none}} + \ifx\pgf@temp\pgf@circ@temp\else(\tikztostart) node[\pgf@circ@temp] {}\fi + \pgfextra{ \edef\pgf@circ@temp{\ctikzvalof{bipole/nodes/right}} } + \ifx\pgf@temp\pgf@circ@temp\else(\tikztotarget) node[\pgf@circ@temp] {}\fi +} + +%% Path definitions +\def\pgf@circ@resistor@path#1{\ifpgf@circuit@europeanresistor\pgf@circ@bipole@path{generic}{#1}\else\pgf@circ@bipole@path{resistor}{#1}\fi} +\def\pgf@circ@vresistor@path#1{\ifpgf@circuit@europeanresistor\pgf@circ@bipole@path{tgeneric}{#1}\else\pgf@circ@bipole@path{vresistor}{#1}\fi} +\def\pgf@circ@sresistor@path#1{\ifpgf@circuit@europeanresistor\pgf@circ@bipole@path{thermistor}{#1}\else\pgf@circ@bipole@path{resistivesens}{#1}\fi} +\def\pgf@circ@potentiometer@path#1{\ifpgf@circuit@europeanresistor\pgf@circ@bipole@path{genericpotentiometer}{#1}\else\pgf@circ@bipole@path{potentiometer}{#1}\fi} +\def\pgf@circ@thermistor@path#1{\pgf@circ@bipole@path{thermistor}{#1}} +\def\pgf@circ@thermistorptc@path#1{\pgf@circ@bipole@path{thermistorptc}{#1}} +\def\pgf@circ@thermistorntc@path#1{\pgf@circ@bipole@path{thermistorntc}{#1}} +\def\pgf@circ@varistor@path#1{\pgf@circ@bipole@path{varistor}{#1}} +\def\pgf@circ@capacitor@path#1{\pgf@circ@bipole@path{capacitor}{#1}} +\def\pgf@circ@capacitivesens@path#1{\pgf@circ@bipole@path{capacitivesens}{#1}} +\def\pgf@circ@ecapacitor@path#1{\pgf@circ@bipole@path{ecapacitor}{#1}} +\def\pgf@circ@polarcapacitor@path#1{\pgf@circ@bipole@path{polarcapacitor}{#1}} +\def\pgf@circ@vcapacitor@path#1{\pgf@circ@bipole@path{vcapacitor}{#1}} +\def\pgf@circ@piezoelectric@path#1{\pgf@circ@bipole@path{piezoelectric}{#1}} +\def\pgf@circ@battery@path#1{\pgf@circ@bipole@path{battery}{#1}} +\def\pgf@circ@batteryone@path#1{\pgf@circ@bipole@path{battery1}{#1}} +\def\pgf@circ@batterytwo@path#1{\pgf@circ@bipole@path{battery2}{#1}} +\def\pgf@circ@europeaninductor@path#1{\pgf@circ@bipole@path{fullgeneric}{#1}} +\def\pgf@circ@americaninductor@path#1{\pgf@circ@bipole@path{americaninductor}{#1}} +\def\pgf@circ@cuteinductor@path#1{\pgf@circ@bipole@path{cuteinductor}{#1}} +\def\pgf@circ@cutechoke@path#1{\pgf@circ@bipole@path{cutechoke}{#1}} +\def\pgf@circ@inductor@path#1{% + \pgfextra{ + \edef\pgf@circ@temp{\ctikzvalof{inductor}}% + \def\pgf@temp{european}% + } + \ifx\pgf@temp\pgf@circ@temp% + \pgf@circ@europeaninductor@path{#1}% + \else% + \pgfextra{ \def\pgf@temp{cute} }% + \ifx\pgf@temp\pgf@circ@temp% + \pgf@circ@cuteinductor@path{#1}% + \else% + \pgf@circ@americaninductor@path{#1}% + \fi% + \fi% +} +\def\pgf@circ@vinductor@path#1{ + \pgfextra{ + \edef\pgf@circ@temp{\ctikzvalof{inductor}}% + \def\pgf@temp{european}% + } + \ifx\pgf@temp\pgf@circ@temp% + \pgf@circ@veuropeaninductor@path{#1}% + \else% + \pgfextra{ \def\pgf@temp{cute} }% + \ifx\pgf@temp\pgf@circ@temp% + \pgf@circ@vcuteinductor@path{#1}% + \else% + \pgf@circ@vamericaninductor@path{#1}% + \fi% + \fi% +} +\def\pgf@circ@inductivesens@path#1{% + \pgfextra{ + \edef\pgf@circ@temp{\ctikzvalof{inductor}}% + \def\pgf@temp{european}% + } + \ifx\pgf@temp\pgf@circ@temp% + \pgf@circ@europeaninductivesens@path{#1}% + \else% + \pgfextra{ \def\pgf@temp{cute} }% + \ifx\pgf@temp\pgf@circ@temp% + \pgf@circ@cuteinductivesens@path{#1}% + \else% + \pgf@circ@americaninductivesens@path{#1}% + \fi% + \fi% +} +\def\pgf@circ@veuropeaninductor@path#1{\pgf@circ@bipole@path{tfullgeneric}{#1}} +\def\pgf@circ@vamericaninductor@path#1{\pgf@circ@bipole@path{vamericaninductor}{#1}} +\def\pgf@circ@vcuteinductor@path#1{\pgf@circ@bipole@path{vcuteinductor}{#1}} +\def\pgf@circ@europeaninductivesens@path#1{\pgf@circ@bipole@path{sfullgeneric}{#1}} +\def\pgf@circ@americaninductivesens@path#1{\pgf@circ@bipole@path{samericaninductor}{#1}} +\def\pgf@circ@cuteinductivesens@path#1{\pgf@circ@bipole@path{scuteinductor}{#1}} +\def\pgf@circ@lamp@path#1{\pgf@circ@bipole@path{lamp}{#1}} +\def\pgf@circ@bulb@path#1{\pgf@circ@bipole@path{bulb}{#1}} +\def\pgf@circ@esource@path#1{\pgf@circ@bipole@path{esource}{#1}} +\def\pgf@circ@pvsource@path#1{\pgf@circ@bipole@path{pvsource}{#1}} +\def\pgf@circ@vsource@path#1{\pgf@circ@bipole@path{vsource}{#1}} +\def\pgf@circ@dcvsource@path#1{\pgf@circ@bipole@path{dcvsource}{#1}} +\def\pgf@circ@vsourceam@path#1{\pgf@circ@bipole@path{vsourceAM}{#1}} +\def\pgf@circ@vsourcesin@path#1{\pgf@circ@bipole@path{vsourcesin}{#1}} +\def\pgf@circ@isource@path#1{\pgf@circ@bipole@path{isource}{#1}} +\def\pgf@circ@oosource@path#1{\pgf@circ@bipole@path{oosource}{#1}} +\def\pgf@circ@dcisource@path#1{\pgf@circ@bipole@path{dcisource}{#1}} +\def\pgf@circ@isourcesin@path#1{\pgf@circ@bipole@path{isourcesin}{#1}} +\def\pgf@circ@vsourcesquare@path#1{\pgf@circ@bipole@path{vsourcesquare}{#1}} +\def\pgf@circ@vsourcetri@path#1{\pgf@circ@bipole@path{vsourcetri}{#1}} +\def\pgf@circ@isourceam@path#1{\pgf@circ@bipole@path{isourceAM}{#1}} +\def\pgf@circ@cvsource@path#1{\pgf@circ@bipole@path{cvsource}{#1}} +\def\pgf@circ@cvsourceam@path#1{\pgf@circ@bipole@path{cvsourceAM}{#1}} +\def\pgf@circ@cvsourcesin@path#1{\pgf@circ@bipole@path{cvsourcesin}{#1}} +\def\pgf@circ@cisource@path#1{\pgf@circ@bipole@path{cisource}{#1}} +\def\pgf@circ@cisourceam@path#1{\pgf@circ@bipole@path{cisourceAM}{#1}} +\def\pgf@circ@cisourcesin@path#1{\pgf@circ@bipole@path{cisourcesin}{#1}} +\def\pgf@circ@short@path#1{\pgf@circ@bipole@path{short}{#1}} +\def\pgf@circ@cspst@path#1{\pgf@circ@bipole@path{cspst}{#1}} +\def\pgf@circ@ospst@path#1{\pgf@circ@bipole@path{ospst}{#1}} +\def\pgf@circ@nos@path#1{\pgf@circ@bipole@path{nos}{#1}} +\def\pgf@circ@ncs@path#1{\pgf@circ@bipole@path{ncs}{#1}} +\def\pgf@circ@pushbutton@path#1{\pgf@circ@bipole@path{pushbutton}{#1}} +\def\pgf@circ@ncpushbutton@path#1{\pgf@circ@bipole@path{ncpushbutton}{#1}} +\def\pgf@circ@open@path#1{\pgf@circ@bipole@path{open}{#1}} +\def\pgf@circ@generic@path#1{\pgf@circ@bipole@path{generic}{#1}} +\def\pgf@circ@ageneric@path#1{\pgf@circ@bipole@path{ageneric}{#1}} +\def\pgf@circ@tgeneric@path#1{\pgf@circ@bipole@path{tgeneric}{#1}} +\def\pgf@circ@fullgeneric@path#1{\pgf@circ@bipole@path{fullgeneric}{#1}} +\def\pgf@circ@tfullgeneric@path#1{\pgf@circ@bipole@path{tfullgeneric}{#1}} +\def\pgf@circ@ammeter@path#1{\pgf@circ@bipole@path{ammeter}{#1}} +\def\pgf@circ@ohmmeter@path#1{\pgf@circ@bipole@path{ohmmeter}{#1}} +\def\pgf@circ@voltmeter@path#1{\pgf@circ@bipole@path{voltmeter}{#1}} +\def\pgf@circ@oscope@path#1{\pgf@circ@bipole@path{oscope}{#1}} +\def\pgf@circ@empty@path#1{} +\def\pgf@circ@photoresistor@path#1{\pgf@circ@bipole@path{photoresistor}{#1}} +\def\pgf@circ@emptythyristor@path#1{\pgf@circ@bipole@path{emptythyristor}{#1}} +\def\pgf@circ@fullthyristor@path#1{\pgf@circ@bipole@path{fullthyristor}{#1}} +\def\pgf@circ@toggleswitch@path#1{\pgf@circ@bipole@path{toggleswitch}{#1}} +\def\pgf@circ@memristor@path#1{\pgf@circ@bipole@path{memristor}{#1}} +\def\pgf@circ@emptytriac@path#1{\pgf@circ@bipole@path{emptytriac}{#1}} +\def\pgf@circ@fulltriac@path#1{\pgf@circ@bipole@path{fulltriac}{#1}} +\def\pgf@circ@tline@path#1{\pgf@circ@bipole@path{tline}{#1}} +\def\pgf@circ@mstline@path#1{\pgf@circ@bipole@path{mstline}{#1}} +\def\pgf@circ@squid@path#1{\pgf@circ@bipole@path{squid}{#1}} +\def\pgf@circ@barrier@path#1{\pgf@circ@bipole@path{barrier}{#1}} +\def\pgf@circ@thermocouple@path#1{\pgf@circ@bipole@path{thermocouple}{#1}} +\def\pgf@circ@fuse@path#1{\pgf@circ@bipole@path{fuse}{#1}} +\def\pgf@circ@afuse@path#1{\pgf@circ@bipole@path{afuse}{#1}} + +\def\pgf@circ@gfsurgearrester@path#1{\ifpgf@circuit@europeangfsurgearrester\pgf@circ@europeangfsurgearrester@path{#1}\else\pgf@circ@americangfsurgearrester@path{#1}\fi} +\def\pgf@circ@europeangfsurgearrester@path#1{\pgf@circ@bipole@path{european gas filled surge arrester}{#1}} +\def\pgf@circ@americangfsurgearrester@path#1{\pgf@circ@bipole@path{american gas filled surge arrester}{#1}} + +\def\pgf@circ@twoport@path#1{\pgf@circ@bipole@path{twoport}{#1}} +\def\pgf@circ@vco@path#1{\pgf@circ@bipole@path{vco}{#1}} +\def\pgf@circ@bandpass@path#1{\pgf@circ@bipole@path{bandpass}{#1}} +\def\pgf@circ@bandstop@path#1{\pgf@circ@bipole@path{bandstop}{#1}} +\def\pgf@circ@highpass@path#1{\pgf@circ@bipole@path{highpass}{#1}} +\def\pgf@circ@lowpass@path#1{\pgf@circ@bipole@path{lowpass}{#1}} +\def\pgf@circ@adc@path#1{\pgf@circ@bipole@path{adc}{#1}} +\def\pgf@circ@dac@path#1{\pgf@circ@bipole@path{dac}{#1}} +\def\pgf@circ@dsp@path#1{\pgf@circ@bipole@path{dsp}{#1}} +\def\pgf@circ@fft@path#1{\pgf@circ@bipole@path{fft}{#1}} +\def\pgf@circ@amp@path#1{\pgf@circ@bipole@path{amp}{#1}} +\def\pgf@circ@vamp@path#1{\pgf@circ@bipole@path{vamp}{#1}} +\def\pgf@circ@piattenuator@path#1{\pgf@circ@bipole@path{piattenuator}{#1}} +\def\pgf@circ@vpiattenuator@path#1{\pgf@circ@bipole@path{vpiattenuator}{#1}} +\def\pgf@circ@tattenuator@path#1{\pgf@circ@bipole@path{tattenuator}{#1}} +\def\pgf@circ@vtattenuator@path#1{\pgf@circ@bipole@path{vtattenuator}{#1}} +\def\pgf@circ@phaseshifter@path#1{\pgf@circ@bipole@path{phaseshifter}{#1}} +\def\pgf@circ@vphaseshifter@path#1{\pgf@circ@bipole@path{vphaseshifter}{#1}} +\def\pgf@circ@detector@path#1{\pgf@circ@bipole@path{detector}{#1}} + +%%Mechanical +\def\pgf@circ@spring@path#1{\pgf@circ@bipole@path{spring}{#1}} +\def\pgf@circ@mass@path#1{\pgf@circ@bipole@path{mass}{#1}} +\def\pgf@circ@damper@path#1{\pgf@circ@bipole@path{damper}{#1}} +\def\pgf@circ@viscoe@path#1{\pgf@circ@bipole@path{viscoe}{#1}} + +%% Styles + +\def\comnpatname{\ifpgf@circuit@compat *\else\fi} +\def\compattikzset#1{\tikzset{\comnpatname#1}} + +%\def\ctikzsetbipole#1#2{% +% \tikzset{#1/.style= {to path=#2, \circuitikzbasekey, l=##1}}% +%} + +\compattikzset{spring/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@spring@path, l=#1}} +\compattikzset{mass/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@mass@path, l=#1}} +\compattikzset{damper/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@damper@path, l=#1}} +\compattikzset{viscoe/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@viscoe@path, l=#1}} +\compattikzset{resistor/.style= {\circuitikzbasekey, /tikz/to path=\pgf@circ@resistor@path, l=#1}} +\compattikzset{american resistor/.style= {\circuitikzbasekey, /tikz/to path=\pgf@circ@bipole@path{resistor}{#1}, l=#1}} +\compattikzset{european resistor/.style= {\circuitikzbasekey, /tikz/to path=\pgf@circ@bipole@path{generic}{#1}, l=#1}} +\compattikzset{potentiometer/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@potentiometer@path, l=#1}} +\compattikzset{varistor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@varistor@path, l=#1}} +\compattikzset{photoresistor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@photoresistor@path, l=#1}} +\compattikzset{thermistor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@thermistor@path, l=#1}} +\compattikzset{thermistor ptc/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@thermistorptc@path, l=#1}} +\compattikzset{thermistor ntc/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@thermistorntc@path, l=#1}} +\compattikzset{american potentiometer/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@bipole@path{potentiometer}{#1}, l=#1}} +\compattikzset{european potentiometer/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@bipole@path{genericpotentiometer}{#1}, l=#1}} +\compattikzset{variable resistor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vresistor@path, l=#1}} +\compattikzset{variable american resistor/.style= {\circuitikzbasekey, /tikz/to path=\pgf@circ@bipole@path{vresistor}{#1}, l=#1}} +\compattikzset{variable european resistor/.style= {\circuitikzbasekey, /tikz/to path=\pgf@circ@bipole@path{tgeneric}{#1}, l=#1}} +\compattikzset{capacitor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@capacitor@path, l=#1}} +\compattikzset{elko/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@ecapacitor@path, l=#1}} +\compattikzset{ecapacitor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@ecapacitor@path, l=#1}} +\compattikzset{polar capacitor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@polarcapacitor@path, l=#1}} +\compattikzset{variable capacitor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vcapacitor@path, l=#1}} +\compattikzset{piezoelectric/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@piezoelectric@path, l=#1}} +\compattikzset{battery/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@battery@path, \circuitikzbasekey/bipole/is voltage=true, \circuitikzbasekey/bipole/is voltageoutsideofsymbol=true, v=#1}} +\compattikzset{battery1/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@batteryone@path, \circuitikzbasekey/bipole/is voltage=true, \circuitikzbasekey/bipole/is voltageoutsideofsymbol=true, v=#1}} +\compattikzset{battery2/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@batterytwo@path, \circuitikzbasekey/bipole/is voltage=true, \circuitikzbasekey/bipole/is voltageoutsideofsymbol=true, v=#1}} +\compattikzset{inductor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@inductor@path, l=#1}} +\compattikzset{gf surge arrester/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@gfsurgearrester@path, l=#1}} +\compattikzset{american gas filled surge arrester/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@americangfsurgearrester@path, l=#1}} +\compattikzset{european gas filled surge arrester/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@europeangfsurgearrester@path, l=#1}} +\compattikzset{gas filled surge arrester/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@gfsurgearrester@path, l=#1}} +\compattikzset{american inductor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@americaninductor@path, l=#1}} +\compattikzset{cute inductor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@cuteinductor@path, l=#1}} +\compattikzset{cute choke/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@cutechoke@path, l=#1}} +\compattikzset{european inductor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@europeaninductor@path, l=#1}} +\compattikzset{variable inductor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vinductor@path, l=#1}} +\compattikzset{variable european inductor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@veuropeaninductor@path, l=#1}} +\compattikzset{variable american inductor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vamericaninductor@path, l=#1}} +\compattikzset{variable cute inductor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vcuteinductor@path, l=#1}} +\compattikzset{tline/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@tline@path, l=#1}} +\compattikzset{transmission line/.style = {tline = #1}} +\compattikzset{TL/.style = {tline = #1}} +\compattikzset{mstline/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@mstline@path, l=#1}} +\compattikzset{european voltage source/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vsource@path, \circuitikzbasekey/bipole/is voltage=true, \circuitikzbasekey/bipole/is voltageoutsideofsymbol=true, v=#1}} +\compattikzset{american voltage source/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vsourceam@path, \circuitikzbasekey/bipole/is voltage=true, v=#1}} +\compattikzset{european current source/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@isource@path, \circuitikzbasekey/bipole/is current=true, i=#1}} +\compattikzset{american current source/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@isourceam@path, \circuitikzbasekey/bipole/is current=true, i=#1}} +\compattikzset{european controlled voltage source/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@cvsource@path, \circuitikzbasekey/bipole/is voltage=true, \circuitikzbasekey/bipole/is voltageoutsideofsymbol=true, v=#1}} +\compattikzset{american controlled voltage source/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@cvsourceam@path, \circuitikzbasekey/bipole/is voltage=true, v=#1}} +\compattikzset{european controlled current source/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@cisource@path, \circuitikzbasekey/bipole/is current=true, i=#1}} +\compattikzset{american controlled current source/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@cisourceam@path, \circuitikzbasekey/bipole/is current=true, i=#1}} +\compattikzset{sinusoidal voltage source/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vsourcesin@path, \circuitikzbasekey/bipole/is voltage=true, \circuitikzbasekey/bipole/is voltageoutsideofsymbol=true, v=#1 }} +\compattikzset{square voltage source/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vsourcesquare@path, \circuitikzbasekey/bipole/is voltage=true, \circuitikzbasekey/bipole/is voltageoutsideofsymbol=true, v=#1 }} +\compattikzset{triangle voltage source/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vsourcetri@path, \circuitikzbasekey/bipole/is voltage=true, \circuitikzbasekey/bipole/is voltageoutsideofsymbol=true, v=#1 }} +\compattikzset{sinusoidal current source/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@isourcesin@path, \circuitikzbasekey/bipole/is current=true, i=#1}} +\compattikzset{controlled sinusoidal voltage source/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@cvsourcesin@path, \circuitikzbasekey/bipole/is voltage=true, \circuitikzbasekey/bipole/is voltageoutsideofsymbol=true, v=#1}} +\compattikzset{controlled sinusoidal current source/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@cisourcesin@path, \circuitikzbasekey/bipole/is current=true, i=#1}} + +\compattikzset{voltage source/.style = {\comnpatname \ifpgf@circuit@europeanvoltage european \else american \fi voltage source, \circuitikzbasekey/bipole/is voltage=true, v=#1}} +\compattikzset{current source/.style = {\comnpatname \ifpgf@circuit@europeancurrent european \else american \fi current source = #1, \circuitikzbasekey/bipole/is current=true}} +\compattikzset{controlled voltage source/.style = {\comnpatname \ifpgf@circuit@europeanvoltage european \else american \fi controlled voltage source, \circuitikzbasekey/bipole/is voltage=true, v=#1}} +\compattikzset{controlled current source/.style = {\comnpatname \ifpgf@circuit@europeancurrent european \else american \fi controlled current source = #1, \circuitikzbasekey/bipole/is current=true}} + + +\compattikzset{generic/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@generic@path, l=#1}} +\compattikzset{ageneric/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@ageneric@path, l=#1}} +\compattikzset{tgeneric/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@tgeneric@path, l=#1}} +\compattikzset{fullgeneric/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@fullgeneric@path, l=#1}} +\compattikzset{tfullgeneric/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@tfullgeneric@path, l=#1}} +\compattikzset{short/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@short@path}} +\compattikzset{open/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@open@path}} + +\compattikzset{lamp/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@lamp@path}} +\compattikzset{bulb/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@bulb@path, l=#1}} + +\compattikzset{squid/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@squid@path}} +\compattikzset{barrier/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@barrier@path}} +\compattikzset{thermocouple/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@thermocouple@path}} +\compattikzset{fuse/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@fuse@path}} +\compattikzset{asymmetric fuse/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@afuse@path}} + +\compattikzset{twoport/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@twoport@path}} +\compattikzset{vco/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vco@path}} +\compattikzset{bandpass/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@bandpass@path}} +\compattikzset{bandstop/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@bandstop@path}} +\compattikzset{highpass/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@highpass@path}} +\compattikzset{lowpass/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@lowpass@path}} +\compattikzset{adc/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@adc@path}} +\compattikzset{dac/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@dac@path}} +\compattikzset{dsp/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@dsp@path}} +\compattikzset{fft/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@fft@path}} +\compattikzset{amp/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@amp@path}} +\compattikzset{vamp/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vamp@path}} +\compattikzset{piattenuator/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@piattenuator@path}} +\compattikzset{vpiattenuator/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vpiattenuator@path}} +\compattikzset{tattenuator/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@tattenuator@path}} +\compattikzset{vtattenuator/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vtattenuator@path}} +\compattikzset{phaseshifter/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@phaseshifter@path}} +\compattikzset{vphaseshifter/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vphaseshifter@path}} +\compattikzset{detector/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@detector@path}} + +% % % % % % +% % Begin of Diodes +% % % % % % + +\def\pgf@circ@fulldiode@path#1{\pgf@circ@bipole@path{fulldiode}{#1}} +\def\pgf@circ@fullzdiode@path#1{\pgf@circ@bipole@path{fullzdiode}{#1}} +\def\pgf@circ@fullzzdiode@path#1{\pgf@circ@bipole@path{fullzzdiode}{#1}} +\def\pgf@circ@fullsdiode@path#1{\pgf@circ@bipole@path{fullsdiode}{#1}} +\def\pgf@circ@fulltdiode@path#1{\pgf@circ@bipole@path{fulltdiode}{#1}} +\def\pgf@circ@fulllediode@path#1{\pgf@circ@bipole@path{fulllediode}{#1}} +\def\pgf@circ@fullpdiode@path#1{\pgf@circ@bipole@path{fullpdiode}{#1}} +\def\pgf@circ@fullvarcap@path#1{\pgf@circ@bipole@path{fullvarcap}{#1}} +\def\pgf@circ@fullbidirectionaldiode@path#1{\pgf@circ@bipole@path{fullbidirectionaldiode}{#1}} +\def\pgf@circ@emptydiode@path#1{\pgf@circ@bipole@path{emptydiode}{#1}} +\def\pgf@circ@emptyzdiode@path#1{\pgf@circ@bipole@path{emptyzdiode}{#1}} +\def\pgf@circ@emptyzzdiode@path#1{\pgf@circ@bipole@path{emptyzzdiode}{#1}} +\def\pgf@circ@emptysdiode@path#1{\pgf@circ@bipole@path{emptysdiode}{#1}} +\def\pgf@circ@emptytdiode@path#1{\pgf@circ@bipole@path{emptytdiode}{#1}} +\def\pgf@circ@emptylediode@path#1{\pgf@circ@bipole@path{emptylediode}{#1}} +\def\pgf@circ@emptypdiode@path#1{\pgf@circ@bipole@path{emptypdiode}{#1}} +\def\pgf@circ@emptyvarcap@path#1{\pgf@circ@bipole@path{emptyvarcap}{#1}} +\def\pgf@circ@emptybidirectionaldiode@path#1{\pgf@circ@bipole@path{emptybidirectionaldiode}{#1}} + +\compattikzset{full diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@fulldiode@path}} +\compattikzset{full Schottky diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@fullsdiode@path}} +\compattikzset{full Zener diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@fullzdiode@path}} +\compattikzset{full ZZener diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@fullzzdiode@path}} +\compattikzset{full tunnel diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@fulltdiode@path}} +\compattikzset{full photodiode/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@fullpdiode@path}} +\compattikzset{full led/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@fulllediode@path}} +\compattikzset{full varcap/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@fullvarcap@path}} +\compattikzset{full bidirectionaldiode/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@fullbidirectionaldiode@path}} +\compattikzset{full thyristor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@fullthyristor@path}} +\compattikzset{full triac/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@fulltriac@path}} + +\compattikzset{empty diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@emptydiode@path}} +\compattikzset{empty Schottky diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@emptysdiode@path}} +\compattikzset{empty Zener diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@emptyzdiode@path}} +\compattikzset{empty ZZener diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@emptyzzdiode@path}} +\compattikzset{empty tunnel diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@emptytdiode@path}} +\compattikzset{empty photodiode/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@emptypdiode@path}} +\compattikzset{empty led/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@emptylediode@path}} +\compattikzset{empty varcap/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@emptyvarcap@path}} +\compattikzset{empty bidirectionaldiode/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@emptybidirectionaldiode@path}} +\compattikzset{empty thyristor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@emptythyristor@path}} +\compattikzset{empty triac/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@emptytriac@path}} + +\compattikzset{stroke diode/.style = {\circuitikzbasekey,\circuitikzbasekey/bipole/is strokedsymbol=true, /tikz/to path=\pgf@circ@emptydiode@path}} +\compattikzset{stroke Schottky diode/.style = {\circuitikzbasekey,\circuitikzbasekey/bipole/is strokedsymbol=true, /tikz/to path=\pgf@circ@emptysdiode@path}} +\compattikzset{stroke Zener diode/.style = {\circuitikzbasekey,\circuitikzbasekey/bipole/is strokedsymbol=true, /tikz/to path=\pgf@circ@emptyzdiode@path}} +\compattikzset{stroke ZZener diode/.style = {\circuitikzbasekey,\circuitikzbasekey/bipole/is strokedsymbol=true, /tikz/to path=\pgf@circ@emptyzzdiode@path}} +\compattikzset{stroke tunnel diode/.style = {\circuitikzbasekey,\circuitikzbasekey/bipole/is strokedsymbol=true, /tikz/to path=\pgf@circ@emptytdiode@path}} +\compattikzset{stroke photodiode/.style = {\circuitikzbasekey,\circuitikzbasekey/bipole/is strokedsymbol=true, /tikz/to path=\pgf@circ@emptypdiode@path}} +\compattikzset{stroke led/.style = {\circuitikzbasekey,\circuitikzbasekey/bipole/is strokedsymbol=true, /tikz/to path=\pgf@circ@emptylediode@path}} +\compattikzset{stroke varcap/.style = {\circuitikzbasekey,\circuitikzbasekey/bipole/is strokedsymbol=true, /tikz/to path=\pgf@circ@emptyvarcap@path}} +\compattikzset{stroke thyristor/.style = {\circuitikzbasekey,\circuitikzbasekey/bipole/is strokedsymbol=true, /tikz/to path=\pgf@circ@emptythyristor@path}} +%\compattikzset{stroke triac/.style = {\circuitikzbasekey,\circuitikzbasekey/bipole/is strokedsymbol=true, /tikz/to path=\pgf@circ@emptytriac@path}} + +\def\pgfcircdiodestylemacro{\ifpgf@circuit@strokediode stroke \else\ifpgf@circuit@fulldiode full \else empty \fi\fi} + +\compattikzset{Schottky diode/.style = {\comnpatname \pgfcircdiodestylemacro Schottky diode}} +\compattikzset{Zener diode/.style = {\comnpatname \pgfcircdiodestylemacro Zener diode}} +\compattikzset{ZZener diode/.style = {\comnpatname \pgfcircdiodestylemacro ZZener diode}} +\compattikzset{tunnel diode/.style = {\comnpatname \pgfcircdiodestylemacro tunnel diode}} +\compattikzset{photodiode/.style = {\comnpatname \pgfcircdiodestylemacro photodiode}} +\compattikzset{led/.style = {\comnpatname \pgfcircdiodestylemacro led}} +\compattikzset{varcap/.style = {\comnpatname \pgfcircdiodestylemacro varcap}} +\compattikzset{diode/.style = {\comnpatname \pgfcircdiodestylemacro diode}} +\compattikzset{thyristor/.style = {\comnpatname \pgfcircdiodestylemacro thyristor}} +\compattikzset{triac/.style = {\comnpatname \ifpgf@circuit@fulldiode full \else empty \fi triac}}%no stroke triac! +\compattikzset{bidirectionaldiode/.style = {\comnpatname \ifpgf@circuit@fulldiode full \else empty \fi bidirectionaldiode}}%no stroke bidirectionaldiode! (based on triac) + +%% Define Shortcuts +\compattikzset{Do/.style = {\comnpatname empty diode}} +\compattikzset{tDo/.style = {\comnpatname empty tunnel diode}} +\compattikzset{zDo/.style = {\comnpatname empty Zener diode}} +\compattikzset{zzDo/.style = {\comnpatname empty ZZener diode}} +\compattikzset{sDo/.style = {\comnpatname empty Schottky diode}} +\compattikzset{pDo/.style = {\comnpatname empty photodiode}} +\compattikzset{leDo/.style = {\comnpatname empty led}} +\compattikzset{VCo/.style = {\comnpatname empty varcap}} +\compattikzset{biDo/.style = {\comnpatname empty bidirectionaldiode}} +\compattikzset{Tyo/.style = {\comnpatname empty thyristor}} +\compattikzset{Tro/.style = {\comnpatname empty triac}} + +\compattikzset{D*/.style = {\comnpatname full diode}} +\compattikzset{tD*/.style = {\comnpatname full tunnel diode}} +\compattikzset{zD*/.style = {\comnpatname full Zener diode}} +\compattikzset{zzD*/.style = {\comnpatname full ZZener diode}} +\compattikzset{sD*/.style = {\comnpatname full Schottky diode}} +\compattikzset{pD*/.style = {\comnpatname full photodiode}} +\compattikzset{leD*/.style = {\comnpatname full led}} +\compattikzset{VC*/.style = {\comnpatname full varcap}} +\compattikzset{biD*/.style = {\comnpatname full bidirectionaldiode}} +\compattikzset{Ty*/.style = {\comnpatname full thyristor}} +\compattikzset{Tr*/.style = {\comnpatname full triac}} + +\compattikzset{D/.style = {\comnpatname diode}} +\compattikzset{tD/.style = {\comnpatname tunnel diode}} +\compattikzset{zD/.style = {\comnpatname Zener diode}} +\compattikzset{zzD/.style = {\comnpatname ZZener diode}} +\compattikzset{sD/.style = {\comnpatname Schottky diode}} +\compattikzset{pD/.style = {\comnpatname photodiode}} +\compattikzset{leD/.style = {\comnpatname led}} +\compattikzset{VC/.style = {\comnpatname varcap}} +\compattikzset{biD/.style = {\comnpatname bidirectionaldiode}} +\compattikzset{Ty/.style = {\comnpatname thyristor}} +\compattikzset{Tr/.style = {\comnpatname triac}} + +\compattikzset{D-/.style = {\comnpatname stroke diode}} +\compattikzset{tD-/.style = {\comnpatname stroke tunnel diode}} +\compattikzset{zD-/.style = {\comnpatname stroke Zener diode}} +\compattikzset{zzD-/.style = {\comnpatname stroke ZZener diode}} +\compattikzset{sD-/.style = {\comnpatname stroke Schottky diode}} +\compattikzset{pD-/.style = {\comnpatname stroke photodiode}} +\compattikzset{leD-/.style = {\comnpatname stroke led}} +\compattikzset{VC-/.style = {\comnpatname stroke varcap}} +\compattikzset{Ty-/.style = {\comnpatname stroke thyristor}} +\compattikzset{Tr-/.style = {\comnpatname empty triac}}%no stroke triac! +\compattikzset{biD-/.style = {\comnpatname empty bidirectionaldiode}}%no stroke bidirectionaldiode! (based on triac) + +% % % % % % +% % End of Diodes +% % % % % % + + +\compattikzset{memristor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@memristor@path}} +\compattikzset{closing switch/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@cspst@path, l=#1}} +\compattikzset{opening switch/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@ospst@path, l=#1}} +\compattikzset{ncs/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@ncs@path, l=#1}} +\compattikzset{nos/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@nos@path, l=#1}} +\compattikzset{normal closed switch/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@ncs@path, l=#1}} +\compattikzset{normal open switch/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@nos@path, l=#1}} +\compattikzset{switch/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@cspst@path, l=#1}} +\compattikzset{push button/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@pushbutton@path, l=#1}} +\compattikzset{nopb/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@pushbutton@path, l=#1}} +\compattikzset{normally open push button/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@pushbutton@path, l=#1}} +\compattikzset{ncpb/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@ncpushbutton@path, l=#1}} +\compattikzset{normally closed push button/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@ncpushbutton@path, l=#1}} +\compattikzset{toggle switch/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@toggleswitch@path}} + +\compattikzset{ammeter/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@ammeter@path}} +\compattikzset{voltmeter/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@voltmeter@path}} +\compattikzset{ohmmeter/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@ohmmeter@path}} +\tikzset{oscope/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@oscope@path, l=#1}} + +% cute switches +%% closed cute switch +\def\pgf@circ@cuteclosedswitch@path#1{\pgf@circ@bipole@path{cuteclosedswitch}{#1}} +\compattikzset{cute closed switch/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@cuteclosedswitch@path, l=#1}} +\compattikzset{ccsw/.style= {\comnpatname cute closed switch= #1}} + +%% open cute switch +\def\pgf@circ@cuteopenswitch@path#1{\pgf@circ@bipole@path{cuteopenswitch}{#1}} +\compattikzset{cute open switch/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@cuteopenswitch@path, l=#1}} +\compattikzset{cosw/.style= {\comnpatname cute open switch= #1}} + +%% closing cute switch +\def\pgf@circ@cuteclosingswitch@path#1{\pgf@circ@bipole@path{cuteclosingswitch}{#1}} +\compattikzset{cute closing switch/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@cuteclosingswitch@path, l=#1}} +\compattikzset{ccgsw/.style= {\comnpatname cute closing switch= #1}} + +%% opening cute switch +\def\pgf@circ@cuteopeningswitch@path#1{\pgf@circ@bipole@path{cuteopeningswitch}{#1}} +\compattikzset{cute opening switch/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@cuteopeningswitch@path, l=#1}} +\compattikzset{cogsw/.style= {\comnpatname cute opening switch= #1}} + + +% short forms +\compattikzset{esource/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@esource@path, \circuitikzbasekey/bipole/is voltage=true,\circuitikzbasekey/bipole/is voltageoutsideofsymbol=true, v=#1}} +\compattikzset{pvsource/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@pvsource@path, \circuitikzbasekey/bipole/is voltage=true,\circuitikzbasekey/bipole/is voltageoutsideofsymbol=true, v=#1}} +\compattikzset{dcvsource/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@dcvsource@path, \circuitikzbasekey/bipole/is voltage=true,\circuitikzbasekey/bipole/is voltageoutsideofsymbol=true, v=#1}} +\compattikzset{dcisource/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@dcisource@path, \circuitikzbasekey/bipole/is current=true, l=#1}} + +\compattikzset{ioosource/.style = {\circuitikzbasekey, \circuitikzbasekey/bipole/is current=true,/tikz/to path=\pgf@circ@oosource@path, i=#1}} +\compattikzset{voosource/.style = {\circuitikzbasekey, \circuitikzbasekey/bipole/is voltage=true,/tikz/to path=\pgf@circ@oosource@path, v=#1}} + +\compattikzset{vsource/.style = {\comnpatname voltage source = #1}} +\compattikzset{isource/.style = {\comnpatname current source = #1}} +\compattikzset{cisource/.style = {\comnpatname controlled current source = #1}} +\compattikzset{cvsource/.style = {\comnpatname controlled voltage source = #1}} +\compattikzset{vsourcesin/.style = {\comnpatname sinusoidal voltage source = #1}} +\compattikzset{vsourcesquare/.style = {\comnpatname square voltage source = #1}} +\compattikzset{vsourcetri/.style = {triangle voltage source = #1}} +\compattikzset{isourcesin/.style = {\comnpatname sinusoidal current source = #1}} +\compattikzset{cisourcesin/.style = {\comnpatname controlled sinusoidal current source = #1}} +\compattikzset{cvsourcesin/.style = {\comnpatname controlled sinusoidal voltage source = #1}} + +\compattikzset{controlled vsource/.style = {\comnpatname controlled voltage source = #1}} +\compattikzset{controlled isource/.style = {\comnpatname controlled current source = #1}} +\compattikzset{controlled vsourcesin/.style = {\comnpatname controlled sinusoidal voltage source = #1}} +\compattikzset{controlled isourcesin/.style = {\comnpatname controlled sinusoidal current source = #1}} + +\compattikzset{R/.style= {\comnpatname resistor = #1}} +\compattikzset{vR/.style= {\comnpatname variable resistor = #1}} +\compattikzset{phR/.style= {\comnpatname photoresistor = #1}} +\compattikzset{thR/.style= {\comnpatname thermistor = #1}} +\compattikzset{thRp/.style= {\comnpatname thermistor ptc= #1}} +\compattikzset{thRn/.style= {\comnpatname thermistor ntc= #1}} +\compattikzset{pR/.style= {\comnpatname potentiometer = #1}} +\compattikzset{C/.style = {\comnpatname capacitor = #1}} +\compattikzset{eC/.style = {\comnpatname ecapacitor = #1}} +\compattikzset{pC/.style = {\comnpatname polar capacitor = #1}} +\compattikzset{vC/.style = {\comnpatname variable capacitor = #1}} +\compattikzset{PZ/.style = {\comnpatname piezoelectric = #1}} +\compattikzset{L/.style = {\comnpatname inductor = #1}} +\compattikzset{vL/.style = {\comnpatname variable inductor = #1}} +\compattikzset{V/.style = {\comnpatname voltage source = #1}} +\compattikzset{cV/.style = {\comnpatname controlled voltage source = #1}} +\compattikzset{sV/.style = {\comnpatname sinusoidal voltage source = #1}} +\compattikzset{sqV/.style = {\comnpatname square voltage source = #1}} +\compattikzset{tV/.style = {\comnpatname triangle voltage source = #1}} +\compattikzset{csV/.style = {\comnpatname controlled sinusoidal voltage source = #1}} +\def\pgf@temp#1{ + \compattikzset{V#1/.style = {\comnpatname voltage source, v#1=##1} } + \compattikzset{cV#1/.style = {\comnpatname controlled voltage source, v#1=##1} } + \compattikzset{sV#1/.style = {\comnpatname sinusoidal voltage source, v#1=##1} } + \compattikzset{csV#1/.style = {\comnpatname controlled sinusoidal voltage source, v#1=##1} } +} +\pgf@temp{_>} \pgf@temp{_<} \pgf@temp{^>} \pgf@temp{^<} +\pgf@temp{>} \pgf@temp{<} \pgf@temp{^} \pgf@temp{_} + +%current sources +\compattikzset{I/.style = {\comnpatname current source = #1}} +\compattikzset{cI/.style = {\comnpatname controlled current source = #1}} +\compattikzset{sI/.style = {\comnpatname sinusoidal current source = #1}} +\compattikzset{csI/.style = {\comnpatname controlled sinusoidal current source = #1}} +\def\pgf@temp#1{ + \compattikzset{I#1/.style = {\comnpatname current source, i#1=##1} } + \compattikzset{cI#1/.style = {\comnpatname controlled current source, i#1=##1} } + \compattikzset{sI#1/.style = {\comnpatname sinusoidal current source, i#1=##1} } + \compattikzset{csI#1/.style = {\comnpatname controlled sinusoidal current source, i#1=##1} } +} +\pgf@temp{_>} \pgf@temp{_<} \pgf@temp{^>} \pgf@temp{^<} +\pgf@temp{>_} \pgf@temp{<_} \pgf@temp{>^} \pgf@temp{<^} +\pgf@temp{>} \pgf@temp{<} \pgf@temp{^} \pgf@temp{_} + +% cute sources +\def\pgf@circ@vsourceC@path#1{\pgf@circ@bipole@path{vsourceC}{#1}} +\compattikzset{cute european voltage source/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vsourceC@path, \circuitikzbasekey/bipole/is voltage=true, \circuitikzbasekey/bipole/is voltageoutsideofsymbol=true, v=#1}} +\compattikzset{vsourceC/.style= {\comnpatname cute european voltage source= #1}} +\compattikzset{ceV/.style= {\comnpatname cute european voltage source= #1}} + +\def\pgf@circ@isourceC@path#1{\pgf@circ@bipole@path{isourceC}{#1}} +\compattikzset{cute european current source/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@isourceC@path, \circuitikzbasekey/bipole/is current=true, i=#1}} +\compattikzset{isourceC/.style= {\comnpatname cute european current source= #1}} +\compattikzset{ceI/.style= {\comnpatname cute european current source= #1}} + +\def\pgf@circ@cvsourceC@path#1{\pgf@circ@bipole@path{cvsourceC}{#1}} +\compattikzset{cute european controlled voltage source/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@cvsourceC@path, \circuitikzbasekey/bipole/is voltage=true, \circuitikzbasekey/bipole/is voltageoutsideofsymbol=true, v=#1}} +\compattikzset{cvsourceC/.style= {\comnpatname cute european controlled voltage source= #1}} +\compattikzset{cceV/.style= {\comnpatname cute european controlled voltage source= #1}} + +\def\pgf@circ@cisourceC@path#1{\pgf@circ@bipole@path{cisourceC}{#1}} +\compattikzset{cute european controlled current source/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@cisourceC@path, \circuitikzbasekey/bipole/is current=true, i=#1}} +\compattikzset{cisourceC/.style= {\comnpatname cute european controlled current source= #1}} +\compattikzset{cceI/.style= {\comnpatname cute european controlled current source= #1}} + +% noise sources +\def\pgf@circ@vsourceN@path#1{\pgf@circ@bipole@path{vsourceN}{#1}} +\compattikzset{noise voltage source/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vsourceN@path, \circuitikzbasekey/bipole/is voltage=true, \circuitikzbasekey/bipole/is voltageoutsideofsymbol=true, v=#1}} +\compattikzset{vsourceN/.style= {\comnpatname noise voltage source= #1}} +\compattikzset{nV/.style= {\comnpatname noise voltage source= #1}} + +\def\pgf@circ@isourceN@path#1{\pgf@circ@bipole@path{isourceN}{#1}} +\compattikzset{noise current source/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@isourceN@path, \circuitikzbasekey/bipole/is current=true, i=#1}} +\compattikzset{isourceN/.style= {\comnpatname noise current source= #1}} +\compattikzset{nI/.style= {\comnpatname noise current source= #1}} + +% resistive sensor american style +\def\pgf@circ@resistivesens@path#1{\pgf@circ@bipole@path{resistivesens}{#1}} +\compattikzset{american resistive sensor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@resistivesens@path, l=#1}} +\compattikzset{european resistive sensor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@thermistorntc@path, l=#1}} +\compattikzset{resistive sensor/.style= {\circuitikzbasekey, /tikz/to path=\pgf@circ@sresistor@path, l=#1}} +\compattikzset{sR/.style= {\comnpatname resistive sensor= #1}} + +\compattikzset{capacitive sensor/.style= {\circuitikzbasekey, /tikz/to path=\pgf@circ@capacitivesens@path, l=#1}} +\compattikzset{sC/.style= {\comnpatname capacitive sensor= #1}} + +\compattikzset{cute inductive sensor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@cuteinductivesens@path, l=#1}} +\compattikzset{european inductive sensor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@europeaninductivesens@path, l=#1}} +\compattikzset{american inductive sensor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@americaninductivesens@path, l=#1}} +\compattikzset{inductive sensor/.style= {\circuitikzbasekey, /tikz/to path=\pgf@circ@inductivesens@path, l=#1}} +\compattikzset{sL/.style= {\comnpatname inductive sensor= #1}} + +\compattikzset{Mr/.style = {\comnpatname memristor}} + +\compattikzset{cspst/.style = {\comnpatname closing switch = #1}} +\compattikzset{ospst/.style = {\comnpatname opening switch = #1}} +\compattikzset{spst/.style = {\comnpatname switch = #1}} + +\compattikzset{afuse/.style = {\comnpatname asymmetric fuse=#1}} + +\compattikzset{vdd/.style = {\comnpatname vcc = #1}} +\compattikzset{vss/.style = {\comnpatname vee = #1}} + +% activate the to-style crossing +\def\pgf@circ@crossing@path#1{\pgf@circ@bipole@path{crossing}{#1}} +\compattikzset{crossing/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@crossing@path, l=#1}} +\compattikzset{xing/.style= {\comnpatname crossing= #1}} + +%% loudspeaker and microphone + +\def\pgf@circ@loudspeaker@path#1{\pgf@circ@bipole@path{loudspeaker}{#1}} +\compattikzset{loudspeaker/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@loudspeaker@path, l=#1}} + +\def\pgf@circ@mic@path#1{\pgf@circ@bipole@path{mic}{#1}} +\compattikzset{mic/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@mic@path, l=#1}} + +% more instrument +\def\pgf@circ@rmeter@path#1{\pgf@circ@bipole@path{rmeter}{#1}} +\compattikzset{rmeter/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@rmeter@path, l=#1}} +\def\pgf@circ@rmeterwa@path#1{\pgf@circ@bipole@path{rmeterwa}{#1}} +\compattikzset{rmeterwa/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@rmeterwa@path, l=#1}} +\def\pgf@circ@smeter@path#1{\pgf@circ@bipole@path{smeter}{#1}} +\compattikzset{smeter/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@smeter@path, l=#1}} +% current loop probes +\def\pgf@circ@iloop@path#1{\pgf@circ@bipole@path{iloop}{#1}} +\compattikzset{iloop/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@iloop@path, l=#1}} +\def\pgf@circ@iloop2@path#1{\pgf@circ@bipole@path{iloop2}{#1}} +\compattikzset{iloop2/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@iloop2@path, l=#1}} +% qucs-style probes +\def\pgf@circ@qiprobe@path#1{\pgf@circ@bipole@path{qiprobe}{#1}} +\compattikzset{qiprobe/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@qiprobe@path, l=#1}} +\def\pgf@circ@qvprobe@path#1{\pgf@circ@bipole@path{qvprobe}{#1}} +\compattikzset{qvprobe/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@qvprobe@path, l=#1}} +\def\pgf@circ@qpprobe@path#1{\pgf@circ@bipole@path{qpprobe}{#1}} +\compattikzset{qpprobe/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@qpprobe@path, l=#1}} + + +% Transistor like bipoles + +\def\pgf@circ@trans@path#1#2{ + \pgfextra{ + \edef\pgf@temp{\pgfkeysvalueof{/tikz/circuitikz/bipole/name}} + \def\pgf@circ@temp{#2} + \ifx\pgf@temp\pgf@circ@temp % if it has not a name + \pgfmathrandominteger{\pgf@circ@rand}{1000}{9999} + \ctikzset{bipole/name = trans\pgf@circ@rand} % create it + \fi + } + \ifpgf@circuit@bipole@inverted + (\tikztostart) node[coordinate] (\ctikzvalof{bipole/name}end) {} + (\tikztotarget) node[coordinate] (\ctikzvalof{bipole/name}start) {} + \else + (\tikztostart) node[coordinate] (\ctikzvalof{bipole/name}start) {} + (\tikztotarget) node[coordinate] (\ctikzvalof{bipole/name}end) {} + \fi + \pgfextra{ + \pgfmathanglebetweenpoints{\pgfpointanchor{\ctikzvalof{bipole/name}start}{center}} + {\pgfpointanchor{\ctikzvalof{bipole/name}end}{center}} + \pgfmathadd{\pgfmathresult}{-90} + \pgfmathround{\pgfmathresult} + \edef\pgf@circ@direction{\pgfmathresult} + } + ($(\tikztostart) ! .5 ! (\tikztotarget)$) + node[#1, /tikz/rotate=\pgf@circ@direction, xscale=\ctikzvalof{mirror value}] + (\ctikzvalof{bipole/name}) {} node {\ctikzvalof{bipole/label/name}} + \ifcsname pgf@anchor@#1@pathstart\endcsname%if special path-anchors are defined, use them! + (\ctikzvalof{bipole/name}start.center) --(\ctikzvalof{bipole/name}.pathstart) + (\ctikzvalof{bipole/name}.pathend) -- (\ctikzvalof{bipole/name}end.center) + \else + (\ctikzvalof{bipole/name}start.center) --(\ctikzvalof{bipole/name}.left) + (\ctikzvalof{bipole/name}.right) -- (\ctikzvalof{bipole/name}end.center) + \fi + \pgfextra{ + \pgfcircresetpath + } + (\tikztotarget) \tikztonodes % e si continua +} + + +\def\pgf@circ@definetranspath#1{ + \compattikzset{T#1/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@trans@path{#1}{}, l=##1}} +} + +\pgf@circ@definetranspath{elmech} +\pgf@circ@definetranspath{nmos} +\pgf@circ@definetranspath{pmos} +\pgf@circ@definetranspath{hemt} +\pgf@circ@definetranspath{npn} +\pgf@circ@definetranspath{pnp} +\pgf@circ@definetranspath{nfet} +\pgf@circ@definetranspath{nigfete} +\pgf@circ@definetranspath{nigfetd} +\pgf@circ@definetranspath{nigfetebulk} +\pgf@circ@definetranspath{pfet} +\pgf@circ@definetranspath{pigfete} +\pgf@circ@definetranspath{pigfetd} +\pgf@circ@definetranspath{pigfetebulk} +\pgf@circ@definetranspath{njfet} +\pgf@circ@definetranspath{pjfet} +\pgf@circ@definetranspath{pigbt} +\pgf@circ@definetranspath{nigbt} +\pgf@circ@definetranspath{Lpigbt} +\pgf@circ@definetranspath{Lnigbt} +%%%---------- close: tex/pgfcircpath + +\ifpgf@circ@siunitx + \RequirePackage{xstring}[2009/03/13] + %\expandafter\let\csname angstrom\endcsname\relax + \RequirePackage{siunitx} +\fi + +\ifpgf@circ@explicitvdir\else + \PackageWarningNoLine{circuitikz}{% + You did not specify one of the voltage directions:\MessageBreak + \space\space oldvoltagedirection, nooldvoltagedirection, \MessageBreak + \space\space RPvoltages or EFvoltages \MessageBreak + Default directions may have changed, \MessageBreak + please check the manual% + } +\fi + +\newenvironment{circuitikz}{\begin{tikzpicture}}{\end{tikzpicture}} +%override (unused) circuitikz environment for compability to externalization) +\let\circuitikz\tikzpicture +\let\endcircuitikz\endtikzpicture + +\endinput