texlive[41299] Master/texmf-dist: circuitikz (6jun16)
commits+karl at tug.org
commits+karl at tug.org
Tue Jun 7 01:01:18 CEST 2016
Revision: 41299
http://tug.org/svn/texlive?view=revision&revision=41299
Author: karl
Date: 2016-06-07 01:01:18 +0200 (Tue, 07 Jun 2016)
Log Message:
-----------
circuitikz (6jun16)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/context/third/circuitikz/circuitikz-context.pdf
trunk/Master/texmf-dist/doc/generic/circuitikz/CHANGELOG.md
trunk/Master/texmf-dist/doc/generic/circuitikz/README.md
trunk/Master/texmf-dist/doc/latex/circuitikz/changelog.tex
trunk/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.pdf
trunk/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.tex
trunk/Master/texmf-dist/tex/context/third/circuitikz/t-circuitikz.tex
trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirc.defines.tex
trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex
trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircshapes.tex
trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex
trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircutils.tex
trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircvoltage.tex
trunk/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty
Added Paths:
-----------
trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircpath.tex
Removed Paths:
-------------
trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircbasic.tex
Modified: trunk/Master/texmf-dist/doc/context/third/circuitikz/circuitikz-context.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/generic/circuitikz/CHANGELOG.md
===================================================================
--- trunk/Master/texmf-dist/doc/generic/circuitikz/CHANGELOG.md 2016-06-06 22:57:41 UTC (rev 41298)
+++ trunk/Master/texmf-dist/doc/generic/circuitikz/CHANGELOG.md 2016-06-06 23:01:18 UTC (rev 41299)
@@ -1,6 +1,15 @@
<!--- CircuiTikz - Changelog --->
-The major changes among the different circuitikz versions are listed here. See <https://github.com/mredaelli/circuitikz/commits> for a full list of changes.
+The major changes among the different circuitikz versions are listed here. See <https://github.com/circuitikz/circuitikz/commits> for a full list of changes.
+* Version 0.6 (2016-06-06)
+ - Added Mechanical Symbols (damper,mass,spring)
+ - Added new connection style diamond, use (d-d)
+ - Added new sources voosource and ioosource (double zero-style)
+ - All diode can now drawn in a stroked way, just use globel option "strokediode" or stroke instead of full/empty, or D-. Use this option for compliance with DIN standard EN-60617
+ - Improved Shape of Diodes:tunnel diode, Zener diode, schottky diode (bit longer lines at cathode)
+ - Reworked igbt: New anchors G,gate and new L-shaped form Lnigbt, Lpigbt
+ - Improved shape of all fet-transistors and mirrored p-chan fets as default, as pnp, pmos, pfet are already. This means a backward-incompatibility, but smaller code, because p-channels mosfet are by default in the correct direction(source at top). Just remove the 'yscale=-1' from your p-chan fets at old pictures.
+
* Version 0.5 (2016-04-24)
- new option boxed and dashed for hf-symbols
- new option solderdot to enable/disable solderdot at source port of some fets
Modified: trunk/Master/texmf-dist/doc/generic/circuitikz/README.md
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/circuitikz/changelog.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/circuitikz/changelog.tex 2016-06-06 22:57:41 UTC (rev 41298)
+++ trunk/Master/texmf-dist/doc/latex/circuitikz/changelog.tex 2016-06-06 23:01:18 UTC (rev 41299)
@@ -1,11 +1,39 @@
%DO NOT EDIT THIS AUTOMATICALLY GENERATED FILE, run "make changelog" at toplevel!!!
The major changes among the different circuitikz versions are listed
-here. See \url{https://github.com/mredaelli/circuitikz/commits} for a
+here. See \url{https://github.com/circuitikz/circuitikz/commits} for a
full list of changes.
\begin{itemize}
\itemsep1pt\parskip0pt\parsep0pt
\item
+ Version 0.6 (2016-06-06)
+
+ \begin{itemize}
+ \itemsep1pt\parskip0pt\parsep0pt
+ \item
+ Added Mechanical Symbols (damper,mass,spring)
+ \item
+ Added new connection style diamond, use (d-d)
+ \item
+ Added new sources voosource and ioosource (double zero-style)
+ \item
+ All diode can now drawn in a stroked way, just use globel option
+ ``strokediode'' or stroke instead of full/empty, or D-. Use this
+ option for compliance with DIN standard EN-60617
+ \item
+ Improved Shape of Diodes:tunnel diode, Zener diode, schottky diode
+ (bit longer lines at cathode)
+ \item
+ Reworked igbt: New anchors G,gate and new L-shaped form Lnigbt,
+ Lpigbt
+ \item
+ Improved shape of all fet-transistors and mirrored p-chan fets as
+ default, as pnp, pmos, pfet are already. This means a
+ backward-incompatibility, but smaller code, because p-channels
+ mosfet are by default in the correct direction(source at top). Just
+ remove the `yscale=-1' from your p-chan fets at old pictures.
+ \end{itemize}
+\item
Version 0.5 (2016-04-24)
\begin{itemize}
Modified: trunk/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.tex 2016-06-06 22:57:41 UTC (rev 41298)
+++ trunk/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.tex 2016-06-06 23:01:18 UTC (rev 41299)
@@ -1,4 +1,3 @@
-% !TeX document-id = {5e9c4ee1-adf2-4a3c-b550-ad6df747cc75}
% % Konfiguration für Texstudio (Version > 2.9)
% !TeX program = xelatex
% !TeX TXS-program:compile = txs:///xelatex/[-8bit]
@@ -31,8 +30,7 @@
%\usepackage{babel}
\fi
\fi
-
-
+\def\tightlist{} %needed for latest pandoc-versions(pandoc used for including changelog)
\usepackage{microtype}
\sisetup{load=derived} % loading \siemens
@@ -142,8 +140,16 @@
Copyright \copyright\ 2007--2016 Massimo Redaelli. This package is author-maintained. Permission is granted to copy, distribute and/or modify this software under the terms of the \LaTeX\ Project Public License, version 1.3.1, or the GNU Public License. This software is provided ‘as is’, without warranty of any kind, either expressed or implied, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose.
\subsection{Feedback}
-The easiest way to contact the authors is via the official Github repository: \url{https://github.com/mredaelli/circuitikz/issues}
+The easiest way to contact the authors is via the official Github repository: \url{https://github.com/circuitikz/circuitikz/issues}
+
+\section{Incompabilities between version}
+Here, we will provide a list of incompabilitys between different version of circuitikz. We will try to hold this list short, but sometimes it is easier to break with old syntax than including a lot of switches and compatibility layers.
+\begin{itemize}
+\item Since v0.5.1: The parts pfet,pigfete,pigfetebulk and pigfetd are now mirrored by default. Please adjust your yscale-option to correct this.
+\item Since v0.5: New voltage counting direction, here exists an option to use the old behaviour
+\end{itemize}
+
\section{Package options}
\noindent Circuit people are very opinionated about their symbols. In order to meet the individual gusto you can set a bunch of package options. The standard options are what the authors like, for example you get this:
@@ -195,8 +201,9 @@
\item \texttt{american}: equivalent to \texttt{americancurrents}, \texttt{americanvoltages}, \texttt{americanresistors}, \texttt{americaninductors}, \texttt{americanports}, \texttt{americangfsurgearrester};
\item \texttt{siunitx}: integrates with \texttt{SIunitx} package. If labels, currents or voltages are of the form \verb!#1<#2>! then what is shown is actually \verb!\SI{#1}{#2}!;
\item \texttt{nosiunitx}: labels are not interpreted as above;
- \item \texttt{fulldiodes}: the various diodes are drawn \emph{and} filled by default, i.e. when using styles such as \texttt{diode}, \texttt{D}, \texttt{sD}, \ldots Un-filled diode can always be forced with \texttt{Do}, \texttt{sDo}, \ldots
- \item \texttt{emptydiodes}: the various diodes are drawn \emph{but not} filled by default, i.e. when using styles such as \texttt{diode}, \texttt{D}, \texttt{sD}, \ldots Filled diode can always be forced with \texttt{D*}, \texttt{sD*}, \ldots
+ \item \texttt{fulldiode}: the various diodes are drawn \emph{and} filled by default, i.e. when using styles such as \texttt{diode}, \texttt{D}, \texttt{sD}, \ldots Other diode styles can always be forced with e.g. \texttt{Do}, \texttt{D-}, \ldots
+ \item \texttt{strokediode}: the various diodes are drawn \emph{and} stroke by default, i.e. when using styles such as \texttt{diode}, \texttt{D}, \texttt{sD}, \ldots Other diode styles can always be forced with e.g. \texttt{Do}, \texttt{D*}, \ldots
+ \item \texttt{emptydiode}: the various diodes are drawn \emph{but not} filled by default, i.e. when using styles such as \texttt{D}, \texttt{sD}, \ldots Other diode styles can always be forced with e.g. \texttt{Do}, \texttt{D-}, \ldots
\item \texttt{arrowmos}: pmos and nmos have arrows analogous to those of pnp and npn transistors;
\item \texttt{noarrowmos}: pmos and nmos do not have arrows analogous to those of pnp and npn transistors;
\item \texttt{fetbodydiode}: draw the body diode of a FET;
@@ -341,29 +348,12 @@
\circuititembip{afuse}{Asymmetric fuse}{asymmetric fuse}
\end{itemize}
-\subsubsection{Stationary sources}
-\begin{itemize}
- \circuititembip{battery}{Battery}{}
- \circuititembip{battery1}{Single battery cell}{}
- \circuititembip{european voltage source}{Voltage source (european style)}{}
- \circuititembip{american voltage source}{Voltage source (american style)}{}
- \circuititembip{european current source}{Current source (european style)}{}
- \circuititembip{american current source}{Current source (american style)}{}
-\end{itemize}
-
-\begin{framed}
-If (default behaviour) \texttt{europeancurrents} option is active (or the style \texttt{[european currents]} is used), the shorthands \texttt{current source}, \texttt{isource}, and \texttt{I} are equivalent to \texttt{european current source}. Otherwise, if \texttt{americancurrents} option is active (or the style \texttt{[american currents]} is used) they are equivalent to \texttt{american current source}.
-
-Similarly, if (default behaviour) \texttt{europeanvoltages} option is active (or the style \texttt{[european voltages]} is used), the shorthands \texttt{voltage source}, \texttt{vsource}, and \texttt{V} are equivalent to \texttt{european voltage source}. Otherwise, if \texttt{americanvoltages} option is active (or the style \texttt{[american voltages]} is used) they are equivalent to \texttt{american voltage source}.
-\end{framed}
-
-
-
\subsubsection{Diodes and such}
\begin{itemize}
\circuititembip{empty diode}{Empty diode}{Do}
\circuititembip{empty Schottky diode}{Empty Schottky diode}{sDo}
\circuititembip{empty Zener diode}{Empty Zener diode}{zDo}
+ \circuititembip{empty ZZener diode}{Empty ZZener diode}{zzDo}
\circuititembip{empty tunnel diode}{Empty tunnel diode}{tDo}
\circuititembip{empty photodiode}{Empty photodiode}{pDo}
\circuititembip{empty led}{Empty led}{leDo}
@@ -371,16 +361,38 @@
\circuititembip{full diode}{Full diode}{D*}
\circuititembip{full Schottky diode}{Full Schottky diode}{sD*}
\circuititembip{full Zener diode}{Full Zener diode}{zD*}
+ \circuititembip{full ZZener diode}{Full ZZener diode}{zzD*}
\circuititembip{full tunnel diode}{Full tunnel diode}{tD*}
\circuititembip{full photodiode}{Full photodiode}{pD*}
\circuititembip{full led}{Full led}{leD*}
\circuititembip{full varcap}{Full varcap}{VC*}
+ \circuititembip{stroke diode}{Stroke diode}{D-}
+ \circuititembip{stroke Schottky diode}{Stroke Schottky diode}{sD-}
+ \circuititembip{stroke Zener diode}{Stroke Zener diode}{zD-}
+ \circuititembip{stroke ZZener diode}{Stroke ZZener diode}{zzD-}
+ \circuititembip{stroke tunnel diode}{Stroke tunnel diode}{tD-}
+ \circuititembip{stroke photodiode}{Stroke photodiode}{pD-}
+ \circuititembip{stroke led}{Stroke led}{leD-}
+ \circuititembip{stroke varcap}{Stroke varcap}{VC-}
\end{itemize}
+\subsubsection{Other tripole-like diodes}\label{sec:othertrip} The following tripoles are entered with the usual command of the form
+\begin{itemize}
+ \circuititembip{triac}{Standard triac (shape depends on package option)}{Tr}
+ \circuititembip{empty triac}{Empty triac}{Tro}
+ \circuititembip{full triac}{Full triac}{Tr*}
+ \circuititembip{thyristor}{Standard thyristor (shape depends on package option)}{Ty}
+ \circuititembip{empty thyristor}{Empty thyristor}{Tyo}
+ \circuititembip{full thyristor}{Full thyristor}{Ty*}
+ \circuititembip{stroke thyristor}{Stroke thyristor}{Ty-}
+\end{itemize}
+See chapter \ref{bipole-naming} for information how access the third connector
+
\begin{framed}
-The options \texttt{fulldiodes} and \texttt{emptydiodes} (and the styles \texttt{[full diodes]} and \texttt{[empty diodes]}) define which shape will be used by abbreviated commands such that \texttt{D}, \texttt{sD}, \texttt{zD}, \texttt{tD}, \texttt{pD}, \texttt{leD}, and \texttt{VC}.
+The package options \texttt{fulldiode}, \texttt{strokediode}, and \texttt{emptydiode} (and the styles \texttt{[full diodes]}, \texttt{[stroke diodes]}, and \texttt{[empty diodes]}) define which shape will be used by abbreviated commands such that \texttt{D}, \texttt{sD}, \texttt{zD}, \texttt{zzD}, \texttt{tD}, \texttt{pD}, \texttt{leD}, \texttt{VC}, \texttt{Ty},\texttt{Tr}(no stroke symbol available!).
\end{framed}
+
\begin{itemize}
\circuititembip{squid}{Squid}{}
\circuititembip{barrier}{Barrier}{}
@@ -432,6 +444,23 @@
\circuititembip{TL}{Transmission line}{transmission line, tline}
\end{itemize}
+\subsubsection{Stationary sources}
+\begin{itemize}
+ \circuititembip{battery}{Battery}{}
+ \circuititembip{battery1}{Single battery cell}{}
+ \circuititembip{european voltage source}{Voltage source (european style)}{}
+ \circuititembip{american voltage source}{Voltage source (american style)}{}
+ \circuititembip{european current source}{Current source (european style)}{}
+ \circuititembip{american current source}{Current source (american style)}{}
+\end{itemize}
+
+\begin{framed}
+If (default behaviour) \texttt{europeancurrents} option is active (or the style \texttt{[european currents]} is used), the shorthands \texttt{current source}, \texttt{isource}, and \texttt{I} are equivalent to \texttt{european current source}. Otherwise, if \texttt{americancurrents} option is active (or the style \texttt{[american currents]} is used) they are equivalent to \texttt{american current source}.
+
+Similarly, if (default behaviour) \texttt{europeanvoltages} option is active (or the style \texttt{[european voltages]} is used), the shorthands \texttt{voltage source}, \texttt{vsource}, and \texttt{V} are equivalent to \texttt{european voltage source}. Otherwise, if \texttt{americanvoltages} option is active (or the style \texttt{[american voltages]} is used) they are equivalent to \texttt{american voltage source}.
+\end{framed}
+
+
\subsubsection{Sinusoidal sources} Here because I was asked for them. But how do you distinguish one from the other?!
\begin{itemize}
\circuititembip{sinusoidal voltage source}{Sinusoidal voltage source}{vsourcesin, sV}
@@ -444,6 +473,8 @@
\circuititembip{vsourcetri}{Triangle voltage source}{tV}
\circuititembip{esource}{Empty voltage source}{}
\circuititembip{pvsource}{Photovoltaic-voltage source}{}
+ \circuititembip{ioosource}{Double Zero style current source}{}
+ \circuititembip{voosource}{Double Zero style voltage source}{}
\end{itemize}
\subsubsection{DC sources}
@@ -452,6 +483,15 @@
\circuititembip{dcisource}{DC current source}{}
\end{itemize}
+
+\subsubsection{Mechanical Analogy}
+\begin{itemize}
+ \circuititembip{damper}{Mechanical Damping}{}
+ \circuititembip{spring}{Mechanical Stiffness}{}
+ \circuititembip{mass}{Mechanical Mass}{}
+\end{itemize}
+
+
%\begin{framed}
%The options \texttt{europeancurrent} [resp. \texttt{europeanvoltage}] (the default) and \texttt{americancurrent} [resp. \texttt{americanvoltage}] define which sinusoidal current [resp. voltage] source is selected by default when the abbreviated styles \texttt{sinusoidal current source}, \texttt{csourcesin}, \texttt{cI} [resp. \texttt{sinusoidal voltage source}, \texttt{vsourcesin}, \texttt{cV}] are used.
@@ -522,12 +562,26 @@
\circuititem{pnp}{\scshape pnp}{}
\circuititem{npn,photo}{\scshape npn}{}
\circuititem{pnp,photo}{\scshape pnp}{}
- \circuititem{nigbt}{\scshape npigbt}{}
- \circuititem{pigbt}{\scshape pigbt}{}
+ \circuititem{nigbt}{\scshape nigbt}{}
+ \circuititem{pigbt}{\scshape pigbt}{}
+ \circuititem{Lnigbt}{\scshape Lnigbt}{}
+ \circuititem{Lpigbt}{\scshape Lpigbt}{}
\end{itemize}
+For all transistors a bodydiode(or freewheeling diode) can automatically be drawn. Just use the global option bodydiode, or for single transistors, the tikz-option bodydiode:
+\begin{LTXexample}[varwidth=true]
+\begin{circuitikz}
+ \draw (0,0) node[npn,bodydiode](npn){}++(2,0)node[pnp,bodydiode](npn){};
+ \draw (0,-2) node[nigbt,bodydiode](npn){}++(2,0)node[pigbt,bodydiode](npn){};
+ \draw (0,-4) node[nfet,bodydiode](npn){}++(2,0)node[pfet,bodydiode](npn){};
+\end{circuitikz}
+\end{LTXexample}
+
+
+
+
+
The Base/Gate connection of all transistors can be disable by using the options \textit{nogate} or \textit{nobase}, respectively. The Base/Gate anchors are floating, but there an additional anchor "nogate"/"nobase", which can be used to point to the unconnected base:
-
\begin{LTXexample}[varwidth=true]
\begin{circuitikz}
\draw (2,0) node[npn,nobase](npn){};
@@ -627,18 +681,7 @@
\end{circuitikz}
\end{LTXexample}
-\subsubsection{Other bipole-like tripoles}\label{sec:othertrip} The following tripoles are entered with the usual command of the form
-\begin{itemize}
- \circuititembip{triac}{triac}{Tr}
- \circuititembip{thyristor}{thyristor}{Ty}
- %\circuititembip{IGBT}{IGBT}{}
-\end{itemize}
-% now part of block diagram parts above
-%\subsubsection{Misc}
-%\begin{itemize}
-% \circuititem{mixer}{Mixer}{}
-%\end{itemize}
\subsection{Double bipoles}
@@ -1050,6 +1093,24 @@
\begin{LTXexample}[varwidth=true]
\begin{circuitikz}
+ \draw (0,0) to[R, d-d] (2,0);
+\end{circuitikz}
+\end{LTXexample}
+
+\begin{LTXexample}[varwidth=true]
+\begin{circuitikz}
+ \draw (0,0) to[R, -d] (2,0);
+\end{circuitikz}
+\end{LTXexample}
+
+\begin{LTXexample}[varwidth=true]
+\begin{circuitikz}
+ \draw (0,0) to[R, d-] (2,0);
+\end{circuitikz}
+\end{LTXexample}
+
+\begin{LTXexample}[varwidth=true]
+\begin{circuitikz}
\draw (0,0) to[R, o-*] (2,0);
\end{circuitikz}
\end{LTXexample}
@@ -1060,7 +1121,31 @@
\end{circuitikz}
\end{LTXexample}
+\begin{LTXexample}[varwidth=true]
+\begin{circuitikz}
+ \draw (0,0) to[R, o-d] (2,0);
+\end{circuitikz}
+\end{LTXexample}
+\begin{LTXexample}[varwidth=true]
+\begin{circuitikz}
+ \draw (0,0) to[R, d-o] (2,0);
+\end{circuitikz}
+\end{LTXexample}
+
+\begin{LTXexample}[varwidth=true]
+\begin{circuitikz}
+ \draw (0,0) to[R, *-d] (2,0);
+\end{circuitikz}
+\end{LTXexample}
+
+\begin{LTXexample}[varwidth=true]
+\begin{circuitikz}
+ \draw (0,0) to[R, d-*] (2,0);
+\end{circuitikz}
+\end{LTXexample}
+
+
\subsection{Special components}
For some components label, current and voltage behave as one would expect:
@@ -1349,7 +1434,6 @@
\begin{LTXexample}[varwidth=true]
\begin{circuitikz} \draw
(0,0) node[nmos] (mos) {}
- (mos.base) node[anchor=west] {B}
(mos.gate) node[anchor=east] {G}
(mos.drain) node[anchor=south] {D}
(mos.source) node[anchor=north] {S}
@@ -1359,10 +1443,10 @@
\begin{LTXexample}[varwidth=true]
\begin{circuitikz} \draw
(0,0) node[pigfete] (pigfete) {}
- (pigfete.B) node[anchor=west] {B}
(pigfete.G) node[anchor=east] {G}
- (pigfete.D) node[anchor=south] {D}
- (pigfete.S) node[anchor=north] {S}
+ (pigfete.D) node[anchor=north] {D}
+ (pigfete.S) node[anchor=south] {S}
+ (pigfete.bulk) node[anchor=east] {Bulk}
;\end{circuitikz}
\end{LTXexample}
@@ -1415,10 +1499,10 @@
\begin{LTXexample}[varwidth=true]
\begin{circuitikz} \draw
(0,0) node[pigfete, yscale=-1] (pigfete) {}
- (pigfete.B) node[anchor=west] {B}
+ (pigfete.bulk) node[anchor=west] {Bulk}
(pigfete.G) node[anchor=east] {G}
- (pigfete.D) node[anchor=north] {D}
- (pigfete.S) node[anchor=south] {S}
+ (pigfete.D) node[anchor=south] {D}
+ (pigfete.S) node[anchor=north] {S}
;\end{circuitikz}
\end{LTXexample}
@@ -1432,7 +1516,7 @@
\end{LTXexample}
\subsubsection{Other tripoles} When inserting a thrystor, a triac or a potentiometer, one needs to refer to the third node--gate (\texttt{gate} or \texttt{G}) for the former two; wiper (\texttt{wiper} or \texttt{W}) for the latter one. This is done by giving a name to the bipole:
-
+\label{bipole-naming}
\begin{LTXexample}[varwidth=true]
\begin{circuitikz} \draw
(0,0) to[Tr, n=TRI] (2,0)
@@ -2005,8 +2089,10 @@
% % changelog.tex will be updated by makefile from CHANGELOG.md
\section{Changelog}
-\input{changelog.tex}
+\IfFileExists{changelog.tex}
+{\input{changelog.tex}}
+{The file changelog.tex was not found, run 'make changelog' at toplevel to generate it with pandoc from CHANGELOG.md}
\printindex
-\end{document}
\ No newline at end of file
+\end{document}
Modified: trunk/Master/texmf-dist/tex/context/third/circuitikz/t-circuitikz.tex
===================================================================
--- trunk/Master/texmf-dist/tex/context/third/circuitikz/t-circuitikz.tex 2016-06-06 22:57:41 UTC (rev 41298)
+++ trunk/Master/texmf-dist/tex/context/third/circuitikz/t-circuitikz.tex 2016-06-06 23:01:18 UTC (rev 41299)
@@ -1,5 +1,5 @@
-\def\pgfcircversion{0.5}
-\def\pgfcircversiondate{2016/04/24}
+\def\pgfcircversion{0.6}
+\def\pgfcircversiondate{2016/06/06}
\writestatus{loading}{\pgfcircversiondate{} The CircuiTikz circuit drawing package version \pgfcircversion}
\usemodule[tikz]
@@ -18,7 +18,19 @@
\catcode`\!=12
\input pgfcirc.defines.tex
+\input pgfcircutils.tex
+\input pgfcircmath.tex
+\input pgfcircshapes.tex
+\input pgfcircmonopoles.tex
+\input pgfcircbipoles.tex
+\input pgfcirctripoles.tex
+\input pgfcircquadpoles.tex
+
+\input pgfcirclabel.tex
+\input pgfcircvoltage.tex
+\input pgfcirccurrent.tex
+
% defaults
\setupmodule
@@ -107,7 +119,7 @@
\ctikzset{tripoles/op amp/font/.initial=\switchtobodyfont[small]}
-\input pgfcircbasic.tex
+\input pgfcircpath.tex
\catcode`\@=\tikzatcode
\catcode`\|=\tikzbarcode
Modified: trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirc.defines.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirc.defines.tex 2016-06-06 22:57:41 UTC (rev 41298)
+++ trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirc.defines.tex 2016-06-06 23:01:18 UTC (rev 41299)
@@ -1,9 +1,20 @@
%% Options
+%%%%%%%%%%%%
+%% Dimensions
-
-
+% coordinates
+\newdimen\pgf at circ@res at up
+\newdimen\pgf at circ@res at down
+\newdimen\pgf at circ@res at zero
+\newdimen\pgf at circ@res at left
+\newdimen\pgf at circ@res at right
+\newdimen\pgf at circ@res at other
+\newdimen\pgf at circ@res at step
+\newdimen\pgf at circ@res at temp
+% inital thickness
+\newdimen \pgfstartlinewidth
%% Keys
\long\def\pgf at circ@comment#1{}
@@ -97,22 +108,20 @@
\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=6}
-\ctikzset{bipoles/cuteinductor/coil height/.initial=.15}
-\ctikzset{bipoles/cuteinductor/coil aspect/.initial=.25}
-\ctikzset{bipoles/cuteinductor/lower coil height/.initial=.05}
+\ctikzset{bipoles/cuteinductor/coils/.initial=5}
+\ctikzset{bipoles/cuteinductor/coil aspect/.initial=.5}%percentage of inductor width, which is covered by lower coil
\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=.3}
+\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=6}
-\ctikzset{bipoles/vcuteinductor/coil height/.initial=.15}
-\ctikzset{bipoles/vcuteinductor/coil aspect/.initial=.25}
-\ctikzset{bipoles/vcuteinductor/lower coil height/.initial=.05}
+\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}
@@ -124,6 +133,10 @@
\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/height/.initial=.60}
\ctikzset{bipoles/dcisource/width/.initial=.60}
\ctikzset{bipoles/dcvsource/height/.initial=.60}
@@ -258,6 +271,10 @@
\ctikzset{bipoles/vphaseshifter/width/.initial=.7}
\ctikzset{bipoles/detector/width/.initial=.7}
+
+\newif\ifpgf at circuit@trans at depletiontype
+\pgf at circuit@trans at depletiontypefalse
+
\newif\ifpgf at circuit@mos at arrows
\ctikzset{tripoles/mos style/.is choice}
\ctikzset{tripoles/mos style/no arrows/.code={\pgf at circuit@mos at arrowsfalse}}
@@ -309,13 +326,14 @@
\ctikzset{tripoles/pmos style/emptycircle/.add code={}{\pgf at circuit@pmos at emptycircletrue}}
-\newif\ifpgf at circuit@fet at ntype
-\pgf at circuit@fet at ntypetrue %default true
-%\newif\ifpgf at circuit@fet at ptype
-%\ctikzset{tripoles/nmos/.add code={\pgf at circuit@fet at ntypetrue}}
+\newif\ifpgf at circuit@trans at ntype
+\pgf at circuit@trans at ntypetrue %default true
+%\newif\ifpgf at circuit@trans at ptype
+%\ctikzset{tripoles/nmos/.add code={\pgf at circuit@trans at 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}
@@ -322,10 +340,12 @@
\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}
@@ -332,11 +352,12 @@
\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/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}
@@ -343,11 +364,12 @@
\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}
@@ -354,11 +376,12 @@
\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}
@@ -365,10 +388,12 @@
\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}
@@ -375,11 +400,12 @@
\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}
@@ -386,11 +412,12 @@
\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}
@@ -397,11 +424,12 @@
\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}
@@ -408,10 +436,11 @@
\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}
@@ -419,53 +448,105 @@
\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/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/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}
@@ -473,6 +554,7 @@
\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}
@@ -480,6 +562,7 @@
\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 at circuit@europeanlogicport
\ctikzset{logic ports/.is choice}
@@ -639,11 +722,20 @@
\ctikzset{quadpoles/coupler2/width/.initial=1.3}
\ctikzset{quadpoles/coupler2/height/.initial=1.3}
-
+% %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 = }
@@ -651,6 +743,10 @@
\ctikzset{bipole/reversed/.is if=pgf at circuit@bipole at reversed}
\newif\ifpgf at circuit@bipole at isvoltage
\ctikzset{bipole/is voltage/.is if=pgf at circuit@bipole at isvoltage}
+\newif\ifpgf at circuit@bipole at voltageoutsideofsymbol
+\ctikzset{bipole/is voltageoutsideofsymbol/.is if=pgf at circuit@bipole at voltageoutsideofsymbol}
+\newif\ifpgf at circuit@bipole at strokedsymbol
+\ctikzset{bipole/is strokedsymbol/.is if=pgf at circuit@bipole at strokedsymbol}
\newif\ifpgf at circuit@bipole at iscurrent
\ctikzset{bipole/is current/.is if=pgf at circuit@bipole at iscurrent}
@@ -693,10 +789,12 @@
\ctikzset{bipole/nodes/left/none/.code={\ctikzsetvalof{bipole/nodes/left}{none}}}
\ctikzset{bipole/nodes/left/empty/.code={\ctikzsetvalof{bipole/nodes/left}{empty}}}
\ctikzset{bipole/nodes/left/full/.code={\ctikzsetvalof{bipole/nodes/left}{full}}}
+\ctikzset{bipole/nodes/left/diamond/.code={\ctikzsetvalof{bipole/nodes/left}{diamond}}}
\ctikzset{bipole/nodes/right/.is choice}
\ctikzset{bipole/nodes/right/none/.code={\ctikzsetvalof{bipole/nodes/right}{none}}}
\ctikzset{bipole/nodes/right/empty/.code={\ctikzsetvalof{bipole/nodes/right}{empty}}}
\ctikzset{bipole/nodes/right/full/.code={\ctikzsetvalof{bipole/nodes/right}{full}}}
+\ctikzset{bipole/nodes/right/diamond/.code={\ctikzsetvalof{bipole/nodes/right}{diamond}}}
@@ -711,11 +809,20 @@
\ctikzset{inductor/european/.code={\ctikzsetvalof{inductor}{european}}}
\ctikzset{inductor/american/.code={\ctikzsetvalof{inductor}{american}}}
+\newif\ifpgf at circuit@strokediode
\newif\ifpgf at circuit@fulldiode
-\ctikzset{diode/.is if=pgf at circuit@fulldiode}
+\pgf at circuit@strokediodefalse
+\pgf at circuit@fulldiodefalse
+
\ctikzset{diode/.is choice}
-\ctikzset{diode/empty/.code = \pgf at circuit@fulldiodefalse }
+\ctikzset{diode/empty/.code = \pgf at circuit@fulldiodefalse\pgf at circuit@strokediodefalse}%default
\ctikzset{diode/full/.code = \pgf at circuit@fulldiodetrue }
+\ctikzset{diode/stroke/.code = \pgf at 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}}}
@@ -784,8 +891,6 @@
\tikzset{american inductors/.style = { \circuitikzbasekey/inductor = american } }
\tikzset{european inductors/.style = { \circuitikzbasekey/inductor = european } }
\tikzset{cute inductors/.style = { \circuitikzbasekey/inductor = cute } }
-\tikzset{full diodes/.style = { \circuitikzbasekey/diode = full } }
-\tikzset{empty diodes/.style = { \circuitikzbasekey/diode = empty } }
\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 } }
@@ -811,18 +916,3 @@
%%%%%%%%%% new
\pgfkeys{\circuitikzbasekey/.search also={/tikz}}
-
-
-\input pgfcircutils.tex
-\input pgfcircmath.tex
-
-\input pgfcircshapes.tex
-\input pgfcircmonopoles.tex
-\input pgfcircbipoles.tex
-\input pgfcirctripoles.tex
-\input pgfcircquadpoles.tex
-
-\input pgfcirclabel.tex
-\input pgfcircvoltage.tex
-\input pgfcirccurrent.tex
-
Deleted: trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircbasic.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircbasic.tex 2016-06-06 22:57:41 UTC (rev 41298)
+++ trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircbasic.tex 2016-06-06 23:01:18 UTC (rev 41299)
@@ -1,570 +0,0 @@
-%%%%%%%%%%%%
-%% Dimensions
-
-% coordinate bipoli
-\newdimen\pgf at circ@res at up \newdimen\pgf at circ@res at down \newdimen\pgf at circ@res at zero
-\newdimen\pgf at circ@res at left \newdimen\pgf at circ@res at right
-\newdimen\pgf at circ@res at other
-\newdimen\pgf at circ@res at step
-\newdimen\pgf at circ@res at temp
-
-% thickness iniziale
-\newdimen \pgfstartlinewidth
-
-\pgf at circ@Rlen = \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
-
-
-
-% 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}}
-
-% Initialize paths
-\def\pgfcircresetpath{
- \ctikzset{bipole/name=, bipole/label/name=, bipole/label/position=90,
- bipole/reversed=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 current=false, bipole/current/label/name=, bipole/current/x position=after,
- bipole/current/y position=above, bipole/current/direction=forward,
- mirrored=false
- }
-}
-
-
-%% Generic bipole path
-\def\pgf at circ@bipole at path#1#2{
- \pgfextra{
- \ctikzset{bipole/kind = #1}
-
- \edef\pgf at temp{\pgfkeysvalueof{/tikz/circuitikz/bipole/name}}
- \def\pgf at circ@temp{}
- \ifx\pgf at temp\pgf at circ@temp % if it has not a name
- \pgfmathrandominteger{\pgf at circ@rand}{1000}{9999}
- \ctikzset{bipole/name = #2\pgf at circ@rand} % create it
- \fi
-
- \def\pgf at temp{open}
- \def\pgf at circ@temp{#1}
- }
- \ifpgf at circuit@bipole at reversed
- (\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{
- \pgf at circ@slope{\pgfpointanchor{\ctikzvalof{bipole/name}start}{center}}
- {\pgfpointanchor{\ctikzvalof{bipole/name}end}{center}}
- \edef\pgf at circ@direction{\pgfmathresult}
- }
- ($(\tikztostart) ! .5 ! (\tikztotarget)$)
- node[#1shape, rotate=\pgf at circ@direction, yscale=\ctikzvalof{mirror value}]
- (\ctikzvalof{bipole/name}) {}
- \ifx\pgf at temp\pgf at circ@temp % if it is an open
- \else
- \ifdefined\pgf at anchor@#1 at pathstart% 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
- \fi
- \pgf at circ@ifkeyempty{bipole/label/name}\else\pgf at circ@drawlabel\fi
- \drawpoles
- \pgf at circ@ifkeyempty{bipole/voltage/label/name}\else\pgf at circ@drawvoltage\fi
- \pgf at circ@ifkeyempty{bipole/current/label/name}\else\pgf at circ@drawcurrent\fi
- % reset
- \pgfextra{
- \pgfcircresetpath
- }
- (\tikztotarget) \tikztonodes % e si continua
-}
-
-
-%% Path definitions
-
-\def\pgf at circ@resistor at path#1{\ifpgf at circuit@europeanresistor\pgf at circ@bipole at path{generic}{#1}\else\pgf at circ@bipole at path{resistor}{#1}\fi}
-\def\pgf at circ@vresistor at path#1{\ifpgf at circuit@europeanresistor\pgf at circ@bipole at path{tgeneric}{#1}\else\pgf at circ@bipole at path{vresistor}{#1}\fi}
-\def\pgf at circ@potentiometer at path#1{\ifpgf at circuit@europeanresistor\pgf at circ@bipole at path{genericpotentiometer}{#1}\else\pgf at circ@bipole at path{potentiometer}{#1}\fi}
-\def\pgf at circ@thermistor at path#1{\pgf at circ@bipole at path{thermistor}{#1}}
-\def\pgf at circ@thermistorptc at path#1{\pgf at circ@bipole at path{thermistorptc}{#1}}
-\def\pgf at circ@thermistorntc at path#1{\pgf at circ@bipole at path{thermistorntc}{#1}}
-\def\pgf at circ@varistor at path#1{\pgf at circ@bipole at path{varistor}{#1}}
-\def\pgf at circ@capacitor at path#1{\pgf at circ@bipole at path{capacitor}{#1}}
-\def\pgf at circ@ecapacitor at path#1{\pgf at circ@bipole at path{ecapacitor}{#1}}
-\def\pgf at circ@polarcapacitor at path#1{\pgf at circ@bipole at path{polarcapacitor}{#1}}
-\def\pgf at circ@vcapacitor at path#1{\pgf at circ@bipole at path{vcapacitor}{#1}}
-\def\pgf at circ@piezoelectric at path#1{\pgf at circ@bipole at path{piezoelectric}{#1}}
-\def\pgf at circ@battery at path#1{\pgf at circ@bipole at path{battery}{#1}}
-\def\pgf at circ@battery1 at path#1{\pgf at circ@bipole at path{battery1}{#1}}
-\def\pgf at circ@europeaninductor at path#1{\pgf at circ@bipole at path{fullgeneric}{#1}}
-\def\pgf at circ@americaninductor at path#1{\pgf at circ@bipole at path{americaninductor}{#1}}
-\def\pgf at circ@cuteinductor at path#1{\pgf at circ@bipole at path{cuteinductor}{#1}}
-\def\pgf at circ@inductor at path#1{%
- \pgfextra{
- \edef\pgf at circ@temp{\ctikzvalof{inductor}}%
- \def\pgf at temp{european}%
- }
- \ifx\pgf at temp\pgf at circ@temp%
- \pgf at circ@europeaninductor at path{#1}%
- \else%
- \pgfextra{ \def\pgf at temp{cute} }%
- \ifx\pgf at temp\pgf at circ@temp%
- \pgf at circ@cuteinductor at path{#1}%
- \else%
- \pgf at circ@americaninductor at path{#1}%
- \fi%
- \fi%
-}
-\def\pgf at circ@vinductor at path#1{
- \pgfextra{
- \edef\pgf at circ@temp{\ctikzvalof{inductor}}%
- \def\pgf at temp{european}%
- }
- \ifx\pgf at temp\pgf at circ@temp%
- \pgf at circ@veuropeaninductor at path{#1}%
- \else%
- \pgfextra{ \def\pgf at temp{cute} }%
- \ifx\pgf at temp\pgf at circ@temp%
- \pgf at circ@vcuteinductor at path{#1}%
- \else%
- \pgf at circ@vamericaninductor at path{#1}%
- \fi%
- \fi%
-}
-\def\pgf at circ@veuropeaninductor at path#1{\pgf at circ@bipole at path{tfullgeneric}{#1}}
-\def\pgf at circ@vamericaninductor at path#1{\pgf at circ@bipole at path{vamericaninductor}{#1}}
-\def\pgf at circ@vcuteinductor at path#1{\pgf at circ@bipole at path{vcuteinductor}{#1}}
-\def\pgf at circ@lamp at path#1{\pgf at circ@bipole at path{lamp}{#1}}
-\def\pgf at circ@esource at path#1{\pgf at circ@bipole at path{esource}{#1}}
-\def\pgf at circ@pvsource at path#1{\pgf at circ@bipole at path{pvsource}{#1}}
-\def\pgf at circ@vsource at path#1{\pgf at circ@bipole at path{vsource}{#1}}
-\def\pgf at circ@dcvsource at path#1{\pgf at circ@bipole at path{dcvsource}{#1}}
-\def\pgf at circ@vsourceam at path#1{\pgf at circ@bipole at path{vsourceAM}{#1}}
-\def\pgf at circ@vsourcesin at path#1{\pgf at circ@bipole at path{vsourcesin}{#1}}
-\def\pgf at circ@isource at path#1{\pgf at circ@bipole at path{isource}{#1}}
-\def\pgf at circ@dcisource at path#1{\pgf at circ@bipole at path{dcisource}{#1}}
-\def\pgf at circ@isourcesin at path#1{\pgf at circ@bipole at path{isourcesin}{#1}}
-\def\pgf at circ@vsourcesquare at path#1{\pgf at circ@bipole at path{vsourcesquare}{#1}}
-\def\pgf at circ@vsourcetri at path#1{\pgf at circ@bipole at path{vsourcetri}{#1}}
-\def\pgf at circ@isourceam at path#1{\pgf at circ@bipole at path{isourceAM}{#1}}
-\def\pgf at circ@cvsource at path#1{\pgf at circ@bipole at path{cvsource}{#1}}
-\def\pgf at circ@cvsourceam at path#1{\pgf at circ@bipole at path{cvsourceAM}{#1}}
-\def\pgf at circ@cvsourcesin at path#1{\pgf at circ@bipole at path{cvsourcesin}{#1}}
-\def\pgf at circ@cisource at path#1{\pgf at circ@bipole at path{cisource}{#1}}
-\def\pgf at circ@cisourceam at path#1{\pgf at circ@bipole at path{cisourceAM}{#1}}
-\def\pgf at circ@cisourcesin at path#1{\pgf at circ@bipole at path{cisourcesin}{#1}}
-\def\pgf at circ@fulldiode at path#1{\pgf at circ@bipole at path{fulldiode}{#1}}
-\def\pgf at circ@fullzdiode at path#1{\pgf at circ@bipole at path{fullzdiode}{#1}}
-\def\pgf at circ@fullsdiode at path#1{\pgf at circ@bipole at path{fullsdiode}{#1}}
-\def\pgf at circ@fulltdiode at path#1{\pgf at circ@bipole at path{fulltdiode}{#1}}
-\def\pgf at circ@fulllediode at path#1{\pgf at circ@bipole at path{fulllediode}{#1}}
-\def\pgf at circ@fullpdiode at path#1{\pgf at circ@bipole at path{fullpdiode}{#1}}
-\def\pgf at circ@fullvarcap at path#1{\pgf at circ@bipole at path{fullvarcap}{#1}}
-\def\pgf at circ@emptydiode at path#1{\pgf at circ@bipole at path{emptydiode}{#1}}
-\def\pgf at circ@emptyzdiode at path#1{\pgf at circ@bipole at path{emptyzdiode}{#1}}
-\def\pgf at circ@emptysdiode at path#1{\pgf at circ@bipole at path{emptysdiode}{#1}}
-\def\pgf at circ@emptytdiode at path#1{\pgf at circ@bipole at path{emptytdiode}{#1}}
-\def\pgf at circ@emptylediode at path#1{\pgf at circ@bipole at path{emptylediode}{#1}}
-\def\pgf at circ@emptypdiode at path#1{\pgf at circ@bipole at path{emptypdiode}{#1}}
-\def\pgf at circ@emptyvarcap at path#1{\pgf at circ@bipole at path{emptyvarcap}{#1}}
-\def\pgf at circ@short at path#1{\pgf at circ@bipole at path{short}{#1}}
-\def\pgf at circ@cspst at path#1{\pgf at circ@bipole at path{cspst}{#1}}
-\def\pgf at circ@spst at path#1{\pgf at circ@bipole at path{spst}{#1}}
-\def\pgf at circ@ospst at path#1{\pgf at circ@bipole at path{ospst}{#1}}
-\def\pgf at circ@pushbutton at path#1{\pgf at circ@bipole at path{pushbutton}{#1}}
-\def\pgf at circ@open at path#1{\pgf at circ@bipole at path{open}{#1}}
-\def\pgf at circ@generic at path#1{\pgf at circ@bipole at path{generic}{#1}}
-\def\pgf at circ@ageneric at path#1{\pgf at circ@bipole at path{ageneric}{#1}}
-\def\pgf at circ@tgeneric at path#1{\pgf at circ@bipole at path{tgeneric}{#1}}
-\def\pgf at circ@fullgeneric at path#1{\pgf at circ@bipole at path{fullgeneric}{#1}}
-\def\pgf at circ@tfullgeneric at path#1{\pgf at circ@bipole at path{tfullgeneric}{#1}}
-\def\pgf at circ@ammeter at path#1{\pgf at circ@bipole at path{ammeter}{#1}}
-\def\pgf at circ@ohmmeter at path#1{\pgf at circ@bipole at path{ohmmeter}{#1}}
-\def\pgf at circ@voltmeter at path#1{\pgf at circ@bipole at path{voltmeter}{#1}}
-\def\pgf at circ@empty at path#1{}
-\def\pgf at circ@photoresistor at path#1{\pgf at circ@bipole at path{photoresistor}{#1}}
-\def\pgf at circ@thyristor at path#1{\pgf at circ@bipole at path{thyristor}{#1}}
-\def\pgf at circ@toggleswitch at path#1{\pgf at circ@bipole at path{toggleswitch}{#1}}
-\def\pgf at circ@memristor at path#1{\pgf at circ@bipole at path{memristor}{#1}}
-\def\pgf at circ@triac at path#1{\pgf at circ@bipole at path{triac}{#1}}
-\def\pgf at circ@tline at path#1{\pgf at circ@bipole at path{tline}{#1}}
-\def\pgf at circ@squid at path#1{\pgf at circ@bipole at path{squid}{#1}}
-\def\pgf at circ@barrier at path#1{\pgf at circ@bipole at path{barrier}{#1}}
-\def\pgf at circ@thermocouple at path#1{\pgf at circ@bipole at path{thermocouple}{#1}}
-\def\pgf at circ@fuse at path#1{\pgf at circ@bipole at path{fuse}{#1}}
-\def\pgf at circ@afuse at path#1{\pgf at circ@bipole at path{afuse}{#1}}
-
-\def\pgf at circ@gfsurgearrester at path#1{\ifpgf at circuit@europeangfsurgearrester\pgf at circ@europeangfsurgearrester at path{#1}\else\pgf at circ@americangfsurgearrester at path{#1}\fi}
-\def\pgf at circ@europeangfsurgearrester at path#1{\pgf at circ@bipole at path{european gas filled surge arrester}{#1}}
-\def\pgf at circ@americangfsurgearrester at path#1{\pgf at circ@bipole at path{american gas filled surge arrester}{#1}}
-
-\def\pgf at circ@twoport at path#1{\pgf at circ@bipole at path{twoport}{#1}}
-\def\pgf at circ@vco at path#1{\pgf at circ@bipole at path{vco}{#1}}
-\def\pgf at circ@bandpass at path#1{\pgf at circ@bipole at path{bandpass}{#1}}
-\def\pgf at circ@highpass at path#1{\pgf at circ@bipole at path{highpass}{#1}}
-\def\pgf at circ@lowpass at path#1{\pgf at circ@bipole at path{lowpass}{#1}}
-\def\pgf at circ@adc at path#1{\pgf at circ@bipole at path{adc}{#1}}
-\def\pgf at circ@dac at path#1{\pgf at circ@bipole at path{dac}{#1}}
-\def\pgf at circ@dsp at path#1{\pgf at circ@bipole at path{dsp}{#1}}
-\def\pgf at circ@fft at path#1{\pgf at circ@bipole at path{fft}{#1}}
-\def\pgf at circ@amp at path#1{\pgf at circ@bipole at path{amp}{#1}}
-\def\pgf at circ@vamp at path#1{\pgf at circ@bipole at path{vamp}{#1}}
-\def\pgf at circ@piattenuator at path#1{\pgf at circ@bipole at path{piattenuator}{#1}}
-\def\pgf at circ@vpiattenuator at path#1{\pgf at circ@bipole at path{vpiattenuator}{#1}}
-\def\pgf at circ@tattenuator at path#1{\pgf at circ@bipole at path{tattenuator}{#1}}
-\def\pgf at circ@vtattenuator at path#1{\pgf at circ@bipole at path{vtattenuator}{#1}}
-\def\pgf at circ@phaseshifter at path#1{\pgf at circ@bipole at path{phaseshifter}{#1}}
-\def\pgf at circ@vphaseshifter at path#1{\pgf at circ@bipole at path{vphaseshifter}{#1}}
-\def\pgf at circ@detector at path#1{\pgf at circ@bipole at path{detector}{#1}}
-
-%% Styles
-
-%% Aggiungere per thyristor e tripoli semplici
-
-\def\comnpatname{\ifpgf at circuit@compat *\else\fi}
-\def\compattikzset#1{\tikzset{\comnpatname#1}}
-
-%\def\ctikzsetbipole#1#2{%
-% \tikzset{#1/.style= {to path=#2, \circuitikzbasekey, l=##1}}%
-%}
-
-\compattikzset{resistor/.style= {\circuitikzbasekey, /tikz/to path=\pgf at circ@resistor at path, l=#1}}
-\compattikzset{american resistor/.style= {\circuitikzbasekey, /tikz/to path=\pgf at circ@bipole at path{resistor}{#1}, l=#1}}
-\compattikzset{european resistor/.style= {\circuitikzbasekey, /tikz/to path=\pgf at circ@bipole at path{generic}{#1}, l=#1}}
-\compattikzset{potentiometer/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@potentiometer at path, l=#1}}
-\compattikzset{varistor/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@varistor at path, l=#1}}
-\compattikzset{photoresistor/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@photoresistor at path, l=#1}}
-\compattikzset{thermistor/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@thermistor at path, l=#1}}
-\compattikzset{thermistor ptc/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@thermistorptc at path, l=#1}}
-\compattikzset{thermistor ntc/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@thermistorntc at path, l=#1}}
-\compattikzset{american potentiometer/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@bipole at path{potentiometer}{#1}, l=#1}}
-\compattikzset{european potentiometer/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@bipole at path{genericpotentiometer}{#1}, l=#1}}
-\compattikzset{variable resistor/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@vresistor at path, l=#1}}
-\compattikzset{variable american resistor/.style= {\circuitikzbasekey, /tikz/to path=\pgf at circ@bipole at path{vresistor}{#1}, l=#1}}
-\compattikzset{variable european resistor/.style= {\circuitikzbasekey, /tikz/to path=\pgf at circ@bipole at path{tgeneric}{#1}, l=#1}}
-\compattikzset{capacitor/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@capacitor at path, l=#1}}
-\compattikzset{elko/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@ecapacitor at path, l=#1}}
-\compattikzset{ecapacitor/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@ecapacitor at path, l=#1}}
-\compattikzset{polar capacitor/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@polarcapacitor at path, l=#1}}
-\compattikzset{variable capacitor/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@vcapacitor at path, l=#1}}
-\compattikzset{piezoelectric/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@piezoelectric at path, l=#1}}
-\compattikzset{battery/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@battery at path, \circuitikzbasekey/bipole/is voltage=true, v=#1}}
-\compattikzset{battery1/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@battery1 at path, \circuitikzbasekey/bipole/is voltage=true, v=#1}}
-\compattikzset{inductor/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@inductor at path, l=#1}}
-\compattikzset{gf surge arrester/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@gfsurgearrester at path, l=#1}}
-\compattikzset{american gas filled surge arrester/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@americangfsurgearrester at path, l=#1}}
-\compattikzset{european gas filled surge arrester/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@europeangfsurgearrester at path, l=#1}}
-\compattikzset{gas filled surge arrester/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@gfsurgearrester at path, l=#1}}
-\compattikzset{american inductor/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@americaninductor at path, l=#1}}
-\compattikzset{cute inductor/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@cuteinductor at path, l=#1}}
-\compattikzset{european inductor/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@europeaninductor at path, l=#1}}
-\compattikzset{variable inductor/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@vinductor at path, l=#1}}
-\compattikzset{variable european inductor/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@veuropeaninductor at path, l=#1}}
-\compattikzset{variable american inductor/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@vamericaninductor at path, l=#1}}
-\compattikzset{variable cute inductor/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@vcuteinductor at path, l=#1}}
-\compattikzset{tline/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@tline at path, l=#1}}
-\compattikzset{transmission line/.style = {tline = #1}}
-\compattikzset{TL/.style = {tline = #1}}
-\compattikzset{european voltage source/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@vsource at path, \circuitikzbasekey/bipole/is voltage=true, v=#1}}
-\compattikzset{american voltage source/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@vsourceam at path, \circuitikzbasekey/bipole/is voltage=true, v=#1}}
-\compattikzset{european current source/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@isource at path, \circuitikzbasekey/bipole/is current=true, i=#1}}
-\compattikzset{american current source/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@isourceam at path, \circuitikzbasekey/bipole/is current=true, i=#1}}
-\compattikzset{european controlled voltage source/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@cvsource at path, \circuitikzbasekey/bipole/is voltage=true, v=#1}}
-\compattikzset{american controlled voltage source/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@cvsourceam at path, \circuitikzbasekey/bipole/is voltage=true, v=#1}}
-\compattikzset{european controlled current source/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@cisource at path, \circuitikzbasekey/bipole/is current=true, i=#1}}
-\compattikzset{american controlled current source/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@cisourceam at path, \circuitikzbasekey/bipole/is current=true, i=#1}}
-\compattikzset{sinusoidal voltage source/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@vsourcesin at path, \circuitikzbasekey/bipole/is voltage=true, v=#1 }}
-\compattikzset{square voltage source/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@vsourcesquare at path, \circuitikzbasekey/bipole/is voltage=true, v=#1 }}
-\compattikzset{triangle voltage source/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@vsourcetri at path, \circuitikzbasekey/bipole/is voltage=true, v=#1 }}
-\compattikzset{sinusoidal current source/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@isourcesin at path, \circuitikzbasekey/bipole/is current=true, i=#1}}
-\compattikzset{controlled sinusoidal voltage source/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@cvsourcesin at path, \circuitikzbasekey/bipole/is voltage=true, v=#1}}
-\compattikzset{controlled sinusoidal current source/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@cisourcesin at path, \circuitikzbasekey/bipole/is current=true, i=#1}}
-
-\compattikzset{voltage source/.style = {\comnpatname \ifpgf at circuit@europeanvoltage european \else american \fi voltage source, \circuitikzbasekey/bipole/is voltage=true, v=#1}}
-\compattikzset{current source/.style = {\comnpatname \ifpgf at circuit@europeancurrent european \else american \fi current source, \circuitikzbasekey/bipole/is current=true, i=#1}}
-\compattikzset{controlled voltage source/.style = {\comnpatname \ifpgf at circuit@europeanvoltage european \else american \fi controlled voltage source, \circuitikzbasekey/bipole/is voltage=true, v=#1}}
-\compattikzset{controlled current source/.style = {\comnpatname \ifpgf at circuit@europeancurrent european \else american \fi controlled current source, \circuitikzbasekey/bipole/is current=true, i=#1}}
-
-
-\compattikzset{generic/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@generic at path, l=#1}}
-\compattikzset{ageneric/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@ageneric at path, l=#1}}
-\compattikzset{tgeneric/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@tgeneric at path, l=#1}}
-\compattikzset{fullgeneric/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@fullgeneric at path, l=#1}}
-\compattikzset{tfullgeneric/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@tfullgeneric at path, l=#1}}
-\compattikzset{short/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@short at path}}
-\compattikzset{open/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@open at path}}
-
-\compattikzset{lamp/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@lamp at path}}
-
-\compattikzset{squid/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@squid at path}}
-\compattikzset{barrier/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@barrier at path}}
-\compattikzset{thermocouple/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@thermocouple at path}}
-\compattikzset{fuse/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@fuse at path}}
-\compattikzset{asymmetric fuse/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@afuse at path}}
-
-\compattikzset{twoport/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@twoport at path}}
-\compattikzset{vco/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@vco at path}}
-\compattikzset{bandpass/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@bandpass at path}}
-\compattikzset{highpass/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@highpass at path}}
-\compattikzset{lowpass/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@lowpass at path}}
-\compattikzset{adc/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@adc at path}}
-\compattikzset{dac/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@dac at path}}
-\compattikzset{dsp/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@dsp at path}}
-\compattikzset{fft/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@fft at path}}
-\compattikzset{amp/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@amp at path}}
-\compattikzset{vamp/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@vamp at path}}
-\compattikzset{piattenuator/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@piattenuator at path}}
-\compattikzset{vpiattenuator/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@vpiattenuator at path}}
-\compattikzset{tattenuator/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@tattenuator at path}}
-\compattikzset{vtattenuator/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@vtattenuator at path}}
-\compattikzset{phaseshifter/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@phaseshifter at path}}
-\compattikzset{vphaseshifter/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@vphaseshifter at path}}
-\compattikzset{detector/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@detector at path}}
-
-\compattikzset{full diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@fulldiode at path}}
-\compattikzset{full Schottky diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@fullsdiode at path}}
-\compattikzset{full Zener diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@fullzdiode at path}}
-\compattikzset{full tunnel diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@fulltdiode at path}}
-\compattikzset{full photodiode/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@fullpdiode at path}}
-\compattikzset{full led/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@fulllediode at path}}
-\compattikzset{full varcap/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@fullvarcap at path}}
-
-\compattikzset{empty diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@emptydiode at path}}
-\compattikzset{empty Schottky diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@emptysdiode at path}}
-\compattikzset{empty Zener diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@emptyzdiode at path}}
-\compattikzset{empty tunnel diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@emptytdiode at path}}
-\compattikzset{empty photodiode/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@emptypdiode at path}}
-\compattikzset{empty led/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@emptylediode at path}}
-\compattikzset{empty varcap/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@emptyvarcap at path}}
-
- \compattikzset{Schottky diode/.style = {\comnpatname \ifpgf at circuit@fulldiode full \else empty \fi Schottky diode}}
- \compattikzset{Zener diode/.style = {\comnpatname \ifpgf at circuit@fulldiode full \else empty \fi Zener diode}}
- \compattikzset{tunnel diode/.style = {\comnpatname \ifpgf at circuit@fulldiode full \else empty \fi tunnel diode}}
- \compattikzset{photodiode/.style = {\comnpatname \ifpgf at circuit@fulldiode full \else empty \fi photodiode}}
- \compattikzset{led/.style = {\comnpatname \ifpgf at circuit@fulldiode full \else empty \fi led}}
- \compattikzset{varcap/.style = {\comnpatname \ifpgf at circuit@fulldiode full \else empty \fi varcap}}
- \compattikzset{diode/.style = {\comnpatname \ifpgf at circuit@fulldiode full \else empty \fi diode}} %%%%%%%%%%%%@@@
-
-
-
-
-\compattikzset{thyristor/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@thyristor at path}}
-\compattikzset{memristor/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@memristor at path}}
-\compattikzset{triac/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@triac at path}}
-
-\compattikzset{closing switch/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@cspst at path, l=#1}}
-\compattikzset{opening switch/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@ospst at path, l=#1}}
-\compattikzset{switch/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@spst at path, l=#1}}
-\compattikzset{push button/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@pushbutton at path, l=#1}}
-\compattikzset{toggle switch/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@toggleswitch at path}}
-
-\compattikzset{ammeter/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@ammeter at path}}
-\compattikzset{voltmeter/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@voltmeter at path}}
-\compattikzset{ohmmeter/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@ohmmeter at path}}
-
-% short forms
-\compattikzset{esource/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@esource at path, \circuitikzbasekey/bipole/is voltage=true, v=#1}}
-\compattikzset{pvsource/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@pvsource at path, \circuitikzbasekey/bipole/is voltage=true, v=#1}}
-\compattikzset{dcvsource/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@dcvsource at path, \circuitikzbasekey/bipole/is voltage=true, v=#1}}
-\compattikzset{dcisource/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@dcisource at path, \circuitikzbasekey/bipole/is current=true, i=#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}}
-%\ifpgf at circuit@compat\else\compattikzset{R/.style= {resistor = #1}}\fi
-\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 at 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 at temp{_>} \pgf at temp{_<} \pgf at temp{^>} \pgf at temp{^<}
-\pgf at temp{>} \pgf at temp{<} \pgf at temp{^} \pgf at temp{_}
-\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 at 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 at temp{_>} \pgf at temp{_<} \pgf at temp{^>} \pgf at temp{^<}
-\pgf at temp{>_} \pgf at temp{<_} \pgf at temp{>^} \pgf at temp{<^}
-\pgf at temp{>} \pgf at temp{<} \pgf at temp{^} \pgf at temp{_}
-\compattikzset{Do/.style = {\comnpatname empty diode}}
-\compattikzset{tDo/.style = {\comnpatname empty tunnel diode}}
-\compattikzset{zDo/.style = {\comnpatname empty Zener 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{D*/.style = {\comnpatname full diode}}
-\compattikzset{tD*/.style = {\comnpatname full tunnel diode}}
-\compattikzset{zD*/.style = {\comnpatname full Zener 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{D/.style = {\comnpatname diode}}
-\compattikzset{tD/.style = {\comnpatname tunnel diode}}
-\compattikzset{zD/.style = {\comnpatname Zener diode}}
-\compattikzset{sD/.style = {\comnpatname Schottky diode}}
-\compattikzset{pD/.style = {\comnpatname photodiode}}
-\compattikzset{leD/.style = {\comnpatname led}}
-\compattikzset{VC/.style = {\comnpatname varcap}}
-
-\compattikzset{Tr/.style = {\comnpatname triac}}
-\compattikzset{Mr/.style = {\comnpatname memristor}}
-\compattikzset{Ty/.style = {\comnpatname thyristor}}
-
-\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}}
-
-\def\inheritlogicport#1#2{
- \pgfdeclareshape{#2 port}{
- \inheritsavedanchors[from=#1 #2 port]
- \inheritbackgroundpath[from=#1 #2 port]
- \inheritanchor[from=#1 #2 port]{in}
- \inheritanchor[from=#1 #2 port]{in 1}
- \inheritanchor[from=#1 #2 port]{in 2}
- \inheritanchor[from=#1 #2 port]{out}
- \inheritanchor[from=#1 #2 port]{center}
- \inheritanchor[from=#1 #2 port]{left}
- }
-}
-
-\ifpgf at circuit@europeanlogicport
- \inheritlogicport{european}{and}
- \inheritlogicport{european}{or}
- \inheritlogicport{european}{xor}
- \inheritlogicport{european}{not}
- \inheritlogicport{european}{nand}
- \inheritlogicport{european}{nor}
- \inheritlogicport{european}{xnor}
-\else
- \inheritlogicport{american}{and}
- \inheritlogicport{american}{or}
- \inheritlogicport{american}{xor}
- \inheritlogicport{american}{not}
- \inheritlogicport{american}{nand}
- \inheritlogicport{american}{nor}
- \inheritlogicport{american}{xnor}
-\fi
-
-% Transistor like bipoles
-
-\def\pgf at circ@trans at path#1#2{
- \pgfextra{
- \edef\pgf at temp{\pgfkeysvalueof{/tikz/circuitikz/bipole/name}}
- \def\pgf at circ@temp{#2}
- \ifx\pgf at temp\pgf at circ@temp % if it has not a name
- \pgfmathrandominteger{\pgf at circ@rand}{1000}{9999}
- \ctikzset{bipole/name = trans\pgf at circ@rand} % create it
- \fi
- }
- \ifpgf at circuit@bipole at reversed
- (\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{
- \pgf at circ@slope{\pgfpointanchor{\ctikzvalof{bipole/name}start}{center}}
- {\pgfpointanchor{\ctikzvalof{bipole/name}end}{center}}
- \pgfmathadd{\pgfmathresult}{-90}
- \edef\pgf at circ@direction{\pgfmathresult}
- }
- ($(\tikztostart) ! .5 ! (\tikztotarget)$)
- node[#1, /tikz/rotate=\pgf at circ@direction, xscale=\ctikzvalof{mirror value}]
- (\ctikzvalof{bipole/name}) {} node {\ctikzvalof{bipole/label/name}}
- \@ifundefined{pgf at anchor@#1 at pathstart}{%if special path-anchors are defined, use them!
- (\ctikzvalof{bipole/name}start.center) --(\ctikzvalof{bipole/name}.left)
- (\ctikzvalof{bipole/name}.right) -- (\ctikzvalof{bipole/name}end.center)
- }{
- (\ctikzvalof{bipole/name}start.center) --(\ctikzvalof{bipole/name}.pathstart)
- (\ctikzvalof{bipole/name}.pathend) -- (\ctikzvalof{bipole/name}end.center)
- }
- \pgfextra{
- \pgfcircresetpath
- }
- (\tikztotarget) \tikztonodes % e si continua
-}
-
-
-\def\pgf at circ@definetranspath#1{
- \compattikzset{T#1/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@trans at path{#1}{}, l=##1}}
-}
-
-\pgf at circ@definetranspath{elmech}
-\pgf at circ@definetranspath{nmos}
-\pgf at circ@definetranspath{pmos}
-\pgf at circ@definetranspath{npn}
-\pgf at circ@definetranspath{pnp}
-\pgf at circ@definetranspath{nfet}
-\pgf at circ@definetranspath{nigfete}
-\pgf at circ@definetranspath{nigfetd}
-\pgf at circ@definetranspath{nigfetebulk}
-\pgf at circ@definetranspath{pfet}
-\pgf at circ@definetranspath{pigfete}
-\pgf at circ@definetranspath{pigfetd}
-\pgf at circ@definetranspath{pigfetebulk}
-\pgf at circ@definetranspath{njfet}
-\pgf at circ@definetranspath{pjfet}
-\pgf at circ@definetranspath{pigbt}
-\pgf at circ@definetranspath{nigbt}
Modified: trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex 2016-06-06 22:57:41 UTC (rev 41298)
+++ trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex 2016-06-06 23:01:18 UTC (rev 41299)
@@ -177,64 +177,65 @@
%% Resistor
\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/resistor/height}}{resistor}{\ctikzvalof{bipoles/resistor/height}}{\ctikzvalof{bipoles/resistor/width}}{
- \pgf at circ@res at step = \ctikzvalof{bipoles/resistor/width}\pgf at circ@Rlen
- \divide \pgf at circ@res at step by 12
-
- \pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
- \pgf at circ@res at other = \pgf at circ@res at left
- \advance\pgf at circ@res at other by \pgf at circ@res at step
-
- \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at up}}
- \advance\pgf at circ@res at other by 2\pgf at circ@res at step
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at down}}
- \advance\pgf at circ@res at other by 2\pgf at circ@res at step
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at up}}
- \advance\pgf at circ@res at other by 2\pgf at circ@res at step
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at down}}
- \advance\pgf at circ@res at other by 2\pgf at circ@res at step
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at up}}
- \advance\pgf at circ@res at other by 2\pgf at circ@res at step
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at down}}
- \advance\pgf at circ@res at other by \pgf at circ@res at step
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at zero}}
- \pgfusepath{draw}
+ \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+ \pgftransformationadjustments
+ \pgfmathsetlength{\pgf at circ@res at step}{\ctikzvalof{bipoles/resistor/width}\pgf at circ@Rlen+\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}
+ \divide \pgf at circ@res at step by 12
+
+ \pgfpathmoveto{\pgfpoint{\pgf at circ@res at left-\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}{\pgf at circ@res at zero}}
+ \pgf at circ@res at other = \pgf at circ@res at left
+ \advance\pgf at circ@res at other by \pgf at circ@res at step
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at up}}
+ \advance\pgf at circ@res at other by 2\pgf at circ@res at step
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at down}}
+ \advance\pgf at circ@res at other by 2\pgf at circ@res at step
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at up}}
+ \advance\pgf at circ@res at other by 2\pgf at circ@res at step
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at down}}
+ \advance\pgf at circ@res at other by 2\pgf at circ@res at step
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at up}}
+ \advance\pgf at circ@res at other by 2\pgf at circ@res at step
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at down}}
+ \advance\pgf at circ@res at other by \pgf at circ@res at step
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at zero}}
+ \pgfsetbeveljoin
+ \pgfusepath{draw}
}
%% Variable resistor
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vresistor/height}}{vresistor}{\ctikzvalof{bipoles/vresistor/height}}{\ctikzvalof{bipoles/vresistor/width}}{
- \pgf at circ@res at step = \ctikzvalof{bipoles/vresistor/width}\pgf at circ@Rlen
- \divide \pgf at circ@res at step by 12
- \def\myfrac{.5}
-
- \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-
- \pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
- \pgf at circ@res at other = \pgf at circ@res at left
- \advance\pgf at circ@res at other by \pgf at circ@res at step
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\myfrac\pgf at circ@res at up}}
- \advance\pgf at circ@res at other by 2\pgf at circ@res at step
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\myfrac\pgf at circ@res at down}}
- \advance\pgf at circ@res at other by 2\pgf at circ@res at step
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\myfrac\pgf at circ@res at up}}
- \advance\pgf at circ@res at other by 2\pgf at circ@res at step
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\myfrac\pgf at circ@res at down}}
- \advance\pgf at circ@res at other by 2\pgf at circ@res at step
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\myfrac\pgf at circ@res at up}}
- \advance\pgf at circ@res at other by 2\pgf at circ@res at step
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\myfrac\pgf at circ@res at down}}
- \advance\pgf at circ@res at other by \pgf at circ@res at step
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at zero}}
- \pgfusepath{draw}
-
- \pgfscope
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vresistor/height}}{vresistor}{\ctikzvalof{bipoles/vresistor/height}}{\ctikzvalof{bipoles/vresistor/width}}{ \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+ \pgftransformationadjustments
+ \pgfmathsetlength{\pgf at circ@res at step}{\ctikzvalof{bipoles/resistor/width}\pgf at circ@Rlen+\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}
+ \divide \pgf at circ@res at step by 12
+
+ \pgfpathmoveto{\pgfpoint{\pgf at circ@res at left-\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}{\pgf at circ@res at zero}}
+
+ \pgf at circ@res at other = \pgf at circ@res at left
+ \advance\pgf at circ@res at other by \pgf at circ@res at step
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{.5\pgf at circ@res at up}}
+ \advance\pgf at circ@res at other by 2\pgf at circ@res at step
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{.5\pgf at circ@res at down}}
+ \advance\pgf at circ@res at other by 2\pgf at circ@res at step
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{.5\pgf at circ@res at up}}
+ \advance\pgf at circ@res at other by 2\pgf at circ@res at step
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{.5\pgf at circ@res at down}}
+ \advance\pgf at circ@res at other by 2\pgf at circ@res at step
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{.5\pgf at circ@res at up}}
+ \advance\pgf at circ@res at other by 2\pgf at circ@res at step
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{.5\pgf at circ@res at down}}
+ \advance\pgf at circ@res at other by \pgf at circ@res at step
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at zero}}
+ \pgfsetbeveljoin
+ \pgfusepath{draw}
+
+ \pgfscope
\pgfsetarrowsend{latex'}
\pgfpathmoveto{\pgfpoint{.4\pgf at circ@res at other}{\pgf at circ@res at up}}
\pgfpathlineto{\pgfpoint{-.4\pgf at circ@res at other}{\pgf at circ@res at down}}
\pgfusepath{draw}
- \endpgfscope
+ \endpgfscope
}
@@ -355,53 +356,111 @@
%% cute inductor
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/cuteinductor/height}}{cuteinductor}{\ctikzvalof{bipoles/cuteinductor/height}}{\ctikzvalof{bipoles/cuteinductor/width}}{
- \pgf at circ@res at step=\ctikzvalof{bipoles/cuteinductor/width}\pgf at circ@Rlen
- \divide \pgf at circ@res at step by \ctikzvalof{bipoles/cuteinductor/coils} %divide by number of coils
- \divide \pgf at circ@res at step by 2 %div by two for arcs
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/cuteinductor/lower coil height}}{cuteinductor}{\ctikzvalof{bipoles/cuteinductor/height}}{\ctikzvalof{bipoles/cuteinductor/width}}{
+ \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+ \pgftransformationadjustments
- \def\pgf at circ@coilsmall at width{\ctikzvalof{bipoles/cuteinductor/coil aspect}\pgf at circ@res at step}
-
- \advance \pgf at circ@res at step by \pgf at circ@coilsmall at width %adjust for overlapping lower arc
+ \pgfmathsetlength{\pgf at circ@res at other}%width of small coil
+ {0.5*\ctikzvalof{bipoles/cuteinductor/coil aspect}*\ctikzvalof{bipoles/cuteinductor/width}*\pgf at circ@Rlen/(\ctikzvalof{bipoles/cuteinductor/coils}-1)}
- \def\pgf at circ@coilwide at width{\pgf at circ@res at step}
-
- \pgf at circ@res at other = \ctikzvalof{bipoles/cuteinductor/coil height}\pgf at circ@Rlen
- \pgf at circ@res at temp =\ctikzvalof{bipoles/cuteinductor/lower coil height}\pgf at circ@Rlen
- \pgfpathmoveto{\pgfpoint{\pgf at circ@res at left+0.5\pgfstartlinewidth}{-0.5\pgfstartlinewidth}}
+ \pgfmathsetlength{\pgf at circ@res at step}
+ {(\ctikzvalof{bipoles/cuteinductor/width}*\pgf at circ@Rlen+\pgfhorizontaltransformationadjustment\pgflinewidth+(\ctikzvalof{bipoles/cuteinductor/coils}-1)*2*\pgf at circ@res at other)/\ctikzvalof{bipoles/cuteinductor/coils}/2}
+
+ \pgfpathmoveto{\pgfpoint{\pgf at circ@res at 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 at circ@coilwide at width and \pgf at circ@res at other}
- \pgfpatharc{0}{-180}{\pgf at circ@coilsmall at width and \pgf at circ@res at temp}
+ \pgfpatharc{180}{0}{\pgf at circ@res at step and \pgf at circ@res at up}
+ \pgfpatharc{0}{-180}{\pgf at circ@res at other and -\pgf at circ@res at down}
}
- \pgfpatharc{180}{0}{\pgf at circ@coilwide at width and \pgf at circ@res at other}
+ \pgfpatharc{180}{0}{\pgf at circ@res at step and \pgf at circ@res at up}
+ \pgfsetbuttcap
+ \pgfsetbeveljoin
+ \pgfusepath{stroke}
+}
+
+%% 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}
- \pgfusepath{stroke}
+ \pgftransformationadjustments
+
+ \pgfmathsetlength{\pgf at circ@res at other}%width of small coil
+ {0.5*\ctikzvalof{bipoles/vcuteinductor/coil aspect}*\ctikzvalof{bipoles/vcuteinductor/width}*\pgf at circ@Rlen/(\ctikzvalof{bipoles/vcuteinductor/coils}-1)}
+
+
+ \pgfmathsetlength{\pgf at circ@res at step}
+ {(\ctikzvalof{bipoles/vcuteinductor/width}*\pgf at circ@Rlen+\pgfhorizontaltransformationadjustment\pgflinewidth+(\ctikzvalof{bipoles/vcuteinductor/coils}-1)*2*\pgf at circ@res at other)/\ctikzvalof{bipoles/vcuteinductor/coils}/2}
+
+ \pgfscope
+ \pgfsetarrowsend{latex'}
+ \pgfpathmoveto{\pgfpoint{.4\pgf at circ@res at left}{\pgf at circ@res at down}}
+ \pgfpathlineto{\pgfpoint{.4\pgf at circ@res at right}{\pgf at circ@res at up}}
+ \pgfusepath{draw}
+ \endpgfscope
+
+ \pgfpathmoveto{\pgfpoint{\pgf at circ@res at 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 at circ@res at step and .5\pgf at circ@res at up}
+ \pgfpatharc{0}{-180}{\pgf at circ@res at other and -.5\pgf at circ@res at down}
+ }
+ \pgfpatharc{180}{0}{\pgf at circ@res at step and .5\pgf at circ@res at up}
+ \pgfsetbuttcap
+ \pgfsetbeveljoin
+ \pgfusepath{stroke}
}
-
%% american inductor
\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/americaninductor/height 2}}{americaninductor}{\ctikzvalof{bipoles/americaninductor/height}}{\ctikzvalof{bipoles/americaninductor/width}}{
\pgf at circ@res at step=\ctikzvalof{bipoles/americaninductor/width}\pgf at circ@Rlen
+ \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+ \pgftransformationadjustments
+ \advance \pgf at circ@res at step by \pgfhorizontaltransformationadjustment\pgflinewidth
\divide \pgf at circ@res at step by \ctikzvalof{bipoles/americaninductor/coils}
\divide \pgf at circ@res at step by 2
\pgf at circ@res at other = \ctikzvalof{bipoles/americaninductor/coil height}\pgf at circ@Rlen
- \pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{-0.5\pgfstartlinewidth}}
+ \pgfpathmoveto{\pgfpoint{\pgf at circ@res at 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
\pgfpatharc{180}{0}{\pgf at circ@res at step and \pgf at circ@res at other}
\pgfpatharc{180}{0}{\pgf at circ@res at step and \pgf at circ@res at other}
\pgfpatharc{180}{0}{\pgf at circ@res at step and \pgf at circ@res at other}
\pgfpatharc{180}{0}{\pgf at circ@res at step and \pgf at circ@res at other}
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{-0.5\pgfstartlinewidth}}
- \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
- \pgfusepath{stroke}
+ \pgfsetbuttcap
+ \pgfsetbeveljoin
+ \pgfusepath{stroke}
}
+%% variable american inductor
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vamericaninductor/height 2}}{vamericaninductor}{\ctikzvalof{bipoles/vamericaninductor/height}}{\ctikzvalof{bipoles/vamericaninductor/width}}{
+ \pgf at circ@res at step=\ctikzvalof{bipoles/vamericaninductor/width}\pgf at circ@Rlen
+ \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+ \pgftransformationadjustments
+ \advance \pgf at circ@res at step by \pgfhorizontaltransformationadjustment\pgflinewidth
+ \divide \pgf at circ@res at step by \ctikzvalof{bipoles/vamericaninductor/coils}
+ \divide \pgf at circ@res at step by 2
+ \pgf at circ@res at other = \ctikzvalof{bipoles/vamericaninductor/coil height}\pgf at circ@Rlen
+ \pgfpathmoveto{\pgfpoint{\pgf at circ@res at 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
+ \pgfpatharc{180}{0}{\pgf at circ@res at step and \pgf at circ@res at other}
+ \pgfpatharc{180}{0}{\pgf at circ@res at step and \pgf at circ@res at other}
+ \pgfpatharc{180}{0}{\pgf at circ@res at step and \pgf at circ@res at other}
+ \pgfpatharc{180}{0}{\pgf at circ@res at step and \pgf at circ@res at other}
+ \pgfsetbuttcap
+ \pgfsetbeveljoin
+ \pgfusepath{stroke}
+ \pgfscope
+ \pgfsetarrowsend{latex'}
+ \pgfpathmoveto{\pgfpoint{.4\pgf at circ@res at left}{\pgf at circ@res at down}}
+ \pgfpathlineto{\pgfpoint{-.4\pgf at circ@res at left}{\pgf at circ@res at up}}
+ \pgfusepath{draw}
+ \endpgfscope
+}
+
+
%% Independent voltage source
\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vsource/height}}{vsource}{\ctikzvalof{bipoles/vsource/height}}{\ctikzvalof{bipoles/vsource/width}}{
@@ -460,7 +519,7 @@
\endpgfscope
}
-% Triangle Voltage source – contributed by Ralf Farkas
+% 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}
@@ -499,7 +558,7 @@
\endpgfscope
}
-% Triangle Voltage source – contributed by Ralf Farkas
+% 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}
@@ -624,7 +683,17 @@
\pgfusepath{draw}
}
+%% 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 at circ@res at left}{0}}
+ {\ctikzvalof{bipoles/oosource/circlesize}\pgf at circ@res at left}
+ \pgfpathcircle{\pgfpoint{\ctikzvalof{bipoles/oosource/circleoffset}\pgf at circ@res at right}{0}}
+ {\ctikzvalof{bipoles/oosource/circlesize}\pgf at circ@res at right}
+ \pgfusepath{draw}
+}
%% Independent current source - American
@@ -845,13 +914,32 @@
\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{0pt}}
\pgfusepath{draw,fill}
\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{\pgf at circ@res at down}}
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{\pgf at circ@res at down}}
\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{\pgf at circ@res at up}}
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at right-1.2\pgf at circ@res at left}{\pgf at circ@res at up}}
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at right-.6\pgf at circ@res at left}{\pgf at circ@res at 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 at circ@res at left}
+ \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{0pt}}
+ \pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at up}}
+ \pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at down}}
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{0pt}}
+ \pgfusepath{draw,fill}
+ \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-1.8\pgf at circ@res at left}{\pgf at circ@res at down-0.5\pgf at circ@res at up}}
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{\pgf at circ@res at down}}
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{\pgf at circ@res at up}}
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at right-0.2\pgf at circ@res at left}{\pgf at circ@res at up-0.5\pgf at circ@res at down}}
+ \pgfusepath{draw}
+ \endpgfscope
+}
+
%% Black Schottky diode
\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{fullsdiode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
@@ -865,13 +953,13 @@
\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{0pt}}
\pgfusepath{draw,fill}
- \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-.8\pgf at circ@res at left}{.8\pgf at circ@res at down}}
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at right-.8\pgf at circ@res at left}{\pgf at circ@res at down}}
+ \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-.6\pgf at circ@res at left}{.6\pgf at circ@res at down}}
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at right-.6\pgf at circ@res at left}{\pgf at circ@res at down}}
\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{\pgf at circ@res at down}}
\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{\pgf at circ@res at down}}
\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{\pgf at circ@res at up}}
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at right-1.2\pgf at circ@res at left}{\pgf at circ@res at up}}
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at right-1.2\pgf at circ@res at left}{.8\pgf at circ@res at up}}
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at right-1.4\pgf at circ@res at left}{\pgf at circ@res at up}}
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at right-1.4\pgf at circ@res at left}{.6\pgf at circ@res at up}}
\pgfusepath{draw}
\endpgfscope
@@ -890,10 +978,10 @@
\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{0pt}}
\pgfusepath{draw,fill}
- \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-.8\pgf at circ@res at left}{\pgf at circ@res at down}}
+ \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-.6\pgf at circ@res at left}{\pgf at circ@res at down}}
\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{\pgf at circ@res at down}}
\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{\pgf at circ@res at up}}
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at right-.8\pgf at circ@res at left}{\pgf at circ@res at up}}
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at right-.6\pgf at circ@res at left}{\pgf at circ@res at up}}
\pgfusepath{draw}
\endpgfscope
}
@@ -1009,13 +1097,31 @@
\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{0pt}}
\pgfusepath{draw}
\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{\pgf at circ@res at down}}
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{\pgf at circ@res at down}}
\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{\pgf at circ@res at up}}
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at right-1.2\pgf at circ@res at left}{\pgf at circ@res at up}}
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at right-0.6\pgf at circ@res at left}{\pgf at circ@res at 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
+ \pgftransformxshift{\pgf at circ@res at left}
+ \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{0pt}}
+ \pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at up}}
+ \pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at down}}
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{0pt}}
+ \pgfusepath{draw}
+ \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-1.8\pgf at circ@res at left}{\pgf at circ@res at down-0.5\pgf at circ@res at up}}
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{\pgf at circ@res at down}}
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{\pgf at circ@res at up}}
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at right-0.2\pgf at circ@res at left}{\pgf at circ@res at up-0.5\pgf at circ@res at down}}
+ \pgfusepath{draw}
+ \endpgfscope
+}
%% Empty Schottky diode
\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{emptysdiode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
@@ -1029,13 +1135,13 @@
\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{0pt}}
\pgfusepath{draw}
- \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-.8\pgf at circ@res at left}{.8\pgf at circ@res at down}}
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at right-.8\pgf at circ@res at left}{\pgf at circ@res at down}}
+ \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-.6\pgf at circ@res at left}{.6\pgf at circ@res at down}}
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at right-.6\pgf at circ@res at left}{\pgf at circ@res at down}}
\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{\pgf at circ@res at down}}
\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{\pgf at circ@res at down}}
\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{\pgf at circ@res at up}}
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at right-1.2\pgf at circ@res at left}{\pgf at circ@res at up}}
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at right-1.2\pgf at circ@res at left}{.8\pgf at circ@res at up}}
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at right-1.4\pgf at circ@res at left}{\pgf at circ@res at up}}
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at right-1.4\pgf at circ@res at left}{.6\pgf at circ@res at up}}
\pgfusepath{draw}
\endpgfscope
@@ -1054,10 +1160,10 @@
\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{0pt}}
\pgfusepath{draw}
- \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-.8\pgf at circ@res at left}{\pgf at circ@res at down}}
+ \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-.6\pgf at circ@res at left}{\pgf at circ@res at down}}
\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{\pgf at circ@res at down}}
\pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{\pgf at circ@res at up}}
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at right-.8\pgf at circ@res at left}{\pgf at circ@res at up}}
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at right-.6\pgf at circ@res at left}{\pgf at circ@res at up}}
\pgfusepath{draw}
\endpgfscope
}
@@ -1118,7 +1224,17 @@
%% Empty varcap
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/varcap/height}}{emptyvarcap}{\ctikzvalof{bipoles/varcap/height}}{\ctikzvalof{bipoles/varcap/width}}{
+\pgfcircdeclarebipole{
+ \anchor{strokepathstart}{
+ \northeast
+ \pgf at y=0cm
+ \pgf at x=.8\pgf at x
+ }
+ \anchor{strokepathend}{
+ \northeast
+ \pgf at y=0cm
+ }
+ }{\ctikzvalof{bipoles/varcap/height}}{emptyvarcap}{\ctikzvalof{bipoles/varcap/height}}{\ctikzvalof{bipoles/varcap/width}}{
\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
\pgfscope
@@ -1212,12 +1328,8 @@
\pgfnode{ocirc}{center}{}{}{\pgfusepath{draw}}
}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-%% Ammeter
-
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/ammeter/height}}{ammeter}{\ctikzvalof{bipoles/ammeter/height}}{\ctikzvalof{bipoles/ammeter/width}}{
+%METERINGSHAPE
+\long\def\drawmeteringcircle{
\def\pgf at circ@temp{right}
\ifx\tikz at res@label at pos\pgf at circ@temp
\pgf at circ@res at step=-1.2\pgf at circ@res at up
@@ -1229,118 +1341,39 @@
\pgf at circ@res at step=1.2\pgf at circ@res at up
\fi
\fi
-
+ %draw connections to circle
\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
- \pgfpointorigin \pgf at circ@res at other = \pgf at x \advance \pgf at circ@res at other by -\pgf at circ@res at up
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at zero}}
- \pgfusepath{draw}
-
- \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-
- \pgfscope
- \pgfpathcircle{\pgfpointorigin}{.9\pgf at circ@res at up}
- \pgfusepath{draw}
- \endpgfscope
-
- \pgfsetlinewidth{\pgfstartlinewidth}
-
- \pgfsetarrowsend{latex}
- \pgfpathmoveto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at down}}
- \pgfpathlineto{\pgfpoint{-\pgf at circ@res at other}{\pgf at circ@res at up}}
- \pgfusepath{draw}
- \pgfsetarrowsend{}
-
-
- \pgfpathmoveto{\pgfpoint{-\pgf at circ@res at other}{\pgf at circ@res at zero}}
+ \pgfpathlineto{\pgfpoint{.9\pgf at circ@res at left}{\pgf at circ@res at zero}}
+ \pgfpathmoveto{\pgfpoint{.9\pgf at circ@res at right}{\pgf at circ@res at zero}}
\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at zero}}
\pgfusepath{draw}
-
+ %draw circle
+ \pgfscope
+ \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+ \pgfpathcircle{\pgfpointorigin}{.9\pgf at circ@res at up}
+ \pgfusepath{draw}
+ \endpgfscope
+ %draw arrow
+ \pgfscope
+ \pgfsetarrowsend{latex}
+ \pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at down}}
+ \pgfpathlineto{\pgfpoint{-\pgf at circ@res at left}{\pgf at circ@res at 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 – contributed by Ralf Farkas
-
+%OHMMETER
\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/ohmmeter/height}}{ohmmeter}{\ctikzvalof{bipoles/ohmmeter/height}}{\ctikzvalof{bipoles/ohmmeter/width}}{
- \def\pgf at circ@temp{right}
- \ifx\tikz at res@label at pos\pgf at circ@temp
- \pgf at circ@res at step=-1.2\pgf at circ@res at up
- \else
- \def\pgf at circ@temp{below}
- \ifx\tikz at res@label at pos\pgf at circ@temp
- \pgf at circ@res at step=-1.2\pgf at circ@res at up
- \else
- \pgf at circ@res at step=1.2\pgf at circ@res at up
- \fi
- \fi
-
- \pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
- \pgfpointorigin \pgf at circ@res at other = \pgf at x \advance \pgf at circ@res at other by -\pgf at circ@res at up
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at zero}}
- \pgfusepath{draw}
-
- \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-
- \pgfscope
- \pgfpathcircle{\pgfpointorigin}{.9\pgf at circ@res at up}
- \pgfusepath{draw}
- \endpgfscope
-
- \pgfsetlinewidth{\pgfstartlinewidth}
-
- \pgfsetarrowsend{latex}
- \pgfpathmoveto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at down}}
- \pgfpathlineto{\pgfpoint{-\pgf at circ@res at other}{\pgf at circ@res at up}}
- \pgfusepath{draw}
- \pgfsetarrowsend{}
-
-
- \pgfpathmoveto{\pgfpoint{-\pgf at circ@res at other}{\pgf at circ@res at zero}}
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at zero}}
- \pgfusepath{draw}
-
+ \drawmeteringcircle
\pgfnode{circle}{center}{\boldmath$\Omega$}{}{}
}
-
-%% Voltmeter
-
+%VOLTMETER
\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/voltmeter/height}}{voltmeter}{\ctikzvalof{bipoles/voltmeter/height}}{\ctikzvalof{bipoles/voltmeter/width}}{
- \def\pgf at circ@temp{right}
- \ifx\tikz at res@label at pos\pgf at circ@temp
- \pgf at circ@res at step=-1.2\pgf at circ@res at up
- \else
- \def\pgf at circ@temp{below}
- \ifx\tikz at res@label at pos\pgf at circ@temp
- \pgf at circ@res at step=-1.2\pgf at circ@res at up
- \else
- \pgf at circ@res at step=1.2\pgf at circ@res at up
- \fi
- \fi
-
- \pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
- \pgfpointorigin \pgf at circ@res at other = \pgf at x \advance \pgf at circ@res at other by -\pgf at circ@res at up
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at zero}}
- \pgfusepath{draw}
-
- \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-
- \pgfscope
- \pgfpathcircle{\pgfpointorigin}{.9\pgf at circ@res at up}
- \pgfusepath{draw}
- \endpgfscope
-
- \pgfsetlinewidth{\pgfstartlinewidth}
-
- \pgfsetarrowsend{latex}
- \pgfpathmoveto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at down}}
- \pgfpathlineto{\pgfpoint{-\pgf at circ@res at other}{\pgf at circ@res at up}}
- \pgfusepath{draw}
- \pgfsetarrowsend{}
-
-
- \pgfpathmoveto{\pgfpoint{-\pgf at circ@res at other}{\pgf at circ@res at zero}}
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at zero}}
- \pgfusepath{draw}
-
+ \drawmeteringcircle
\pgfnode{circle}{center}{\textbf{V}}{}{}
}
@@ -1611,69 +1644,11 @@
}
-%% variable cute inductor
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vcuteinductor/height}}{vcuteinductor}{\ctikzvalof{bipoles/vcuteinductor/height}}{\ctikzvalof{bipoles/vcuteinductor/width}}{
- \pgf at circ@res at step=\ctikzvalof{bipoles/vcuteinductor/width}\pgf at circ@Rlen
- \divide \pgf at circ@res at step by \ctikzvalof{bipoles/vcuteinductor/coils} %divide by number of coils
- \divide \pgf at circ@res at step by 2 %div by two for arcs
- \def\pgf at circ@coilsmall at width{\ctikzvalof{bipoles/vcuteinductor/coil aspect}\pgf at circ@res at step}
-
- \advance \pgf at circ@res at step by \pgf at circ@coilsmall at width %adjust for overlapping lower arc
- \def\pgf at circ@coilwide at width{\pgf at circ@res at step}
-
- \pgf at circ@res at other = \ctikzvalof{bipoles/vcuteinductor/coil height}\pgf at circ@Rlen
- \pgf at circ@res at temp =\ctikzvalof{bipoles/vcuteinductor/lower coil height}\pgf at circ@Rlen
- \pgfpathmoveto{\pgfpoint{\pgf at circ@res at left+0.5\pgfstartlinewidth}{-0.5\pgfstartlinewidth}}
- \foreach \x in {2,...,\ctikzvalof{bipoles/vcuteinductor/coils}}
- {
- \pgfpatharc{180}{0}{\pgf at circ@coilwide at width and \pgf at circ@res at other}
- \pgfpatharc{0}{-180}{\pgf at circ@coilsmall at width and \pgf at circ@res at temp}
- }
- \pgfpatharc{180}{0}{\pgf at circ@coilwide at width and \pgf at circ@res at other}
- \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
- \pgfusepath{stroke}
-
-\pgfscope
- \pgfsetarrowsend{latex'}
- \pgfpathmoveto{\pgfpoint{.5\pgf at circ@res at left}{1.5\pgf at circ@res at down}}
- \pgfpathlineto{\pgfpoint{-.5\pgf at circ@res at left}{2.5\pgf at circ@res at up}}
- \pgfusepath{draw}
- \endpgfscope
-}
-
-%% variable american inductor
-
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vamericaninductor/height 2}}{vamericaninductor}{\ctikzvalof{bipoles/vamericaninductor/height}}{\ctikzvalof{bipoles/vamericaninductor/width}}{
- \pgf at circ@res at step=\ctikzvalof{bipoles/vamericaninductor/width}\pgf at circ@Rlen
- \divide \pgf at circ@res at step by \ctikzvalof{bipoles/vamericaninductor/coils}
- \divide \pgf at circ@res at step by 2
- \pgf at circ@res at other = \ctikzvalof{bipoles/vamericaninductor/coil height}\pgf at circ@Rlen
-
- \pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{-0.5\pgfstartlinewidth}}
- \pgfpatharc{180}{0}{\pgf at circ@res at step and \pgf at circ@res at other}
- \pgfpatharc{180}{0}{\pgf at circ@res at step and \pgf at circ@res at other}
- \pgfpatharc{180}{0}{\pgf at circ@res at step and \pgf at circ@res at other}
- \pgfpatharc{180}{0}{\pgf at circ@res at step and \pgf at circ@res at other}
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at zero}}
- \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
- \pgfusepath{stroke}
-
- \pgfscope
- \pgfsetarrowsend{latex'}
- \pgfpathmoveto{\pgfpoint{.4\pgf at circ@res at left}{\pgf at circ@res at down}}
- \pgfpathlineto{\pgfpoint{-.4\pgf at circ@res at left}{\pgf at circ@res at up}}
- \pgfusepath{draw}
- \endpgfscope
-}
-
-
-
-
%% Variable Capacitor
\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vcapacitor/height}}{vcapacitor}{\ctikzvalof{bipoles/vcapacitor/height}}{\ctikzvalof{bipoles/vcapacitor/width}}{
@@ -1736,14 +1711,21 @@
%% Easily usable styles
-\ctikzset{*-/.style = {\circuitikzbasekey/bipole/nodes/left=full, \circuitikzbasekey/bipole/nodes/right=none}}
+\ctikzset{o-o/.style = {\circuitikzbasekey/bipole/nodes/left=empty, \circuitikzbasekey/bipole/nodes/right=empty}}
+\ctikzset{-o/.style = {\circuitikzbasekey/bipole/nodes/left=none, \circuitikzbasekey/bipole/nodes/right=empty}}
+\ctikzset{o-/.style = {\circuitikzbasekey/bipole/nodes/left=empty, \circuitikzbasekey/bipole/nodes/right=none}}
\ctikzset{*-o/.style = {\circuitikzbasekey/bipole/nodes/left=full, \circuitikzbasekey/bipole/nodes/right=empty}}
-\ctikzset{*-*/.style = {\circuitikzbasekey/bipole/nodes/left=full, \circuitikzbasekey/bipole/nodes/right=full}}
-\ctikzset{o-/.style = {\circuitikzbasekey/bipole/nodes/left=empty, \circuitikzbasekey/bipole/nodes/right=none}}
-\ctikzset{o-o/.style = {\circuitikzbasekey/bipole/nodes/left=empty, \circuitikzbasekey/bipole/nodes/right=empty}}
\ctikzset{o-*/.style = {\circuitikzbasekey/bipole/nodes/left=empty, \circuitikzbasekey/bipole/nodes/right=full}}
-\ctikzset{-o/.style = {\circuitikzbasekey/bipole/nodes/left=none, \circuitikzbasekey/bipole/nodes/right=empty}}
+\ctikzset{d-o/.style = {\circuitikzbasekey/bipole/nodes/left=diamond, \circuitikzbasekey/bipole/nodes/right=empty}}
+\ctikzset{o-d/.style = {\circuitikzbasekey/bipole/nodes/left=empty, \circuitikzbasekey/bipole/nodes/right=diamond}}
+\ctikzset{*-/.style = {\circuitikzbasekey/bipole/nodes/left=full, \circuitikzbasekey/bipole/nodes/right=none}}
\ctikzset{-*/.style = {\circuitikzbasekey/bipole/nodes/left=none, \circuitikzbasekey/bipole/nodes/right=full}}
+\ctikzset{d-/.style = {\circuitikzbasekey/bipole/nodes/left=diamond, \circuitikzbasekey/bipole/nodes/right=none}}
+\ctikzset{-d/.style = {\circuitikzbasekey/bipole/nodes/left=none, \circuitikzbasekey/bipole/nodes/right=diamond}}
+\ctikzset{*-*/.style = {\circuitikzbasekey/bipole/nodes/left=full, \circuitikzbasekey/bipole/nodes/right=full}}
+\ctikzset{d-*/.style = {\circuitikzbasekey/bipole/nodes/left=diamond, \circuitikzbasekey/bipole/nodes/right=full}}
+\ctikzset{*-d/.style = {\circuitikzbasekey/bipole/nodes/left=full, \circuitikzbasekey/bipole/nodes/right=diamond}}
+\ctikzset{d-d/.style = {\circuitikzbasekey/bipole/nodes/left=diamond, \circuitikzbasekey/bipole/nodes/right=diamond}}
\tikzset{reversed/.style = {\circuitikzbasekey/bipole/reversed=true}}
@@ -1751,24 +1733,34 @@
%% The output routine
\def\drawpoles{
- \pgfextra{ \edef\pgf at circ@temp{\ctikzvalof{bipole/nodes/left}} \def\pgf at temp{empty} }
+ \pgfextra{ \edef\pgf at circ@temp{\ctikzvalof{bipole/nodes/left}} \def\pgf at temp{diamond} }
\ifx\pgf at temp\pgf at circ@temp
- { (\tikztostart) node[ocirc] {} }
+ { (\tikztostart) node[diamond] {} }
\else
- \pgfextra{ \def\pgf at temp{full} }
- \ifx\pgf at temp\pgf at circ@temp
- { (\tikztostart) node[circ] {} }
+ \pgfextra{ \edef\pgf at circ@temp{\ctikzvalof{bipole/nodes/left}} \def\pgf at temp{empty} }
+ \ifx\pgf at temp\pgf at circ@temp
+ { (\tikztostart) node[ocirc] {} }
+ \else
+ \pgfextra{ \def\pgf at temp{full} }
+ \ifx\pgf at temp\pgf at circ@temp
+ { (\tikztostart) node[circ] {} }
+ \fi
\fi
\fi
- \pgfextra{ \edef\pgf at circ@temp{\ctikzvalof{bipole/nodes/right}} \def\pgf at temp{empty} }
- \ifx\pgf at temp\pgf at circ@temp
- { (\tikztotarget) node[ocirc] {} }
- \else
- \pgfextra{ \def\pgf at temp{full} }
- \ifx\pgf at temp\pgf at circ@temp
- { (\tikztotarget) node[circ] {} }
+ \pgfextra{ \edef\pgf at circ@temp{\ctikzvalof{bipole/nodes/right}} \def\pgf at temp{diamond} }
+ \ifx\pgf at temp\pgf at circ@temp
+ { (\tikztotarget) node[diamond] {} }
+ \else
+ \pgfextra{ \edef\pgf at circ@temp{\ctikzvalof{bipole/nodes/right}} \def\pgf at temp{empty} }
+ \ifx\pgf at temp\pgf at circ@temp
+ { (\tikztotarget) node[ocirc] {} }
+ \else
+ \pgfextra{ \def\pgf at temp{full} }
+ \ifx\pgf at temp\pgf at circ@temp
+ { (\tikztotarget) node[circ] {} }
+ \fi
\fi
- \fi
+ \fi
}
@@ -3106,9 +3098,82 @@
\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 at circ@res at step}
+ {(\ctikzvalof{bipoles/spring/width}*\pgf at circ@Rlen+\pgfhorizontaltransformationadjustment*.5*\pgflinewidth)/16}
+
+ \pgfpathmoveto{\pgfpoint{\pgf at circ@res at left-\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}{\pgf at circ@res at zero}}
+ \pgfsetcornersarced{\pgfpoint{.5\pgf at circ@res at up}{.5\pgf at circ@res at up}}
+ \pgf at circ@res at other = \pgf at circ@res at left
+ \advance\pgf at circ@res at other by \pgf at circ@res at step
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at up}}
+ \advance\pgf at circ@res at other by 2\pgf at circ@res at step
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at down}}
+ \advance\pgf at circ@res at other by 2\pgf at circ@res at step
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at up}}
+ \advance\pgf at circ@res at other by 2\pgf at circ@res at step
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at down}}
+ \advance\pgf at circ@res at other by 2\pgf at circ@res at step
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at up}}
+ \advance\pgf at circ@res at other by 2\pgf at circ@res at step
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at down}}
+ \advance\pgf at circ@res at other by 2\pgf at circ@res at step
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at up}}
+ \advance\pgf at circ@res at other by 2\pgf at circ@res at step
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at down}}
+ \advance\pgf at circ@res at other by \pgf at circ@res at step
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at 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 at circ@res at left}{\pgf at circ@res at down}}
+ {\pgfpoint{-2\pgf at circ@res at down}{-2\pgf at circ@res at down}}
-\endinput
+\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
+\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}
+ \pgfsetrectcap
+ \pgfsetmiterjoin
+ \pgfusepath{stroke}
+}
+
+%% mechanical resistor - damper
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/damper/height}}{damper}{\ctikzvalof{bipoles/damper/height}}{\ctikzvalof{bipoles/damper/width}}{
+ \pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
+ \pgfpathlineto{\pgfpoint{\ctikzvalof{bipoles/damper/length}\pgf at circ@res at right}
+ {\pgf at circ@res at zero}}
+ \pgfusepath{stroke}
+
+ \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+ \pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at down}}
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}
+
+ \pgfsetrectcap
+ \pgfsetmiterjoin
+ \pgfusepath{stroke}
+
+ \pgfpathmoveto{\pgfpoint{\ctikzvalof{bipoles/damper/length}\pgf at circ@res at right}
+ {.8\pgf at circ@res at down}}
+ \pgfpathlineto{\pgfpoint{\ctikzvalof{bipoles/damper/length}\pgf at circ@res at right}
+ {.8\pgf at circ@res at up}}
+ \pgfsetbuttcap
+ \pgfusepath{stroke}
+
+}
+
+
Added: trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircpath.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircpath.tex (rev 0)
+++ trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircpath.tex 2016-06-06 23:01:18 UTC (rev 41299)
@@ -0,0 +1,634 @@
+
+\pgf at circ@Rlen = \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+
+
+% 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}}
+
+% Initialize paths
+\def\pgfcircresetpath{
+ \ctikzset{bipole/name=, bipole/label/name=, bipole/label/position=90,
+ bipole/reversed=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
+ }
+}
+
+
+%% Generic bipole path
+\def\pgf at circ@bipole at path#1#2{
+ \pgfextra{
+ \ctikzset{bipole/kind = #1}
+
+ \edef\pgf at temp{\pgfkeysvalueof{/tikz/circuitikz/bipole/name}}
+ \def\pgf at circ@temp{}
+ \ifx\pgf at temp\pgf at circ@temp % if it has not a name
+ \pgfmathrandominteger{\pgf at circ@rand}{1000}{9999}
+ \ctikzset{bipole/name = #2\pgf at circ@rand} % create it
+ \fi
+
+ \def\pgf at temp{open}
+ \def\pgf at circ@temp{#1}
+ }
+ \ifpgf at circuit@bipole at reversed
+ (\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{
+ \pgf at circ@slope{\pgfpointanchor{\ctikzvalof{bipole/name}start}{center}}
+ {\pgfpointanchor{\ctikzvalof{bipole/name}end}{center}}
+ \edef\pgf at circ@direction{\pgfmathresult}
+ }
+ ($(\tikztostart) ! .5 ! (\tikztotarget)$)
+ node[#1shape, rotate=\pgf at circ@direction, yscale=\ctikzvalof{mirror value}]
+ (\ctikzvalof{bipole/name}) {}
+ \ifx\pgf at temp\pgf at circ@temp % if it is an open
+ \else
+ \ifpgf at circuit@bipole at strokedsymbol%draw line thrue symbol(e.g. diodes)
+ \ifcsname pgf at anchor@#1shape at strokepathstart\endcsname%if special path-anchors are defined, use them!
+ (\ctikzvalof{bipole/name}start.center) --(\ctikzvalof{bipole/name}.strokepathstart)
+ (\ctikzvalof{bipole/name}.strokepathend) -- (\ctikzvalof{bipole/name}end.center)
+ \else
+ (\ctikzvalof{bipole/name}start.center)--(\ctikzvalof{bipole/name}end.center)
+ \fi
+ \else
+ \ifcsname pgf at anchor@#1shape at 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
+ \fi
+ \fi
+ \pgf at circ@ifkeyempty{bipole/label/name}\else\pgf at circ@drawlabel\fi
+ \drawpoles
+ \pgf at circ@ifkeyempty{bipole/voltage/label/name}\else\pgf at circ@drawvoltage\fi
+ \pgf at circ@ifkeyempty{bipole/current/label/name}\else\pgf at circ@drawcurrent\fi
+ % reset
+ \pgfextra{
+ \pgfcircresetpath
+ }
+ (\tikztotarget) \tikztonodes % e si continua
+}
+
+
+%% Path definitions
+
+\def\pgf at circ@resistor at path#1{\ifpgf at circuit@europeanresistor\pgf at circ@bipole at path{generic}{#1}\else\pgf at circ@bipole at path{resistor}{#1}\fi}
+\def\pgf at circ@vresistor at path#1{\ifpgf at circuit@europeanresistor\pgf at circ@bipole at path{tgeneric}{#1}\else\pgf at circ@bipole at path{vresistor}{#1}\fi}
+\def\pgf at circ@potentiometer at path#1{\ifpgf at circuit@europeanresistor\pgf at circ@bipole at path{genericpotentiometer}{#1}\else\pgf at circ@bipole at path{potentiometer}{#1}\fi}
+\def\pgf at circ@thermistor at path#1{\pgf at circ@bipole at path{thermistor}{#1}}
+\def\pgf at circ@thermistorptc at path#1{\pgf at circ@bipole at path{thermistorptc}{#1}}
+\def\pgf at circ@thermistorntc at path#1{\pgf at circ@bipole at path{thermistorntc}{#1}}
+\def\pgf at circ@varistor at path#1{\pgf at circ@bipole at path{varistor}{#1}}
+\def\pgf at circ@capacitor at path#1{\pgf at circ@bipole at path{capacitor}{#1}}
+\def\pgf at circ@ecapacitor at path#1{\pgf at circ@bipole at path{ecapacitor}{#1}}
+\def\pgf at circ@polarcapacitor at path#1{\pgf at circ@bipole at path{polarcapacitor}{#1}}
+\def\pgf at circ@vcapacitor at path#1{\pgf at circ@bipole at path{vcapacitor}{#1}}
+\def\pgf at circ@piezoelectric at path#1{\pgf at circ@bipole at path{piezoelectric}{#1}}
+\def\pgf at circ@battery at path#1{\pgf at circ@bipole at path{battery}{#1}}
+\def\pgf at circ@battery1 at path#1{\pgf at circ@bipole at path{battery1}{#1}}
+\def\pgf at circ@europeaninductor at path#1{\pgf at circ@bipole at path{fullgeneric}{#1}}
+\def\pgf at circ@americaninductor at path#1{\pgf at circ@bipole at path{americaninductor}{#1}}
+\def\pgf at circ@cuteinductor at path#1{\pgf at circ@bipole at path{cuteinductor}{#1}}
+\def\pgf at circ@inductor at path#1{%
+ \pgfextra{
+ \edef\pgf at circ@temp{\ctikzvalof{inductor}}%
+ \def\pgf at temp{european}%
+ }
+ \ifx\pgf at temp\pgf at circ@temp%
+ \pgf at circ@europeaninductor at path{#1}%
+ \else%
+ \pgfextra{ \def\pgf at temp{cute} }%
+ \ifx\pgf at temp\pgf at circ@temp%
+ \pgf at circ@cuteinductor at path{#1}%
+ \else%
+ \pgf at circ@americaninductor at path{#1}%
+ \fi%
+ \fi%
+}
+\def\pgf at circ@vinductor at path#1{
+ \pgfextra{
+ \edef\pgf at circ@temp{\ctikzvalof{inductor}}%
+ \def\pgf at temp{european}%
+ }
+ \ifx\pgf at temp\pgf at circ@temp%
+ \pgf at circ@veuropeaninductor at path{#1}%
+ \else%
+ \pgfextra{ \def\pgf at temp{cute} }%
+ \ifx\pgf at temp\pgf at circ@temp%
+ \pgf at circ@vcuteinductor at path{#1}%
+ \else%
+ \pgf at circ@vamericaninductor at path{#1}%
+ \fi%
+ \fi%
+}
+\def\pgf at circ@veuropeaninductor at path#1{\pgf at circ@bipole at path{tfullgeneric}{#1}}
+\def\pgf at circ@vamericaninductor at path#1{\pgf at circ@bipole at path{vamericaninductor}{#1}}
+\def\pgf at circ@vcuteinductor at path#1{\pgf at circ@bipole at path{vcuteinductor}{#1}}
+\def\pgf at circ@lamp at path#1{\pgf at circ@bipole at path{lamp}{#1}}
+\def\pgf at circ@esource at path#1{\pgf at circ@bipole at path{esource}{#1}}
+\def\pgf at circ@pvsource at path#1{\pgf at circ@bipole at path{pvsource}{#1}}
+\def\pgf at circ@vsource at path#1{\pgf at circ@bipole at path{vsource}{#1}}
+\def\pgf at circ@dcvsource at path#1{\pgf at circ@bipole at path{dcvsource}{#1}}
+\def\pgf at circ@vsourceam at path#1{\pgf at circ@bipole at path{vsourceAM}{#1}}
+\def\pgf at circ@vsourcesin at path#1{\pgf at circ@bipole at path{vsourcesin}{#1}}
+\def\pgf at circ@isource at path#1{\pgf at circ@bipole at path{isource}{#1}}
+\def\pgf at circ@oosource at path#1{\pgf at circ@bipole at path{oosource}{#1}}
+\def\pgf at circ@dcisource at path#1{\pgf at circ@bipole at path{dcisource}{#1}}
+\def\pgf at circ@isourcesin at path#1{\pgf at circ@bipole at path{isourcesin}{#1}}
+\def\pgf at circ@vsourcesquare at path#1{\pgf at circ@bipole at path{vsourcesquare}{#1}}
+\def\pgf at circ@vsourcetri at path#1{\pgf at circ@bipole at path{vsourcetri}{#1}}
+\def\pgf at circ@isourceam at path#1{\pgf at circ@bipole at path{isourceAM}{#1}}
+\def\pgf at circ@cvsource at path#1{\pgf at circ@bipole at path{cvsource}{#1}}
+\def\pgf at circ@cvsourceam at path#1{\pgf at circ@bipole at path{cvsourceAM}{#1}}
+\def\pgf at circ@cvsourcesin at path#1{\pgf at circ@bipole at path{cvsourcesin}{#1}}
+\def\pgf at circ@cisource at path#1{\pgf at circ@bipole at path{cisource}{#1}}
+\def\pgf at circ@cisourceam at path#1{\pgf at circ@bipole at path{cisourceAM}{#1}}
+\def\pgf at circ@cisourcesin at path#1{\pgf at circ@bipole at path{cisourcesin}{#1}}
+\def\pgf at circ@short at path#1{\pgf at circ@bipole at path{short}{#1}}
+\def\pgf at circ@cspst at path#1{\pgf at circ@bipole at path{cspst}{#1}}
+\def\pgf at circ@spst at path#1{\pgf at circ@bipole at path{spst}{#1}}
+\def\pgf at circ@ospst at path#1{\pgf at circ@bipole at path{ospst}{#1}}
+\def\pgf at circ@pushbutton at path#1{\pgf at circ@bipole at path{pushbutton}{#1}}
+\def\pgf at circ@open at path#1{\pgf at circ@bipole at path{open}{#1}}
+\def\pgf at circ@generic at path#1{\pgf at circ@bipole at path{generic}{#1}}
+\def\pgf at circ@ageneric at path#1{\pgf at circ@bipole at path{ageneric}{#1}}
+\def\pgf at circ@tgeneric at path#1{\pgf at circ@bipole at path{tgeneric}{#1}}
+\def\pgf at circ@fullgeneric at path#1{\pgf at circ@bipole at path{fullgeneric}{#1}}
+\def\pgf at circ@tfullgeneric at path#1{\pgf at circ@bipole at path{tfullgeneric}{#1}}
+\def\pgf at circ@ammeter at path#1{\pgf at circ@bipole at path{ammeter}{#1}}
+\def\pgf at circ@ohmmeter at path#1{\pgf at circ@bipole at path{ohmmeter}{#1}}
+\def\pgf at circ@voltmeter at path#1{\pgf at circ@bipole at path{voltmeter}{#1}}
+\def\pgf at circ@empty at path#1{}
+\def\pgf at circ@photoresistor at path#1{\pgf at circ@bipole at path{photoresistor}{#1}}
+\def\pgf at circ@emptythyristor at path#1{\pgf at circ@bipole at path{emptythyristor}{#1}}
+\def\pgf at circ@fullthyristor at path#1{\pgf at circ@bipole at path{fullthyristor}{#1}}
+\def\pgf at circ@toggleswitch at path#1{\pgf at circ@bipole at path{toggleswitch}{#1}}
+\def\pgf at circ@memristor at path#1{\pgf at circ@bipole at path{memristor}{#1}}
+\def\pgf at circ@emptytriac at path#1{\pgf at circ@bipole at path{emptytriac}{#1}}
+\def\pgf at circ@fulltriac at path#1{\pgf at circ@bipole at path{fulltriac}{#1}}
+\def\pgf at circ@tline at path#1{\pgf at circ@bipole at path{tline}{#1}}
+\def\pgf at circ@squid at path#1{\pgf at circ@bipole at path{squid}{#1}}
+\def\pgf at circ@barrier at path#1{\pgf at circ@bipole at path{barrier}{#1}}
+\def\pgf at circ@thermocouple at path#1{\pgf at circ@bipole at path{thermocouple}{#1}}
+\def\pgf at circ@fuse at path#1{\pgf at circ@bipole at path{fuse}{#1}}
+\def\pgf at circ@afuse at path#1{\pgf at circ@bipole at path{afuse}{#1}}
+
+\def\pgf at circ@gfsurgearrester at path#1{\ifpgf at circuit@europeangfsurgearrester\pgf at circ@europeangfsurgearrester at path{#1}\else\pgf at circ@americangfsurgearrester at path{#1}\fi}
+\def\pgf at circ@europeangfsurgearrester at path#1{\pgf at circ@bipole at path{european gas filled surge arrester}{#1}}
+\def\pgf at circ@americangfsurgearrester at path#1{\pgf at circ@bipole at path{american gas filled surge arrester}{#1}}
+
+\def\pgf at circ@twoport at path#1{\pgf at circ@bipole at path{twoport}{#1}}
+\def\pgf at circ@vco at path#1{\pgf at circ@bipole at path{vco}{#1}}
+\def\pgf at circ@bandpass at path#1{\pgf at circ@bipole at path{bandpass}{#1}}
+\def\pgf at circ@highpass at path#1{\pgf at circ@bipole at path{highpass}{#1}}
+\def\pgf at circ@lowpass at path#1{\pgf at circ@bipole at path{lowpass}{#1}}
+\def\pgf at circ@adc at path#1{\pgf at circ@bipole at path{adc}{#1}}
+\def\pgf at circ@dac at path#1{\pgf at circ@bipole at path{dac}{#1}}
+\def\pgf at circ@dsp at path#1{\pgf at circ@bipole at path{dsp}{#1}}
+\def\pgf at circ@fft at path#1{\pgf at circ@bipole at path{fft}{#1}}
+\def\pgf at circ@amp at path#1{\pgf at circ@bipole at path{amp}{#1}}
+\def\pgf at circ@vamp at path#1{\pgf at circ@bipole at path{vamp}{#1}}
+\def\pgf at circ@piattenuator at path#1{\pgf at circ@bipole at path{piattenuator}{#1}}
+\def\pgf at circ@vpiattenuator at path#1{\pgf at circ@bipole at path{vpiattenuator}{#1}}
+\def\pgf at circ@tattenuator at path#1{\pgf at circ@bipole at path{tattenuator}{#1}}
+\def\pgf at circ@vtattenuator at path#1{\pgf at circ@bipole at path{vtattenuator}{#1}}
+\def\pgf at circ@phaseshifter at path#1{\pgf at circ@bipole at path{phaseshifter}{#1}}
+\def\pgf at circ@vphaseshifter at path#1{\pgf at circ@bipole at path{vphaseshifter}{#1}}
+\def\pgf at circ@detector at path#1{\pgf at circ@bipole at path{detector}{#1}}
+
+%%Mechanical
+\def\pgf at circ@spring at path#1{\pgf at circ@bipole at path{spring}{#1}}
+\def\pgf at circ@mass at path#1{\pgf at circ@bipole at path{mass}{#1}}
+\def\pgf at circ@damper at path#1{\pgf at circ@bipole at path{damper}{#1}}
+
+
+
+
+%% Styles
+
+\def\comnpatname{\ifpgf at 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 at circ@spring at path, l=#1}}
+\compattikzset{mass/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@mass at path, l=#1}}
+\compattikzset{damper/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@damper at path, l=#1}}
+\compattikzset{resistor/.style= {\circuitikzbasekey, /tikz/to path=\pgf at circ@resistor at path, l=#1}}
+\compattikzset{american resistor/.style= {\circuitikzbasekey, /tikz/to path=\pgf at circ@bipole at path{resistor}{#1}, l=#1}}
+\compattikzset{european resistor/.style= {\circuitikzbasekey, /tikz/to path=\pgf at circ@bipole at path{generic}{#1}, l=#1}}
+\compattikzset{potentiometer/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@potentiometer at path, l=#1}}
+\compattikzset{varistor/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@varistor at path, l=#1}}
+\compattikzset{photoresistor/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@photoresistor at path, l=#1}}
+\compattikzset{thermistor/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@thermistor at path, l=#1}}
+\compattikzset{thermistor ptc/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@thermistorptc at path, l=#1}}
+\compattikzset{thermistor ntc/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@thermistorntc at path, l=#1}}
+\compattikzset{american potentiometer/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@bipole at path{potentiometer}{#1}, l=#1}}
+\compattikzset{european potentiometer/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@bipole at path{genericpotentiometer}{#1}, l=#1}}
+\compattikzset{variable resistor/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@vresistor at path, l=#1}}
+\compattikzset{variable american resistor/.style= {\circuitikzbasekey, /tikz/to path=\pgf at circ@bipole at path{vresistor}{#1}, l=#1}}
+\compattikzset{variable european resistor/.style= {\circuitikzbasekey, /tikz/to path=\pgf at circ@bipole at path{tgeneric}{#1}, l=#1}}
+\compattikzset{capacitor/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@capacitor at path, l=#1}}
+\compattikzset{elko/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@ecapacitor at path, l=#1}}
+\compattikzset{ecapacitor/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@ecapacitor at path, l=#1}}
+\compattikzset{polar capacitor/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@polarcapacitor at path, l=#1}}
+\compattikzset{variable capacitor/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@vcapacitor at path, l=#1}}
+\compattikzset{piezoelectric/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@piezoelectric at path, l=#1}}
+\compattikzset{battery/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@battery at path, \circuitikzbasekey/bipole/is voltage=true, \circuitikzbasekey/bipole/is voltageoutsideofsymbol=true, v=#1}}
+\compattikzset{battery1/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@battery1 at path, \circuitikzbasekey/bipole/is voltage=true, \circuitikzbasekey/bipole/is voltageoutsideofsymbol=true, v=#1}}
+\compattikzset{inductor/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@inductor at path, l=#1}}
+\compattikzset{gf surge arrester/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@gfsurgearrester at path, l=#1}}
+\compattikzset{american gas filled surge arrester/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@americangfsurgearrester at path, l=#1}}
+\compattikzset{european gas filled surge arrester/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@europeangfsurgearrester at path, l=#1}}
+\compattikzset{gas filled surge arrester/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@gfsurgearrester at path, l=#1}}
+\compattikzset{american inductor/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@americaninductor at path, l=#1}}
+\compattikzset{cute inductor/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@cuteinductor at path, l=#1}}
+\compattikzset{european inductor/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@europeaninductor at path, l=#1}}
+\compattikzset{variable inductor/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@vinductor at path, l=#1}}
+\compattikzset{variable european inductor/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@veuropeaninductor at path, l=#1}}
+\compattikzset{variable american inductor/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@vamericaninductor at path, l=#1}}
+\compattikzset{variable cute inductor/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@vcuteinductor at path, l=#1}}
+\compattikzset{tline/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@tline at path, l=#1}}
+\compattikzset{transmission line/.style = {tline = #1}}
+\compattikzset{TL/.style = {tline = #1}}
+\compattikzset{european voltage source/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@vsource at path, \circuitikzbasekey/bipole/is voltage=true, \circuitikzbasekey/bipole/is voltageoutsideofsymbol=true, v=#1}}
+\compattikzset{american voltage source/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@vsourceam at path, \circuitikzbasekey/bipole/is voltage=true, v=#1}}
+\compattikzset{european current source/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@isource at path, \circuitikzbasekey/bipole/is current=true, i=#1}}
+\compattikzset{american current source/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@isourceam at path, \circuitikzbasekey/bipole/is current=true, i=#1}}
+\compattikzset{european controlled voltage source/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@cvsource at path, \circuitikzbasekey/bipole/is voltage=true, \circuitikzbasekey/bipole/is voltageoutsideofsymbol=true, v=#1}}
+\compattikzset{american controlled voltage source/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@cvsourceam at path, \circuitikzbasekey/bipole/is voltage=true, v=#1}}
+\compattikzset{european controlled current source/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@cisource at path, \circuitikzbasekey/bipole/is current=true, i=#1}}
+\compattikzset{american controlled current source/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@cisourceam at path, \circuitikzbasekey/bipole/is current=true, i=#1}}
+\compattikzset{sinusoidal voltage source/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@vsourcesin at path, \circuitikzbasekey/bipole/is voltage=true, \circuitikzbasekey/bipole/is voltageoutsideofsymbol=true, v=#1 }}
+\compattikzset{square voltage source/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@vsourcesquare at path, \circuitikzbasekey/bipole/is voltage=true, \circuitikzbasekey/bipole/is voltageoutsideofsymbol=true, v=#1 }}
+\compattikzset{triangle voltage source/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@vsourcetri at path, \circuitikzbasekey/bipole/is voltage=true, \circuitikzbasekey/bipole/is voltageoutsideofsymbol=true, v=#1 }}
+\compattikzset{sinusoidal current source/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@isourcesin at path, \circuitikzbasekey/bipole/is current=true, i=#1}}
+\compattikzset{controlled sinusoidal voltage source/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@cvsourcesin at path, \circuitikzbasekey/bipole/is voltage=true, \circuitikzbasekey/bipole/is voltageoutsideofsymbol=true, v=#1}}
+\compattikzset{controlled sinusoidal current source/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@cisourcesin at path, \circuitikzbasekey/bipole/is current=true, i=#1}}
+
+\compattikzset{voltage source/.style = {\comnpatname \ifpgf at circuit@europeanvoltage european \else american \fi voltage source, \circuitikzbasekey/bipole/is voltage=true, v=#1}}
+\compattikzset{current source/.style = {\comnpatname \ifpgf at circuit@europeancurrent european \else american \fi current source, \circuitikzbasekey/bipole/is current=true, i=#1}}
+\compattikzset{controlled voltage source/.style = {\comnpatname \ifpgf at circuit@europeanvoltage european \else american \fi controlled voltage source, \circuitikzbasekey/bipole/is voltage=true, v=#1}}
+\compattikzset{controlled current source/.style = {\comnpatname \ifpgf at circuit@europeancurrent european \else american \fi controlled current source, \circuitikzbasekey/bipole/is current=true, i=#1}}
+
+
+\compattikzset{generic/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@generic at path, l=#1}}
+\compattikzset{ageneric/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@ageneric at path, l=#1}}
+\compattikzset{tgeneric/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@tgeneric at path, l=#1}}
+\compattikzset{fullgeneric/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@fullgeneric at path, l=#1}}
+\compattikzset{tfullgeneric/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@tfullgeneric at path, l=#1}}
+\compattikzset{short/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@short at path}}
+\compattikzset{open/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@open at path}}
+
+\compattikzset{lamp/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@lamp at path}}
+
+\compattikzset{squid/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@squid at path}}
+\compattikzset{barrier/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@barrier at path}}
+\compattikzset{thermocouple/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@thermocouple at path}}
+\compattikzset{fuse/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@fuse at path}}
+\compattikzset{asymmetric fuse/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@afuse at path}}
+
+\compattikzset{twoport/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@twoport at path}}
+\compattikzset{vco/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@vco at path}}
+\compattikzset{bandpass/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@bandpass at path}}
+\compattikzset{highpass/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@highpass at path}}
+\compattikzset{lowpass/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@lowpass at path}}
+\compattikzset{adc/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@adc at path}}
+\compattikzset{dac/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@dac at path}}
+\compattikzset{dsp/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@dsp at path}}
+\compattikzset{fft/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@fft at path}}
+\compattikzset{amp/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@amp at path}}
+\compattikzset{vamp/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@vamp at path}}
+\compattikzset{piattenuator/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@piattenuator at path}}
+\compattikzset{vpiattenuator/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@vpiattenuator at path}}
+\compattikzset{tattenuator/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@tattenuator at path}}
+\compattikzset{vtattenuator/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@vtattenuator at path}}
+\compattikzset{phaseshifter/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@phaseshifter at path}}
+\compattikzset{vphaseshifter/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@vphaseshifter at path}}
+\compattikzset{detector/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@detector at path}}
+
+% % % % % %
+% % Beginn of Diodes
+% % % % % %
+
+\def\pgf at circ@fulldiode at path#1{\pgf at circ@bipole at path{fulldiode}{#1}}
+\def\pgf at circ@fullzdiode at path#1{\pgf at circ@bipole at path{fullzdiode}{#1}}
+\def\pgf at circ@fullzzdiode at path#1{\pgf at circ@bipole at path{fullzzdiode}{#1}}
+\def\pgf at circ@fullsdiode at path#1{\pgf at circ@bipole at path{fullsdiode}{#1}}
+\def\pgf at circ@fulltdiode at path#1{\pgf at circ@bipole at path{fulltdiode}{#1}}
+\def\pgf at circ@fulllediode at path#1{\pgf at circ@bipole at path{fulllediode}{#1}}
+\def\pgf at circ@fullpdiode at path#1{\pgf at circ@bipole at path{fullpdiode}{#1}}
+\def\pgf at circ@fullvarcap at path#1{\pgf at circ@bipole at path{fullvarcap}{#1}}
+\def\pgf at circ@emptydiode at path#1{\pgf at circ@bipole at path{emptydiode}{#1}}
+\def\pgf at circ@emptyzdiode at path#1{\pgf at circ@bipole at path{emptyzdiode}{#1}}
+\def\pgf at circ@emptyzzdiode at path#1{\pgf at circ@bipole at path{emptyzzdiode}{#1}}
+\def\pgf at circ@emptysdiode at path#1{\pgf at circ@bipole at path{emptysdiode}{#1}}
+\def\pgf at circ@emptytdiode at path#1{\pgf at circ@bipole at path{emptytdiode}{#1}}
+\def\pgf at circ@emptylediode at path#1{\pgf at circ@bipole at path{emptylediode}{#1}}
+\def\pgf at circ@emptypdiode at path#1{\pgf at circ@bipole at path{emptypdiode}{#1}}
+\def\pgf at circ@emptyvarcap at path#1{\pgf at circ@bipole at path{emptyvarcap}{#1}}
+
+\compattikzset{full diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@fulldiode at path}}
+\compattikzset{full Schottky diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@fullsdiode at path}}
+\compattikzset{full Zener diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@fullzdiode at path}}
+\compattikzset{full ZZener diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@fullzzdiode at path}}
+\compattikzset{full tunnel diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@fulltdiode at path}}
+\compattikzset{full photodiode/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@fullpdiode at path}}
+\compattikzset{full led/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@fulllediode at path}}
+\compattikzset{full varcap/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@fullvarcap at path}}
+\compattikzset{full thyristor/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@fullthyristor at path}}
+\compattikzset{full triac/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@fulltriac at path}}
+
+\compattikzset{empty diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@emptydiode at path}}
+\compattikzset{empty Schottky diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@emptysdiode at path}}
+\compattikzset{empty Zener diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@emptyzdiode at path}}
+\compattikzset{empty ZZener diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@emptyzzdiode at path}}
+\compattikzset{empty tunnel diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@emptytdiode at path}}
+\compattikzset{empty photodiode/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@emptypdiode at path}}
+\compattikzset{empty led/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@emptylediode at path}}
+\compattikzset{empty varcap/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@emptyvarcap at path}}
+\compattikzset{empty thyristor/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@emptythyristor at path}}
+\compattikzset{empty triac/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@emptytriac at path}}
+
+\compattikzset{stroke diode/.style = {\circuitikzbasekey,\circuitikzbasekey/bipole/is strokedsymbol=true, /tikz/to path=\pgf at circ@emptydiode at path}}
+\compattikzset{stroke Schottky diode/.style = {\circuitikzbasekey,\circuitikzbasekey/bipole/is strokedsymbol=true, /tikz/to path=\pgf at circ@emptysdiode at path}}
+\compattikzset{stroke Zener diode/.style = {\circuitikzbasekey,\circuitikzbasekey/bipole/is strokedsymbol=true, /tikz/to path=\pgf at circ@emptyzdiode at path}}
+\compattikzset{stroke ZZener diode/.style = {\circuitikzbasekey,\circuitikzbasekey/bipole/is strokedsymbol=true, /tikz/to path=\pgf at circ@emptyzzdiode at path}}
+\compattikzset{stroke tunnel diode/.style = {\circuitikzbasekey,\circuitikzbasekey/bipole/is strokedsymbol=true, /tikz/to path=\pgf at circ@emptytdiode at path}}
+\compattikzset{stroke photodiode/.style = {\circuitikzbasekey,\circuitikzbasekey/bipole/is strokedsymbol=true, /tikz/to path=\pgf at circ@emptypdiode at path}}
+\compattikzset{stroke led/.style = {\circuitikzbasekey,\circuitikzbasekey/bipole/is strokedsymbol=true, /tikz/to path=\pgf at circ@emptylediode at path}}
+\compattikzset{stroke varcap/.style = {\circuitikzbasekey,\circuitikzbasekey/bipole/is strokedsymbol=true, /tikz/to path=\pgf at circ@emptyvarcap at path}}
+\compattikzset{stroke thyristor/.style = {\circuitikzbasekey,\circuitikzbasekey/bipole/is strokedsymbol=true, /tikz/to path=\pgf at circ@emptythyristor at path}}
+%\compattikzset{stroke triac/.style = {\circuitikzbasekey,\circuitikzbasekey/bipole/is strokedsymbol=true, /tikz/to path=\pgf at circ@emptytriac at path}}
+
+\def\pgfcircdiodestylemacro{\ifpgf at circuit@strokediode stroke \else\ifpgf at 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 at circuit@fulldiode full \else empty \fi triac}}%no stroke 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{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{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{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!
+
+% % % % % %
+% % End of Diodes
+% % % % % %
+
+
+\compattikzset{memristor/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@memristor at path}}
+\compattikzset{closing switch/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@cspst at path, l=#1}}
+\compattikzset{opening switch/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@ospst at path, l=#1}}
+\compattikzset{switch/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@spst at path, l=#1}}
+\compattikzset{push button/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@pushbutton at path, l=#1}}
+\compattikzset{toggle switch/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@toggleswitch at path}}
+
+\compattikzset{ammeter/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@ammeter at path}}
+\compattikzset{voltmeter/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@voltmeter at path}}
+\compattikzset{ohmmeter/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@ohmmeter at path}}
+
+% short forms
+\compattikzset{esource/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@esource at path, \circuitikzbasekey/bipole/is voltage=true,\circuitikzbasekey/bipole/is voltageoutsideofsymbol=true, v=#1}}
+\compattikzset{pvsource/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@pvsource at path, \circuitikzbasekey/bipole/is voltage=true,\circuitikzbasekey/bipole/is voltageoutsideofsymbol=true, v=#1}}
+\compattikzset{dcvsource/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@dcvsource at path, \circuitikzbasekey/bipole/is voltage=true,\circuitikzbasekey/bipole/is voltageoutsideofsymbol=true, v=#1}}
+\compattikzset{dcisource/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@dcisource at path, \circuitikzbasekey/bipole/is current=true, i=#1}}
+
+\compattikzset{ioosource/.style = {\circuitikzbasekey, \circuitikzbasekey/bipole/is current=true,/tikz/to path=\pgf at circ@oosource at path}}
+\compattikzset{voosource/.style = {\circuitikzbasekey, \circuitikzbasekey/bipole/is voltage=true,/tikz/to path=\pgf at circ@oosource at path}}
+
+\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}}
+%\ifpgf at circuit@compat\else\compattikzset{R/.style= {resistor = #1}}\fi
+\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 at 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 at temp{_>} \pgf at temp{_<} \pgf at temp{^>} \pgf at temp{^<}
+\pgf at temp{>} \pgf at temp{<} \pgf at temp{^} \pgf at temp{_}
+\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 at 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 at temp{_>} \pgf at temp{_<} \pgf at temp{^>} \pgf at temp{^<}
+\pgf at temp{>_} \pgf at temp{<_} \pgf at temp{>^} \pgf at temp{<^}
+\pgf at temp{>} \pgf at temp{<} \pgf at temp{^} \pgf at temp{_}
+
+
+
+\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}}
+
+\def\inheritlogicport#1#2{
+ \pgfdeclareshape{#2 port}{
+ \inheritsavedanchors[from=#1 #2 port]
+ \inheritbackgroundpath[from=#1 #2 port]
+ \inheritanchor[from=#1 #2 port]{in}
+ \inheritanchor[from=#1 #2 port]{in 1}
+ \inheritanchor[from=#1 #2 port]{in 2}
+ \inheritanchor[from=#1 #2 port]{out}
+ \inheritanchor[from=#1 #2 port]{center}
+ \inheritanchor[from=#1 #2 port]{left}
+ }
+}
+
+\ifpgf at circuit@europeanlogicport
+ \inheritlogicport{european}{and}
+ \inheritlogicport{european}{or}
+ \inheritlogicport{european}{xor}
+ \inheritlogicport{european}{not}
+ \inheritlogicport{european}{nand}
+ \inheritlogicport{european}{nor}
+ \inheritlogicport{european}{xnor}
+\else
+ \inheritlogicport{american}{and}
+ \inheritlogicport{american}{or}
+ \inheritlogicport{american}{xor}
+ \inheritlogicport{american}{not}
+ \inheritlogicport{american}{nand}
+ \inheritlogicport{american}{nor}
+ \inheritlogicport{american}{xnor}
+\fi
+
+% Transistor like bipoles
+
+\def\pgf at circ@trans at path#1#2{
+ \pgfextra{
+ \edef\pgf at temp{\pgfkeysvalueof{/tikz/circuitikz/bipole/name}}
+ \def\pgf at circ@temp{#2}
+ \ifx\pgf at temp\pgf at circ@temp % if it has not a name
+ \pgfmathrandominteger{\pgf at circ@rand}{1000}{9999}
+ \ctikzset{bipole/name = trans\pgf at circ@rand} % create it
+ \fi
+ }
+ \ifpgf at circuit@bipole at reversed
+ (\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{
+ \pgf at circ@slope{\pgfpointanchor{\ctikzvalof{bipole/name}start}{center}}
+ {\pgfpointanchor{\ctikzvalof{bipole/name}end}{center}}
+ \pgfmathadd{\pgfmathresult}{-90}
+ \edef\pgf at circ@direction{\pgfmathresult}
+ }
+ ($(\tikztostart) ! .5 ! (\tikztotarget)$)
+ node[#1, /tikz/rotate=\pgf at circ@direction, xscale=\ctikzvalof{mirror value}]
+ (\ctikzvalof{bipole/name}) {} node {\ctikzvalof{bipole/label/name}}
+ \ifcsname pgf at anchor@#1 at 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 at circ@definetranspath#1{
+ \compattikzset{T#1/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@trans at path{#1}{}, l=##1}}
+}
+
+\pgf at circ@definetranspath{elmech}
+\pgf at circ@definetranspath{nmos}
+\pgf at circ@definetranspath{pmos}
+\pgf at circ@definetranspath{npn}
+\pgf at circ@definetranspath{pnp}
+\pgf at circ@definetranspath{nfet}
+\pgf at circ@definetranspath{nigfete}
+\pgf at circ@definetranspath{nigfetd}
+\pgf at circ@definetranspath{nigfetebulk}
+\pgf at circ@definetranspath{pfet}
+\pgf at circ@definetranspath{pigfete}
+\pgf at circ@definetranspath{pigfetd}
+\pgf at circ@definetranspath{pigfetebulk}
+\pgf at circ@definetranspath{njfet}
+\pgf at circ@definetranspath{pjfet}
+\pgf at circ@definetranspath{pigbt}
+\pgf at circ@definetranspath{nigbt}
+\pgf at circ@definetranspath{Lpigbt}
+\pgf at circ@definetranspath{Lnigbt}
\ No newline at end of file
Property changes on: trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircpath.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircshapes.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircshapes.tex 2016-06-06 22:57:41 UTC (rev 41298)
+++ trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircshapes.tex 2016-06-06 23:01:18 UTC (rev 41299)
@@ -92,6 +92,29 @@
}
}
+%% Diamond terminal
+
+\pgfdeclareshape{diamond}{
+ \anchor{center}{
+ \pgfpointorigin
+ }
+ \anchorborder{
+ \pgf at circ@res at left=\pgf at x
+ \pgf at circ@res at up=\pgf at y
+ }
+ \behindforegroundpath{
+ \pgfscope
+ \pgfmathsetlength{\pgf at circ@res at temp}{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}}
+ \pgftransformrotate{45}
+ \pgfpathrectanglecorners
+ {\pgfpoint{\pgf at circ@res at left-\pgf at circ@res at temp}{\pgf at circ@res at up+\pgf at circ@res at temp}}
+ {\pgfpoint{\pgf at circ@res at left+\pgf at circ@res at temp}{\pgf at circ@res at up-\pgf at circ@res at temp}}
+ \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
+ \pgfusepath{draw,fill}
+ \endpgfscope
+ }
+}
+
%% Current arrow
\pgfdeclareshape{currarrow}{
Modified: trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex 2016-06-06 22:57:41 UTC (rev 41298)
+++ trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex 2016-06-06 23:01:18 UTC (rev 41299)
@@ -812,50 +812,37 @@
\pgfcircdeclareeurologicport{nor}{$\ge 1$}{2}{not}
\pgfcircdeclareeurologicport{xnor}{$=1$}{2}{not}
-
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-
\long\def\pgfcircdeclaretransistor#1#2#3{
\pgfdeclareshape{#1}
{
- \anchor{center}{\pgfpointorigin}
- \savedanchor\northeast{% upper right
+ \anchor{center}{
+ \pgfpointorigin
+ }
+ \savedanchor\northeast{% upper right
\pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/height}\pgf at y
\pgf at y=.5\pgf at y
\pgf at x=0pt
- }
-% \savedanchor\northeast{%
-% \pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
-% \pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/height}\pgf at y
-% \pgf at y=.5\pgf at y
-% \pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
-% \pgf at x=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/width}\pgf at x
-% }
- \savedanchor\left{%center left
+ }
+ \savedanchor\left{%center left
\pgf at y=0pt
\pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
\pgf at x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/width}\pgf at x
- }
- \anchor{text}{
- \northeast
- \pgfpoint
- {12\pgf at circ@res at right +0.2*(\pgf at circ@res at right-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf at circ@res at left)}
- {0.6\pgf at y}
- }
- %
- % pseudo-bipole
- \anchor{left}{ % south
+ }
+ \anchor{text}{
+ \northeast
+ \pgf at y=.7\pgf at y
+ \pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+ \pgf at x=0.1\pgf at x
+ }
+ \anchor{pathstart}{ % south
\northeast
\pgf at y=-\pgf at y
- }
- \anchor{right}{
+ }
+ \anchor{pathend}{
\northeast
- }
- \anchor{north}{
+ }
+ \anchor{north}{
\northeast
\pgf at circ@res at step=\pgf at y
\left
@@ -862,54 +849,113 @@
\pgf at y=\pgf at circ@res at step
\pgf at x=.5\pgf at x
}
- \anchor{west}{
+ \anchor{west}{
\left
- }
- \anchor{east}{
- \pgf at x=0pt
+ }
+ \anchor{east}{
+ \northeast
\pgf at y=0pt
- }
- \anchor{south}{
+ }
+ \anchor{south}{
\northeast
\pgf at circ@res at step=\pgf at y
\left
\pgf at y=-\pgf at circ@res at step
\pgf at x=.5\pgf at x
- }
- \anchor{south west}{
+ }
+ \anchor{south west}{
\northeast
\pgf at circ@res at step=\pgf at y
\left
\pgf at y=-\pgf at circ@res at step
- }
- \anchor{north east}{
+ }
+ \anchor{north east}{
\northeast
- }
- \anchor{north west}{
+ }
+ \anchor{north west}{
\northeast
\pgf at circ@res at step=\pgf at y
\left
\pgf at y=\pgf at circ@res at step
- }
- \anchor{south east}{
+ }
+ \anchor{south east}{
\northeast
\pgf at y=-\pgf at y
- }
- \anchor{B}{
- \left
+ }
+ \anchor{B}{
+ \northeast
+ \pgf at circ@res at step=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/conn height}\pgf at y
+ \left
+ \pgf at y=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction}\pgf at circ@res at step
+ }
+ \anchor{base}{
+ \northeast
+ \pgf at circ@res at step=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/conn height}\pgf at y
+ \left
+ \pgf at y=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction}\pgf at circ@res at step
+ }
+ \anchor{G}{
+ \northeast
+ \pgf at circ@res at step=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/conn height}\pgf at y
+ \left
+ \pgf at y=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction}\pgf at circ@res at step
+ }
+ \anchor{gate}{
+ \northeast
+ \pgf at circ@res at step=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/conn height}\pgf at y
+ \left
+ \pgf at y=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction}\pgf at circ@res at step
+ }
+ \anchor{nobase}{
+ \left
+ \pgf at x=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf at x
}
- \anchor{base}{
- \left
- }
- \anchor{nobase}{
- \left
- \pgf at x=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf at x
- }
+ \anchor{nogate}{
+ \left
+ \pgf at x=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate width}\pgf at x
+ }
+ \anchor{E}{
+ \northeast
+ \pgf at y=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction}\pgf at y
+ }
+ \anchor{emitter}{
+ \northeast
+ \pgf at y=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction}\pgf at y
+ }
+ \anchor{C}{
+ \northeast
+ \pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction}\pgf at y
+ }
+ \anchor{collector}{
+ \northeast
+ \pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction}\pgf at y
+ }
+ \anchor{S}{
+ \northeast
+ \pgf at y=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction}\pgf at y
+ }
+ \anchor{source}{
+ \northeast
+ \pgf at y=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction}\pgf at y
+ }
+ \anchor{D}{
+ \northeast
+ \pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction}\pgf at y
+ }
+ \anchor{drain}{
+ \northeast
+ \pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction}\pgf at y
+ }
#2
- \backgroundpath{
+ \backgroundpath{
+ \pgftransformationadjustments
\pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
%
- %
+ \ifnum \pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction} > 0
+ \pgf at circuit@trans at ntypetrue
+ \else
+ \pgf at circuit@trans at ntypefalse
+ \fi
\northeast
\pgf at circ@res at up = \pgf at y
\pgf at circ@res at down = -\pgf at y
@@ -918,509 +964,19 @@
\pgf at circ@res at left = \pgf at x
%
#3
+ % BODY DIODE
+ \ifpgf at circuit@fet at bodydiode
+ \drawbodydiode{#1}
+ \fi
%
}
}
}
-\pgfcircdeclaretransistor{pnp}{
- \anchor{E}{
- \northeast
- }
- \anchor{emitter}{
- \northeast
- }
- \anchor{C}{
- \northeast
- \pgf at y=-\pgf at y
- }
- \anchor{collector}{
- \northeast
- \pgf at y=-\pgf at y
- }
-}{
- \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pnp/base height}\pgf at circ@res at up}}
- \pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pnp/base width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pnp/base height 2}\pgf at circ@res at up}}
- \pgfusepath{draw}
-
- \pgfscope
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pnp/base width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pnp/base height}\pgf at circ@res at up}}
- \pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pnp/base width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pnp/base height}\pgf at circ@res at down}}
- \pgfsetlinewidth{2\pgflinewidth}
- \pgfusepath{draw}
- \endpgfscope
-
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pnp/base width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pnp/base height 2}\pgf at circ@res at down}}
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pnp/base height}\pgf at circ@res at down}}
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
- \pgfusepath{draw}
-
- \pgfscope
- \pgfslopedattimetrue
- \pgfallowupsidedownattimetrue
- \pgfresetnontranslationattimefalse
- \pgftransformlineattime{.5}{%
- \pgfpoint%
- {\pgf at circ@res at right}%
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pnp/base height}\pgf at circ@res at up}%
- }{%
- \pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pnp/base width}\pgf at circ@res at left}%
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pnp/base height 2}\pgf at circ@res at up}%
- }
- \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
- \endpgfscope
- \ifpgf at circuit@bpt at drawphoto
- \pgfscope
- \pgfsetarrowsstart{latex'}
- \pgfpathmoveto{\pgfpointadd{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/base width}\pgf at circ@res at left}
- {\pgf at circ@res at up+\pgf at circ@res at down}}
- {\pgfpoint{0.05\pgf at circ@res at left}{0.1\pgf at circ@res at up}}}
- \pgfpathlineto{\pgfpointadd{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/base width}\pgf at circ@res at left}
- {\pgf at circ@res at up+\pgf at circ@res at down}}
- {\pgfpoint{0.5\pgf at circ@res at left}{0.3\pgf at circ@res at up}}}
- \pgfusepath{draw}
- \pgfpathmoveto{\pgfpointadd{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/base width}\pgf at circ@res at left}
- {\pgf at circ@res at up+\pgf at circ@res at down}}
- {\pgfpoint{0.05\pgf at circ@res at left}{-0.1\pgf at circ@res at up}}}
- \pgfpathlineto{\pgfpointadd{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/base width}\pgf at circ@res at left}
- {\pgf at circ@res at up+\pgf at circ@res at down}}
- {\pgfpoint{0.5\pgf at circ@res at left}{0.1\pgf at circ@res at up}}}
- \pgfusepath{draw}
- \endpgfscope
- \else
- \ifpgf at circuit@bpt at drawbase
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pnp/base width}\pgf at circ@res at left}
- {\pgf at circ@res at up+\pgf at circ@res at down}}
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up+\pgf at circ@res at down}}
- \pgfusepath{draw}
- \fi
- \fi
-}
-
-
-
-
-
-
-\pgfcircdeclaretransistor{npn}{
- \anchor{C}{
- \northeast
- }
- \anchor{collector}{
- \northeast
- }
- \anchor{E}{
- \northeast
- \pgf at y=-\pgf at y
- }
- \anchor{emitter}{
- \northeast
- \pgf at y=-\pgf at y
- }
-}{%
- \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/base height}\pgf at circ@res at up}}
- \pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/base width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/base height 2}\pgf at circ@res at up}}
- \pgfusepath{draw}
-
- \pgfscope
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/base width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/base height}\pgf at circ@res at up}}
- \pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/base width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/base height}\pgf at circ@res at down}}
- \pgfsetlinewidth{2\pgflinewidth}
- \pgfusepath{draw}
- \endpgfscope
-
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/base width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/base height 2}\pgf at circ@res at down}}
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/base height}\pgf at circ@res at down}}
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
- \pgfusepath{draw}
-
- \pgfscope
- \pgfslopedattimetrue
- \pgfallowupsidedownattimetrue
- \pgfresetnontranslationattimefalse
- \pgftransformlineattime{.5}{%
- \pgfpoint%
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/base width}\pgf at circ@res at left}%
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/base height 2}\pgf at circ@res at down}%
- }{%
- \pgfpoint{\pgf at circ@res at right}%
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/base height}\pgf at circ@res at down}%
- }
- \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
- \endpgfscope
-
- \ifpgf at circuit@bpt at drawphoto
- \pgfscope
- \pgfsetarrowsstart{latex'}
- \pgfpathmoveto{\pgfpointadd{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/base width}\pgf at circ@res at left}
- {\pgf at circ@res at up+\pgf at circ@res at down}}
- {\pgfpoint{0.05\pgf at circ@res at left}{0.1\pgf at circ@res at up}}}
- \pgfpathlineto{\pgfpointadd{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/base width}\pgf at circ@res at left}
- {\pgf at circ@res at up+\pgf at circ@res at down}}
- {\pgfpoint{0.5\pgf at circ@res at left}{0.3\pgf at circ@res at up}}}
- \pgfusepath{draw}
- \pgfpathmoveto{\pgfpointadd{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/base width}\pgf at circ@res at left}
- {\pgf at circ@res at up+\pgf at circ@res at down}}
- {\pgfpoint{0.05\pgf at circ@res at left}{-0.1\pgf at circ@res at up}}}
- \pgfpathlineto{\pgfpointadd{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/base width}\pgf at circ@res at left}
- {\pgf at circ@res at up+\pgf at circ@res at down}}
- {\pgfpoint{0.5\pgf at circ@res at left}{0.1\pgf at circ@res at up}}}
- \pgfusepath{draw}
- \endpgfscope
- \else
- \ifpgf at circuit@bpt at drawbase
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/base width}\pgf at circ@res at left}
- {\pgf at circ@res at up+\pgf at circ@res at down}}
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up+\pgf at circ@res at down}}
- \pgfusepath{draw}
- \fi
- \fi
-}
-
-
-
-\pgfcircdeclaretransistor{pigbt}{
- \anchor{E}{
- \northeast
- }
- \anchor{emitter}{
- \northeast
- }
- \anchor{B}{
- \left
- }
- \anchor{base}{
- \left
- }
- \anchor{C}{
- \northeast
- \pgf at y=-\pgf at y
- }
- \anchor{collector}{
- \northeast
- \pgf at y=-\pgf at y
- }
-}{
- \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/gate height}\pgf at circ@res at up}}
- \pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/base width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/gate height 2}\pgf at circ@res at up}}
- \pgfusepath{draw}
-
- \pgfscope
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/gate width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/base height}\pgf at circ@res at up}}
- \pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/gate width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/base height}\pgf at circ@res at down}}
- %\pgfsetlinewidth{2\pgflinewidth}
- \pgfusepath{draw}
- \endpgfscope
-
- \pgfscope
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/base width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/base height}\pgf at circ@res at up}}
- \pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/base width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/base height}\pgf at circ@res at down}}
- \pgfsetlinewidth{2\pgflinewidth}
- \pgfusepath{draw}
- \endpgfscope
-
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/base width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/gate height 2}\pgf at circ@res at down}}
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/gate height}\pgf at circ@res at down}}
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
- \pgfusepath{draw}
-
- \pgfscope
- \pgfslopedattimetrue
- \pgfallowupsidedownattimetrue
- \pgfresetnontranslationattimefalse
- \pgftransformlineattime{.5}{%
- \pgfpoint%
- {\pgf at circ@res at right}%
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/gate height}\pgf at circ@res at up}%
- }{%
- \pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/base width}\pgf at circ@res at left}%
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/gate height 2}\pgf at circ@res at up}%
- }
- \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
- \endpgfscope
-
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/gate width}\pgf at circ@res at left}
- {\pgf at circ@res at up+\pgf at circ@res at down}}
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up+\pgf at circ@res at down}}
- \pgfusepath{draw}
-
-
-}
-
-
-
-\pgfcircdeclaretransistor{nigbt}{
- \anchor{C}{
- \northeast
- }
- \anchor{collector}{
- \northeast
- }
- \anchor{B}{
- \left
- }
- \anchor{base}{
- \left
- }
- \anchor{E}{
- \northeast
- \pgf at y=-\pgf at y
- }
- \anchor{emitter}{
- \northeast
- \pgf at y=-\pgf at y
- }
-}{
- \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/gate height}\pgf at circ@res at up}}
- \pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/base width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/gate height 2}\pgf at circ@res at up}}
- \pgfusepath{draw}
-
- \pgfscope
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/gate width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/base height}\pgf at circ@res at up}}
- \pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/gate width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/base height}\pgf at circ@res at down}}
- \pgfsetlinewidth{2\pgflinewidth}
- \pgfusepath{draw}
- \endpgfscope
-
- \pgfscope
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/base width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/base height}\pgf at circ@res at up}}
- \pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/base width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/base height}\pgf at circ@res at down}}
- %\pgfsetlinewidth{2\pgflinewidth}
- \pgfusepath{draw}
- \endpgfscope
-
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/base width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/gate height 2}\pgf at circ@res at down}}
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/gate height}\pgf at circ@res at down}}
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
- \pgfusepath{draw}
-
- \pgfscope
- \pgfslopedattimetrue
- \pgfallowupsidedownattimetrue
- \pgfresetnontranslationattimefalse
- \pgftransformlineattime{.5}{%
- \pgfpoint%
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/base width}\pgf at circ@res at left}%
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/gate height 2}\pgf at circ@res at down}%
- }{%
- \pgfpoint{\pgf at circ@res at right}%
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/gate height}\pgf at circ@res at down}%
- }
- \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
- \endpgfscope
-
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/gate width}\pgf at circ@res at left}
- {\pgf at circ@res at up+\pgf at circ@res at down}}
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up+\pgf at circ@res at down}}
- \pgfusepath{draw}
-
-
-}
-
-
-
-
-
-
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%% Contrib
-
-
-%%
-% IGFET (e.g. MOSFET)
-\long\def\pgfcircdeclarefet#1#2#3{
-\pgfdeclareshape{#1}{
- \anchor{center}
- {\pgfpointorigin}
- \savedanchor\northeast{% upper right
- \pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
- \pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/height}\pgf at y
- \pgf at y=.5\pgf at y
- \pgf at x=0pt
- }
- \savedanchor\left{%center left
- \pgf at y=0pt
- \pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
- \pgf at x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/width}\pgf at x
- }
- \anchor{text}{
- \northeast
- \pgfpoint
- {12\pgf at circ@res at right +0.2*(\pgf at circ@res at right-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate width}\pgf at circ@res at left)}
- {0.6\pgf at y}
- }
- %
- % pseudo-bipole
- \anchor{left}{ % south
- \northeast
- \pgf at y=-\pgf at y
- }
- \anchor{right}{
- \northeast
- }
- \anchor{north}{
- \northeast
- \pgf at circ@res at step=\pgf at y
- \left
- \pgf at y=\pgf at circ@res at step
- \pgf at x=.5\pgf at x
- }
- \anchor{west}{
- \left
- }
- \anchor{east}{
- \pgf at x=0pt
- \pgf at y=0pt
- }
- \anchor{south}{
- \northeast
- \pgf at circ@res at step=\pgf at y
- \left
- \pgf at y=-\pgf at circ@res at step
- \pgf at x=.5\pgf at x
- }
- \anchor{south west}{
- \northeast
- \pgf at circ@res at step=\pgf at y
- \left
- \pgf at y=-\pgf at circ@res at step
- }
- \anchor{north east}{
- \northeast
- }
- \anchor{north west}{
- \northeast
- \pgf at circ@res at step=\pgf at y
- \left
- \pgf at y=\pgf at circ@res at step
- }
- \anchor{south east}{
- \northeast
- \pgf at y=-\pgf at y
- }
- \anchor{G}{
- \left
- }
- \anchor{gate}{
- \left
- }
- \anchor{B}{
- \left
- \pgf at x=\pgf at circ@res at right
- }
- \anchor{base}{
- \left
- \pgf at x=\pgf at circ@res at right
- }
- \anchor{Bulk}{
- \left
- \pgf at x=\pgf at circ@res at right
- }
- \anchor{nobase}{
- \left
- \pgf at x=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate width}\pgf at x
- }
- \anchor{nogate}{
- \left
- \pgf at x=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate width}\pgf at x
- }
- #2
- \backgroundpath{
- \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
- %
- %
- \northeast
- \pgf at circ@res at up = \pgf at y
- \pgf at circ@res at down = -\pgf at y
- \pgf at circ@res at right = \pgf at x
- \left
- \pgf at circ@res at left = \pgf at x
- %
- #3
- % BODY DIODE
- \ifpgf at circuit@fet at bodydiode
- \drawbodydiode{#1}
- \fi
- }
-}
-}
-
\long\def\drawbodydiode#1{
\pgfscope
\pgftransformshift{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/bodydiode distance}\pgf at circ@res at left}{\pgf at circ@res at up+\pgf at circ@res at down}}
- \ifpgf at circuit@fet at ntype
- \pgftransformrotate{90}
- \else
- \pgftransformrotate{-90}
- \fi
+ \pgftransformrotate{90}
\pgftransformscale{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/bodydiode scale}}
\ifpgf at circuit@fulldiode
\pgfnode{fulldiodeshape}{center}{}{pgf at bodydiode}{\pgfusepath{fill}}
@@ -1433,11 +989,7 @@
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/bodydiode conn}\pgf at circ@res at up}}
\pgfpathlineto{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/bodydiode distance}\pgf at circ@res at left}
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/bodydiode conn}\pgf at circ@res at up}}
- \ifpgf at circuit@fet at ntype
\pgfpathlineto{\pgfpointanchor{pgf at bodydiode}{east}}
- \else
- \pgfpathlineto{\pgfpointanchor{pgf at bodydiode}{west}}
- \fi
\pgfusepath{draw}
\pgfscope
\pgftransformshift{\pgfpoint{\pgf at circ@res at right}
@@ -1449,45 +1001,194 @@
\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/bodydiode conn}\pgf at circ@res at down}}
\pgfpathlineto{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/bodydiode distance}\pgf at circ@res at left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/bodydiode conn}\pgf at circ@res at down}}
- \ifpgf at circuit@fet at ntype
\pgfpathlineto{\pgfpointanchor{pgf at bodydiode}{west}}
- \else
- \pgfpathlineto{\pgfpointanchor{pgf at bodydiode}{east}}
- \fi
\pgfusepath{draw}
\pgfscope
- \pgftransformshift{\pgfpoint{\pgf at circ@res at right} {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/bodydiode conn}\pgf at circ@res at down}}
- \pgftransformscale{0.5}
- \pgfnode{circ}{center}{}{}{\pgfusepath{fill}}
- \endpgfscope
+ \pgftransformshift{\pgfpoint{\pgf at circ@res at right} {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/bodydiode conn}\pgf at circ@res at down}}
+ \pgftransformscale{0.5}
+ \pgfnode{circ}{center}{}{}{\pgfusepath{fill}}
+ \endpgfscope
}
-\pgfcircdeclarefet{nmos}{
- \anchor{B}{
- \left
- \pgf at x=\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/base width}\pgf at x
- }
- \anchor{base}{
- \left
- \pgf at x=\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/base width}\pgf at x
- }
- \anchor{D}{
- \northeast
- }
- \anchor{drain}{
- \northeast
- }
- \anchor{S}{
- \northeast
- \pgf at y=-\pgf at y
- }
- \anchor{source}{
- \northeast
- \pgf at y=-\pgf at y
- }
-}{%
- \pgf at circuit@fet at ntypetrue
- \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
+\long\def\declarebpt#1{
+ \pgfcircdeclaretransistor{#1}{}{
+ \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf at circ@res at up}}
+ \pgfpathlineto{\pgfpoint
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf at circ@res at left}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height 2}\pgf at circ@res at up}}
+ \pgfusepath{draw}
+
+ \pgfscope
+ \pgfpathmoveto{\pgfpoint
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf at circ@res at left}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf at circ@res at up}}
+ \pgfpathlineto{\pgfpoint
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf at circ@res at left}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf at circ@res at down}}
+ \pgfsetlinewidth{2\pgflinewidth}
+ \pgfusepath{draw}
+ \endpgfscope
+
+ \pgfpathmoveto{\pgfpoint
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf at circ@res at left}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height 2}\pgf at circ@res at down}}
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf at circ@res at down}}
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down-\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
+ \pgfusepath{draw}
+ %draw arrow depending on type of transiytor
+ \pgfscope
+ \pgfslopedattimetrue
+ \pgfallowupsidedownattimetrue
+ \pgfresetnontranslationattimefalse
+ \ifpgf at circuit@trans at ntype
+ \pgftransformlineattime{.5}{%
+ \pgfpoint%
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf at circ@res at left}%
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height 2}\pgf at circ@res at down}%
+ }{%
+ \pgfpoint{\pgf at circ@res at right}%
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf at circ@res at down}%
+ }
+ \else
+ \pgftransformlineattime{.5}{%
+ \pgfpoint{\pgf at circ@res at right}%
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf at circ@res at up}%
+ }{%
+ \pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf at circ@res at left}%
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height 2}\pgf at circ@res at up}%
+ }
+ \fi
+ \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
+ \endpgfscope
+
+ \ifpgf at circuit@bpt at drawphoto
+ \pgfscope
+ \pgfsetarrowsstart{latex'}
+ \pgfpathmoveto{\pgfpointadd{\pgfpoint
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf at circ@res at left}
+ {\pgf at circ@res at up+\pgf at circ@res at down}}
+ {\pgfpoint{0.05\pgf at circ@res at left}{0.1\pgf at circ@res at up}}}
+ \pgfpathlineto{\pgfpointadd{\pgfpoint
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf at circ@res at left}
+ {\pgf at circ@res at up+\pgf at circ@res at down}}
+ {\pgfpoint{0.5\pgf at circ@res at left}{0.3\pgf at circ@res at up}}}
+ \pgfusepath{draw}
+ \pgfpathmoveto{\pgfpointadd{\pgfpoint
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf at circ@res at left}
+ {\pgf at circ@res at up+\pgf at circ@res at down}}
+ {\pgfpoint{0.05\pgf at circ@res at left}{-0.1\pgf at circ@res at up}}}
+ \pgfpathlineto{\pgfpointadd{\pgfpoint
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf at circ@res at left}
+ {\pgf at circ@res at up+\pgf at circ@res at down}}
+ {\pgfpoint{0.5\pgf at circ@res at left}{0.1\pgf at circ@res at up}}}
+ \pgfusepath{draw}
+ \endpgfscope
+ \else
+ \ifpgf at circuit@bpt at drawbase
+ \pgfpathmoveto{\pgfpoint
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf at circ@res at left}
+ {\pgf at circ@res at up+\pgf at circ@res at down}}
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at left-\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}{\pgf at circ@res at up+\pgf at circ@res at down}}
+ \pgfusepath{draw}
+ \fi
+ \fi
+ }
+}
+
+\declarebpt{npn}
+\declarebpt{pnp}
+
+\long\def\declareigbt#1{
+\pgfcircdeclaretransistor{#1}{}
+{
+ %draw upper connection
+ \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height}\pgf at circ@res at up}}
+ \pgfpathlineto{\pgfpoint
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf at circ@res at left}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height 2}\pgf at circ@res at up}}
+ \pgfusepath{draw}
+
+ %draw thicker gate lines
+ \pgfscope
+ \pgfpathmoveto{\pgfpoint
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate width}\pgf at circ@res at left}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf at circ@res at up+\pgfverticaltransformationadjustment*.5\pgflinewidth}}
+ \pgfpathlineto{\pgfpoint
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate width}\pgf at circ@res at left}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf at circ@res at down-\pgfverticaltransformationadjustment*.5\pgflinewidth}}
+ \pgfpathmoveto{\pgfpoint
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf at circ@res at left}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf at circ@res at up+\pgfverticaltransformationadjustment*.5\pgflinewidth}}
+ \pgfpathlineto{\pgfpoint
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf at circ@res at left}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf at circ@res at down-\pgfverticaltransformationadjustment*.5\pgflinewidth}}
+ \pgfsetlinewidth{2\pgflinewidth}
+ \pgfusepath{draw}
+ \endpgfscope
+ %draw lower connection
+ \pgfpathmoveto{\pgfpoint
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf at circ@res at left}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height 2}\pgf at circ@res at down}}
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height}\pgf at circ@res at down}}
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down-\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
+ \pgfusepath{draw}
+ %draw arrow depending on type of transiytor
+ \pgfscope
+ \pgfslopedattimetrue
+ \pgfallowupsidedownattimetrue
+ \pgfresetnontranslationattimefalse
+ \ifpgf at circuit@trans at ntype
+ \pgftransformlineattime{.5}{%
+ \pgfpoint%
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf at circ@res at left}%
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height 2}\pgf at circ@res at down}%
+ }{%
+ \pgfpoint{\pgf at circ@res at right}%
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height}\pgf at circ@res at down}%
+ }
+ \else
+ \pgftransformlineattime{.5}{%
+ \pgfpoint{\pgf at circ@res at right}%
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height}\pgf at circ@res at up}%
+ }{%
+ \pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf at circ@res at left}%
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height 2}\pgf at circ@res at up}%
+ }
+ \fi
+ \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
+ \endpgfscope
+ %draw gate
+ \ifpgf at circuit@trans at ntype
+ \pgfpathmoveto{\pgfpoint
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate width}\pgf at circ@res at left}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/conn height}\pgf at circ@res at down}}
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at left-\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}%
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/conn height}\pgf at circ@res at down}}
+ \else
+ \pgfpathmoveto{\pgfpoint
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate width}\pgf at circ@res at left}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/conn height}\pgf at circ@res at up}}
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at left-\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}%
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/conn height}\pgf at circ@res at up}}
+ \fi
+ \pgfusepath{draw}
+}
+}
+
+\declareigbt{pigbt}
+\declareigbt{nigbt}
+\declareigbt{Lnigbt}
+\declareigbt{Lpigbt}
+
+
+\pgfcircdeclaretransistor{nmos}{}{%
+ \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf at circ@res at up}}
\pgfpathlineto{\pgfpoint
@@ -1496,21 +1197,20 @@
\pgfpathmoveto{\pgfpoint
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/base width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/base height}\pgf at circ@res at up}}
- \pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/base width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/base height}\pgf at circ@res at down}}
-
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/base width}\pgf at circ@res at left}
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf at circ@res at down}}
\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf at circ@res at down}}
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down-\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
\pgfusepath{draw}
\pgfscope
\pgfpathmoveto{\pgfpoint
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/base width}\pgf at circ@res at left}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/base height}\pgf at circ@res at up}}
+ \pgfpathlineto{\pgfpoint
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/base width}\pgf at circ@res at left}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/base height}\pgf at circ@res at down}}
+ \pgfpathmoveto{\pgfpoint
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate width}\pgf at circ@res at left}
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf at circ@res at up}}
\pgfpathlineto{\pgfpoint
@@ -1541,38 +1241,14 @@
\pgfpathmoveto{\pgfpoint
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate width}\pgf at circ@res at left}
{\pgf at circ@res at up+\pgf at circ@res at down}}
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up+\pgf at circ@res at down}}
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at left-\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}{\pgf at circ@res at up+\pgf at circ@res at down}}
\pgfusepath{draw}
\fi
}
-\pgfcircdeclarefet{pmos}{
- \anchor{B}{
- \left
- \pgf at x=\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/base width}\pgf at x
- }
- \anchor{base}{
- \left
- \pgf at x=\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/base width}\pgf at x
- }
- \anchor{S}{
- \northeast
- }
- \anchor{source}{
- \northeast
- }
- \anchor{D}{
- \northeast
- \pgf at y=-\pgf at y
- }
- \anchor{drain}{
- \northeast
- \pgf at y=-\pgf at y
- }
-}{%
- \pgf at circuit@fet at ntypefalse
- \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
+\pgfcircdeclaretransistor{pmos}{}{%
+ \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf at circ@res at up}}
\pgfpathlineto{\pgfpoint
@@ -1605,6 +1281,12 @@
\pgfpathlineto{\pgfpoint
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/base width}\pgf at circ@res at left}
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/base height}\pgf at circ@res at down}}
+ \pgfpathmoveto{\pgfpoint
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate width}\pgf at circ@res at left}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf at circ@res at up}}
+ \pgfpathlineto{\pgfpoint
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate width}\pgf at circ@res at left}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf at circ@res at down}}
\pgfsetlinewidth{2\pgflinewidth}
\pgfusepath{draw}
\endpgfscope
@@ -1614,20 +1296,15 @@
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf at circ@res at down}}
\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf at circ@res at down}}
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down-\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf at circ@res at up}}
- \pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf at circ@res at down}}
+
\pgfusepath{draw}
\ifpgf at circuit@bpt at drawgate
\pgfpathmoveto{\pgfpoint
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate width}\pgf at circ@res at left}
{\pgf at circ@res at up+\pgf at circ@res at down}}
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up+\pgf at circ@res at down}}
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at left-\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}{\pgf at circ@res at up+\pgf at circ@res at down}}
\pgfusepath{draw}
\fi
\pgfpathcircle{\pgfpoint
@@ -1639,287 +1316,138 @@
\pgfusepath{draw,fill}
}
-
-
-\pgfcircdeclarefet{nfet}{
- \anchor{D}{
- \northeast
- }
- \anchor{drain}{
- \northeast
- }
- \anchor{S}{
- \northeast
- \pgf at y=-\pgf at y
- }
- \anchor{source}{
- \northeast
- \pgf at y=-\pgf at y
- }
- \anchor{G}{
- \left
- }
- \anchor{gate}{
- \left
- }
-
-}{%
- \pgf at circuit@fet at ntypetrue
- \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
+\long\def\drawfetcore#1{
+ \pgftransformationadjustments
+ %top connection
+ \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/gate height}\pgf at circ@res at up}}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height}\pgf at circ@res at up}}
\pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/base width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/gate height}\pgf at circ@res at up}}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf at circ@res at left}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height}\pgf at circ@res at up}}
+ \pgfusepath{draw}
+ \pgfscope
+ \pgfpathmoveto{\pgfpoint
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf at circ@res at left}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf at circ@res at up}}
+ \ifpgf at circuit@trans at depletiontype
+ \pgfpathlineto{\pgfpoint
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf at circ@res at left}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf at circ@res at down}}
+ \else
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/base width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/base height}\pgf at circ@res at up}}
\pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/base width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/base height}\pgf at circ@res at up*0.45}}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf at circ@res at left}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf at circ@res at up*0.45}}
\pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/base width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/base height}\pgf at circ@res at up*0.25}}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf at circ@res at left}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf at circ@res at up*0.25}}
\pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/base width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/base height}\pgf at circ@res at down*0.25}}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf at circ@res at left}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf at circ@res at down*0.25}}
\pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/base width}\pgf at circ@res at left}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf at circ@res at left}
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/base height}\pgf at circ@res at down*0.45}}
\pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/base width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/base height}\pgf at circ@res at down}}
-
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf at circ@res at left}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf at circ@res at down}}
+ \fi
+ \pgfsetlinewidth{2\pgflinewidth}
+ \pgfusepath{draw}
+ \endpgfscope
+ %Bulk connection line
\pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/base width}\pgf at circ@res at left}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf at circ@res at left}
{\pgf at circ@res at up+\pgf at circ@res at down}}
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at right+\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}
{\pgf at circ@res at up+\pgf at circ@res at down}}
+ %bottom connection
\pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/base width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/gate height}\pgf at circ@res at down}}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf at circ@res at left}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height}\pgf at circ@res at down}}
\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/gate height}\pgf at circ@res at down}}
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height}\pgf at circ@res at down}}
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down-\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
\pgfusepath{draw}
-
+
+ %draw thick gate line
+ \pgfscope
+ \pgfpathmoveto{\pgfpoint
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate width}\pgf at circ@res at left}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height}\pgf at circ@res at up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
+ \pgfpathlineto{\pgfpoint
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate width}\pgf at circ@res at left}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height}\pgf at circ@res at down-\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
+ \pgfsetlinewidth{2\pgflinewidth}
+ \pgfusepath{draw}
+ \endpgfscope
+
\pgfscope
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/gate width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/gate height}\pgf at circ@res at up}}
- \pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/gate width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/gate height}\pgf at circ@res at down}}
- \pgfsetlinewidth{2\pgflinewidth}
- \pgfusepath{draw}
- \endpgfscope
+ \pgfslopedattimetrue
+ \pgfallowupsidedownattimetrue
+ \pgfresetnontranslationattimefalse
+
+ \pgftransformlineattime{.6}{%
+ \pgfpoint
+ {\pgf at circ@res at right}%
+ {\pgf at circ@res at up+\pgf at circ@res at down}%
+ }{%
+ \pgfpoint%
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf at circ@res at left}%
+ {\pgf at circ@res at up+\pgf at circ@res at down}%
+ }
+ \ifpgf at circuit@trans at ntype
+ \else
+ \pgftransformrotate{180}
+ \fi
+ \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
+ \endpgfscope
- \pgfscope
- \pgfslopedattimetrue
- \pgfallowupsidedownattimetrue
- \pgfresetnontranslationattimefalse
- \pgftransformlineattime{.6}{%
- \pgfpoint
- {\pgf at circ@res at right}%
- {\pgf at circ@res at up+\pgf at circ@res at down}%
- }{%
- \pgfpoint%
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/base width}\pgf at circ@res at left}%
- {\pgf at circ@res at up+\pgf at circ@res at down}%
- }
- \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
- \endpgfscope
+ % GATE CONNECTION
+ \ifpgf at circuit@bpt at drawgate
+ \ifpgf at circuit@trans at ntype
+ \pgfpathmoveto{\pgfpoint
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate width}\pgf at circ@res at left}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/conn height}\pgf at circ@res at down}}
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at left-\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/conn height}\pgf at circ@res at down}}
+ \else
+ \pgfpathmoveto{\pgfpoint
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate width}\pgf at circ@res at left}
+ {-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/conn height}\pgf at circ@res at down}}
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at left-\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/conn height}\pgf at circ@res at down}}
+ \fi
+ \pgfusepath{draw}
+ \fi
- \ifpgf at circuit@bpt at drawgate
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/gate width}\pgf at circ@res at left}
- {\pgf at circ@res at up+\pgf at circ@res at down}}
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up+\pgf at circ@res at down}}
- \pgfusepath{draw}
- \fi
}
+\long\def\pgfdeclaretransistorwrapperaddbulk#1#2#3
+{\pgfcircdeclaretransistor{#1}{
+ \anchor{bulk}{\left\pgf at x=0pt}
+ \anchor{B}{\left\pgf at x=0pt}%override Base anchor from npn&igbt
+ #2
+ }
+ {#3}
+}
-\pgfcircdeclarefet{pfet}{
- \anchor{D}{
- \northeast
- }
- \anchor{drain}{
- \northeast
- }
- \anchor{S}{
- \northeast
- \pgf at y=-\pgf at y
- }
- \anchor{source}{
- \northeast
- \pgf at y=-\pgf at y
- }
- \anchor{G}{
- \left
- }
- \anchor{gate}{
- \left
- }
-}{%
- \pgf at circuit@fet at ntypefalse
- \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/gate height}\pgf at circ@res at up}}
- \pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/base width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/gate height}\pgf at circ@res at up}}
- \pgfusepath{draw}
+\pgfdeclaretransistorwrapperaddbulk{nfet}{}{%
+ \pgf at circuit@trans at depletiontypefalse
+ \drawfetcore{nfet}
+}
- \pgfscope
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/base width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/base height}\pgf at circ@res at up}}
- \pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/base width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/base height}\pgf at circ@res at up*0.45}}
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/base width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/base height}\pgf at circ@res at up*0.25}}
- \pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/base width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/base height}\pgf at circ@res at down*0.25}}
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/base width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/base height}\pgf at circ@res at down*0.45}}
- \pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/base width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/base height}\pgf at circ@res at down}}
- \pgfsetlinewidth{2\pgflinewidth}
- \pgfusepath{draw}
- \endpgfscope
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/base width}\pgf at circ@res at left}
- {\pgf at circ@res at up+\pgf at circ@res at down}}
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
- {\pgf at circ@res at up+\pgf at circ@res at down}}
-
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/base width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/gate height}\pgf at circ@res at down}}
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/gate height}\pgf at circ@res at down}}
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
- \pgfusepath{draw}
-
- \pgfscope
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/gate width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/gate height}\pgf at circ@res at up}}
- \pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/gate width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/gate height}\pgf at circ@res at down}}
- %\pgfsetlinewidth{2\pgflinewidth}
- \pgfusepath{draw}
- \endpgfscope
-
- \pgfscope
- \pgfslopedattimetrue
- \pgfallowupsidedownattimetrue
- \pgfresetnontranslationattimefalse
- \pgftransformlineattime{.6}{%
- \pgfpoint
- {\pgf at circ@res at right}%
- {\pgf at circ@res at up+\pgf at circ@res at down}%
- }{%
- \pgfpoint%
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/base width}\pgf at circ@res at left}%
- {\pgf at circ@res at up+\pgf at circ@res at down}%
- }
- \pgftransformrotate{180}
- \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
- \endpgfscope
-
- \ifpgf at circuit@bpt at drawgate
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/gate width}\pgf at circ@res at left}
- {\pgf at circ@res at up+\pgf at circ@res at down}}
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up+\pgf at circ@res at down}}
- \pgfusepath{draw}
- \fi
+\pgfdeclaretransistorwrapperaddbulk{pfet}{}{%
+ \pgf at circuit@trans at depletiontypefalse
+ \drawfetcore{pfet}
}
-
-
% N-CHANNEL IGFET ENHANCEMENT TYPE
-\pgfcircdeclarefet{nigfete}{
- \anchor{D}{
- \northeast
- }
- \anchor{drain}{
- \northeast
- }
- \anchor{S}{
- \northeast
- \pgf at y=-\pgf at y
- }
- \anchor{source}{
- \northeast
- \pgf at y=-\pgf at y
- }
- \anchor{G}{
- \northeast
- \pgf at circ@res at step=\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf at y
- \left
- \pgf at y=-\pgf at circ@res at step
- }
- \anchor{gate}{
- \northeast
- \pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf at y
- }
-}{%
- \pgf at circuit@fet at ntypetrue
- \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
- % DRAIN CONNECTION
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf at circ@res at up}}
- % DRAIN
- \pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/base width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf at circ@res at up}}
-
- % GATE, ENHANCEMENT TYPE (DASHED)
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/base width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/base height}\pgf at circ@res at up}}
- \pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/base width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/base height}\pgf at circ@res at up*0.45}}
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/base width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/base height}\pgf at circ@res at up*0.25}}
- \pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/base width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/base height}\pgf at circ@res at down*0.25}}
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/base width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/base height}\pgf at circ@res at down*0.45}}
- \pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/base width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/base height}\pgf at circ@res at down}}
-
- % BULK
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/base width}\pgf at circ@res at left}
- {\pgf at circ@res at up+\pgf at circ@res at down}}
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
- {\pgf at circ@res at up+\pgf at circ@res at down}}
-
- % SOURCE
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/base width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf at circ@res at down}}
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf at circ@res at down}}
+\pgfdeclaretransistorwrapperaddbulk{nigfete}{}{%
+ \pgf at circuit@trans at depletiontypefalse
+ \drawfetcore{nigfete}
+
% SOURCE CONNECTION
\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{0pt}}
\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
@@ -1933,43 +1461,6 @@
\pgfnode{circ}{center}{}{}{}
\endpgfscope{}
\fi
- % GATE
- \pgfscope
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf at circ@res at up}}
- \pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf at circ@res at down}}
- \pgfsetlinewidth{2\pgflinewidth}
- \pgfusepath{draw}
- \endpgfscope
-
- % ARROW
- \pgfscope
- \pgfslopedattimetrue
- \pgfallowupsidedownattimetrue
- \pgfresetnontranslationattimefalse
- \pgftransformlineattime{.6}{%
- \pgfpoint
- {\pgf at circ@res at right}%
- {\pgf at circ@res at up+\pgf at circ@res at down}%
- }{%
- \pgfpoint%
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/base width}\pgf at circ@res at left}%
- {\pgf at circ@res at up+\pgf at circ@res at down}%
- }
- \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
- \endpgfscope
-
- \ifpgf at circuit@bpt at drawgate
- % GATE CONNECTION
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf at circ@res at down}}
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf at circ@res at down}}
- \pgfusepath{draw}
- \fi
}
@@ -1976,117 +1467,16 @@
% N-CHANNEL IGFET ENHANCEMENT TYPE with Bulk connector
-\pgfcircdeclarefet{nigfetebulk}{ %nur ohne strich zwischen Bulk und Source
- \anchor{D}{
- \northeast
- }
- \anchor{drain}{
- \northeast
- }
- \anchor{S}{
- \northeast
- \pgf at y=-\pgf at y
- }
- \anchor{source}{
- \northeast
- \pgf at y=-\pgf at y
- }
- \anchor{G}{
- \northeast
- \pgf at circ@res at step=\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetebulk/gate height}\pgf at y
- \left
- \pgf at y=-\pgf at circ@res at step
- }
- \anchor{gate}{
- \northeast
- \pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetebulk/gate height}\pgf at y
- }
-}{%
- \pgf at circuit@fet at ntypetrue
- \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
- % DRAIN CONNECTION
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetebulk/gate height}\pgf at circ@res at up}}
- % DRAIN
- \pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetebulk/base width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetebulk/gate height}\pgf at circ@res at up}}
-
- % GATE, ENHANCEMENT TYPE (DASHED)
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetebulk/base width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetebulk/base height}\pgf at circ@res at up}}
- \pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetebulk/base width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetebulk/base height}\pgf at circ@res at up*0.45}}
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetebulk/base width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetebulk/base height}\pgf at circ@res at up*0.25}}
- \pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetebulk/base width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetebulk/base height}\pgf at circ@res at down*0.25}}
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetebulk/base width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetebulk/base height}\pgf at circ@res at down*0.45}}
- \pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetebulk/base width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetebulk/base height}\pgf at circ@res at down}}
-
- % BULK
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetebulk/base width}\pgf at circ@res at left}
- {\pgf at circ@res at up+\pgf at circ@res at down}}
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
- {\pgf at circ@res at up+\pgf at circ@res at down}}
-
- % SOURCE
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetebulk/base width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetebulk/gate height}\pgf at circ@res at down}}
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetebulk/gate height}\pgf at circ@res at down}}
- % SOURCE CONNECTION
- \pgfpathmoveto{\pgfpoint
- {\pgf at circ@res at right}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetebulk/gate height}\pgf at circ@res at down}} %Geändert
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
- \pgfusepath{draw}
-
- % GATE
+\pgfdeclaretransistorwrapperaddbulk{nigfetebulk}{}{%
+ \pgf at circuit@trans at depletiontypefalse
+ \drawfetcore{nigfetebulk}
+ % SOLDER DOT at source-bulk connection
+ \ifpgf at circuit@fet at solderdot
\pgfscope
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetebulk/gate width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetebulk/gate height}\pgf at circ@res at up}}
- \pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetebulk/gate width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetebulk/gate height}\pgf at circ@res at down}}
- \pgfsetlinewidth{2\pgflinewidth}
- \pgfusepath{draw}
- \endpgfscope
-
- % ARROW
- \pgfscope
- \pgfslopedattimetrue
- \pgfallowupsidedownattimetrue
- \pgfresetnontranslationattimefalse
- \pgftransformlineattime{.6}{%
- \pgfpoint
- {\pgf at circ@res at right}%
- {\pgf at circ@res at up+\pgf at circ@res at down}%
- }{%
- \pgfpoint%
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetebulk/base width}\pgf at circ@res at left}%
- {\pgf at circ@res at up+\pgf at circ@res at down}%
- }
- \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
- \endpgfscope
- \ifpgf at circuit@bpt at drawgate
- % GATE CONNECTION
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetebulk/gate width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetebulk/gate height}\pgf at circ@res at down}}
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetebulk/gate height}\pgf at circ@res at down}}
- \pgfusepath{draw}
+ \pgftransformshift{\pgfpoint{\pgf at circ@res at right}{
+ \pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetebulk/gate height}\pgf at circ@res at down}}
+ \pgfnode{circ}{center}{}{}{}
+ \endpgfscope{}
\fi
}
@@ -2093,70 +1483,15 @@
% N-CHANNEL IGFET DEPLETION TYPE
-\pgfcircdeclarefet{nigfetd}{
- \anchor{D}{
- \northeast
- }
- \anchor{drain}{
- \northeast
- }
- \anchor{S}{
- \northeast
- \pgf at y=-\pgf at y
- }
- \anchor{source}{
- \northeast
- \pgf at y=-\pgf at y
- }
- \anchor{G}{
- \northeast
- \pgf at circ@res at step=\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/gate height}\pgf at y
- \left
- \pgf at y=-\pgf at circ@res at step
- }
- \anchor{gate}{
- \northeast
- \pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/gate height}\pgf at y
- }
+\pgfdeclaretransistorwrapperaddbulk{nigfetd}{}{%
+ \pgf at circuit@trans at depletiontypetrue
+ \drawfetcore{nigfetd}
-}{%
- \pgf at circuit@fet at ntypetrue
- \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
- % DRAIN CONNECTION
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/gate height}\pgf at circ@res at up}}
- % DRAIN
- \pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/base width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/gate height}\pgf at circ@res at up}}
-
- % GATE, DEPLETION TYPE
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/base width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/base height}\pgf at circ@res at up}}
- \pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/base width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/base height}\pgf at circ@res at down}}
-
- % BULK
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/base width}\pgf at circ@res at left}
- {\pgf at circ@res at up+\pgf at circ@res at down}}
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
- {\pgf at circ@res at up+\pgf at circ@res at down}}
-
- % SOURCE
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/base width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/gate height}\pgf at circ@res at down}}
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/gate height}\pgf at circ@res at down}}
% SOURCE CONNECTION
\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{0pt}}
\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
\pgfusepath{draw}
-
-
+
% SOLDER DOT at source-bulk connection
\ifpgf at circuit@fet at solderdot
\pgfscope
@@ -2165,123 +1500,17 @@
\pgfnode{circ}{center}{}{}{}
\endpgfscope{}
\fi
- % GATE
- \pgfscope
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/gate width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/gate height}\pgf at circ@res at up}}
- \pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/gate width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/gate height}\pgf at circ@res at down}}
- \pgfsetlinewidth{2\pgflinewidth}
- \pgfusepath{draw}
- \endpgfscope
-
- % ARROW
- \pgfscope
- \pgfslopedattimetrue
- \pgfallowupsidedownattimetrue
- \pgfresetnontranslationattimefalse
- \pgftransformlineattime{.6}{%
- \pgfpoint
- {\pgf at circ@res at right}%
- {\pgf at circ@res at up+\pgf at circ@res at down}%
- }{%
- \pgfpoint%
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/base width}\pgf at circ@res at left}%
- {\pgf at circ@res at up+\pgf at circ@res at down}%
- }
- \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
- \endpgfscope
- \ifpgf at circuit@bpt at drawgate
- % GATE CONNECTION
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/gate width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/gate height}\pgf at circ@res at down}}
- %\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up+\pgf at circ@res at down}}
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/gate height}\pgf at circ@res at down}}
- \pgfusepath{draw}
- \fi
}
% P-CHANNEL IGFET ENHANCEMENT TYPE
-\pgfcircdeclarefet{pigfete}{
- \anchor{D}{
- \northeast
- }
- \anchor{drain}{
- \northeast
- }
- \anchor{S}{
- \northeast
- \pgf at y=-\pgf at y
- }
- \anchor{source}{
- \northeast
- \pgf at y=-\pgf at y
- }
- \anchor{G}{
- \northeast
- \pgf at circ@res at step=\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/gate height}\pgf at y
- \left
- \pgf at y=-\pgf at circ@res at step
- }
- \anchor{gate}{
- \northeast
- \pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/gate height}\pgf at y
- }
-}{%
-\pgf at circuit@fet at ntypefalse
+\pgfdeclaretransistorwrapperaddbulk{pigfete}{}{%
+ \pgf at circuit@trans at depletiontypefalse
+ \drawfetcore{pigfete}
\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
- % DRAIN CONNECTION
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/gate height}\pgf at circ@res at up}}
- % DRAIN
- \pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/base width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/gate height}\pgf at circ@res at up}}
- \pgfusepath{draw}
-
- % GATE, DASHED, BOLD
- \pgfscope
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/base width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/base height}\pgf at circ@res at up}}
- \pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/base width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/base height}\pgf at circ@res at up*0.45}}
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/base width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/base height}\pgf at circ@res at up*0.25}}
- \pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/base width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/base height}\pgf at circ@res at down*0.25}}
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/base width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/base height}\pgf at circ@res at down*0.45}}
- \pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/base width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/base height}\pgf at circ@res at down}}
- \pgfsetlinewidth{2\pgflinewidth}
- \pgfusepath{draw}
- \endpgfscope
-
- % BULK
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/base width}\pgf at circ@res at left}
- {\pgf at circ@res at up+\pgf at circ@res at down}}
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
- {\pgf at circ@res at up+\pgf at circ@res at down}}
-
- % SOURCE
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/base width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/gate height}\pgf at circ@res at down}}
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/gate height}\pgf at circ@res at down}}
+
% SOURCE CONNECTION
\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{0pt}}
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
\pgfusepath{draw}
@@ -2289,245 +1518,27 @@
\ifpgf at circuit@fet at solderdot
\pgfscope
\pgftransformshift{\pgfpoint{\pgf at circ@res at right}{
- \pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/gate height}\pgf at circ@res at down}}
+ \pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/gate height}\pgf at circ@res at up}}
\pgfnode{circ}{center}{}{}{}
\endpgfscope
\fi
- % GATE
- \pgfscope
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/gate width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/gate height}\pgf at circ@res at up}}
- \pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/gate width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/gate height}\pgf at circ@res at down}}
- %\pgfsetlinewidth{2\pgflinewidth}
- \pgfusepath{draw}
- \endpgfscope
-
- % ARROW
- \pgfscope
- \pgfslopedattimetrue
- \pgfallowupsidedownattimetrue
- \pgfresetnontranslationattimefalse
- % Arrow has to be rotated, as this is a p-channel fet
- \pgftransformrotate{180}
- \pgftransformlineattime{-.6}{%
- \pgfpoint
- {\pgf at circ@res at right}%
- {\pgf at circ@res at up+\pgf at circ@res at down}%
- }{%
- \pgfpoint%
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/base width}\pgf at circ@res at left}%
- {\pgf at circ@res at up+\pgf at circ@res at down}%
- }
- \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
- \endpgfscope
- \ifpgf at circuit@bpt at drawgate
- % GATE CONNECTION (in line with source)
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/gate width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/gate height}\pgf at circ@res at down}}
- %\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up+\pgf at circ@res at down}}
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/gate height}\pgf at circ@res at down}}
- \pgfusepath{draw}
- \fi
}
% P-CHANNEL IGFET ENHANCEMENT TYPE with bulk connector
-\pgfcircdeclarefet{pigfetebulk}{
- \anchor{D}{
- \northeast
- }
- \anchor{drain}{
- \northeast
- }
- \anchor{S}{
- \northeast
- \pgf at y=-\pgf at y
- }
- \anchor{source}{
- \northeast
- \pgf at y=-\pgf at y
- }
- \anchor{G}{
- \northeast
- \pgf at circ@res at step=\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetebulk/gate height}\pgf at y
- \left
- \pgf at y=-\pgf at circ@res at step
- }
- \anchor{gate}{
- \northeast
- \pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetebulk/gate height}\pgf at y
- }
-}{%
- \pgf at circuit@fet at ntypefalse
- \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
- % DRAIN CONNECTION
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetebulk/gate height}\pgf at circ@res at up}}
- % DRAIN
- \pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetebulk/base width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetebulk/gate height}\pgf at circ@res at up}}
- \pgfusepath{draw}
-
- % GATE, DASHED, BOLD
- \pgfscope
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetebulk/base width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetebulk/base height}\pgf at circ@res at up}}
- \pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetebulk/base width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetebulk/base height}\pgf at circ@res at up*0.45}}
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetebulk/base width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetebulk/base height}\pgf at circ@res at up*0.25}}
- \pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetebulk/base width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetebulk/base height}\pgf at circ@res at down*0.25}}
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetebulk/base width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetebulk/base height}\pgf at circ@res at down*0.45}}
- \pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetebulk/base width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetebulk/base height}\pgf at circ@res at down}}
- \pgfsetlinewidth{2\pgflinewidth}
- \pgfusepath{draw}
- \endpgfscope
-
- % BULK
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetebulk/base width}\pgf at circ@res at left}
- {\pgf at circ@res at up+\pgf at circ@res at down}}
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
- {\pgf at circ@res at up+\pgf at circ@res at down}}
-
- % SOURCE
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetebulk/base width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetebulk/gate height}\pgf at circ@res at down}}
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetebulk/gate height}\pgf at circ@res at down}}
- % SOURCE CONNECTION
- \pgfpathmoveto{\pgfpoint
- {\pgf at circ@res at right}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetebulk/gate height}\pgf at circ@res at down}} %Geändert
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
- \pgfusepath{draw}
-
- % GATE
- \pgfscope
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetebulk/gate width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetebulk/gate height}\pgf at circ@res at up}}
- \pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetebulk/gate width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetebulk/gate height}\pgf at circ@res at down}}
- %\pgfsetlinewidth{2\pgflinewidth}
- \pgfusepath{draw}
- \endpgfscope
-
- % ARROW
- \pgfscope
- \pgfslopedattimetrue
- \pgfallowupsidedownattimetrue
- \pgfresetnontranslationattimefalse
- % Arrow has to be rotated, as this is a p-channel fet
- \pgftransformrotate{180}
- \pgftransformlineattime{-.6}{%
- \pgfpoint
- {\pgf at circ@res at right}%
- {\pgf at circ@res at up+\pgf at circ@res at down}%
- }{%
- \pgfpoint%
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetebulk/base width}\pgf at circ@res at left}%
- {\pgf at circ@res at up+\pgf at circ@res at down}%
- }
- \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
- \endpgfscope
- \ifpgf at circuit@bpt at drawgate
- % GATE CONNECTION (in line with source)
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetebulk/gate width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetebulk/gate height}\pgf at circ@res at down}}
- %\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up+\pgf at circ@res at down}}
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetebulk/gate height}\pgf at circ@res at down}}
- \pgfusepath{draw}
- \fi
+\pgfdeclaretransistorwrapperaddbulk{pigfetebulk}{}{%
+ \pgf at circuit@trans at depletiontypefalse
+ \drawfetcore{pigfetebulk}
}
% P-CHANNEL IGFET DEPLETION TYPE
-\pgfcircdeclarefet{pigfetd}{
- \anchor{D}{
- \northeast
- }
- \anchor{drain}{
- \northeast
- }
- \anchor{S}{
- \northeast
- \pgf at y=-\pgf at y
- }
- \anchor{source}{
- \northeast
- \pgf at y=-\pgf at y
- }
- \anchor{G}{
- \northeast
- \pgf at circ@res at step=\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf at y
- \left
- \pgf at y=-\pgf at circ@res at step
- }
- \anchor{gate}{
- \northeast
- \pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf at y
- }
-}{%
- \pgf at circuit@fet at ntypefalse
- \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
- % DRAIN CONNECTION
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetd/gate height}\pgf at circ@res at up}}
- % DRAIN
- \pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetd/base width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetd/gate height}\pgf at circ@res at up}}
-
- \pgfusepath{draw}
-
-
- % GATE DEPLETION TYPE
- \pgfscope
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetd/base width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetd/base height}\pgf at circ@res at up}}
- \pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetd/base width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetd/base height}\pgf at circ@res at down}}
- \pgfsetlinewidth{2\pgflinewidth}
- \pgfusepath{draw}
- \endpgfscope
-
- % BULK
-
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetd/base width}\pgf at circ@res at left}
- {\pgf at circ@res at up+\pgf at circ@res at down}}
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
- {\pgf at circ@res at up+\pgf at circ@res at down}}
-
-
- % SOURCE
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetd/base width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetd/gate height}\pgf at circ@res at down}}
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetd/gate height}\pgf at circ@res at down}}
+\pgfdeclaretransistorwrapperaddbulk{pigfetd}{}{%
+ \pgf at circuit@trans at depletiontypetrue
+ \drawfetcore{pigfetd}
+
% SOURCE CONNECTION
\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{0pt}}
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
\pgfusepath{draw}
@@ -2535,89 +1546,14 @@
\ifpgf at circuit@fet at solderdot
\pgfscope
\pgftransformshift{\pgfpoint{\pgf at circ@res at right}{
- \pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf at circ@res at down}}
+ \pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf at circ@res at up}}
\pgfnode{circ}{center}{}{}{}
\endpgfscope{}
\fi
- % GATE
- \pgfscope
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetd/gate width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetd/gate height}\pgf at circ@res at up}}
- \pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetd/gate width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetd/gate height}\pgf at circ@res at down}}
- %\pgfsetlinewidth{2\pgflinewidth}
- \pgfusepath{draw}
- \endpgfscope
-
- % ARROW
- \pgfscope
- \pgfslopedattimetrue
- \pgfallowupsidedownattimetrue
- \pgfresetnontranslationattimefalse
- % PFET!
- \pgftransformrotate{180}
- \pgftransformlineattime{-.6}{%
- \pgfpoint
- {\pgf at circ@res at right}%
- {\pgf at circ@res at up+\pgf at circ@res at down}%
- }{%
- \pgfpoint%
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/base width}\pgf at circ@res at left}%
- {\pgf at circ@res at up+\pgf at circ@res at down}%
- }
- \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
- \endpgfscope
- \ifpgf at circuit@bpt at drawgate
- % GATE CONNECTION
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetd/gate width}\pgf at circ@res at left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetd/gate height}\pgf at circ@res at down}}
- %\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up+\pgf at circ@res at down}}
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetd/gate height}\pgf at circ@res at down}}
- \pgfusepath{draw}
- \fi
}
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-%% Contrib Danilo Piazzalunga
-
-\pgfcircdeclarefet{njfet}{
- \anchor{G}{
- \left
- \pgf at y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
- \pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/height}\pgf at y
- \pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height 2}\pgf at y
- \pgf at y=-.5\pgf at y
- }
- \anchor{gate}{
- \left
- \pgf at y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
- \pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/height}\pgf at y
- \pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height 2}\pgf at y
- \pgf at y=-.5\pgf at y
- }
- \anchor{D}{
- \northeast
- }
- \anchor{drain}{
- \northeast
- }
- \anchor{S}{
- \northeast
- \pgf at y=-\pgf at y
- }
- \anchor{source}{
- \northeast
- \pgf at y=-\pgf at y
- }
-}{%
- \pgf at circuit@fet at ntypetrue
- \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
+\pgfcircdeclaretransistor{njfet}{}{%
+ \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height 2}\pgf at circ@res at up}}
\pgfpathlineto{\pgfpoint
@@ -2629,7 +1565,7 @@
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height 2}\pgf at circ@res at down}}
\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height 2}\pgf at circ@res at down}}
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down-\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
\pgfusepath{draw}
\pgfscope
@@ -2661,44 +1597,14 @@
\pgfpathmoveto{\pgfpoint
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate width}\pgf at circ@res at left}
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height 2}\pgf at circ@res at down}}
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at left}
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at left-\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height 2}\pgf at circ@res at down}}
\pgfusepath{draw}
}
-\pgfcircdeclarefet{pjfet}{
- \anchor{G}{
- \left
- \pgf at y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
- \pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/height}\pgf at y
- \pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height 2}\pgf at y
- \pgf at y=.5\pgf at y
- }
- \anchor{gate}{
- \left
- \pgf at y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
- \pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/height}\pgf at y
- \pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height 2}\pgf at y
- \pgf at y=.5\pgf at y
- }
- \anchor{S}{
- \northeast
- }
- \anchor{source}{
- \northeast
- }
- \anchor{D}{
- \northeast
- \pgf at y=-\pgf at y
- }
- \anchor{drain}{
- \northeast
- \pgf at y=-\pgf at y
- }
-}{%
- \pgf at circuit@fet at ntypefalse
- \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
+\pgfcircdeclaretransistor{pjfet}{}{%
+ \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height 2}\pgf at circ@res at up}}
\pgfpathlineto{\pgfpoint
@@ -2710,7 +1616,7 @@
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height 2}\pgf at circ@res at down}}
\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height 2}\pgf at circ@res at down}}
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down-\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
\pgfusepath{draw}
\pgfscope
@@ -2743,45 +1649,14 @@
\pgfpathmoveto{\pgfpoint
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate width}\pgf at circ@res at left}
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height 2}\pgf at circ@res at up}}
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at left}
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at left-\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height 2}\pgf at circ@res at up}}
\pgfusepath{draw}
}
-
-
-
-
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-
-
-
-
-
-
-% ISFET
-\pgfcircdeclarefet{isfet}{
- \anchor{D}{
- \northeast
- }
- \anchor{drain}{
- \northeast
- }
- \anchor{S}{
- \northeast
- \pgf at y=-\pgf at y
- }
- \anchor{source}{
- \northeast
- \pgf at y=-\pgf at y
- }
-}{%
- \pgf at circuit@fet at ntypetrue
- \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
+\pgfdeclaretransistorwrapperaddbulk{isfet}{}{%
+ \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
% DRAIN CONNECTION
\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/gate height}\pgf at circ@res at up}}
@@ -2807,7 +1682,7 @@
\pgfpathmoveto{\pgfpoint
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/base width}\pgf at circ@res at left}
{\pgf at circ@res at up+\pgf at circ@res at down}}
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at right+.5\pgflinewidth}
{\pgf at circ@res at up+\pgf at circ@res at down}}
% SOURCE
@@ -2818,7 +1693,7 @@
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/gate height}\pgf at circ@res at down}}
% SOURCE CONNECTION
\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{0pt}}
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down-\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
\pgfusepath{draw}
% GATE
@@ -2904,7 +1779,7 @@
\ifpgf at circuit@bipole at reversed\southwest\else\northeast\fi
\pgf at y=0cm
}
-}{\ctikzvalof{tripoles/thyristor/height 2}}{thyristor}{\ctikzvalof{tripoles/thyristor/height}}{\ctikzvalof{tripoles/thyristor/width}}{
+}{\ctikzvalof{tripoles/thyristor/height 2}}{fullthyristor}{\ctikzvalof{tripoles/thyristor/height}}{\ctikzvalof{tripoles/thyristor/width}}{
\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
@@ -2945,7 +1820,64 @@
}
+%% Empty thyristor
+\pgfcircdeclarebipole{
+ \anchor{gate}{
+ \northeast
+ }
+ \anchor{anode}{
+ \ifpgf at circuit@bipole at reversed\northeast\else\southwest\fi
+ \pgf at y=0cm
+ }
+ \anchor{G}{
+ \northeast
+ }
+ \anchor{cathode}{
+ \ifpgf at circuit@bipole at reversed\southwest\else\northeast\fi
+ \pgf at y=0cm
+ }
+}{\ctikzvalof{tripoles/thyristor/height 2}}{emptythyristor}{\ctikzvalof{tripoles/thyristor/height}}{\ctikzvalof{tripoles/thyristor/width}}{
+
+ \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+
+ \pgf at circ@res at other = \ctikzvalof{tripoles/thyristor/diode width left}\pgf at circ@res at left
+ \pgf at circ@res at step = \ctikzvalof{tripoles/thyristor/diode width right}\pgf at circ@res at right
+
+ \pgfscope
+ \pgftransformxshift{\pgf at circ@res at other}
+ \pgfpathmoveto{\pgfpoint{\pgf at circ@res at step-\pgf at circ@res at other}{0pt}}
+
+ \pgfpathlineto{\pgfpoint{0pt}{-\pgf at circ@res at down}}
+ \pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at down}}
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at step-\pgf at circ@res at other}{0pt}}
+ \pgfusepath{draw}
+
+ \pgfsetlinewidth{\pgfstartlinewidth}
+
+ \pgfpathmoveto{\pgfpoint{\pgf at circ@res at step-\pgf at circ@res at other}{0pt}}
+ \pgfpathlineto{\pgfpoint{2*\pgf at circ@res at step-2*\pgf at circ@res at other}{\ctikzvalof{tripoles/thyristor/diode height}\pgf at circ@res at up}}
+ \pgfpathlineto{\pgfpoint{2*\pgf at circ@res at step-2*\pgf at circ@res at other}{\pgf at circ@res at up}}
+ \pgfusepath{draw}
+ \endpgfscope
+
+ \pgfpathmoveto{\pgfpoint{\pgf at circ@res at step}{\pgf at circ@res at down}}
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at step}{-\pgf at circ@res at down}}
+
+ \pgfusepath{draw}
+
+ \pgfsetlinewidth{\pgfstartlinewidth}
+
+ \pgfpathmoveto{\pgfpoint{\pgf at circ@res at other}{0pt}}
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{0pt}}
+
+ \pgfpathmoveto{\pgfpoint{\pgf at circ@res at step}{0pt}}
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{0pt}}
+
+ \pgfusepath{draw}
+
+}
+
%% Empty triac
\pgfcircdeclarebipole{
@@ -2963,7 +1895,7 @@
\ifpgf at circuit@bipole at reversed\southwest\else\northeast\fi
\pgf at y=0cm
}
-}{\ctikzvalof{tripoles/triac/height}}{triac}{\ctikzvalof{tripoles/triac/height}}{\ctikzvalof{tripoles/triac/width}}{
+}{\ctikzvalof{tripoles/triac/height}}{emptytriac}{\ctikzvalof{tripoles/triac/height}}{\ctikzvalof{tripoles/triac/width}}{
\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
@@ -2998,14 +1930,64 @@
}
+%% Empty triac
+\pgfcircdeclarebipole{
+ \anchor{gate}{
+ \northeast
+ }
+ \anchor{G}{
+ \northeast
+ }
+ \anchor{anode}{
+ \ifpgf at circuit@bipole at reversed\northeast\else\southwest\fi
+ \pgf at y=0cm
+ }
+ \anchor{cathode}{
+ \ifpgf at circuit@bipole at reversed\southwest\else\northeast\fi
+ \pgf at y=0cm
+ }
+}{\ctikzvalof{tripoles/triac/height}}{fulltriac}{\ctikzvalof{tripoles/triac/height}}{\ctikzvalof{tripoles/triac/width}}{
+ \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+ \pgf at circ@res at other = \ctikzvalof{tripoles/triac/diode width left}\pgf at circ@res at left
+ \pgf at circ@res at step = \ctikzvalof{tripoles/triac/diode width right}\pgf at circ@res at right
+ \pgfpathmoveto{\pgfpoint{\pgf at circ@res at other}{0pt}}
+ \pgfpathlineto{\pgfpoint{0.95\pgf at circ@res at step}{0.707*(\pgf at circ@res at other-\pgf at circ@res at step)}} % sqrt(1/2)
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{1.414*(\pgf at circ@res at other-\pgf at circ@res at step)}}
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{-1.414*(\pgf at circ@res at other-\pgf at circ@res at step)}}
+
+ \pgfpathmoveto{\pgfpoint{\pgf at circ@res at step}{0pt}}
+ \pgfpathlineto{\pgfpoint{0.95\pgf at circ@res at other}{-0.707*(\pgf at circ@res at other-\pgf at circ@res at step)}} % sqrt(1/2)
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at step}{-1.414*(\pgf at circ@res at other-\pgf at circ@res at step)}}
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at step}{1.414*(\pgf at circ@res at other-\pgf at circ@res at step)}}
+
+ \pgfusepath{draw,fill}
+
+ \pgfsetlinewidth{\pgfstartlinewidth}
+
+ \pgfpathmoveto{\pgfpoint{\pgf at circ@res at step}{-0.707*(\pgf at circ@res at other-\pgf at circ@res at step)}} % sqrt(1/2)
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{-1.414*(\pgf at circ@res at other-\pgf at circ@res at step)}} % sqrt(1/2)
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}} % sqrt(1/2)
+
+ \pgfpathmoveto{\pgfpoint{\pgf at circ@res at other}{0pt}}
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{0pt}}
+
+ \pgfpathmoveto{\pgfpoint{\pgf at circ@res at step}{0pt}}
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{0pt}}
+
+ \pgfusepath{draw}
+
+}
+
+
+
\pgfcircdeclarebipole{
\anchor{out 1}{
\ifpgf at circuit@bipole at reversed\southwest\else\northeast\fi
@@ -3325,36 +2307,38 @@
\pgfpoint{0pt}{\pgf at y}
}
}{\ctikzvalof{bipoles/potentiometer/height 2}}{potentiometer}{\ctikzvalof{bipoles/potentiometer/height}}{\ctikzvalof{bipoles/potentiometer/width}}{
- \pgf at circ@res at step = \ctikzvalof{bipoles/potentiometer/width}\pgf at circ@Rlen
- \divide \pgf at circ@res at step by 12
+\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+\pgftransformationadjustments
+\pgfmathsetlength{\pgf at circ@res at step}{\ctikzvalof{bipoles/resistor/width}\pgf at circ@Rlen+\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}
+\divide \pgf at circ@res at step by 12
- \pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
- \pgf at circ@res at other = \pgf at circ@res at left
- \advance\pgf at circ@res at other by \pgf at circ@res at step
+\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left-\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}{\pgf at circ@res at zero}}
- \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{-\pgf at circ@res at down}}
- \advance\pgf at circ@res at other by 2\pgf at circ@res at step
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at down}}
- \advance\pgf at circ@res at other by 2\pgf at circ@res at step
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{-\pgf at circ@res at down}}
- \advance\pgf at circ@res at other by 2\pgf at circ@res at step
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at down}}
- \advance\pgf at circ@res at other by 2\pgf at circ@res at step
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{-\pgf at circ@res at down}}
- \advance\pgf at circ@res at other by 2\pgf at circ@res at step
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at down}}
- \advance\pgf at circ@res at other by \pgf at circ@res at step
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at zero}}
- \pgfusepath{draw}
-
- \pgfscope
- %\pgfsetlinewidth{\pgfstartlinewidth}
- \pgfsetarrowsend{latex'}
- \pgfpathmoveto{\pgfpoint{0pt}{\pgf at circ@res at up}}
- \pgfpathlineto{\pgfpoint{0pt}{-\pgf at circ@res at down}}
- \pgfusepath{draw}
- \endpgfscope
+\pgf at circ@res at other = \pgf at circ@res at left
+\advance\pgf at circ@res at other by \pgf at circ@res at step
+\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{-\pgf at circ@res at down}}
+\advance\pgf at circ@res at other by 2\pgf at circ@res at step
+\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at down}}
+\advance\pgf at circ@res at other by 2\pgf at circ@res at step
+\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{-\pgf at circ@res at down}}
+\advance\pgf at circ@res at other by 2\pgf at circ@res at step
+\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at down}}
+\advance\pgf at circ@res at other by 2\pgf at circ@res at step
+\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{-\pgf at circ@res at down}}
+\advance\pgf at circ@res at other by 2\pgf at circ@res at step
+\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at down}}
+\advance\pgf at circ@res at other by \pgf at circ@res at step
+\pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at zero}}
+\pgfsetbeveljoin
+\pgfusepath{draw}
+
+\pgfscope
+ %\pgfsetlinewidth{\pgfstartlinewidth}
+ \pgfsetarrowsend{latex'}
+ \pgfpathmoveto{\pgfpoint{0pt}{\pgf at circ@res at up}}
+ \pgfpathlineto{\pgfpoint{0pt}{-\pgf at circ@res at down}}
+ \pgfusepath{draw}
+\endpgfscope
}
Modified: trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircutils.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircutils.tex 2016-06-06 22:57:41 UTC (rev 41298)
+++ trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircutils.tex 2016-06-06 23:01:18 UTC (rev 41299)
@@ -62,5 +62,4 @@
\ifx\pgf at circ@temp\pgf at temp
}
-
-\endinput
+\endinput
\ No newline at end of file
Modified: trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircvoltage.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircvoltage.tex 2016-06-06 22:57:41 UTC (rev 41298)
+++ trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircvoltage.tex 2016-06-06 23:01:18 UTC (rev 41299)
@@ -175,27 +175,12 @@
\else % american voltage
- \pgfextra{
- \def\pgf at temp{\pgfkeysvalueof{/tikz/circuitikz/bipole/kind}}
- \def\pgf at circ@temp{battery}
- \ifx\pgf at temp\pgf at circ@temp
- \edef\pgf at circ@batteria{battery}
- \else
- \def\pgf at circ@temp{battery1}
- \ifx\pgf at temp\pgf at circ@temp
- \edef\pgf at circ@batteria{battery}
- \else
- \edef\pgf at circ@batteria{false}
- \fi
- \fi
- \edef\pgf at circ@temp{battery}
- }
-
- \ifx\pgf at circ@batteria\pgf at circ@temp % if it is a battery, must put + and -
+ \ifpgf at circuit@bipole at voltageoutsideofsymbol
+ % if it is a battery, must put + and -
\ifpgf at circuit@bipole at voltage@backward
(pgfcirc at Vcont2) node {$-$} (pgfcirc at Vcont1) node {$+$}
\else
- (pgfcirc at Vcont1) node {$-$} (pgfcirc at Vcont2) node {$+$}
+ (pgfcirc at Vcont1) node {$+$} (pgfcirc at Vcont2) node {$-$}
\fi
\fi
Modified: trunk/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty 2016-06-06 22:57:41 UTC (rev 41298)
+++ trunk/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty 2016-06-06 23:01:18 UTC (rev 41299)
@@ -17,8 +17,8 @@
\NeedsTeXFormat{LaTeX2e}
-\def\pgfcircversion{0.5}
-\def\pgfcircversiondate{2016/04/24}
+\def\pgfcircversion{0.6}
+\def\pgfcircversiondate{2016/06/06}
\ProvidesPackage{circuitikz}%
[\pgfcircversiondate{} The CircuiTikz circuit drawing package version \pgfcircversion]
@@ -173,6 +173,10 @@
\ctikzset{diode = empty}
}
+\DeclareOption{strokediode}{
+ \ctikzset{diode = stroke}
+}
+
\DeclareOption{arrowmos}{
\pgf at circuit@mos at arrowstrue
}
@@ -305,11 +309,25 @@
%%%%%%%%%
\input pgfcirc.defines.tex
+\input pgfcircutils.tex
+\input pgfcircmath.tex
+\input pgfcircshapes.tex
+\input pgfcircmonopoles.tex
+\input pgfcircbipoles.tex
+\input pgfcirctripoles.tex
+\input pgfcircquadpoles.tex
+
+\input pgfcirclabel.tex
+\input pgfcircvoltage.tex
+\input pgfcirccurrent.tex
+
\ExecuteOptions{nofetbodydiode,nofetsolderdot,nooldvoltagedirection,europeancurrents,europeanvoltages,americanports,americanresistors,cuteinductors,europeangfsurgearrester,nosiunitx,noarrowmos,smartlabels,nocompatibility}
\ProcessOptions\relax
+\input pgfcircpath.tex
+
\ifpgf at circ@siunitx
\RequirePackage{xstring}[2009/03/13]
%\expandafter\let\csname angstrom\endcsname\relax
@@ -316,8 +334,8 @@
\RequirePackage{siunitx}
\fi
-\input pgfcircbasic.tex
+
\newenvironment{circuitikz}{\begin{tikzpicture}}{\end{tikzpicture}}
%override (unused) circuitikz environment for compability to externalization)
\let\circuitikz\tikzpicture
More information about the tex-live-commits
mailing list