texlive[65240] Master/texmf-dist: circuitikz (11dec22)

commits+karl at tug.org commits+karl at tug.org
Sun Dec 11 22:34:32 CET 2022


Revision: 65240
          http://tug.org/svn/texlive?view=revision&revision=65240
Author:   karl
Date:     2022-12-11 22:34:32 +0100 (Sun, 11 Dec 2022)
Log Message:
-----------
circuitikz (11dec22)

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/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/doc/latex/circuitikz/ctikzmanutils.sty
    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/pgfcircmonopoles.tex
    trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircquadpoles.tex
    trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex
    trunk/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty

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	2022-12-11 00:51:11 UTC (rev 65239)
+++ trunk/Master/texmf-dist/doc/generic/circuitikz/CHANGELOG.md	2022-12-11 21:34:32 UTC (rev 65240)
@@ -1,6 +1,23 @@
 <!--- CircuiTikz - Changelog --->
 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 1.6.0 (2022-12-10)
+
+    The big change is the refactoring (and enhancement) of the block's code. In addition, double gate MOSes, several fixes all over the map, and quite a lot of anchors were added into the mix.
+
+    - Big change (mostly backward compatible, minus a couple of bug fixes) to the block's code.
+        - Now `vco` can be `box`ed
+        - enabled more short-name geographical anchors
+        - generic blocks can be made rectangular
+        - mid-way lateral anchors for all blocks, as well as up/down
+        - renamed converters anchors (old ones retained for backward compatibility)
+        - new ac/ac blocks, both single- and three-phase
+    - Added double gate MOS transistors (by Romano Giannetti)
+    - Fix deformed shape for legacy `TL` component ([issue on GitHub](https://github.com/circuitikz/circuitikz/issues/664))
+    - Added several anchors on variable components, suggested by [Dr Matthias Jung](https://github.com/circuitikz/circuitikz/issues/663)
+    - Added `genericsplitter` component (by [frankplow](github.com/frankplow))
+    - Fix - reshape `splitter` using `/tripoles/splitter/width` and `/tripoles/splitter/height` rather than `/tripoles/wilkinson/width` and `/tripoles/wilkinson/height`.
+
 * Version 1.5.5 (2022-11-12)
 
     New features for optoelectronic devices: a new component, arrow styling,

Modified: trunk/Master/texmf-dist/doc/latex/circuitikz/changelog.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/circuitikz/changelog.tex	2022-12-11 00:51:11 UTC (rev 65239)
+++ trunk/Master/texmf-dist/doc/latex/circuitikz/changelog.tex	2022-12-11 21:34:32 UTC (rev 65240)
@@ -5,6 +5,55 @@
 
 \begin{itemize}
 \item
+  Version 1.6.0 (2022-12-10)
+
+  The big change is the refactoring (and enhancement) of the block's
+  code. In addition, double gate MOSes, several fixes all over the map,
+  and quite a lot of anchors were added into the mix.
+
+  \begin{itemize}
+  \tightlist
+  \item
+    Big change (mostly backward compatible, minus a couple of bug fixes)
+    to the block's code.
+
+    \begin{itemize}
+    \tightlist
+    \item
+      Now \texttt{vco} can be \texttt{box}ed
+    \item
+      enabled more short-name geographical anchors
+    \item
+      generic blocks can be made rectangular
+    \item
+      mid-way lateral anchors for all blocks, as well as up/down
+    \item
+      renamed converters anchors (old ones retained for backward
+      compatibility)
+    \item
+      new ac/ac blocks, both single- and three-phase
+    \end{itemize}
+  \item
+    Added double gate MOS transistors (by Romano Giannetti)
+  \item
+    Fix deformed shape for legacy \texttt{TL} component
+    (\href{https://github.com/circuitikz/circuitikz/issues/664}{issue on
+    GitHub})
+  \item
+    Added several anchors on variable components, suggested by
+    \href{https://github.com/circuitikz/circuitikz/issues/663}{Dr
+    Matthias Jung}
+  \item
+    Added \texttt{genericsplitter} component (by
+    \href{github.com/frankplow}{frankplow})
+  \item
+    Fix - reshape \texttt{splitter} using
+    \texttt{/tripoles/splitter/width} and
+    \texttt{/tripoles/splitter/height} rather than
+    \texttt{/tripoles/wilkinson/width} and
+    \texttt{/tripoles/wilkinson/height}.
+  \end{itemize}
+\item
   Version 1.5.5 (2022-11-12)
 
   New features for optoelectronic devices: a new component, arrow

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	2022-12-11 00:51:11 UTC (rev 65239)
+++ trunk/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.tex	2022-12-11 21:34:32 UTC (rev 65240)
@@ -213,7 +213,10 @@
 \end{circuitikz}
 \end{LTXexample}
 
+Lastly, voltage styles interacts in strange ways with general (such as \texttt{american}, \texttt{european} style), in the sense that sometimes the order in which you enact them is important. That should be arguably fixed, but it will change (read break) a lot of existing code, so it'll stay;  more information and workarounds in section~\ref{sec:mixing-voltage-styles}.
 
+As a final notice, if you want to use the \texttt{externalize} library, do not use the \texttt{circuitikz} environment: use \texttt{tikzpicture} (which is really the same thing, see the FAQ~\ref{faqs:externalize}).
+
 \subsection{Scale factor inaccuracies}\label{sec:usefpu}
 
 Sometimes, when using fractional scaling factors and big values for the coordinates, the basic layer inaccuracies from \TeX{} can bite you, producing results like the following one:
@@ -246,6 +249,7 @@
 Here, we will provide a list of incompabilities between different version of \Circuitikz. We will try to hold this list short, but sometimes it is easier to break with old syntax than include a lot of switches and compatibility layers. In general, changes that would invalidate a circuit (changes of polarity of components and so on) are almost always protected by a flag; the same is not true for purely aesthetic changes.
 If unsure, you can check the version in your local installation by using the macro \verb!\pgfcircversion{}!.
 \begin{itemize}
+    \item Version \texttt{1.6.0} has a big rewrite of the block's code. In principle the changes are backward-compatible, but there were several bugs (wrong anchors, errors with rotations, and so on) that have been fixed in the process.
     \item Since \texttt{v1.5.1}\footnote{Do not use \texttt{v1.5.0}, it's buggy.} color management (see section~\ref{sec:colors}) and the details of how the shapes are drawn and protected by the external drawing options has changed. There should be no substantial changes to the circuits, though.
     \item The \TikZ{} fix for \texttt{to[...] +(x,y)} behavior (see~\ref{sec:path-relative-coordinates}) uncovered a bug in the positioning of the labels in \Circuitikz{} that had been present since \texttt{v0.8}. So you \textbf{must} upgrade to \texttt{v1.4.1} or better if you have \TikZ{} newer than \texttt{3.1.8} (and you want/need to use the \texttt{+(x,y)} syntax).
     \item There have been changes in (internal) parameters for capacitors in \texttt{v1.4.1}; now to change them you should use the style interface (see~\ref{sec:capacitors-styling}).
@@ -1705,7 +1709,7 @@
 This kind of style will \emph{add} to the existing style.  If you want to have a style that \emph{substitute} the current style, you should do like this:
 
 \begin{lstlisting}[frame=single, framesep=10pt]
-\ctikzloadstyle{legacy}% start from a know state
+\ctikzloadstyle{legacy}% start from a known state
 \tikzset{romano circuit style/.style={%
     legacy circuit style, % load the legacy style
     \circuitikzbasekey/.cd,%
@@ -2019,9 +2023,9 @@
 \begin{groupdesc}
     \ctikzset{resistor=american}
     \circuitdescbip[resistor]{R}{Resistor}{american resistor}
-    \circuitdescbip[vresistor]{vR}{Variable resistor}{variable american resistor}
-    \circuitdescbip[potentiometer]{pR}{Potentiometer}{american potentiometer}( wiper/0/0.3 )
-    \circuitdescbip[resistivesens]{sR}{Resistive sensor}{american resistive sensor}( label/0/0.3 )
+    \circuitdescbip[vresistor]{vR}{Variable resistor}{variable american resistor}(wiper/180/0.3, tip/0/0.3)
+    \circuitdescbip[potentiometer]{pR}{Potentiometer}{american potentiometer}(wiper/0/0.3, tip/135/0.2)
+    \circuitdescbip[resistivesens]{sR}{Resistive sensor}{american resistive sensor}(label/0/0.3, wiper/180/0.3, tip/0/0.3)
     \circuitdescbip*[ldresistor]{ldR}{Ligth-Dependent resistor}{american light dependent resistor}(arrows/-45/0.3)
 \end{groupdesc}
 
@@ -2029,9 +2033,9 @@
 \begin{groupdesc}
     \ctikzset{resistor=european}
     \circuitdescbip*[generic]{R}{Resistor}{european resistor}
-    \circuitdescbip*[tgeneric]{vR}{Variable resistor}{variable european resistor}
-    \circuitdescbip*[genericpotentiometer]{pR}{Potentiometer}{european potentiometer}( wiper/0/0.3 )
-    \circuitdescbip*[thermistor]{sR}{Resistive sensor}{european resistive sensor}( label/0/0.3 )
+    \circuitdescbip*[tgeneric]{vR}{Variable resistor}{variable european resistor}(wiper/180/0.3, tip/0/0.3)
+    \circuitdescbip*[genericpotentiometer]{pR}{Potentiometer}{european potentiometer}(wiper/0/0.3, tip/135/0.2)
+    \circuitdescbip*[thermistor]{sR}{Resistive sensor}{european resistive sensor}(label/0/0.3, wiper/180/0.3, tip/0/0.3)
     \circuitdescbip*[ldgeneric]{ldR}{Ligth-Dependent resistor}{european light dependent resistor}(arrows/-45/0.3)
     \ctikzset{resistor=american} % reset default
 \end{groupdesc}
@@ -2063,6 +2067,23 @@
 \end{circuitikz}
 \end{LTXexample}
 
+Since version \texttt{1.6.0}, potentiometers and variable resistors have extra anchors\footnote{Thanks to a suggestion by \href{https://github.com/circuitikz/circuitikz/issues/663}{Dr. Matthias Jung on GitHub}}, to allow this kind of circuits (that seems to be common in some region):
+
+\begin{LTXexample}[varwidth=true, basicstyle=\small\ttfamily]
+\begin{circuitikz}[european]
+    \draw (0,0) to[battery2, l=E] ++(0,4.5)
+        -- ++(2,0) coordinate(tmp)
+        to[vR, l2_=$P_1$ and \SI{10}{\kohm}, mirror,
+            invert, name=P]
+        (0,0-|tmp) -- (0,0);
+    \draw (0,0-|tmp) -- ++(1.5,0)
+        to[R=$R_1$, -*] ++(0,2) coordinate(p)
+        |- (P.wiper);
+    \draw (p) to[rmeterwa, t=V] (tmp-|p) -- (tmp);
+\end{circuitikz}
+\end{LTXexample}
+
+
 \subsubsection{Generic sensors anchors}\label{sec:sensors-anchors}
 Generic sensors have an extra anchor named \texttt{label}  to help position the type of dependence, if needed:
 
@@ -2141,8 +2162,8 @@
     \circuitdescbip*{capacitor}{Capacitor}{C}
     \circuitdescbip*[ccapacitor]{curved capacitor}{Curved (polarized) capacitor}{cC}
     \circuitdescbip*{ecapacitor}{Electrolytic capacitor}{eC,elko}
-    \circuitdescbip*[vcapacitor]{variable capacitor}{Variable capacitor}{vC}
-    \circuitdescbip*[capacitivesens]{capacitive sensor}{Capacitive sensor}{sC}(label/0/0.3)
+    \circuitdescbip*[vcapacitor]{variable capacitor}{Variable capacitor}{vC}(wiper/180/0.3, tip/0/0.3)
+    \circuitdescbip*[capacitivesens]{capacitive sensor}{Capacitive sensor}{sC}(label/0/0.3, wiper/180/0.3, tip/0/0.3)
     \circuitdescbip*{piezoelectric}{Piezoelectric Element}{PZ}
     \circuitdescbip*{cpe}{Constant Phase Element}{cpe}
     \circuitdescbip*[ferrocap]{feC}{Ferroelectric capacitor\footnotemark}{ferrocap}(kink left/180/0.2, kink right/0/0.2, curve left/160/0.3, curve right/-20/0.2, center/45/0.3)
@@ -2207,8 +2228,8 @@
 \begin{groupdesc}
     \ctikzset{inductor=cute}
     \circuitdescbip[cuteinductor]{L}{Inductor}{cute inductor}(midtap/90/0.1)
-    \circuitdescbip[vcuteinductor]{vL}{Variable inductor}{variable cute inductor}(core west/135/0.1, core east/45/0.1)
-    \circuitdescbip[scuteinductor]{sL}{Inductive sensor}{cute inductive sensor}(label/0/0.3)
+    \circuitdescbip[vcuteinductor]{vL}{Variable inductor}{variable cute inductor}(wiper/180/0.3, tip/0/0.3)
+    \circuitdescbip[scuteinductor]{sL}{Inductive sensor}{cute inductive sensor}(label/0/0.3, wiper/180/0.3, tip/0/0.3)
 \end{groupdesc}
 
 If the \texttt{americaninductors} option is active (or the style \texttt{[american inductors]} is used), the inductors are displayed as follows:
@@ -2215,8 +2236,8 @@
 \begin{groupdesc}
     \ctikzset{inductor=american}
     \circuitdescbip[americaninductor]{L}{Inductor}{american inductor}(midtap/90/0.3)
-    \circuitdescbip[vamericaninductor]{vL}{Variable inductor}{variable american inductor}(core west/135/0.1, core east/45/0.1)
-    \circuitdescbip[samericaninductor]{sL}{Inductive sensor}{american inductive sensor}( label/0/0.3 )
+    \circuitdescbip[vamericaninductor]{vL}{Variable inductor}{variable american inductor}(core west/135/0.1, core east/45/0.1, wiper/180/0.3, tip/90/0.1)
+    \circuitdescbip[samericaninductor]{sL}{Inductive sensor}{american inductive sensor}(label/0/0.3, wiper/180/0.3, tip/0/0.3)
 \end{groupdesc}
 
 Finally, if the \texttt{europeaninductors} option is active (or the style \texttt{[european inductors]} is used), the inductors are displayed as follows:
@@ -2223,8 +2244,8 @@
 \begin{groupdesc}
     \ctikzset{inductor=european}
     \circuitdescbip[fullgeneric]{L}{Inductor}{european inductor}(midtap/90/0.1)
-    \circuitdescbip[tfullgeneric]{vL}{Variable inductor}{variable european inductor}(core west/135/0.1, core east/45/0.1)
-    \circuitdescbip[sfullgeneric]{sL}{Inductive sensor}{european inductive sensor}( label/0/0.3 )
+    \circuitdescbip[tfullgeneric]{vL}{Variable inductor}{variable european inductor}(wiper/180/0.3, tip/90/0.1,core west/135/0.1, core east/45/0.1)
+    \circuitdescbip[sfullgeneric]{sL}{Inductive sensor}{european inductive sensor}(label/0/0.3, wiper/180/0.3, tip/0/0.3)
     \ctikzset{inductor=cute} % back to default
 \end{groupdesc}
 
@@ -3406,6 +3427,7 @@
 
 \begin{groupdesc}
     \circuitdesc*{mixer}{mixer}{}( w/180/0.1,s/-90/0.1,e/0/0.1,n/90/0.1, center/-120/0.3, geocenter/-60/.3  )
+    \circuitdesc*{mixer, boxed}{mixer, boxed}{}(right up/30/0.1, right down/-30/0.1, left up/150/0.1, left down/-150/0.1)
     \circuitdesc*{adder}{adder}{}( west/180/0.1,south/-90/0.1,east/0/0.1,north/90/0.1 )
     \circuitdesc*{oscillator}{oscillator}{}( w/180/0.1,s/-90/0.1,e/0/0.1,n/90/0.1, center/45/0.2, geocenter/-45/.3 )
     \circuitdesc*{circulator}{circulator}{}( left/180/0.1,down/-90/0.1,right/0/0.1, up/90/0.1 )
@@ -3412,6 +3434,8 @@
     \circuitdesc*{wilkinson}{wilkinson divider}{}( in/180/0.1, out2/45/0.1, out1/-45/0.1 )
     \circuitdesc*{splitter}{resistive splitter\footnotemark}{}( in/180/0.1, out2/45/0.1, out1/-45/0.1 )
     \footnotetext{added by \texttt{matthuszagh}}
+    \circuitdesc*{genericsplitter}{generic splitter\footnotemark}{$\SI{-3}{\deci\bel}$}( in/180/0.1, out2/45/0.1, out1/-45/0.1 )
+    \footnotetext{added by \texttt{frankplow}}
     \circuitdesc*{gridnode}{gridnode\footnotemark}{}(left/135/0.2, right/45/0.2, center/-100/0.4, up/90/0.2, down/-45/.2)
     \footnotetext{added by \texttt{olfline}}
     \circuitdesc*{mzm}{Mach Zehnder Modulator\footnotemark}{}( in/180/0.1, mod/90/0.1, out/0/0.1)
@@ -3419,9 +3443,10 @@
 \end{groupdesc}
 
 \begin{groupdesc}
-    \circuitdescbip*{twoport}{generic two port (use \texttt{t=\dots} to specify text)}{}
-    \circuitdescbip*{twoportsplit}{generic two port split (use \texttt{t1=\dots} and \texttt{t2=\dots} to specify text)}{}
+    \circuitdescbip*{twoport}{generic two port (use \texttt{t=\dots} to specify text)}{}(w/180/0.1,s/-90/0.1,e/0/0.1,n/90/0.1, center/-120/0.3)
+    \circuitdescbip*{twoportsplit}{generic two port split (use \texttt{t1=\dots} and \texttt{t2=\dots} to specify text)}{}(right up/30/0.1, right down/-30/0.1, left up/150/0.1, left down/-150/0.1)
     \circuitdescbip*{vco}{vco}{}
+    \circuitdescbip*{vco,box}{vco,box}{}(right up/30/0.1, right down/-30/0.1, left up/150/0.1, left down/-150/0.1)
     \circuitdescbip*{bandpass}{bandpass}{}
     \circuitdescbip*{bandstop}{bandstop}{}
     \circuitdescbip*{highpass}{highpass}{}
@@ -3442,12 +3467,14 @@
     \circuitdescbip*{phaseshifter}{phase shifter}{}
     \circuitdescbip*{vphaseshifter}{var.\ phase shifter}{}
     \circuitdescbip*{detector}{detector}{}
-    \circuitdescbip*{sdcdc}{single wire DC/DC converter\footnotemark}{}
+    \circuitdescbip*{sdcdc}{single wire DC/DC converter\footnotemark}{}(dc up in/135/.3, dc down in/185/.3, dc up out/45/.3, dc down out/-35/.3)
     \footnotetext{the converter blocks added by \texttt{olfline}}
-    \circuitdescbip*{sacdc}{single phase AC/DC converter}{}
-    \circuitdescbip*{sdcac}{single phase DC/AC converter}{}
-    \circuitdescbip*{tacdc}{three phases AC/DC converter}{}
-    \circuitdescbip*{tdcac}{three phases AC/DC converter}{}(left/170/0.5, right/5/0.5, center/-90/0.3, ac1/45/0.1, ac2/-5/.3, ac3/-45/.1, dc1/135/.3, dc2/185/.3)
+    \circuitdescbip*{sacdc}{single phase AC/DC converter}{}(ac up in/135/.3, ac down in/185/.3, dc up out/45/.3, dc down out/-35/.3)
+    \circuitdescbip*{sdcac}{single phase DC/AC converter}{}(dc up in/135/.3, dc down in/185/.3, ac up out/45/.3, ac down out/-35/.3)
+    \circuitdescbip*{sacac}{single phase AC/AC converter}{}(ac up in/135/.3, ac down in/185/.3, ac up out/45/.3, ac down out/-35/.3)
+    \circuitdescbip*{tacdc}{three phases AC/DC converter}{}(ac up in/135/.3, ac mid in/185/.3, ac down in/-135/.3, dc up out/45/.3, dc down out/-35/.3)
+    \circuitdescbip*{tdcac}{three phases AC/DC converter}{}(ac up out/45/0.1, ac mid out/-5/.3, ac down out/-45/.1, dc up in/135/.3, dc down in/185/.3)
+    \circuitdescbip*{tacac}{three phases AC/DC converter}{}(ac up in/135/.3, ac mid in/185/.3, ac down in/-135/.3, ac up out/45/.3, ac mid out/-5/.3, ac down out/-45/.3)
 \end{groupdesc}
 
 \begin{groupdesc}
@@ -3470,6 +3497,39 @@
 ;\end{circuitikz}
 \end{LTXexample}
 
+In addition, since \texttt{v1.6.0},  most blocks have also the \texttt{left up}, \texttt{left down}, \texttt{right up} and \texttt{right down} anchors:
+\begin{LTXexample}[varwidth=true]
+\begin{circuitikz} \draw
+    (0,0) to[bandpass, name=bp] ++(2,0)
+    (bp.left up) node[circ, red]{}
+    (bp.left down) node[circ, blue]{}
+    (bp.right up) node[circ, green]{}
+    (bp.right down) node[circ, yellow]{}
+;\end{circuitikz}
+\end{LTXexample}
+
+You can use those anchors to build ``mixed-type'' circuits, positioning the node-shapes:
+\begin{LTXexample}[pos=t, varwidth=true]
+\begin{tikzpicture}[
+    big/.style={circuitikz/blocks/scale=1.5},
+    long/.style={circuitikz/bipoles/twoportsplit/width=1.5}]
+    \path (0,0) node[sacdcshape, big](A){}
+        (5,0) node[twoportsplitshape, big, long, t1=LNA, t2=Digital](B){};
+    \draw (A.right up) -- (B.left up) (A.right down) to[cute choke] (B.left down);
+\end{tikzpicture}
+\end{LTXexample}
+Notice also form the previous example that the generic blocks (\texttt{twoport} and \texttt{twoportsplit}) can be made ``longer'' by setting different \texttt{width} and \texttt{height} (the other blocks are square, and just use the \texttt{width} key for bth dimensions).
+O
+Also, for \texttt{amp} and \texttt{vamp}, the \texttt{up} and \texttt{down} anchors follow the shape when they are not boxed.
+\begin{LTXexample}[varwidth=true]
+\begin{tikzpicture}
+    \draw (0,0) to[vamp, name=a] ++(1.5,0)
+        to [vamp, boxed, name=ab] ++(1.5,0);
+    \path (a.up) node[circ, blue]{} (ab.up) node[circ, blue]{};
+    \path (a.down) node[circ, red]{} (ab.down) node[circ, red]{};
+\end{tikzpicture}
+\end{LTXexample}
+
 The \texttt{oscillator} has a displaced \texttt{center} anchor, to simplify the task of putting it at the left side of a circuit; it also as a special position for the node text. The four round elements (mixer, circulator, adder, and the oscillator) have a \texttt{geocenter} anchor which corresponds always to the center of the circle.
 \begin{LTXexample}[varwidth=true, basicstyle=\small\ttfamily]
 \begin{tikzpicture}[>=Stealth]
@@ -3635,14 +3695,21 @@
 
 
 \paragraph{Dash optional parts}
-To show that a device is optional, you can dash it. The inner symbol will be kept with solid lines.
+To show that a device is optional, you can dash it. The inner symbol will be kept with solid lines, unless you set the key \texttt{inner blocks dashed} to true.
+Moreover, the key \texttt{dashed blocks pattern} (default \verb|{{1mm}{1mm}}|), be careful with the number of braces!.
 \begin{LTXexample}[varwidth=true]
 \begin{circuitikz}
-\draw (0,2) to[amp,l=\SI{10}{dB}] ++(2.5,0);
-\draw[dashed] (2.5,2) to[lowpass,l=opt.] ++(2.5,0);
+\draw (0,1.5) to[amp,l=\SI{10}{dB}] ++(2.5,0);
+\draw[dashed] (2.5,1.5) to[lowpass,l=opt.] ++(2.5,0);
 % or just the block
 \draw (0,0) to[amp,l=\SI{10}{dB}] ++(2.5,0)
      to[lowpass,l=opt., dashed] ++(2.5,0);
+% or everything
+\ctikzset{inner blocks dashed,
+    dashed blocks pattern={{1.5pt}{1pt}},
+}
+\draw (0,-1.5) to[amp,l=\SI{10}{dB}] ++(2.5,0)
+     to[lowpass,l=opt., dashed] ++(2.5,0);
 \end{circuitikz}
 \end{LTXexample}
 
@@ -3692,19 +3759,52 @@
 \textsc{nfet}s and \textsc{pfet}s have been incorporated based on code provided by Clemens Helfmeier and Theodor Borsche. Use the package options \texttt{fetsolderdot}/\texttt{nofetsolderdot} to enable/disable solderdot at some fet-transistors. Additionally, the solderdot option can be enabled/disabled for single transistors with the option \texttt{solderdot} and \texttt{nosolderdot}, respectively.
 
 \begin{groupdesc}
-    \circuitdesc{nfet}{nfet}{Q}
-    \circuitdesc{nfetd}{nfet depletion}{Q}
-    \circuitdesc{nigfete}{nigfete}{Q}
+    \circuitdesc{nfet}{nfet}{Q}(G/180/0.1, D/0/0.1, S/0/0.1)
+    \circuitdesc{nfetd}{nfet depletion}{Q}(G/180/0.1, D/0/0.1, S/0/0.1)
+    \circuitdesc{nigfete}{nigfete}{Q}(G/180/0.1, D/0/0.1, S/0/0.1)
     \circuitdesc{nigfete,solderdot}{nigfete}{}(centergap/0/0.5)
     \circuitdesc{nigfetebulk}{nigfetebulk}{}
     \circuitdesc{nigfetd}{nigfetd}{}(centergap/0/0.5)
-    \circuitdesc{pfet}{pfet}{Q}
-    \circuitdesc{pfetd}{pfet depletion}{Q}
-    \circuitdesc{pigfete}{pigfete}{}(centergap/0/0.5)
+    \circuitdesc{pfet}{pfet}{Q}(G/180/0.1, D/0/0.1, S/0/0.1)
+    \circuitdesc{pfetd}{pfet depletion}{Q}(G/180/0.1, D/0/0.1, S/0/0.1)
+    \circuitdesc{pigfete}{pigfete}{}(centergap/0/0.5, G/180/0.1, D/0/0.1, S/0/0.1)
     \circuitdesc{pigfetebulk}{pigfetebulk}{}
     \circuitdesc{pigfetd}{pigfetd}{}
 \end{groupdesc}
 
+Since version \texttt{1.6.0}, you can add the \texttt{doublegate} option to the \texttt{*igfet*} family of devices to have a double gate MOS --- the additional gate is called \texttt{G2} or \texttt{gate2} (the plain \texttt{G} is where it will be without the \texttt{doublegate} option).
+
+\begin{groupdesc}
+    \circuitdesc{nigfete, doublegate}{nigfete, doublegate}{Q}(G/180/0.1, G2/180/0.1, D/0/0.1, S/0/0.1)
+    \circuitdesc{nigfete,solderdot, doublegate}{nigfete, doublegate}{}(G1/180/0.1, centergap/0/0.5, G2/180/0.1)
+    \circuitdesc{nigfetebulk, doublegate}{nigfetebulk, doublegate}{}(G/180/0.1, G2/180/0.1)
+    \circuitdesc{nigfetd, doublegate}{nigfetd, doublegate}{}(G1/180/0.1, centergap/0/0.5, G2/180/0.1)
+    \circuitdesc{pigfete, doublegate}{pigfete, doublegate}{}(G/180/0.1, centergap/0/0.5, G2/180/0.1, D/0/0.1, S/0/0.1)
+    \circuitdesc{pigfetebulk, doublegate}{pigfetebulk, doublegate}{}(G/180/0.1, G2/180/0.1)
+    \circuitdesc{pigfetd, doublegate}{pigfetd, doublegate}{}(G1/180/0.1, G2/180/0.1)
+\end{groupdesc}
+
+You can use the double-gated transistor for example like this:%
+\footnote{Found at \href{https://www.electronics-notes.com/articles/electronic_components/fet-field-effect-transistor/dual-gate-mosfet.php}{this page on electronics notes}.}
+
+\begin{LTXexample}[varwidth=true, basicstyle=\scriptsize\ttfamily]
+\begin{circuitikz}[european, scale=0.7, transform shape,
+    circuitikz/resistors/scale=0.7]
+    \draw (0,0) to[C, o-*] ++(1,0) coordinate(in)
+    to[R, -*] ++(0,-3) coordinate(GND)
+    ++(1,0) to[C, *-] ++(0,4) -- ++(1,0) coordinate(div)
+    to[R, *-*] ++(0,2) coordinate(vdd)
+    (div) to[R, -*] (div|-GND)
+    (in) -- ++(2.5,0) node[nigfetd, doublegate, anchor=G1](Q){Q}
+    (Q.G2) to[short, -*] (Q.G2-|div)
+    (Q.D) to[R, -*] (Q.D|-vdd)
+    (Q.D) to[C, *-o] ++(2,0) coordinate(out)
+    (Q.S) to[R, *-*] (Q.S|-GND) (Q.S) -- ++(1,0) coordinate(Sd)
+    (Sd) to[C, -*] (Sd |- GND);
+    \draw (0,0|-GND) -- (out|-GND) (0,0|-vdd) -- (out|-vdd);
+\end{circuitikz}
+\end{LTXexample}
+
 \textsc{JFET} are also available\footnote{based on code provided by Danilo Piazzalunga}, both n-type and p-type.
 
 \begin{groupdesc}
@@ -8136,8 +8236,26 @@
 \end{circuitikz}
 \end{LTXexample}
 
+\subsubsection{Combining different styles}\label{sec:mixing-voltage-styles}
 
+Due to an historical hiccup, you need to be careful if you want to mix styles, like for example having \texttt{american} styled components and straight voltages (which are basically \texttt{european} style, at least in \Circuitikz{}). The problem is that the order of style parameters can change the output\footnote{%
+thanks to Stack Exchange user \href{https://tex.stackexchange.com/q/665466/38080}{Mads P Olesen} for noticing.} as you can see in the following example, where in the red case the voltage generator shape reverted to the \texttt{european} one.
 
+\begin{LTXexample}
+\begin{circuitikz}[straight voltages, american]
+    \draw (0,0) to [V, v=$V_P$] ++(0,3);
+    \draw (1,0) to [R, v=$V_P$] ++(0,3);
+\end{circuitikz}\color{red}%
+\begin{circuitikz}[american, straight voltages]
+    \draw (0,0) to [V, v=$V_P$] ++(0,3);
+    \draw (1,0) to [R, v=$V_P$] ++(0,3);
+\end{circuitikz}
+\end{LTXexample}
+
+This is arguably a bug, but fixing it (separating the voltage generator shapes from the voltage style) would break havoc with older circuits, so this will not be fixed for now.
+
+
+
 \subsection{Changing the style of labels, voltages, and other text ornaments}\label{sec:ornament-style}
 
 Since version \texttt{0.9.5}, it is possible to change the style of bipole text ornaments (labels, annotations, voltages etc) by using the appropriate styles or keys.
@@ -8843,7 +8961,7 @@
 
 \section{Colors}\label{sec:colors}
 
-Color support in \Circuitikz{} has been quite limited up to version 1.5.1; form that one onward there has been an effort to make component's behavior more intuitive.
+Color support in \Circuitikz{} has been quite limited up to version 1.5.1; from that one onward there has been an effort to make component's behavior more intuitive.
 
 Part of the problem is how colors in paths are treated by \TikZ{} itself; you can see part of the discussion \href{https://github.com/circuitikz/circuitikz/issues/605}{this issue} and in \href{https://tex.stackexchange.com/questions/634987/pgf-basic-layer-struggling-again-with-colors}{this question on TeX.SX} --- many thanks to \texttt{@muzimuzhi} for helping there. Basically, nodes are drawn \emph{after} the path is completed, and color is applied to the path at the end. Look at this code (pure \TikZ, no \Circuitikz{} here):
 
@@ -9090,7 +9208,7 @@
 
 in your preamble.
 
-But really, your circuit definition is buggy, so the best thing to do is fix that; if you want to name a point in you circuit, you should use a \texttt{coordinate}, not a \texttt{node}.\footnote{Yes, I understand from where the confusion arise --- in circuit theory they are called nodes.} Here is a small tutorial on \emph{why} you should change your circuit.
+But really, your circuit definition is buggy, so the best thing to do is fix that; if you want to name a point in your circuit, you should use a \texttt{coordinate}, not a \texttt{node}.\footnote{Yes, I understand from where the confusion arise --- in circuit theory they are called nodes.} Here is a small tutorial on \emph{why} you should change your circuit.
 
 Nodes, in \TikZ, have normally a non-zero size even when they are empty; moreover, connections are supposed to join the border of nodes. Please study the following (pure \TikZ, not \Circuitikz):
 
@@ -9582,7 +9700,7 @@
 
 \section{Examples}
 
-Here a series of example, contributed by several people, is shown with their code.
+Here a series of examples, contributed by several people, is shown with their code.
 
 \subsection{A red diode}
 
@@ -9851,20 +9969,23 @@
 
 \begin{LTXexample}[varwidth=true,pos=t]
 \begin{circuitikz}[smallR/.style={european resistor, resistors/scale=0.5}]
-    \draw (0,0) node[tacdcshape, anchor=ac2](acdc){} to[smallR] ++(-2,0)
+    \draw (0,0) node[tacdcshape, anchor=ac mid in](acdc){} to[smallR] ++(-2,0)
         -- coordinate(point) node[circ](){} ++(-.5,0);
-    \draw (acdc.ac1) to[nos, invert, mirror, name=switch,color=red] ++(-2,0) -- (point);
-    \draw (acdc.ac3) to[smallR] ++(-2,0)
+    \draw (acdc.ac up in)
+        to[nos, invert, mirror, name=switch,color=red] ++(-2,0)
+        -- (point);
+    \draw (acdc.ac down in) to[smallR] ++(-2,0)
         -- (point)
         to[oosourcetrans,prim=wye,sec=delta,l=transformer] ++(-1.5,0)
         to[tmultiwire] ++(-.5,0)
         node[gridnode, anchor=right]{};
     \node[above=.3cm,color=red] at (switch) {fault};
-    \draw (acdc.dc1) to[smallR,l=HVDC line] ++(2,0 )
-        node[tdcacshape, anchor=dc1](dcac){};
-    \draw (acdc.dc2) -- (dcac.dc2);
-    \draw (dcac.right) to[ooosource,prim=delta,sec=delta,tert=wye,invert] ++(1.5,0)
-                        to[tmultiwire] ++(.5,0) node[gridnode,anchor=left]{};
+    \draw (acdc.dc up out) to[smallR,l=HVDC line] ++(2,0 )
+        node[tdcacshape, anchor=dc up in](dcac){};
+    \draw (acdc.dc down out) -- (dcac.dc down in);
+    \draw (dcac.right)
+        to[ooosource,prim=delta,sec=delta,tert=wye,invert] ++(1.5,0)
+        to[tmultiwire] ++(.5,0) node[gridnode,anchor=left]{};
 \end{circuitikz}
 \end{LTXexample}
 

Modified: trunk/Master/texmf-dist/doc/latex/circuitikz/ctikzmanutils.sty
===================================================================
--- trunk/Master/texmf-dist/doc/latex/circuitikz/ctikzmanutils.sty	2022-12-11 00:51:11 UTC (rev 65239)
+++ trunk/Master/texmf-dist/doc/latex/circuitikz/ctikzmanutils.sty	2022-12-11 21:34:32 UTC (rev 65240)
@@ -106,7 +106,7 @@
 }
 %% New circuit description macros
 \newcommand{\twopartbox}[2]{%
-    \leavevmode\null\par\noindent\fbox{\parbox[c]{0.3\linewidth}{#1} \parbox[c]{0.6\linewidth}{\RaggedRight #2}\par\noindent}%
+    \leavevmode\null\par\noindent\fbox{\parbox[c]{0.3\linewidth}{#1} \parbox[c]{0.6\linewidth}{\RaggedRight\hbadness=9500 #2}\par\noindent}%
 }
 % filling color for filled-enabled component
 \colorlet{fillcol}{cyan!30!white}

Modified: trunk/Master/texmf-dist/tex/context/third/circuitikz/t-circuitikz.tex
===================================================================
--- trunk/Master/texmf-dist/tex/context/third/circuitikz/t-circuitikz.tex	2022-12-11 00:51:11 UTC (rev 65239)
+++ trunk/Master/texmf-dist/tex/context/third/circuitikz/t-circuitikz.tex	2022-12-11 21:34:32 UTC (rev 65240)
@@ -10,8 +10,8 @@
 %
 % See the files gpl-3.0_license.txt and lppl-1-3c_license.txt for more details.
 
-\def\pgfcircversion{1.5.5}
-\def\pgfcircversiondate{2022/11/12}
+\def\pgfcircversion{1.6.0}
+\def\pgfcircversiondate{2022/12/10}
 \writestatus{loading}{\pgfcircversiondate{} The CircuiTikz circuit drawing package version \pgfcircversion}
 
 \usemodule[tikz]

Modified: trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirc.defines.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirc.defines.tex	2022-12-11 00:51:11 UTC (rev 65239)
+++ trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirc.defines.tex	2022-12-11 21:34:32 UTC (rev 65240)
@@ -801,6 +801,8 @@
 %
 % Option "t=*" for nodes
 \pgfkeys{/tikz/t/.add code={}{\ctikzset{text=#1}}}
+\pgfkeys{/tikz/t1/.add code={}{\ctikzset{text in=#1}}}
+\pgfkeys{/tikz/t2/.add code={}{\ctikzset{text out=#1}}}
 %
 \ctikzset{bipole/.is family}
 \ctikzset{bipole/kind/.initial=}

Modified: trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex	2022-12-11 00:51:11 UTC (rev 65239)
+++ trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex	2022-12-11 21:34:32 UTC (rev 65240)
@@ -284,7 +284,11 @@
 }
 %% Generic empty tunable
 \pgfcircdeclarebipolescaled{resistors}
-{}
+{
+    \anchor{wiper}{\northeast\pgf at x=-0.5\pgf at x\pgf at y=-\pgf at y}
+    \anchor{W}{\northeast\pgf at x=-0.5\pgf at x\pgf at y=-\pgf at y}
+    \anchor{tip}{\northeast\pgf at x=0.5\pgf at x}
+}
 {\ctikzvalof{bipoles/tgeneric/height}}
 {tgeneric}
 {\ctikzvalof{bipoles/tgeneric/height}}
@@ -396,6 +400,9 @@
         \pgf at y=1.2\pgf at y
     }%
     \pgfcirc at border@extend at updown{1}{1.2}
+    \anchor{wiper}{\northeast\pgf at x=-\pgf at x\pgf at y=-1.2\pgf at y}
+    \anchor{W}{\northeast\pgf at x=-\pgf at x\pgf at y=-1.2\pgf at y}
+    \anchor{tip}{\northeast}
 }
 {\ctikzvalof{bipoles/thermistor/height}}
 {thermistor}
@@ -510,6 +517,7 @@
         }
     \anchor{wiper}{\wiper}
     \anchor{W}{\wiper}
+    \anchor{tip}{\wiper\pgf at xa=\pgf at x\southwest\pgf at x=\pgf at xa\pgf at y=-\pgf at y}
 }
 {\ctikzvalof{bipoles/generic potentiometer/height 2}}
 {genericpotentiometer}
@@ -632,6 +640,9 @@
 \pgfcircdeclarebipolescaled{resistors}
 {
 \savedmacro{\zigs}{\edef\zigs{\ctikzvalof{resistors/zigs}}}
+\anchor{wiper}{\northeast\pgf at x=-0.4\pgf at x\pgf at y=-\pgf at y}
+\anchor{W}{\northeast\pgf at x=-0.4\pgf at x\pgf at y=-\pgf at y}
+\anchor{tip}{\northeast\pgf at x=0.4\pgf at x}
 }
 {\ctikzvalof{bipoles/vresistor/height}}
 {vresistor}
@@ -647,11 +658,11 @@
         \pgf at circ@set at relative@thickness{modifier thickness}
         \pgfcirc at set@arrows{tunable}{}{latexslim}
         \ifpgf at circ@fixtunable at dir
-            \pgfpathmoveto{\pgfpoint{-.4\pgf at circ@res at other}{\pgf at circ@res at down}}
-            \pgfpathlineto{\pgfpoint{.4\pgf at circ@res at other}{\pgf at circ@res at up}}
+            \pgfpathmoveto{\pgfpoint{-.4\pgf at circ@res at right}{\pgf at circ@res at down}}
+            \pgfpathlineto{\pgfpoint{.4\pgf at circ@res at right}{\pgf at circ@res at up}}
         \else
-            \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}}
+            \pgfpathmoveto{\pgfpoint{.4\pgf at circ@res at right}{\pgf at circ@res at up}}
+            \pgfpathlineto{\pgfpoint{-.4\pgf at circ@res at right}{\pgf at circ@res at down}}
         \fi
         \pgfusepath{draw}
     \endpgfscope
@@ -670,6 +681,7 @@
     \anchor{wiper}{\wiper}
     \anchor{W}{\wiper}
     \savedmacro{\zigs}{\edef\zigs{\ctikzvalof{resistors/zigs}}}
+    \anchor{tip}{\wiper\pgf at xa=\pgf at x\southwest\pgf at x=\pgf at xa\pgf at y=-\pgf at y}
 }
 {\ctikzvalof{bipoles/potentiometer/height 2}}
 {potentiometer}
@@ -697,6 +709,9 @@
 {% anchor for labelling the type of dependency
     \anchor{label}{\southwest\pgf at x=0.4\pgf at x}%
     \savedmacro{\zigs}{\edef\zigs{\ctikzvalof{resistors/zigs}}}
+    \anchor{wiper}{\northeast\pgf at x=-0.9\pgf at x\pgf at y=-\pgf at y}
+    \anchor{W}{\northeast\pgf at x=-0.9\pgf at x\pgf at y=-\pgf at y}
+    \anchor{tip}{\northeast\pgf at x=0.4\pgf at x}
 }
 {\ctikzvalof{bipoles/resistivesens/height}}
 {resistivesens}
@@ -710,9 +725,9 @@
 
     \pgfscope
         \pgf at circ@set at relative@thickness{modifier thickness}
-        \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}}
-        \pgfpathlineto{\pgfpoint{-.9\pgf at circ@res at other}{\pgf at circ@res at down}}
+        \pgfpathmoveto{\pgfpoint{.4\pgf at circ@res at right}{\pgf at circ@res at up}}
+        \pgfpathlineto{\pgfpoint{-.4\pgf at circ@res at right}{\pgf at circ@res at down}}
+        \pgfpathlineto{\pgfpoint{-.9\pgf at circ@res at right}{\pgf at circ@res at down}}
         \pgfusepath{draw}
     \endpgfscope
 }%
@@ -909,6 +924,9 @@
 {
     \anchor{label}{\southwest\pgf at x=2.6\pgf at x\pgf at y=1.2\pgf at y}%
     \pgfcirc at border@extend at full{2.6}{1}{4.4}{1.2}
+    \anchor{wiper}{\northeast\pgf at x=-4.4\pgf at x\pgf at y=-1.2\pgf at y}
+    \anchor{W}{\northeast\pgf at x=-4.4\pgf at x\pgf at y=-1.2\pgf at y}
+    \anchor{tip}{\northeast\pgf at x=2.6\pgf at x}
 }
 {\ctikzvalof{bipoles/capacitor/height}}
 {capacitivesens}
@@ -1037,7 +1055,16 @@
 
 %% Variable Capacitor
 \pgfcircdeclarebipolescaled{capacitors}
-{}
+{
+    \saveddimen{\tunablewidth}{%
+        \pgfmathsetlength{\pgf at x}{\ctikzvalof{bipoles/vcapacitor/tunable width}*
+            \ctikzvalof{bipoles/vcapacitor/width}*0.5*
+            \ctikzvalof{\ctikzclass/scale}*\pgf at circ@Rlen}
+    }
+    \anchor{wiper}{\northeast\pgf at x=-\tunablewidth\pgf at y=-\pgf at y}
+    \anchor{W}{\northeast\pgf at x=-\tunablewidth\pgf at y=-\pgf at y}
+    \anchor{tip}{\northeast\pgf at x=\tunablewidth}
+}
 {\ctikzvalof{bipoles/vcapacitor/height}}
 {vcapacitor}
 {\ctikzvalof{bipoles/vcapacitor/height}}
@@ -1366,6 +1393,9 @@
     \anchor{midtap}{\midtap}
     \pgfcirc at border@extend at full{1}{2}{1.6}{2.6}
     \pgfcir at basic@core at anchors
+    \anchor{wiper}{\southwest\pgf at x=1.6\pgf at x\pgf at y=2.6\pgf at y}
+    \anchor{W}{\southwest\pgf at x=1.6\pgf at x\pgf at y=2.6\pgf at y}
+    \anchor{tip}{\northeast\pgf at x=0.8\pgf at x\pgf at y=2\pgf at y}
 }
 {\ctikzvalof{bipoles/cuteinductor/lower coil height}}
 {scuteinductor}
@@ -1476,6 +1506,9 @@
     \anchor{core west}{%
         \northeast\pgf at y=0.5\pgf at y\advance\pgf at y by\coredistance\pgf at x=-\pgf at x
     }
+    \anchor{wiper}{\southwest\pgf at x=0.4\pgf at x\pgf at y=\pgf at y}
+    \anchor{W}{\southwest\pgf at x=0.4\pgf at x\pgf at y=\pgf at y}
+    \anchor{tip}{\northeast\pgf at x=0.4\pgf at x}
 }
 {\ctikzvalof{bipoles/vcuteinductor/lower coil height}}
 {vcuteinductor}
@@ -1567,6 +1600,9 @@
     \anchor{midtap}{\midtap}
     \pgfcirc at border@extend at full{1}{2}{1.6}{2.6}
     \pgfcir at basic@core at anchors
+    \anchor{wiper}{\southwest\pgf at x=1.6\pgf at x\pgf at y=2.6\pgf at y}
+    \anchor{W}{\southwest\pgf at x=1.6\pgf at x\pgf at y=2.6\pgf at y}
+    \anchor{tip}{\northeast\pgf at x=0.8\pgf at x\pgf at y=2\pgf at y}
 }
 {\ctikzvalof{bipoles/americaninductor/height 2}}
 {samericaninductor}
@@ -1618,6 +1654,9 @@
     \anchor{core west}{%
         \northeast\pgf at y=0.5\pgf at y\advance\pgf at y by\coredistance\pgf at x=-\pgf at x
     }
+    \anchor{wiper}{\southwest\pgf at x=0.4\pgf at x\pgf at y=\pgf at y}
+    \anchor{W}{\southwest\pgf at x=0.4\pgf at x\pgf at y=\pgf at y}
+    \anchor{tip}{\northeast\pgf at x=0.4\pgf at x}
 }
 {\ctikzvalof{bipoles/vamericaninductor/height 2}}
 {vamericaninductor}
@@ -1675,6 +1714,9 @@
     \anchor{midtap}{\northeast\pgf at x=0pt\relax}
     \pgfcirc at border@extend at full{1}{2}{1}{2}
     \pgfcir at basic@core at anchors
+    \anchor{wiper}{\northeast\pgf at x=-\pgf at x\pgf at y=-2\pgf at y}
+    \anchor{W}{\northeast\pgf at x=-\pgf at x\pgf at y=-2\pgf at y}
+    \anchor{tip}{\northeast\pgf at y=2\pgf at y}
 }
 {\ctikzvalof{bipoles/fullgeneric/height}}
 {sfullgeneric}
@@ -1706,6 +1748,9 @@
     \anchor{core west}{%
         \northeast\pgf at y=0.4\pgf at y\advance\pgf at y by \coredistance\pgf at x=-\pgf at x
     }
+    \anchor{wiper}{\northeast\pgf at x=-0.5\pgf at x\pgf at y=-\pgf at y}
+    \anchor{W}{\northeast\pgf at x=-0.5\pgf at x\pgf at y=-\pgf at y}
+    \anchor{tip}{\northeast\pgf at x=0.5\pgf at x}
 }
 {\ctikzvalof{bipoles/tfullgeneric/height}}
 {tfullgeneric}
@@ -6509,8 +6554,6 @@
 \ctikzset{bipoles/lamp/width/.initial=.60}
 \ctikzset{bipoles/bulb/height/.initial=.8}
 \ctikzset{bipoles/bulb/width/.initial=.8}
-\ctikzset{bipoles/tline/height/.initial=.3}
-\ctikzset{bipoles/tline/width/.initial=.6}
 \ctikzset{bipoles/squid/height/.initial=.60}
 \ctikzset{bipoles/squid/width/.initial=.60}
 \ctikzset{bipoles/barrier/height/.initial=.60}

Modified: trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircmonopoles.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircmonopoles.tex	2022-12-11 00:51:11 UTC (rev 65239)
+++ trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircmonopoles.tex	2022-12-11 21:34:32 UTC (rev 65240)
@@ -410,6 +410,8 @@
 %>>>
 
 %% Node shapes for RF bipoles%<<<
+\ctikzset{bipoles/tline/height/.initial=.3}
+\ctikzset{bipoles/tline/width/.initial=.6}
 
 \pgfcircdeclarebipolescaled{RF}
 {}
@@ -418,7 +420,7 @@
 {\ctikzvalof{bipoles/tline/height}}
 {\ctikzvalof{bipoles/tline/width}}
 {
-    \pgf at circ@res at step=.2\pgf at circ@res at right % half x axis
+    \pgf at circ@res at step=.4\pgf at circ@res at up % the size of the ellipsis is proportional to the height
     \pgfscope
         \pgf at circ@setlinewidth{bipoles}{\pgfstartlinewidth}
         \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at step}{\pgf at circ@res at up}}

Modified: trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircquadpoles.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircquadpoles.tex	2022-12-11 00:51:11 UTC (rev 65239)
+++ trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircquadpoles.tex	2022-12-11 21:34:32 UTC (rev 65240)
@@ -517,6 +517,7 @@
 \ctikzset{bipoles/twoport/height/.initial=.7}
 \ctikzset{bipoles/twoport/text/.initial=}
 \ctikzset{bipoles/twoportsplit/width/.initial=.7}
+\ctikzset{bipoles/twoportsplit/height/.initial=.7}
 \ctikzset{bipoles/twoport/text in/.initial=}
 \ctikzset{bipoles/twoport/text out/.initial=}
 \ctikzset{text/.style={t=#1}}
@@ -563,6 +564,9 @@
 \ctikzset{tripoles/splitter/height/.initial=1.3}
 \ctikzset{tripoles/splitter/width/.initial=1.3}
 
+\ctikzset{tripoles/genericsplitter/height/.initial=1.3}
+\ctikzset{tripoles/genericsplitter/width/.initial=1.3}
+
 \ctikzset{tripoles/mzm/height/.initial=1.3}
 \ctikzset{tripoles/mzm/width/.initial=1.3}
 
@@ -590,7 +594,12 @@
 \newif\ifpgf at circuit@dashed
 \pgfkeys{/tikz/dashed/.add code={}{\pgf at circuit@dashedtrue}}
 \ctikzset{dashed/.add code={}{\pgf at circuit@dashedtrue}}%
-
+% Also draw internal things dashed
+\newif\ifpgf at circuit@full at dashed
+\ctikzset{inner blocks dashed/.is if=pgf at circuit@full at dashed}%
+% Default block dash
+\ctikzset{dashed blocks pattern/.initial={{0.1cm}{0.1cm}}}
+%
 % powerelectronic blocks
 \ctikzset{bipoles/sacdc/width/.initial=.7}
 \ctikzset{bipoles/sdcac/width/.initial=.7}
@@ -621,8 +630,132 @@
         }%
     \fi
 }
+%%% blocks additional anchors
+\def\pgcirc at twoport@additional at anchors{%
+    \anchor{right down}{\northeast\pgf at y=-0.5\pgf at y}
+    \anchor{left down}{\northeast\pgf at x=-\pgf at x\pgf at y=-0.5\pgf at y}
+    \anchor{left up}{\northeast\pgf at x=-\pgf at x\pgf at y=0.5\pgf at y}
+    \anchor{right up}{\northeast\pgf at y=0.5\pgf at y}
+    \anchor{up}{\northeast\pgf at x=0pt\relax}
+    \anchor{down}{\northeast\pgf at y=-\pgf at y\pgf at x=0pt\relax}
+}
+
+%%% definition to help define the blocks. Notice that the height, width, etc are different, so we can't
+%%% simplify more...
+\def\pfgcirc at twoport@get at symbol@rotation{
+    %%% put the needed rotation in \@@rotation
+    \def\pgfcircmathresult{\expandafter\pgf at circ@stripdecimals\pgf at circ@direction\pgf at nil}
+    \def\@@rotation{0}
+    \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
+        \def\@@rotation{270}
+    \fi\fi
+    \ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225
+        \def\@@rotation{180}
+    \fi\fi
+    \ifnum \pgfcircmathresult > 224 \ifnum \pgfcircmathresult < 315
+        \def\@@rotation{90}
+    \fi\fi
+}
+%
+\def\pfgcirc at twoport@rotate at inner@symbol{%
+    % rotate inner symbol
+    \pfgcirc at twoport@get at symbol@rotation
+    \pgftransformrotate{\@@rotation}
+}
+% enact dashing if needed
+\def\pgfcirc at twoport@maybedash{%
+    \ifpgf at circuit@dashed
+    \edef\@@tmp{\ctikzvalof{dashed blocks pattern}}
+    \expandafter\pgfsetdash\expandafter{\@@tmp}{0cm}
+    \fi
+}
+% debug
+\def\@@printrot{%
+    \pgfsetcolor{red}
+    \pgftext[center,x=0,y=0,]{\tiny\ttfamily\pgf at circ@direction > \@@rotation}
+}
+%
+\def\pgfcirc at twoport@setup#1{%
+    \pgf at circ@res at step = #1\pgf at circ@scaled at Rlen%6 is the real width parameter
+    \divide \pgf at circ@res at step by 2
+    \pgfsetdash{}{0pt}	% always draw solid line for inner symbol
+    \pgfsetarrows{-}
+    % let set the dash for the next operations
+    \pgfcirc at twoport@maybedash
+}
+%
+\def\pgfcirc at twoport@draw at sine#1#2{% #1 -> y shift; #2 -> crossed out if != 0
+    % draw inner sine waves; ...res at step must be defined
+    \pgfscope
+        \pgfsetlinewidth{\pgfstartlinewidth}
+        \pgftransformyshift{#1\pgf at circ@res at step}
+        \pgfpathmoveto{\pgfpoint{-.5\pgf at circ@res at step}{0\pgf at circ@res at step}}
+        \pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
+        \pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
+        \pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
+        \pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
+        \ifnum #2=0\else
+            \pgfpathmoveto{\pgfpoint{0.15\pgf at circ@res at step}{0.15\pgf at circ@res at step}}
+            \pgfpathlineto{\pgfpoint{-0.15\pgf at circ@res at step}{-0.15\pgf at circ@res at step}}
+        \fi
+        \pgfusepath{draw}
+    \endpgfscope
+}
+%
+\def\pgfcirc at twoport@draw at splitline{%
+    \pgfscope
+        \pgfcirc at twoport@maybedash
+        \pgfsetlinewidth{\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 up}}
+        \pgfusepath{draw}
+    \endpgfscope
+}
+%
+\long\def\pgfcirc at define@twoports#1#2#3#4#5#6#7{
+\pgfcircdeclarebipolescaled{#1}
+    {
+        \pgcirc at twoport@additional at anchors
+        #2
+    }
+    {#3}
+    {#4}
+    {#5}
+    {#6}
+    {
+        \pgfcirc at twoport@setup{#6}
+        % draw outer box
+        \pgf at circ@twoportbox
+        % draw solid line for inner symbol if no box is drawn and not fully dashed
+        \ifpgf at circuit@full at dashed\else\pgfsetdash{}{0pt}\fi
+        \pgf at circ@inputarrow
+        \pfgcirc at twoport@rotate at inner@symbol
+        #7
+    }
+}
+%
+\long\def\pgfcirc at define@twoports at norotate#1#2#3#4#5#6#7{
+\pgfcircdeclarebipolescaled{#1}
+    {
+        \pgcirc at twoport@additional at anchors
+        #2
+    }
+    {#3}
+    {#4}
+    {#5}
+    {#6}
+    {
+        \pgfcirc at twoport@setup{#6}
+        % draw outer box
+        \pgf at circ@twoportbox
+        % draw solid line for inner symbol if no box is drawn and not fully dashed
+        \ifpgf at circuit@full at dashed\else\pgfsetdash{}{0pt}\fi
+        \pgf at circ@inputarrow
+        #7
+    }
+}
 %% Generic two port box
-\pgfcircdeclarebipolescaled{blocks}
+\pgfcirc at define@twoports{blocks}
 {}
 {\ctikzvalof{bipoles/twoport/height}}
 {twoport}
@@ -629,152 +762,36 @@
 {\ctikzvalof{bipoles/twoport/height}}
 {\ctikzvalof{bipoles/twoport/width}}
 {
-    \pgf at circ@res at step = \ctikzvalof{bipoles/twoport/width}\pgf at circ@scaled at Rlen
-    \divide \pgf at circ@res at step by 2
-
-    \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
-    \ifpgf at circuit@dashed
-        \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
-    \fi
-    % draw outer box
-    \pgf at circ@twoportbox
-    \pgf at circ@inputarrow
-    % rotate inner symbol
-    \def\pgfcircmathresult{\expandafter\pgf at circ@stripdecimals\pgf at circ@direction\pgf at nil}
-    \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
-        \pgftransformrotate{270}
-    \fi\fi
-    \ifnum \pgfcircmathresult > 135 \ifnum \pgfcircmathresult < 225
-        \pgftransformrotate{180}
-    \fi\fi
-    \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
-        \pgftransformrotate{90}
-    \fi\fi
-
     % draw inner symbol
     \pgf at circ@text at strokecolor
     \pgftext[center,x=0,y=0]{\ctikzvalof{bipoles/twoport/text}}
 
 }
-
 %% twoport split
-\pgfcircdeclarebipolescaled{blocks}
+\pgfcirc at define@twoports{blocks}
 {}
-{\ctikzvalof{bipoles/twoportsplit/width}}
+{\ctikzvalof{bipoles/twoportsplit/height}}
 {twoportsplit}
+{\ctikzvalof{bipoles/twoportsplit/height}}
 {\ctikzvalof{bipoles/twoportsplit/width}}
-{\ctikzvalof{bipoles/twoportsplit/width}}
 {
-    \pgf at circ@res at step = \ctikzvalof{bipoles/twoportsplit/width}\pgf at circ@scaled at Rlen
-    \divide \pgf at circ@res at step by 2
-
-    \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
-
-    \ifpgf at circuit@dashed
-        \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
-    \fi
-
-    % draw outer box
-    \pgf at circ@twoportbox
-    \pgf at circ@inputarrow
     %get texts
     \def\pgfcirc at tin{\ctikzvalof{bipoles/twoport/text in}}
     \def\pgfcirc at tout{\ctikzvalof{bipoles/twoport/text out}}
-
-    % rotate inner symbol
-    \def\texti{\pgfcirc at tin}
-    \def\textii{\pgfcirc at tout}
-    \def\pgfcircmathresult{\expandafter\pgf at circ@stripdecimals\pgf at circ@direction\pgf at nil}
-    \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
-        \def\texti{\pgfcirc at tout}
-        \def\textii{\pgfcirc at tin}
-        \pgftransformrotate{270}
-    \fi\fi
-    \ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225  % 134 degree, because >= 135 is not possible
-        \def\texti{\pgfcirc at tout}
-        \def\textii{\pgfcirc at tin}
-        \pgftransformrotate{180}
-    \fi\fi
-    \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
-        \pgftransformrotate{90}
-        \def\texti{\pgfcirc at tin}
-        \def\textii{\pgfcirc at tout}
-    \fi\fi
-
-    % draw inner symbol
-    \pgfsetdash{}{0pt}	% always draw solid line for inner symbol
-    \pgfsetarrows{-} %never draw arrows
-    \pgfsetlinewidth{\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 up}}
-    \pgfusepath{draw}
-
+    % shuffle text depending on rotation
+    \pgfcirc at twoport@draw at splitline
+    %
     \pgf at circ@text at strokecolor
-    \pgftext[center,x=0.45\pgf at circ@res at left,y=0.45\pgf at circ@res at up]{\texti}
-    \pgftext[center,x=0.45\pgf at circ@res at right,y=0.45\pgf at circ@res at down]{\textii}
-}
-
-%% voltage controled oscillator
-\pgfcircdeclarebipolescaled{blocks}
-{}
-{\ctikzvalof{bipoles/vco/width}}
-{vco}
-{\ctikzvalof{bipoles/twoport/width}}
-{\ctikzvalof{bipoles/vco/width}}
-{
-    \pgf at circ@res at step = \ctikzvalof{bipoles/vco/width}\pgf at circ@scaled at Rlen
-    \divide \pgf at circ@res at step by 2
-
-    \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
-
-    \ifpgf at circuit@dashed
-        \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
+    \ifnum\@@rotation<145
+        \pgftext[center,x=0.45\pgf at circ@res at left,y=0.45\pgf at circ@res at up]{\pgfcirc at tin}
+        \pgftext[center,x=0.45\pgf at circ@res at right,y=0.45\pgf at circ@res at down]{\pgfcirc at tout}
+    \else
+        \pgftext[center,x=0.45\pgf at circ@res at left,y=0.45\pgf at circ@res at up]{\pgfcirc at tout}
+        \pgftext[center,x=0.45\pgf at circ@res at right,y=0.45\pgf at circ@res at down]{\pgfcirc at tin}
     \fi
-    % draw circle
-    \pgfscope
-        \pgf at circ@setlinewidth{bipoles}{\pgfstartlinewidth}
-        \pgfpathcircle{\pgfpoint{0}{0}} {\pgf at circ@res at step}
-        \pgf at circ@draworfill
-    \endpgfscope
-    \ifpgf at circuit@inputarrow
-        {
-            \advance \pgf at circ@res at left by -.5\ctikzvalof{bipoles/thickness}\pgfstartlinewidth
-            \pgftransformshift{\pgfpoint{\pgf at circ@res at left}{0pt}}
-            \pgfnode{inputarrow}{tip}{}{pgf at inputarrow}{\pgfusepath{fill}}
-        }
-    \fi
-
-    % rotate inner symbol
-    \def\pgfcircmathresult{\expandafter\pgf at circ@stripdecimals\pgf at circ@direction\pgf at nil}
-    \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
-        \pgftransformrotate{270}
-    \fi\fi
-    \ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225  % 134 degree, because >= 135 is not possible
-        \pgftransformrotate{180}
-    \fi\fi
-    \ifnum \pgfcircmathresult > 224 \ifnum \pgfcircmathresult < 315
-        \pgftransformrotate{90}
-    \fi\fi
-
-    % draw inner sine waves
-    \pgfsetdash{}{0pt}	% always draw solid line for inner symbol
-    \pgfsetlinewidth{\pgfstartlinewidth}
-    \pgfpathmoveto{\pgfpoint{-.5\pgf at circ@res at step}{0\pgf at circ@res at step}}
-    \pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
-    \pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
-    \pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
-    \pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
-    \pgfusepath{draw}
 }
-
 %% bandpass filter
-\pgfcircdeclarebipolescaled{blocks}
+\pgfcirc at define@twoports{blocks}
 {}
 {\ctikzvalof{bipoles/bandpass/width}}
 {bandpass}
@@ -781,67 +798,12 @@
 {\ctikzvalof{bipoles/bandpass/width}}
 {\ctikzvalof{bipoles/bandpass/width}}
 {
-
-    \pgf at circ@res at step = \ctikzvalof{bipoles/bandpass/width}\pgf at circ@scaled at Rlen
-    \divide \pgf at circ@res at step by 2
-
-    \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
-
-    \ifpgf at circuit@dashed
-        \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
-    \fi
-
-    % draw outer box
-    \pgf at circ@twoportbox
-    \pgf at circ@inputarrow
-    % rotate inner symbol
-    \def\pgfcircmathresult{\expandafter\pgf at circ@stripdecimals\pgf at circ@direction\pgf at nil}
-    \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
-        \pgftransformrotate{270}
-    \fi\fi
-    \ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225  % 134 degree, because >= 135 is not possible
-        \pgftransformrotate{180}
-    \fi\fi
-    \ifnum \pgfcircmathresult > 224 \ifnum \pgfcircmathresult < 315
-        \pgftransformrotate{90}
-    \fi\fi
-
-    % draw inner symbol
-    \pgfsetdash{}{0pt}	% always draw solid line for inner symbol
-    \pgfsetarrows{-} %never draw arrows
-    \pgfsetlinewidth{\pgfstartlinewidth}
-    \pgfpathmoveto{\pgfpoint{-0.5\pgf at circ@res at step}{0.5\pgf at circ@res at step}}
-    \pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
-    \pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
-    \pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
-    \pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
-    \pgfusepath{draw}
-    \pgfpathmoveto{\pgfpoint{-0.15\pgf at circ@res at step}{0.35\pgf at circ@res at step}}
-    \pgfpathlineto{\pgfpoint{0.15\pgf at circ@res at step}{0.65\pgf at circ@res at step}}
-    \pgfusepath{draw}
-
-    \pgfpathmoveto{\pgfpoint{-0.5\pgf at circ@res at step}{0}}
-    \pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
-    \pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
-    \pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
-    \pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
-    \pgfusepath{draw}
-
-    \pgfpathmoveto{\pgfpoint{-0.5\pgf at circ@res at step}{-0.5\pgf at circ@res at step}}
-    \pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
-    \pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
-    \pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
-    \pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
-    \pgfusepath{draw}
-    \pgfpathmoveto{\pgfpoint{-0.15\pgf at circ@res at step}{-0.65\pgf at circ@res at step}}
-    \pgfpathlineto{\pgfpoint{0.15\pgf at circ@res at step}{-0.35\pgf at circ@res at step}}
-    \pgfusepath{draw}
+    \pgfcirc at twoport@draw at sine{0.5}{1}
+    \pgfcirc at twoport@draw at sine{0.0}{0}
+    \pgfcirc at twoport@draw at sine{-0.5}{1}
 }
-
 %% bandstop filter
-\pgfcircdeclarebipolescaled{blocks}
+\pgfcirc at define@twoports{blocks}
 {}
 {\ctikzvalof{bipoles/bandstop/width}}
 {bandstop}
@@ -848,63 +810,12 @@
 {\ctikzvalof{bipoles/bandstop/width}}
 {\ctikzvalof{bipoles/bandstop/width}}
 {
-    \pgf at circ@res at step = \ctikzvalof{bipoles/bandstop/width}\pgf at circ@scaled at Rlen
-    \divide \pgf at circ@res at step by 2
-
-    \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
-
-    \ifpgf at circuit@dashed
-        \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
-    \fi
-
-    % draw outer box
-    \pgf at circ@twoportbox
-    \pgf at circ@inputarrow
-    % rotate inner symbol
-    \def\pgfcircmathresult{\expandafter\pgf at circ@stripdecimals\pgf at circ@direction\pgf at nil}
-    \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
-        \pgftransformrotate{270}
-    \fi\fi
-    \ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225% 134 degree, because >= 135 is not possible
-        \pgftransformrotate{180}
-    \fi\fi
-    \ifnum \pgfcircmathresult > 224 \ifnum \pgfcircmathresult < 315
-        \pgftransformrotate{90}
-    \fi\fi
-
-    % draw inner symbol
-    \pgfsetdash{}{0pt}% always draw solid line for inner symbol
-    \pgfsetarrows{-}%never draw arrows
-    \pgfsetlinewidth{\pgfstartlinewidth}
-    \pgfpathmoveto{\pgfpoint{-0.5\pgf at circ@res at step}{0.5\pgf at circ@res at step}}
-    \pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
-    \pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
-    \pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
-    \pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
-    \pgfusepath{draw}
-
-    \pgfpathmoveto{\pgfpoint{-0.5\pgf at circ@res at step}{0}}
-    \pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
-    \pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
-    \pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
-    \pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
-    \pgfusepath{draw}
-    \pgfpathmoveto{\pgfpoint{-0.15\pgf at circ@res at step}{-0.15\pgf at circ@res at step}}
-    \pgfpathlineto{\pgfpoint{0.15\pgf at circ@res at step}{0.15\pgf at circ@res at step}}
-    \pgfusepath{draw}
-
-    \pgfpathmoveto{\pgfpoint{-0.5\pgf at circ@res at step}{-0.5\pgf at circ@res at step}}
-    \pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
-    \pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
-    \pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
-    \pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
-    \pgfusepath{draw}
+    \pgfcirc at twoport@draw at sine{0.5}{0}
+    \pgfcirc at twoport@draw at sine{0.0}{1}
+    \pgfcirc at twoport@draw at sine{-0.5}{0}
 }
-
 %% highpass filter
-\pgfcircdeclarebipolescaled{blocks}
+\pgfcirc at define@twoports{blocks}
 {}
 {\ctikzvalof{bipoles/highpass/width}}
 {highpass}
@@ -911,66 +822,12 @@
 {\ctikzvalof{bipoles/highpass/width}}
 {\ctikzvalof{bipoles/highpass/width}}
 {
-    \pgf at circ@res at step = \ctikzvalof{bipoles/highpass/width}\pgf at circ@scaled at Rlen
-    \divide \pgf at circ@res at step by 2
-
-    \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
-
-    \ifpgf at circuit@dashed
-        \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
-    \fi
-
-    % draw outer box
-    \pgf at circ@twoportbox
-    \pgf at circ@inputarrow
-    % rotate inner symbol
-    \def\pgfcircmathresult{\expandafter\pgf at circ@stripdecimals\pgf at circ@direction\pgf at nil}
-    \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
-        \pgftransformrotate{270}
-    \fi\fi
-    \ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225  % 134 degree, because >= 135 is not possible
-        \pgftransformrotate{180}
-    \fi\fi
-    \ifnum \pgfcircmathresult > 224 \ifnum \pgfcircmathresult < 315
-        \pgftransformrotate{90}
-    \fi\fi
-
-    % draw inner symbol
-    \pgfsetdash{}{0pt}	% always draw solid line for inner symbol
-    \pgfsetarrows{-} %never draw arrows
-    \pgfsetlinewidth{\pgfstartlinewidth}
-    \pgfpathmoveto{\pgfpoint{-0.5\pgf at circ@res at step}{0.5\pgf at circ@res at step}}
-    \pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
-    \pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
-    \pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
-    \pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
-    \pgfusepath{draw}
-
-    \pgfpathmoveto{\pgfpoint{-0.5\pgf at circ@res at step}{0}}
-    \pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
-    \pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
-    \pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
-    \pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
-    \pgfusepath{draw}
-    \pgfpathmoveto{\pgfpoint{-0.15\pgf at circ@res at step}{-0.15\pgf at circ@res at step}}
-    \pgfpathlineto{\pgfpoint{0.15\pgf at circ@res at step}{0.15\pgf at circ@res at step}}
-    \pgfusepath{draw}
-
-    \pgfpathmoveto{\pgfpoint{-0.5\pgf at circ@res at step}{-0.5\pgf at circ@res at step}}
-    \pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
-    \pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
-    \pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
-    \pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
-    \pgfusepath{draw}
-    \pgfpathmoveto{\pgfpoint{-0.15\pgf at circ@res at step}{-0.65\pgf at circ@res at step}}
-    \pgfpathlineto{\pgfpoint{0.15\pgf at circ@res at step}{-0.35\pgf at circ@res at step}}
-    \pgfusepath{draw}
+    \pgfcirc at twoport@draw at sine{0.5}{0}
+    \pgfcirc at twoport@draw at sine{0.0}{1}
+    \pgfcirc at twoport@draw at sine{-0.5}{1}
 }
-
 %% highpass2 filter ---simplyfied with just two waves
-\pgfcircdeclarebipolescaled{blocks}
+\pgfcirc at define@twoports{blocks}
 {}
 {\ctikzvalof{bipoles/highpass2/width}}
 {highpass2}
@@ -977,56 +834,11 @@
 {\ctikzvalof{bipoles/highpass2/width}}
 {\ctikzvalof{bipoles/highpass2/width}}
 {
-    \pgf at circ@res at step = \ctikzvalof{bipoles/highpass2/width}\pgf at circ@scaled at Rlen
-    \divide \pgf at circ@res at step by 2
-
-    \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
-
-    \ifpgf at circuit@dashed
-        \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
-    \fi
-
-    % draw outer box
-    \pgf at circ@twoportbox
-    \pgf at circ@inputarrow
-    % rotate inner symbol
-    \def\pgfcircmathresult{\expandafter\pgf at circ@stripdecimals\pgf at circ@direction\pgf at nil}
-    \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
-        \pgftransformrotate{270}
-    \fi\fi
-    \ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225  % 134 degree, because >= 135 is not possible
-        \pgftransformrotate{180}
-    \fi\fi
-    \ifnum \pgfcircmathresult > 224 \ifnum \pgfcircmathresult < 315
-        \pgftransformrotate{90}
-    \fi\fi
-
-    % draw inner symbol
-    \pgfsetdash{}{0pt}	% always draw solid line for inner symbol
-    \pgfsetarrows{-} %never draw arrows
-    \pgfsetlinewidth{\pgfstartlinewidth}
-    \pgfpathmoveto{\pgfpoint{-0.5\pgf at circ@res at step}{0.25\pgf at circ@res at step}}
-    \pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
-    \pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
-    \pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
-    \pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
-    \pgfusepath{draw}
-
-    \pgfpathmoveto{\pgfpoint{-0.5\pgf at circ@res at step}{-0.25\pgf at circ@res at step}}
-    \pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
-    \pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
-    \pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
-    \pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
-    \pgfusepath{draw}
-    \pgfpathmoveto{\pgfpoint{-0.3\pgf at circ@res at step}{-0.5\pgf at circ@res at step}}
-    \pgfpathlineto{\pgfpoint{0.3\pgf at circ@res at step}{-0.1\pgf at circ@res at step}}
-    \pgfusepath{draw}
+    \pgfcirc at twoport@draw at sine{0.25}{0}
+    \pgfcirc at twoport@draw at sine{-0.25}{1}
 }
-
 %% lowpass filter
-\pgfcircdeclarebipolescaled{blocks}
+\pgfcirc at define@twoports{blocks}
 {}
 {\ctikzvalof{bipoles/lowpass/width}}
 {lowpass}
@@ -1033,66 +845,12 @@
 {\ctikzvalof{bipoles/lowpass/width}}
 {\ctikzvalof{bipoles/lowpass/width}}
 {
-    \pgf at circ@res at step = \ctikzvalof{bipoles/lowpass/width}\pgf at circ@scaled at Rlen
-    \divide \pgf at circ@res at step by 2
-
-    \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
-
-    \ifpgf at circuit@dashed
-        \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
-    \fi
-
-    % draw outer box
-    \pgf at circ@twoportbox
-    \pgf at circ@inputarrow
-    % rotate inner symbol
-    \def\pgfcircmathresult{\expandafter\pgf at circ@stripdecimals\pgf at circ@direction\pgf at nil}
-    \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
-        \pgftransformrotate{270}
-    \fi\fi
-    \ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225  % 134 degree, because >= 135 is not possible
-        \pgftransformrotate{180}
-    \fi\fi
-    \ifnum \pgfcircmathresult > 224 \ifnum \pgfcircmathresult < 315
-        \pgftransformrotate{90}
-    \fi\fi
-
-    % draw inner symbol
-    \pgfsetdash{}{0pt}	% always draw solid line for inner symbol
-    \pgfsetarrows{-} %never draw arrows
-    \pgfsetlinewidth{\pgfstartlinewidth}
-    \pgfpathmoveto{\pgfpoint{-0.5\pgf at circ@res at step}{0.5\pgf at circ@res at step}}
-    \pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
-    \pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
-    \pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
-    \pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
-    \pgfusepath{draw}
-    \pgfpathmoveto{\pgfpoint{-0.15\pgf at circ@res at step}{0.35\pgf at circ@res at step}}
-    \pgfpathlineto{\pgfpoint{0.15\pgf at circ@res at step}{0.65\pgf at circ@res at step}}
-    \pgfusepath{draw}
-
-    \pgfpathmoveto{\pgfpoint{-0.5\pgf at circ@res at step}{0}}
-    \pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
-    \pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
-    \pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
-    \pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
-    \pgfusepath{draw}
-    \pgfpathmoveto{\pgfpoint{-0.15\pgf at circ@res at step}{-0.15\pgf at circ@res at step}}
-    \pgfpathlineto{\pgfpoint{0.15\pgf at circ@res at step}{0.15\pgf at circ@res at step}}
-    \pgfusepath{draw}
-
-    \pgfpathmoveto{\pgfpoint{-0.5\pgf at circ@res at step}{-0.5\pgf at circ@res at step}}
-    \pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
-    \pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
-    \pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
-    \pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
-    \pgfusepath{draw}
+    \pgfcirc at twoport@draw at sine{0.5}{1}
+    \pgfcirc at twoport@draw at sine{0.0}{1}
+    \pgfcirc at twoport@draw at sine{-0.5}{0}
 }
-
 %% lowpass2 filter: simplyfied with just two waves
-\pgfcircdeclarebipolescaled{blocks}
+\pgfcirc at define@twoports{blocks}
 {}
 {\ctikzvalof{bipoles/lowpass2/width}}
 {lowpass2}
@@ -1099,56 +857,11 @@
 {\ctikzvalof{bipoles/lowpass2/width}}
 {\ctikzvalof{bipoles/lowpass2/width}}
 {
-    \pgf at circ@res at step = \ctikzvalof{bipoles/lowpass2/width}\pgf at circ@scaled at Rlen
-    \divide \pgf at circ@res at step by 2
-
-    \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
-
-    \ifpgf at circuit@dashed
-        \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
-    \fi
-
-    % draw outer box
-    \pgf at circ@twoportbox
-    \pgf at circ@inputarrow
-    % rotate inner symbol
-    \def\pgfcircmathresult{\expandafter\pgf at circ@stripdecimals\pgf at circ@direction\pgf at nil}
-    \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
-        \pgftransformrotate{270}
-    \fi\fi
-    \ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225  % 134 degree, because >= 135 is not possible
-        \pgftransformrotate{180}
-    \fi\fi
-    \ifnum \pgfcircmathresult > 224 \ifnum \pgfcircmathresult < 315
-        \pgftransformrotate{90}
-    \fi\fi
-
-    % draw inner symbol
-    \pgfsetdash{}{0pt}	% always draw solid line for inner symbol
-    \pgfsetarrows{-} %never draw arrows
-    \pgfsetlinewidth{\pgfstartlinewidth}
-    \pgfpathmoveto{\pgfpoint{-0.5\pgf at circ@res at step}{0.25\pgf at circ@res at step}}
-    \pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
-    \pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
-    \pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
-    \pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
-    \pgfusepath{draw}
-    \pgfpathmoveto{\pgfpoint{-0.3\pgf at circ@res at step}{0.1\pgf at circ@res at step}}
-    \pgfpathlineto{\pgfpoint{0.3\pgf at circ@res at step}{0.5\pgf at circ@res at step}}
-    \pgfusepath{draw}
-
-    \pgfpathmoveto{\pgfpoint{-0.5\pgf at circ@res at step}{-0.25\pgf at circ@res at step}}
-    \pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
-    \pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
-    \pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
-    \pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
-    \pgfusepath{draw}
+    \pgfcirc at twoport@draw at sine{0.25}{1}
+    \pgfcirc at twoport@draw at sine{-0.25}{0}
 }
-
 %% allpass filter
-\pgfcircdeclarebipolescaled{blocks}
+\pgfcirc at define@twoports{blocks}
 {}
 {\ctikzvalof{bipoles/allpass/width}}
 {allpass}
@@ -1155,60 +868,12 @@
 {\ctikzvalof{bipoles/allpass/width}}
 {\ctikzvalof{bipoles/allpass/width}}
 {
-    \pgf at circ@res at step = \ctikzvalof{bipoles/allpass/width}\pgf at circ@scaled at Rlen
-    \divide \pgf at circ@res at step by 2
-
-    \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
-
-    \ifpgf at circuit@dashed
-        \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
-    \fi
-
-    % draw outer box
-    \pgf at circ@twoportbox
-    \pgf at circ@inputarrow
-    % rotate inner symbol
-    \def\pgfcircmathresult{\expandafter\pgf at circ@stripdecimals\pgf at circ@direction\pgf at nil}
-    \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
-        \pgftransformrotate{270}
-    \fi\fi
-    \ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225  % 134 degree, because >= 135 is not possible
-        \pgftransformrotate{180}
-    \fi\fi
-    \ifnum \pgfcircmathresult > 224 \ifnum \pgfcircmathresult < 315
-        \pgftransformrotate{90}
-    \fi\fi
-
-    % draw inner symbol
-    \pgfsetdash{}{0pt}	% always draw solid line for inner symbol
-    \pgfsetarrows{-} %never draw arrows
-    \pgfsetlinewidth{\pgfstartlinewidth}
-    \pgfpathmoveto{\pgfpoint{-0.5\pgf at circ@res at step}{0.5\pgf at circ@res at step}}
-    \pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
-    \pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
-    \pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
-    \pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
-    \pgfusepath{draw}
-
-    \pgfpathmoveto{\pgfpoint{-0.5\pgf at circ@res at step}{0}}
-    \pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
-    \pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
-    \pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
-    \pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
-    \pgfusepath{draw}
-
-    \pgfpathmoveto{\pgfpoint{-0.5\pgf at circ@res at step}{-0.5\pgf at circ@res at step}}
-    \pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
-    \pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
-    \pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
-    \pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
-    \pgfusepath{draw}
+    \pgfcirc at twoport@draw at sine{0.5}{0}
+    \pgfcirc at twoport@draw at sine{0.0}{0}
+    \pgfcirc at twoport@draw at sine{-0.5}{0}
 }
-
 %% ADC
-\pgfcircdeclarebipolescaled{blocks}
+\pgfcirc at define@twoports{blocks}
 {}
 {\ctikzvalof{bipoles/adc/width}}
 {adc}
@@ -1215,55 +880,20 @@
 {\ctikzvalof{bipoles/adc/width}}
 {\ctikzvalof{bipoles/adc/width}}
 {
-    \pgf at circ@res at step = \ctikzvalof{bipoles/adc/width}\pgf at circ@scaled at Rlen
-    \divide \pgf at circ@res at step by 2
-
-    \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
-
-    \ifpgf at circuit@dashed
-        \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
+    \pgfcirc at twoport@draw at splitline
+    %
+    \pgf at circ@text at strokecolor
+    \ifnum\@@rotation<145
+        \pgftext[center,x=0.45\pgf at circ@res at left,y=0.45\pgf at circ@res at up]{A}
+        \pgftext[center,x=0.45\pgf at circ@res at right,y=0.45\pgf at circ@res at down]{D}
+    \else
+        \pgftext[center,x=0.45\pgf at circ@res at left,y=0.45\pgf at circ@res at up]{D}
+        \pgftext[center,x=0.45\pgf at circ@res at right,y=0.45\pgf at circ@res at down]{A}
     \fi
-
-    % draw outer box
-    \pgf at circ@twoportbox
-    \pgf at circ@inputarrow
-    % rotate inner symbol
-    \def\texti{A}
-    \def\textii{D}
-    \def\pgfcircmathresult{\expandafter\pgf at circ@stripdecimals\pgf at circ@direction\pgf at nil}
-    \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
-        \def\texti{D}
-        \def\textii{A}
-        \pgftransformrotate{270}
-    \fi\fi
-    \ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225  % 134 degree, because >= 135 is not possible
-        \def\texti{D}
-        \def\textii{A}
-        \pgftransformrotate{180}
-    \fi\fi
-    \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
-        \pgftransformrotate{90}
-        \def\texti{A}
-        \def\textii{D}
-    \fi\fi
-
-    % draw inner symbol
-    \pgfsetdash{}{0pt}	% always draw solid line for inner symbol
-    \pgfsetarrows{-} %never draw arrows
-    \pgfsetlinewidth{\pgfstartlinewidth}
-    \pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at down}}
-    \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
-    \pgfusepath{draw}
-
-    \pgf at circ@text at strokecolor
-    \pgftext[center,x=0.45\pgf at circ@res at left,y=0.45\pgf at circ@res at up]{\textsf{\texti}}
-    \pgftext[center,x=0.45\pgf at circ@res at right,y=0.45\pgf at circ@res at down]{\textsf{\textii}}
 }
 
 %% DAC
-\pgfcircdeclarebipolescaled{blocks}
+\pgfcirc at define@twoports{blocks}
 {}
 {\ctikzvalof{bipoles/dac/width}}
 {dac}
@@ -1270,55 +900,20 @@
 {\ctikzvalof{bipoles/dac/width}}
 {\ctikzvalof{bipoles/dac/width}}
 {
-    \pgf at circ@res at step = \ctikzvalof{bipoles/dac/width}\pgf at circ@scaled at Rlen
-    \divide \pgf at circ@res at step by 2
-
-    \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
-
-    \ifpgf at circuit@dashed
-        \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
+    \pgfcirc at twoport@draw at splitline
+    %
+    \pgf at circ@text at strokecolor
+    \ifnum\@@rotation<145
+        \pgftext[center,x=0.45\pgf at circ@res at left,y=0.45\pgf at circ@res at up]{D}
+        \pgftext[center,x=0.45\pgf at circ@res at right,y=0.45\pgf at circ@res at down]{A}
+    \else
+        \pgftext[center,x=0.45\pgf at circ@res at left,y=0.45\pgf at circ@res at up]{A}
+        \pgftext[center,x=0.45\pgf at circ@res at right,y=0.45\pgf at circ@res at down]{D}
     \fi
-
-    % draw outer box
-    \pgf at circ@twoportbox
-    \pgf at circ@inputarrow
-    % rotate inner symbol
-    \def\texti{D}
-    \def\textii{A}
-    \def\pgfcircmathresult{\expandafter\pgf at circ@stripdecimals\pgf at circ@direction\pgf at nil}
-    \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
-        \def\texti{A}
-        \def\textii{D}
-        \pgftransformrotate{270}
-    \fi\fi
-    \ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225  % 134 degree, because >= 135 is not possible
-        \def\texti{A}
-        \def\textii{D}
-        \pgftransformrotate{180}
-    \fi\fi
-    \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
-        \pgftransformrotate{90}
-        \def\texti{D}
-        \def\textii{A}
-    \fi\fi
-
-    % draw inner symbol
-    \pgfsetdash{}{0pt}	% always draw solid line for inner symbol
-    \pgfsetarrows{-} %never draw arrows
-    \pgfsetlinewidth{\pgfstartlinewidth}
-    \pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at down}}
-    \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
-    \pgfusepath{draw}
-
-    \pgf at circ@text at strokecolor
-    \pgftext[center,x=0.45\pgf at circ@res at left,y=0.45\pgf at circ@res at up]{\textsf{\texti}}
-    \pgftext[center,x=0.45\pgf at circ@res at right,y=0.45\pgf at circ@res at down]{\textsf{\textii}}
 }
 
 %% DSP
-\pgfcircdeclarebipolescaled{blocks}
+\pgfcirc at define@twoports{blocks}
 {}
 {\ctikzvalof{bipoles/dsp/width}}
 {dsp}
@@ -1325,39 +920,11 @@
 {\ctikzvalof{bipoles/dsp/width}}
 {\ctikzvalof{bipoles/dsp/width}}
 {
-    \pgf at circ@res at step = \ctikzvalof{bipoles/dsp/width}\pgf at circ@scaled at Rlen
-    \divide \pgf at circ@res at step by 2
-
-    \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
-
-    \ifpgf at circuit@dashed
-        \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
-    \fi
-
-    % draw outer box
-    \pgf at circ@twoportbox
-    \pgf at circ@inputarrow
-    % rotate inner symbol
-    \def\pgfcircmathresult{\expandafter\pgf at circ@stripdecimals\pgf at circ@direction\pgf at nil}
-    \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
-        \pgftransformrotate{270}
-    \fi\fi
-    \ifnum \pgfcircmathresult > 135 \ifnum \pgfcircmathresult < 225
-        \pgftransformrotate{180}
-    \fi\fi
-    \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
-        \pgftransformrotate{90}
-    \fi\fi
-
-    % draw inner symbol
     \pgf at circ@text at strokecolor
     \pgftext[center,x=0,y=0]{\textsf{DSP}}
 }
-
 %% FFT
-\pgfcircdeclarebipolescaled{blocks}
+\pgfcirc at define@twoports{blocks}
 {}
 {\ctikzvalof{bipoles/fft/width}}
 {fft}
@@ -1364,187 +931,11 @@
 {\ctikzvalof{bipoles/fft/width}}
 {\ctikzvalof{bipoles/fft/width}}
 {
-    \pgf at circ@res at step = \ctikzvalof{bipoles/fft/width}\pgf at circ@scaled at Rlen
-    \divide \pgf at circ@res at step by 2
-
-    \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
-
-    \ifpgf at circuit@dashed
-        \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
-    \fi
-
-    % draw outer box
-    \pgf at circ@twoportbox
-    \pgf at circ@inputarrow
-    % rotate inner symbol
-    \def\pgfcircmathresult{\expandafter\pgf at circ@stripdecimals\pgf at circ@direction\pgf at nil}
-    \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
-        \pgftransformrotate{270}
-    \fi\fi
-    \ifnum \pgfcircmathresult > 135 \ifnum \pgfcircmathresult < 225
-        \pgftransformrotate{180}
-    \fi\fi
-    \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
-        \pgftransformrotate{90}
-    \fi\fi
-
-    % draw inner symbol
     \pgf at circ@text at strokecolor
     \pgftext[center,x=0,y=0]{\textsf{FFT}}
 }
-
-%% Amplifier
-\pgfcircdeclarebipolescaled{blocks}
-{}
-{
-    \ifpgf at circuit@boxed
-        \ctikzvalof{bipoles/twoport/width}
-    \else
-        \ctikzvalof{bipoles/amp/width}
-    \fi
-}
-{amp}
-{
-    \ifpgf at circuit@boxed
-        \ctikzvalof{bipoles/twoport/width}
-    \else
-        \ctikzvalof{bipoles/amp/width}
-    \fi
-}
-{
-    \ifpgf at circuit@boxed
-        \ctikzvalof{bipoles/twoport/width}
-    \else
-        \ctikzvalof{bipoles/amp/width}
-    \fi
-}
-{
-    \pgf at circ@res at step = \ctikzvalof{bipoles/amp/width}\pgf at circ@scaled at Rlen
-
-    \ifpgf at circuit@dashed
-        \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
-    \fi
-
-    % draw outer box
-    \ifpgf at circuit@boxed
-        \pgf at circ@setlinewidth{bipoles}{\pgfstartlinewidth}
-        \pgfnode{blockbox}{center}{}{pgf at box}{\pgfusepath{draw}}
-        \pgf at circ@draworfill
-    \fi
-
-    % draw input arrow
-    \ifpgf at circuit@inputarrow
-        {
-            \advance \pgf at circ@res at left by -.5\ctikzvalof{bipoles/thickness}\pgfstartlinewidth
-            \pgftransformshift{\pgfpoint{\pgf at circ@res at left}{0pt}}
-            \pgfnode{inputarrow}{tip}{}{pgf at inputarrow}{\pgfusepath{fill}}
-        }
-    \fi
-
-    \ifpgf at circuit@boxed
-        \pgfsetlinewidth{\pgfstartlinewidth}
-        \pgfsetdash{}{0pt}	% draw solid line for inner symbol if no box is drawn
-        \pgf at circ@res at step=.7\pgf at circ@res at step % scale amp symbol when inside a box
-    \else
-        \pgf at circ@setlinewidth{bipoles}{\pgfstartlinewidth}
-    \fi
-
-    \pgfsetarrows{-} %never draw arrows
-
-    \pgfpathmoveto{\pgfpoint{-0.5\pgf at circ@res at step}{0.55\pgf at circ@res at step}}
-    \pgfpathlineto{\pgfpoint{0.5\pgf at circ@res at step}{0}}
-    \pgfpathlineto{\pgfpoint{-0.5\pgf at circ@res at step}{-0.55\pgf at circ@res at step}}
-
-    \pgfpathclose
-    \pgf at circ@draworfill
-
-    % draw inner text
-    \pgf at circ@text at strokecolor
-    \pgftext[center,x=-0.12\pgf at circ@res at step,y=0]{\ctikzvalof{bipoles/twoport/text}}
-}
-
-
-%% variable amplifier
-\pgfcircdeclarebipolescaled{blocks}
-{}
-{
-    \ifpgf at circuit@boxed
-        \ctikzvalof{bipoles/twoport/width}
-    \else
-        \ctikzvalof{bipoles/amp/width}
-    \fi
-}
-{vamp}
-{
-    \ifpgf at circuit@boxed
-        \ctikzvalof{bipoles/twoport/width}
-    \else
-        \ctikzvalof{bipoles/amp/width}
-    \fi
-}
-{
-    \ifpgf at circuit@boxed
-        \ctikzvalof{bipoles/twoport/width}
-    \else
-        \ctikzvalof{bipoles/amp/width}
-    \fi
-}
-{
-    \pgf at circ@res at step = \ctikzvalof{bipoles/amp/width}\pgf at circ@scaled at Rlen
-
-    \ifpgf at circuit@dashed
-        \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
-    \fi
-
-    % draw outer box
-    \ifpgf at circuit@boxed
-        \pgfnode{blockbox}{center}{}{pgf at box}{\pgfusepath{draw}}
-    \fi
-
-    % draw input arrow
-    \ifpgf at circuit@inputarrow
-        {
-            \advance \pgf at circ@res at left by -.5\ctikzvalof{bipoles/thickness}\pgfstartlinewidth
-            \pgftransformshift{\pgfpoint{\pgf at circ@res at left}{0pt}}
-            \pgfnode{inputarrow}{tip}{}{pgf at inputarrow}{\pgfusepath{fill}}
-        }
-    \fi
-
-    \ifpgf at circuit@boxed
-        \pgfsetlinewidth{\pgfstartlinewidth}
-        \pgfsetdash{}{0pt}	% draw solid line for inner symbol if no box is drawn
-        \pgf at circ@res at step=.7\pgf at circ@res at step % scale amp symbol when inside a box
-    \else
-        \pgf at circ@setlinewidth{bipoles}{\pgfstartlinewidth}
-    \fi
-
-
-    \pgfsetdash{}{0pt}	% always draw solid line for inner symbol
-    \pgfsetarrows{-} %never draw arrows
-
-    \pgfpathmoveto{\pgfpoint{-0.5\pgf at circ@res at step}{0.55\pgf at circ@res at step}}
-    \pgfpathlineto{\pgfpoint{0.5\pgf at circ@res at step}{0}}
-    \pgfpathlineto{\pgfpoint{-0.5\pgf at circ@res at step}{-0.55\pgf at circ@res at step}}
-
-    \pgfpathclose
-    \pgf at circ@draworfill
-
-
-    % draw arrow
-    \pgfsetlinewidth{\pgfstartlinewidth}
-    \pgfsetarrowsend{latex}
-    \pgfpathmoveto{\pgfpoint{-0.8\pgf at circ@res at step}{-0.5\pgf at circ@res at step}}
-    \pgfpathlineto{\pgfpoint{0.6\pgf at circ@res at step}{0.6\pgf at circ@res at step}}
-    \pgfusepath{draw}
-    % draw inner text
-    \pgf at circ@text at strokecolor
-    \pgftext[center,x=-0.12\pgf at circ@res at step,y=0]{\ctikzvalof{bipoles/twoport/text}}
-}
-
 %% pi attenuator
-\pgfcircdeclarebipolescaled{blocks}
+\pgfcirc at define@twoports{blocks}
 {}
 {\ctikzvalof{bipoles/piattenuator/width}}
 {piattenuator}
@@ -1551,46 +942,18 @@
 {\ctikzvalof{bipoles/piattenuator/width}}
 {\ctikzvalof{bipoles/piattenuator/width}}
 {
-    \pgf at circ@res at step = \ctikzvalof{bipoles/piattenuator/width}\pgf at circ@scaled at Rlen
-    \divide \pgf at circ@res at step by 2
-
-    \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
-
-    \ifpgf at circuit@dashed
-        \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
-    \fi
-
-    % draw outer box
-    \pgf at circ@twoportbox
-    \pgf at circ@inputarrow
-    % rotate inner symbol
-    \def\pgfcircmathresult{\expandafter\pgf at circ@stripdecimals\pgf at circ@direction\pgf at nil}
-    \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
-        \pgftransformrotate{270}
-    \fi\fi
-    \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
-        \pgftransformrotate{90}
-    \fi\fi
-
     % draw inner symbol
-    \pgfsetdash{}{0pt}	% always draw solid line for inner symbol
-    \pgfsetarrows{-} %never draw arrows
     \pgfsetlinewidth{\pgfstartlinewidth}
     \pgfpathmoveto{\pgfpoint{0.4\pgf at circ@res at left}{0.4\pgf at circ@res at down}}
     \pgfpathlineto{\pgfpoint{0.4\pgf at circ@res at left}{0.4\pgf at circ@res at up}}
-    \pgfusepath{draw}
     \pgfpathmoveto{\pgfpoint{0.4\pgf at circ@res at right}{0.4\pgf at circ@res at down}}
     \pgfpathlineto{\pgfpoint{0.4\pgf at circ@res at right}{0.4\pgf at circ@res at up}}
-    \pgfusepath{draw}
     \pgfpathmoveto{\pgfpoint{0.6\pgf at circ@res at left}{0.4\pgf at circ@res at up}}
     \pgfpathlineto{\pgfpoint{0.6\pgf at circ@res at right}{0.4\pgf at circ@res at up}}
     \pgfusepath{draw}
 }
-
 %% variable pi attenuator
-\pgfcircdeclarebipolescaled{blocks}
+\pgfcirc at define@twoports{blocks}
 {}
 {\ctikzvalof{bipoles/vpiattenuator/width}}
 {vpiattenuator}
@@ -1597,51 +960,22 @@
 {\ctikzvalof{bipoles/vpiattenuator/width}}
 {\ctikzvalof{bipoles/vpiattenuator/width}}
 {
-    \pgf at circ@res at step = \ctikzvalof{bipoles/vpiattenuator/width}\pgf at circ@scaled at Rlen
-    \divide \pgf at circ@res at step by 2
-
-    \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
-
-    \ifpgf at circuit@dashed
-        \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
-    \fi
-
-    % draw outer box
-    \pgf at circ@twoportbox
-    \pgf at circ@inputarrow
-    % rotate inner symbol
-    \def\pgfcircmathresult{\expandafter\pgf at circ@stripdecimals\pgf at circ@direction\pgf at nil}
-    \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
-        \pgftransformrotate{270}
-    \fi\fi
-    \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
-        \pgftransformrotate{90}
-    \fi\fi
-
     % draw inner symbol
-    \pgfsetdash{}{0pt}	% always draw solid line for inner symbol
-    \pgfsetarrows{-} %never draw arrows
     \pgfsetlinewidth{\pgfstartlinewidth}
     \pgfpathmoveto{\pgfpoint{0.4\pgf at circ@res at left}{0.4\pgf at circ@res at down}}
     \pgfpathlineto{\pgfpoint{0.4\pgf at circ@res at left}{0.4\pgf at circ@res at up}}
-    \pgfusepath{draw}
     \pgfpathmoveto{\pgfpoint{0.4\pgf at circ@res at right}{0.4\pgf at circ@res at down}}
     \pgfpathlineto{\pgfpoint{0.4\pgf at circ@res at right}{0.4\pgf at circ@res at up}}
-    \pgfusepath{draw}
     \pgfpathmoveto{\pgfpoint{0.6\pgf at circ@res at left}{0.4\pgf at circ@res at up}}
     \pgfpathlineto{\pgfpoint{0.6\pgf at circ@res at right}{0.4\pgf at circ@res at up}}
     \pgfusepath{draw}
-
-    \pgfsetarrowsend{latex}
+    \pgfcirc at set@arrows{tunable}{}{latex}
     \pgfpathmoveto{\pgfpoint{0.7\pgf at circ@res at left}{0.5\pgf at circ@res at down}}
     \pgfpathlineto{\pgfpoint{0.7\pgf at circ@res at right}{0.8\pgf at circ@res at up}}
     \pgfusepath{draw}
 }
-
 %% T attenuator
-\pgfcircdeclarebipolescaled{blocks}
+\pgfcirc at define@twoports{blocks}
 {}
 {\ctikzvalof{bipoles/tattenuator/width}}
 {tattenuator}
@@ -1648,43 +982,16 @@
 {\ctikzvalof{bipoles/tattenuator/width}}
 {\ctikzvalof{bipoles/tattenuator/width}}
 {
-    \pgf at circ@res at step = \ctikzvalof{bipoles/tattenuator/width}\pgf at circ@scaled at Rlen
-    \divide \pgf at circ@res at step by 2
-
-    \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
-
-    \ifpgf at circuit@dashed
-        \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
-    \fi
-
-    % draw outer box
-    \pgf at circ@twoportbox
-    \pgf at circ@inputarrow
-    % rotate inner symbol
-    \def\pgfcircmathresult{\expandafter\pgf at circ@stripdecimals\pgf at circ@direction\pgf at nil}
-    \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
-        \pgftransformrotate{270}
-    \fi\fi
-    \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
-        \pgftransformrotate{90}
-    \fi\fi
-
     % draw inner symbol
-    \pgfsetdash{}{0pt}	% always draw solid line for inner symbol
-    \pgfsetarrows{-} %never draw arrows
     \pgfsetlinewidth{\pgfstartlinewidth}
     \pgfpathmoveto{\pgfpoint{0pt}{0.4\pgf at circ@res at down}}
     \pgfpathlineto{\pgfpoint{0pt}{0.4\pgf at circ@res at up}}
-    \pgfusepath{draw}
     \pgfpathmoveto{\pgfpoint{0.6\pgf at circ@res at left}{0.4\pgf at circ@res at up}}
     \pgfpathlineto{\pgfpoint{0.6\pgf at circ@res at right}{0.4\pgf at circ@res at up}}
     \pgfusepath{draw}
 }
-
 %% variable T attenuator
-\pgfcircdeclarebipolescaled{blocks}
+\pgfcirc at define@twoports{blocks}
 {}
 {\ctikzvalof{bipoles/vtattenuator/width}}
 {vtattenuator}
@@ -1691,48 +998,20 @@
 {\ctikzvalof{bipoles/vtattenuator/width}}
 {\ctikzvalof{bipoles/vtattenuator/width}}
 {
-    \pgf at circ@res at step = \ctikzvalof{bipoles/vtattenuator/width}\pgf at circ@scaled at Rlen
-    \divide \pgf at circ@res at step by 2
-
-    \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
-
-    \ifpgf at circuit@dashed
-        \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
-    \fi
-
-    % draw outer box
-    \pgf at circ@twoportbox
-    \pgf at circ@inputarrow
-    % rotate inner symbol
-    \def\pgfcircmathresult{\expandafter\pgf at circ@stripdecimals\pgf at circ@direction\pgf at nil}
-    \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
-        \pgftransformrotate{270}
-    \fi\fi
-    \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
-        \pgftransformrotate{90}
-    \fi\fi
-
     % draw inner symbol
-    \pgfsetdash{}{0pt}	% always draw solid line for inner symbol
-    \pgfsetarrows{-} %never draw arrows
     \pgfsetlinewidth{\pgfstartlinewidth}
     \pgfpathmoveto{\pgfpoint{0pt}{0.4\pgf at circ@res at down}}
     \pgfpathlineto{\pgfpoint{0pt}{0.4\pgf at circ@res at up}}
-    \pgfusepath{draw}
     \pgfpathmoveto{\pgfpoint{0.6\pgf at circ@res at left}{0.4\pgf at circ@res at up}}
     \pgfpathlineto{\pgfpoint{0.6\pgf at circ@res at right}{0.4\pgf at circ@res at up}}
     \pgfusepath{draw}
-
-    \pgfsetarrowsend{latex}
+    \pgfcirc at set@arrows{tunable}{}{latex}
     \pgfpathmoveto{\pgfpoint{0.7\pgf at circ@res at left}{0.5\pgf at circ@res at down}}
     \pgfpathlineto{\pgfpoint{0.7\pgf at circ@res at right}{0.8\pgf at circ@res at up}}
     \pgfusepath{draw}
 }
-
 %% phase shifter
-\pgfcircdeclarebipolescaled{blocks}
+\pgfcirc at define@twoports{blocks}
 {}
 {\ctikzvalof{bipoles/phaseshifter/width}}
 {phaseshifter}
@@ -1739,39 +1018,12 @@
 {\ctikzvalof{bipoles/phaseshifter/width}}
 {\ctikzvalof{bipoles/phaseshifter/width}}
 {
-    \pgf at circ@res at step = \ctikzvalof{bipoles/phaseshifter/width}\pgf at circ@scaled at Rlen
-    \divide \pgf at circ@res at step by 2
-
-    \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
-
-    \ifpgf at circuit@dashed
-        \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
-    \fi
-
-    % draw outer box
-    \pgf at circ@twoportbox
-    \pgf at circ@inputarrow
-    % rotate inner symbol
-    \def\pgfcircmathresult{\expandafter\pgf at circ@stripdecimals\pgf at circ@direction\pgf at nil}
-    \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
-        \pgftransformrotate{270}
-    \fi\fi
-    \ifnum \pgfcircmathresult > 135 \ifnum \pgfcircmathresult < 225
-        \pgftransformrotate{180}
-    \fi\fi
-    \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
-        \pgftransformrotate{90}
-    \fi\fi
-
     % inner symbol
     \pgf at circ@text at strokecolor
     \pgftext[center,x=0,y=0]{\Large$\varphi$}
 }
-
 %% variable phase shifter
-\pgfcircdeclarebipolescaled{blocks}
+\pgfcirc at define@twoports{blocks}
 {}
 {\ctikzvalof{bipoles/phaseshifter/width}}
 {vphaseshifter}
@@ -1778,35 +1030,8 @@
 {\ctikzvalof{bipoles/vphaseshifter/width}}
 {\ctikzvalof{bipoles/vphaseshifter/width}}
 {
-    \pgf at circ@res at step = \ctikzvalof{bipoles/vphaseshifter/width}\pgf at circ@scaled at Rlen
-    \divide \pgf at circ@res at step by 2
-
-    \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
-
-    \ifpgf at circuit@dashed
-        \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
-    \fi
-
-    % draw outer box
-    \pgf at circ@twoportbox
-    \pgf at circ@inputarrow
-    % rotate inner symbol
-    \def\pgfcircmathresult{\expandafter\pgf at circ@stripdecimals\pgf at circ@direction\pgf at nil}
-    \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
-        \pgftransformrotate{270}
-    \fi\fi
-    \ifnum \pgfcircmathresult > 135 \ifnum \pgfcircmathresult < 225
-        \pgftransformrotate{180}
-    \fi\fi
-    \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
-        \pgftransformrotate{90}
-    \fi\fi
-
-    \pgfsetdash{}{0pt}	% always draw solid line for inner symbol
     \pgfsetlinewidth{\pgfstartlinewidth}
-    \pgfsetarrowsend{latex}
+    \pgfcirc at set@arrows{tunable}{}{latex}
     \pgfpathmoveto{\pgfpoint{0.75\pgf at circ@res at left}{0.65\pgf at circ@res at down}}
     \pgfpathlineto{\pgfpoint{0.7\pgf at circ@res at right}{0.65\pgf at circ@res at up}}
     \pgfusepath{draw}
@@ -1813,11 +1038,10 @@
     % inner symbol
     \pgf at circ@text at strokecolor
     \pgftext[center,x=0,y=0]{\Large$\varphi$}
-
 }
 
 %% detector
-\pgfcircdeclarebipolescaled{blocks}
+\pgfcirc at define@twoports at norotate{blocks}
 {}
 {\ctikzvalof{bipoles/detector/width}}
 {detector}
@@ -1824,28 +1048,11 @@
 {\ctikzvalof{bipoles/detector/width}}
 {\ctikzvalof{bipoles/detector/width}}
 {
-    \pgf at circ@res at step = \ctikzvalof{bipoles/detector/width}\pgf at circ@scaled at Rlen
-    \divide \pgf at circ@res at step by 2
-
-    \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
-
-    \ifpgf at circuit@dashed
-        \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
-    \fi
-
-    % draw outer box
-    \pgf at circ@twoportbox
-    \pgf at circ@inputarrow
     % draw inner stuff
-    \pgfsetdash{}{0pt}	% always draw solid line for inner symbol
-    \pgfsetarrows{-} %never draw arrows
     \pgfsetlinewidth{0.8\pgfstartlinewidth}
     \pgfpathmoveto{\pgfpoint{0.75\pgf at circ@res at left}{0}}
     \pgfpathlineto{\pgfpoint{0.75\pgf at circ@res at right}{0}}
     \pgfusepath{draw}
-
     \ifpgf at circuit@fulldiode
         \pgfmathparse{2\pgf at circ@res at up / \pgf at circ@scaled at Rlen / \ctikzvalof{bipoles/generic/width}}
         \pgftransformscale{\pgfmathresult}
@@ -1855,20 +1062,64 @@
         \pgftransformscale{\pgfmathresult}
         \pgfnode{emptydiodeshape}{center}{}{pgf at emptydiode}{\pgfusepath{fill}}
     \fi
+}
 
+%% converters help function
+\def\pgf at circ@twoport at converter@dc#1#2{%
+    \pgfscope
+    \pgftransformshift{\pgfpoint{#1\pgf at circ@res at step}{#2\pgf at circ@res at step}}
+    \pgfpathmoveto{\pgfpoint{-0.25\pgf at circ@res at step}{0.125\pgf at circ@res at step}}
+    \pgfpathlineto{\pgfpoint{0.25\pgf at circ@res at step}{0.125\pgf at circ@res at step}}
+    \pgfusepath{draw}
+    \pgfpathmoveto{\pgfpoint{-0.25\pgf at circ@res at step}{-0.125\pgf at circ@res at step}}
+    \pgfpathlineto{\pgfpoint{0.25\pgf at circ@res at step}{-0.125\pgf at circ@res at step}}
+    \pgfusepath{draw}
+    \endpgfscope
 }
-
+\def\pgf at circ@twoport at converter@dc at up{%
+    \pgf at circ@twoport at converter@dc{-0.5}{0.5}
+}
+\def\pgf at circ@twoport at converter@dc at down{%
+    \pgf at circ@twoport at converter@dc{0.5}{-0.5}
+}
+\def\pgf at circ@twoport at converter@ac#1#2{%
+    \pgfscope
+    \pgftransformshift{\pgfpoint{#1\pgf at circ@res at step}{#2\pgf at circ@res at step}}
+    \pgfpathmoveto{\pgfpoint{-.31\pgf at circ@res at step}{0\pgf at circ@res at step}}
+    \pgfpathsine{\pgfpoint{.17\pgf at circ@res at step}{.17\pgf at circ@res at step}}
+    \pgfpathcosine{\pgfpoint{.17\pgf at circ@res at step}{-.17\pgf at circ@res at step}}
+    \pgfpathsine{\pgfpoint{.17\pgf at circ@res at step}{-.17\pgf at circ@res at step}}
+    \pgfpathcosine{\pgfpoint{.17\pgf at circ@res at step}{.17\pgf at circ@res at step}}
+    \pgfusepath{draw}
+    \endpgfscope
+}
+\def\pgf at circ@twoport at converter@ac at up{%
+    \pgf at circ@twoport at converter@ac{-0.45}{0.5}
+    }
+\def\pgf at circ@twoport at converter@ac at down{%
+    \pgf at circ@twoport at converter@ac{0.45}{-0.5}
+}
+\def\pgf at circ@twoport at converter@tac at up{%
+    \pgf at circ@twoport at converter@ac{-0.45}{0.65}
+    \pgf at circ@twoport at converter@ac{-0.45}{0.5}
+    \pgf at circ@twoport at converter@ac{-0.45}{0.35}
+}
+\def\pgf at circ@twoport at converter@tac at down{%
+    \pgf at circ@twoport at converter@ac{0.45}{-0.65}
+    \pgf at circ@twoport at converter@ac{0.45}{-0.5}
+    \pgf at circ@twoport at converter@ac{0.45}{-0.35}
+}
 %% single phase ac/dc converter
-\pgfcircdeclarebipolescaled{blocks}
+\pgfcirc at define@twoports{blocks}
 {
-    \anchor{dc1}{
-        \northeast
-        \pgf at y=.4\pgf at y
-    }
-    \anchor{dc2}{
-        \northeast
-        \pgf at y=-.4\pgf at y
-    }
+    % these two are left for backward compatibiliyt
+    \anchor{dc1}{\northeast\pgf at y=.4\pgf at y}
+    \anchor{dc2}{\northeast\pgf at y=-.4\pgf at y}
+    % better
+    \anchor{ac up in}{\northeast\pgf at y=.4\pgf at y\pgf at x=-\pgf at x}
+    \anchor{ac down in}{\northeast\pgf at y=-.4\pgf at y\pgf at x=-\pgf at x}
+    \anchor{dc up out}{\northeast\pgf at y=.4\pgf at y}
+    \anchor{dc down out}{\northeast\pgf at y=-.4\pgf at y}
 }
 {\ctikzvalof{bipoles/sacdc/width}}
 {sacdc}
@@ -1875,71 +1126,26 @@
 {\ctikzvalof{bipoles/sacdc/width}}
 {\ctikzvalof{bipoles/sacdc/width}}
 {
-    \pgf at circ@res at step = \ctikzvalof{bipoles/sacdc/width}\pgf at circ@scaled at Rlen
-    \divide \pgf at circ@res at step by 2
-
-    \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
-
-    \ifpgf at circuit@dashed
-        \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
+    \pgfcirc at twoport@draw at splitline
+    \ifnum\@@rotation<145 % swap dc/ac for "backward" and "up" symbol
+        \pgf at circ@twoport at converter@ac at up
+        \pgf at circ@twoport at converter@dc at down
+    \else
+        \pgf at circ@twoport at converter@dc at up
+        \pgf at circ@twoport at converter@ac at down
     \fi
-
-    % draw outer box
-    \pgf at circ@twoportbox
-    \pgf at circ@inputarrow
-    % rotate inner symbol
-    \def\pgfcircmathresult{\expandafter\pgf at circ@stripdecimals\pgf at circ@direction\pgf at nil}
-    \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
-        \pgftransformrotate{270}
-    \fi\fi
-    \ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225  % 134 degree, because >= 135 is not possible
-        \pgftransformrotate{180}
-    \fi\fi
-    \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
-        \pgftransformrotate{90}
-    \fi\fi
-
-    % draw inner symbol
-    \pgfsetdash{}{0pt}	% always draw solid line for inner symbol
-    \pgfsetarrows{-} %never draw arrows
-    \pgfsetlinewidth{\pgfstartlinewidth}
-    \pgfpathmoveto{\pgfpoint{\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 up}}
-    \pgfusepath{draw}
-
-    % draw sin wave
-    \pgfpathmoveto{\pgfpoint{-.76\pgf at circ@res at step}{.5\pgf at circ@res at step}}
-    \pgfpathsine{\pgfpoint{.17\pgf at circ@res at step}{.17\pgf at circ@res at step}}
-    \pgfpathcosine{\pgfpoint{.17\pgf at circ@res at step}{-.17\pgf at circ@res at step}}
-    \pgfpathsine{\pgfpoint{.17\pgf at circ@res at step}{-.17\pgf at circ@res at step}}
-    \pgfpathcosine{\pgfpoint{.17\pgf at circ@res at step}{.17\pgf at circ@res at step}}
-    \pgfusepath{draw}
-
-    % draw equal sign
-    \pgfpathmoveto{\pgfpoint{.2\pgf at circ@res at step}{-.375\pgf at circ@res at step}}
-    \pgfpathlineto{\pgfpoint{0.7\pgf at circ@res at step}{-0.375\pgf at circ@res at step}}
-    \pgfusepath{draw}
-    \pgfpathmoveto{\pgfpoint{.2\pgf at circ@res at step}{-.625\pgf at circ@res at step}}
-    \pgfpathlineto{\pgfpoint{0.7\pgf at circ@res at step}{-0.625\pgf at circ@res at step}}
-    \pgfusepath{draw}
 }
-
-
 %% dc/dc converter
-\pgfcircdeclarebipolescaled{blocks}
+\pgfcirc at define@twoports{blocks}
 {
-    \anchor{dc1}{
-        \northeast
-        \pgf at y=.4\pgf at y
-        \pgf at x=-\pgf at x
-    }
-    \anchor{dc2}{
-        \northeast
-        \pgf at y=-.4\pgf at y
-        \pgf at x=-\pgf at x
-    }
+    % these two are left for backward compatibiliyt
+    \anchor{dc1}{\northeast\pgf at y=.4\pgf at y\pgf at x=-\pgf at x}
+    \anchor{dc2}{\northeast\pgf at y=-.4\pgf at y\pgf at x=-\pgf at x}
+    % better
+    \anchor{dc up in}{\northeast\pgf at y=.4\pgf at y\pgf at x=-\pgf at x}
+    \anchor{dc down in}{\northeast\pgf at y=-.4\pgf at y\pgf at x=-\pgf at x}
+    \anchor{dc up out}{\northeast\pgf at y=.4\pgf at y}
+    \anchor{dc down out}{\northeast\pgf at y=-.4\pgf at y}
 }
 {\ctikzvalof{bipoles/sdcdc/width}}
 {sdcdc}
@@ -1946,71 +1152,22 @@
 {\ctikzvalof{bipoles/sdcdc/width}}
 {\ctikzvalof{bipoles/sdcdc/width}}
 {
-    \pgf at circ@res at step = \ctikzvalof{bipoles/sdcdc/width}\pgf at circ@scaled at Rlen
-    \divide \pgf at circ@res at step by 2
-
-    \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
-
-    \ifpgf at circuit@dashed
-        \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
-    \fi
-
-    % draw outer box
-    \pgf at circ@twoportbox
-    \pgf at circ@inputarrow
-    % rotate inner symbol
-    \def\pgfcircmathresult{\expandafter\pgf at circ@stripdecimals\pgf at circ@direction\pgf at nil}
-    \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
-        \pgftransformrotate{270}
-    \fi\fi
-    \ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225  % 134 degree, because >= 135 is not possible
-        \pgftransformrotate{180}
-    \fi\fi
-    \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
-        \pgftransformrotate{90}
-    \fi\fi
-
-    % draw inner symbol
-    \pgfsetdash{}{0pt}	% always draw solid line for inner symbol
-    \pgfsetarrows{-} %never draw arrows
-    \pgfsetlinewidth{\pgfstartlinewidth}
-    \pgfpathmoveto{\pgfpoint{\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 up}}
-    \pgfusepath{draw}
-
-    % draw equal sign
-    \pgfpathmoveto{\pgfpoint{.2\pgf at circ@res at step}{-.375\pgf at circ@res at step}}
-    \pgfpathlineto{\pgfpoint{0.7\pgf at circ@res at step}{-0.375\pgf at circ@res at step}}
-    \pgfusepath{draw}
-    \pgfpathmoveto{\pgfpoint{.2\pgf at circ@res at step}{-.625\pgf at circ@res at step}}
-    \pgfpathlineto{\pgfpoint{0.7\pgf at circ@res at step}{-0.625\pgf at circ@res at step}}
-    \pgfusepath{draw}
-
-    % draw equal sign
-    \pgfpathmoveto{\pgfpoint{-.2\pgf at circ@res at step}{.375\pgf at circ@res at step}}
-    \pgfpathlineto{\pgfpoint{-0.7\pgf at circ@res at step}{0.375\pgf at circ@res at step}}
-    \pgfusepath{draw}
-    \pgfpathmoveto{\pgfpoint{-.2\pgf at circ@res at step}{.625\pgf at circ@res at step}}
-    \pgfpathlineto{\pgfpoint{-0.7\pgf at circ@res at step}{0.625\pgf at circ@res at step}}
-    \pgfusepath{draw}
+    \pgfcirc at twoport@draw at splitline
+    % No need to switch here
+    \pgf at circ@twoport at converter@dc at up
+    \pgf at circ@twoport at converter@dc at down
 }
-
-
 %% single phase dc/ac converter
-\pgfcircdeclarebipolescaled{blocks}
+\pgfcirc at define@twoports{blocks}
 {
-    \anchor{dc1}{
-        \northeast
-        \pgf at y=.4\pgf at y
-        \pgf at x=-\pgf at x
-    }
-    \anchor{dc2}{
-        \northeast
-        \pgf at y=-.4\pgf at y
-        \pgf at x=-\pgf at x
-    }
+    % these two are left for backward compatibiliyt
+    \anchor{dc1}{\northeast\pgf at y=.4\pgf at y\pgf at x=-\pgf at x}
+    \anchor{dc2}{\northeast\pgf at y=-.4\pgf at y\pgf at x=-\pgf at x}
+    % better
+    \anchor{dc up in}{\northeast\pgf at y=.4\pgf at y\pgf at x=-\pgf at x}
+    \anchor{dc down in}{\northeast\pgf at y=-.4\pgf at y\pgf at x=-\pgf at x}
+    \anchor{ac up out}{\northeast\pgf at y=.4\pgf at y}
+    \anchor{ac down out}{\northeast\pgf at y=-.4\pgf at y}
 }
 {\ctikzvalof{bipoles/sdcac/width}}
 {sdcac}
@@ -2017,84 +1174,47 @@
 {\ctikzvalof{bipoles/sdcac/width}}
 {\ctikzvalof{bipoles/sdcac/width}}
 {
-    \pgf at circ@res at step = \ctikzvalof{bipoles/sdcac/width}\pgf at circ@scaled at Rlen
-    \divide \pgf at circ@res at step by 2
-
-    \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
-
-    \ifpgf at circuit@dashed
-        \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
+    \pgfcirc at twoport@draw at splitline
+    \ifnum\@@rotation<145 % swap dc/ac for "backward" and "up" symbol
+        \pgf at circ@twoport at converter@dc at up
+        \pgf at circ@twoport at converter@ac at down
+    \else
+        \pgf at circ@twoport at converter@ac at up
+        \pgf at circ@twoport at converter@dc at down
     \fi
-
-    % draw outer box
-    \pgf at circ@twoportbox
-    \pgf at circ@inputarrow
-    % rotate inner symbol
-    \def\pgfcircmathresult{\expandafter\pgf at circ@stripdecimals\pgf at circ@direction\pgf at nil}
-    \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
-        \pgftransformrotate{270}
-    \fi\fi
-    \ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225  % 134 degree, because >= 135 is not possible
-        \pgftransformrotate{180}
-    \fi\fi
-    \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
-        \pgftransformrotate{90}
-    \fi\fi
-
-    % draw inner symbol
-    \pgfsetdash{}{0pt}	% always draw solid line for inner symbol
-    \pgfsetarrows{-} %never draw arrows
-    \pgfsetlinewidth{\pgfstartlinewidth}
-    \pgfpathmoveto{\pgfpoint{\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 up}}
-    \pgfusepath{draw}
-
-    % draw sin wave
-    \pgfpathmoveto{\pgfpoint{.14\pgf at circ@res at step}{-.5\pgf at circ@res at step}}
-    \pgfpathsine{\pgfpoint{.17\pgf at circ@res at step}{.17\pgf at circ@res at step}}
-    \pgfpathcosine{\pgfpoint{.17\pgf at circ@res at step}{-.17\pgf at circ@res at step}}
-    \pgfpathsine{\pgfpoint{.17\pgf at circ@res at step}{-.17\pgf at circ@res at step}}
-    \pgfpathcosine{\pgfpoint{.17\pgf at circ@res at step}{.17\pgf at circ@res at step}}
-    \pgfusepath{draw}
-
-    % draw equal sign
-    \pgfpathmoveto{\pgfpoint{-.2\pgf at circ@res at step}{.375\pgf at circ@res at step}}
-    \pgfpathlineto{\pgfpoint{-0.7\pgf at circ@res at step}{0.375\pgf at circ@res at step}}
-    \pgfusepath{draw}
-    \pgfpathmoveto{\pgfpoint{-.2\pgf at circ@res at step}{.625\pgf at circ@res at step}}
-    \pgfpathlineto{\pgfpoint{-0.7\pgf at circ@res at step}{0.625\pgf at circ@res at step}}
-    \pgfusepath{draw}
 }
-
-
+%% single phase ac/ac converter
+\pgfcirc at define@twoports{blocks}
+{
+    \anchor{ac up in}{\northeast\pgf at y=.4\pgf at y\pgf at x=-\pgf at x}
+    \anchor{ac down in}{\northeast\pgf at y=-.4\pgf at y\pgf at x=-\pgf at x}
+    \anchor{ac up out}{\northeast\pgf at y=.4\pgf at y}
+    \anchor{ac down out}{\northeast\pgf at y=-.4\pgf at y}
+}
+{\ctikzvalof{bipoles/sdcac/width}}
+{sacac}
+{\ctikzvalof{bipoles/sdcac/width}}
+{\ctikzvalof{bipoles/sdcac/width}}
+{
+    \pgfcirc at twoport@draw at splitline
+    \pgf at circ@twoport at converter@ac at up
+    \pgf at circ@twoport at converter@ac at down
+}
 %% threephase ac/dc converter
-\pgfcircdeclarebipolescaled{blocks}
+\pgfcirc at define@twoports{blocks}
 {
-    \anchor{dc1}{
-        \northeast
-        \pgf at y=.4\pgf at y
-    }
-    \anchor{dc2}{
-        \northeast
-        \pgf at y=-.4\pgf at y
-    }
-    \anchor{ac1}{
-        \northeast
-        \pgf at y=.6\pgf at y
-        \pgf at x=-\pgf at x
-    }
-    \anchor{ac2}{
-        \northeast
-        \pgf at y=0\pgf at y
-        \pgf at x=-\pgf at x
-    }
-    \anchor{ac3}{
-        \northeast
-        \pgf at y=-.6\pgf at y
-        \pgf at x=-\pgf at x
-    }
+    % legacy, let for compatibility
+    \anchor{dc1}{\northeast\pgf at y=.4\pgf at y}
+    \anchor{dc2}{\northeast\pgf at y=-.4\pgf at y}
+    \anchor{ac1}{\northeast\pgf at y=.6\pgf at y\pgf at x=-\pgf at x}
+    \anchor{ac2}{\northeast\pgf at y=0\pgf at y\pgf at x=-\pgf at x}
+    \anchor{ac3}{\northeast\pgf at y=-.6\pgf at y\pgf at x=-\pgf at x}
+    %better
+    \anchor{dc up out}{\northeast\pgf at y=.4\pgf at y}
+    \anchor{dc down out}{\northeast\pgf at y=-.4\pgf at y}
+    \anchor{ac up in}{\northeast\pgf at y=.6\pgf at y\pgf at x=-\pgf at x}
+    \anchor{ac mid in}{\northeast\pgf at y=0\pgf at y\pgf at x=-\pgf at x}
+    \anchor{ac down in}{\northeast\pgf at y=-.6\pgf at y\pgf at x=-\pgf at x}
 }
 {\ctikzvalof{bipoles/tacdc/width}}
 {tacdc}
@@ -2101,98 +1221,30 @@
 {\ctikzvalof{bipoles/tacdc/width}}
 {\ctikzvalof{bipoles/tacdc/width}}
 {
-    \pgf at circ@res at step = \ctikzvalof{bipoles/tacdc/width}\pgf at circ@scaled at Rlen
-    \divide \pgf at circ@res at step by 2
-
-    \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
-
-    \ifpgf at circuit@dashed
-        \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
+    \pgfcirc at twoport@draw at splitline
+    \ifnum\@@rotation<145 % swap dc/ac for "backward" and "up" symbol
+        \pgf at circ@twoport at converter@tac at up
+        \pgf at circ@twoport at converter@dc at down
+    \else
+        \pgf at circ@twoport at converter@dc at up
+        \pgf at circ@twoport at converter@tac at down
     \fi
-
-    % draw outer box
-    \pgf at circ@twoportbox
-    \pgf at circ@inputarrow
-    % rotate inner symbol
-    \def\pgfcircmathresult{\expandafter\pgf at circ@stripdecimals\pgf at circ@direction\pgf at nil}
-    \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
-        \pgftransformrotate{270}
-    \fi\fi
-    \ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225  % 134 degree, because >= 135 is not possible
-        \pgftransformrotate{180}
-    \fi\fi
-    \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
-        \pgftransformrotate{90}
-    \fi\fi
-
-    % draw inner symbol
-    \pgfsetdash{}{0pt}	% always draw solid line for inner symbol
-    \pgfsetarrows{-} %never draw arrows
-    \pgfsetlinewidth{\pgfstartlinewidth}
-    \pgfpathmoveto{\pgfpoint{\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 up}}
-    \pgfusepath{draw}
-
-    % draw sin waves
-    \pgfpathmoveto{\pgfpoint{-.76\pgf at circ@res at step}{.65\pgf at circ@res at step}}
-    \pgfpathsine{\pgfpoint{.17\pgf at circ@res at step}{.17\pgf at circ@res at step}}
-    \pgfpathcosine{\pgfpoint{.17\pgf at circ@res at step}{-.17\pgf at circ@res at step}}
-    \pgfpathsine{\pgfpoint{.17\pgf at circ@res at step}{-.17\pgf at circ@res at step}}
-    \pgfpathcosine{\pgfpoint{.17\pgf at circ@res at step}{.17\pgf at circ@res at step}}
-    \pgfusepath{draw}
-    \pgfpathmoveto{\pgfpoint{-.76\pgf at circ@res at step}{.5\pgf at circ@res at step}}
-    \pgfpathsine{\pgfpoint{.17\pgf at circ@res at step}{.17\pgf at circ@res at step}}
-    \pgfpathcosine{\pgfpoint{.17\pgf at circ@res at step}{-.17\pgf at circ@res at step}}
-    \pgfpathsine{\pgfpoint{.17\pgf at circ@res at step}{-.17\pgf at circ@res at step}}
-    \pgfpathcosine{\pgfpoint{.17\pgf at circ@res at step}{.17\pgf at circ@res at step}}
-    \pgfusepath{draw}
-    \pgfpathmoveto{\pgfpoint{-.76\pgf at circ@res at step}{.35\pgf at circ@res at step}}
-    \pgfpathsine{\pgfpoint{.17\pgf at circ@res at step}{.17\pgf at circ@res at step}}
-    \pgfpathcosine{\pgfpoint{.17\pgf at circ@res at step}{-.17\pgf at circ@res at step}}
-    \pgfpathsine{\pgfpoint{.17\pgf at circ@res at step}{-.17\pgf at circ@res at step}}
-    \pgfpathcosine{\pgfpoint{.17\pgf at circ@res at step}{.17\pgf at circ@res at step}}
-    \pgfusepath{draw}
-
-
-
-
-    % draw equal sign
-    \pgfpathmoveto{\pgfpoint{.2\pgf at circ@res at step}{-.375\pgf at circ@res at step}}
-    \pgfpathlineto{\pgfpoint{0.7\pgf at circ@res at step}{-0.375\pgf at circ@res at step}}
-    \pgfusepath{draw}
-    \pgfpathmoveto{\pgfpoint{.2\pgf at circ@res at step}{-.625\pgf at circ@res at step}}
-    \pgfpathlineto{\pgfpoint{0.7\pgf at circ@res at step}{-0.625\pgf at circ@res at step}}
-    \pgfusepath{draw}
 }
-
-
 %% threephase dc/ac converter
-\pgfcircdeclarebipolescaled{blocks}
+\pgfcirc at define@twoports{blocks}
 {
-    \anchor{dc1}{
-        \northeast
-        \pgf at y=.4\pgf at y
-        \pgf at x=-\pgf at x
-    }
-    \anchor{dc2}{
-        \northeast
-        \pgf at y=-.4\pgf at y
-        \pgf at x=-\pgf at x
-    }
-    \anchor{ac1}{
-        \northeast
-        \pgf at y=.6\pgf at y
-    }
-    \anchor{ac2}{
-        \northeast
-        \pgf at y=0\pgf at y
-    }
-    \anchor{ac3}{
-        \northeast
-        \pgf at y=-.6\pgf at y
-    }
+    % legacy, let for compatibility
+    \anchor{dc1}{\northeast\pgf at y=.4\pgf at y\pgf at x=-\pgf at x}
+    \anchor{dc2}{\northeast\pgf at y=-.4\pgf at y\pgf at x=-\pgf at x}
+    \anchor{ac1}{\northeast\pgf at y=.6\pgf at y}
+    \anchor{ac2}{\northeast\pgf at y=0\pgf at y}
+    \anchor{ac3}{\northeast\pgf at y=-.6\pgf at y}
+    %better
+    \anchor{dc up in}{\northeast\pgf at y=.4\pgf at y\pgf at x=-\pgf at x}
+    \anchor{dc down in}{\northeast\pgf at y=-.4\pgf at y\pgf at x=-\pgf at x}
+    \anchor{ac up out}{\northeast\pgf at y=.6\pgf at y}
+    \anchor{ac mid out}{\northeast\pgf at y=0\pgf at y}
+    \anchor{ac down out}{\northeast\pgf at y=-.6\pgf at y}
 }
 {\ctikzvalof{bipoles/tdcac/width}}
 {tdcac}
@@ -2199,70 +1251,171 @@
 {\ctikzvalof{bipoles/tdcac/width}}
 {\ctikzvalof{bipoles/tdcac/width}}
 {
-    \pgf at circ@res at step = \ctikzvalof{bipoles/tdcac/width}\pgf at circ@scaled at Rlen
-    \divide \pgf at circ@res at step by 2
-
-    \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
-
-    \ifpgf at circuit@dashed
-        \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
+    \pgfcirc at twoport@draw at splitline
+    \ifnum\@@rotation<145 % swap dc/ac for "backward" and "up" symbol
+        \pgf at circ@twoport at converter@dc at up
+        \pgf at circ@twoport at converter@tac at down
+    \else
+        \pgf at circ@twoport at converter@tac at up
+        \pgf at circ@twoport at converter@dc at down
     \fi
-
+}
+%% threephase ac/ac converter
+\pgfcirc at define@twoports{blocks}
+{
+    \anchor{ac up in}{\northeast\pgf at y=.6\pgf at y\pgf at x=-\pgf at x}
+    \anchor{ac mid in}{\northeast\pgf at y=0\pgf at y\pgf at x=-\pgf at x}
+    \anchor{ac down in}{\northeast\pgf at y=-.6\pgf at y\pgf at x=-\pgf at x}
+    \anchor{ac up out}{\northeast\pgf at y=.6\pgf at y}
+    \anchor{ac mid out}{\northeast\pgf at y=0\pgf at y}
+    \anchor{ac down out}{\northeast\pgf at y=-.6\pgf at y}
+}
+{\ctikzvalof{bipoles/tdcac/width}}
+{tacac}
+{\ctikzvalof{bipoles/tdcac/width}}
+{\ctikzvalof{bipoles/tdcac/width}}
+{
+    \pgfcirc at twoport@draw at splitline
+    \pgf at circ@twoport at converter@tac at down
+    \pgf at circ@twoport at converter@tac at up
+}
+%%%% Non-square blocks. We do not use the standard macros
+%%%% this one is adapted to do the boxed thing
+%
+\long\def\pgfcirc at define@twoports at boxed#1#2#3#4#5#6#7{
+\pgfcircdeclarebipolescaled{#1}
+    {
+        \savedmacro{\componentisboxed}{\edef\componentisboxed{\ifpgf at circuit@boxed 1\else 0\fi}}
+        \pgcirc at twoport@additional at anchors
+        #2
+    }
+    {#3}
+    {#4}
+    {#5}
+    {#6}
+    {
+    \pgf at circ@res at step=#6\pgf at circ@scaled at Rlen %6 is the real width parameter
+    \pgfsetdash{}{0pt}	% always draw solid line for inner symbol
+    \pgfsetarrows{-}
+    \pgfcirc at twoport@maybedash
     % draw outer box
-    \pgf at circ@twoportbox
+    \ifpgf at circuit@boxed
+        \pgf at circ@setlinewidth{bipoles}{\pgfstartlinewidth}
+        \pgfnode{blockbox}{center}{}{pgf at box}{\pgfusepath{draw}}
+        \pgf at circ@draworfill
+    \fi
     \pgf at circ@inputarrow
-    % rotate inner symbol
-    \def\pgfcircmathresult{\expandafter\pgf at circ@stripdecimals\pgf at circ@direction\pgf at nil}
-    \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
-        \pgftransformrotate{270}
-    \fi\fi
-    \ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225  % 134 degree, because >= 135 is not possible
+    \ifpgf at circuit@boxed
+        \pgfsetlinewidth{\pgfstartlinewidth}
+        % draw solid line for inner symbol if no box is drawn and not fully dashed
+        \ifpgf at circuit@full at dashed\else\pgfsetdash{}{0pt}\fi
+        \pgf at circ@res at step=.7\pgf at circ@res at step % scale amp symbol when inside a box
+    \else
+        \pgf at circ@setlinewidth{bipoles}{\pgfstartlinewidth}
+    \fi
+    #7
+    }
+}
+%% voltage controled oscillator
+\pgfcirc at define@twoports at boxed{blocks}
+{}
+{\ctikzvalof{bipoles/vco/width}}
+{vco}
+{\ctikzvalof{bipoles/twoport/width}}
+{\ctikzvalof{bipoles/vco/width}}
+{
+    % ok, this is a bit of incoherence
+    \divide \pgf at circ@res at step by 2
+    % draw circle
+    \pgfscope
+        \pgf at circ@setlinewidth{bipoles}{\pgfstartlinewidth}
+        \pgfpathcircle{\pgfpoint{0}{0}} {\pgf at circ@res at step}
+        \pgf at circ@draworfill
+    \endpgfscope
+    \pfgcirc at twoport@rotate at inner@symbol
+    \pgfcirc at twoport@draw at sine{0}{0}
+}
+%% amplifier and vamplifier
+%% Amplifier %% Beware, not using the generic twoport(s) macros.
+\pgfcirc at define@twoports at boxed{blocks}
+{
+    \anchor{up}{%
+        \northeast\pgf at x=0pt\relax
+        \ifnum\componentisboxed=0
+            \pgf at y=0.55\pgf at y
+        \fi
+    }
+    \anchor{down}{%
+        \northeast\pgf at x=0pt\pgf at y=-\pgf at y\relax
+        \ifnum\componentisboxed=0
+            \pgf at y=0.55\pgf at y
+        \fi
+    }
+}
+{\ifpgf at circuit@boxed\ctikzvalof{bipoles/twoport/width}\else\ctikzvalof{bipoles/amp/width}\fi}
+{amp}
+{\ifpgf at circuit@boxed\ctikzvalof{bipoles/twoport/width}\else\ctikzvalof{bipoles/amp/width}\fi}
+{\ifpgf at circuit@boxed\ctikzvalof{bipoles/twoport/width}\else\ctikzvalof{bipoles/amp/width}\fi}
+{
+    % draw triangle
+    \pgfpathmoveto{\pgfpoint{-0.5\pgf at circ@res at step}{0.55\pgf at circ@res at step}}
+    \pgfpathlineto{\pgfpoint{0.5\pgf at circ@res at step}{0}}
+    \pgfpathlineto{\pgfpoint{-0.5\pgf at circ@res at step}{-0.55\pgf at circ@res at step}}
+    \pgfpathclose
+    \pgf at circ@draworfill
+    \pfgcirc at twoport@get at symbol@rotation
+    % draw inner text
+    \pgf at circ@text at strokecolor
+    \ifnum\@@rotation=180
         \pgftransformrotate{180}
-    \fi\fi
-    \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
-        \pgftransformrotate{90}
-    \fi\fi
-
-    % draw inner symbol
-    \pgfsetdash{}{0pt}	% always draw solid line for inner symbol
-    \pgfsetarrows{-} %never draw arrows
+        \pgftext[center,x=0.12\pgf at circ@res at step,y=0]{\ctikzvalof{bipoles/twoport/text}}
+    \else
+        \pgftext[center,x=-0.12\pgf at circ@res at step,y=0]{\ctikzvalof{bipoles/twoport/text}}
+    \fi
+}
+%% variable amplifier %% Beware, not using the generic twoport(s) macros.
+% \pgfcircdeclarebipolescaled{blocks}
+\pgfcirc at define@twoports at boxed{blocks}
+{
+    \anchor{up}{%
+        \northeast\pgf at x=0pt\relax
+        \ifnum\componentisboxed=0
+            \pgf at y=0.55\pgf at y
+        \fi
+    }
+    \anchor{down}{%
+        \northeast\pgf at x=0pt\pgf at y=-\pgf at y\relax
+        \ifnum\componentisboxed=0
+            \pgf at y=0.55\pgf at y
+        \fi
+    }
+}
+{\ifpgf at circuit@boxed\ctikzvalof{bipoles/twoport/width}\else\ctikzvalof{bipoles/amp/width}\fi}
+{vamp}
+{\ifpgf at circuit@boxed\ctikzvalof{bipoles/twoport/width}\else\ctikzvalof{bipoles/amp/width}\fi}
+{\ifpgf at circuit@boxed\ctikzvalof{bipoles/twoport/width}\else\ctikzvalof{bipoles/amp/width}\fi}
+{
+    % draw triangle
+    \pgfpathmoveto{\pgfpoint{-0.5\pgf at circ@res at step}{0.55\pgf at circ@res at step}}
+    \pgfpathlineto{\pgfpoint{0.5\pgf at circ@res at step}{0}}
+    \pgfpathlineto{\pgfpoint{-0.5\pgf at circ@res at step}{-0.55\pgf at circ@res at step}}
+    \pgfpathclose
+    \pgf at circ@draworfill
+    \pfgcirc at twoport@get at symbol@rotation
+    % draw arrow
     \pgfsetlinewidth{\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 up}}
+    \pgfcirc at set@arrows{tunable}{}{latex}
+    \pgfpathmoveto{\pgfpoint{-0.8\pgf at circ@res at step}{-0.5\pgf at circ@res at step}}
+    \pgfpathlineto{\pgfpoint{0.6\pgf at circ@res at step}{0.6\pgf at circ@res at step}}
     \pgfusepath{draw}
-
-    % draw sin waves
-    \pgfpathmoveto{\pgfpoint{.14\pgf at circ@res at step}{-.65\pgf at circ@res at step}}
-    \pgfpathsine{\pgfpoint{.17\pgf at circ@res at step}{.17\pgf at circ@res at step}}
-    \pgfpathcosine{\pgfpoint{.17\pgf at circ@res at step}{-.17\pgf at circ@res at step}}
-    \pgfpathsine{\pgfpoint{.17\pgf at circ@res at step}{-.17\pgf at circ@res at step}}
-    \pgfpathcosine{\pgfpoint{.17\pgf at circ@res at step}{.17\pgf at circ@res at step}}
-    \pgfusepath{draw}
-    \pgfpathmoveto{\pgfpoint{.14\pgf at circ@res at step}{-.5\pgf at circ@res at step}}
-    \pgfpathsine{\pgfpoint{.17\pgf at circ@res at step}{.17\pgf at circ@res at step}}
-    \pgfpathcosine{\pgfpoint{.17\pgf at circ@res at step}{-.17\pgf at circ@res at step}}
-    \pgfpathsine{\pgfpoint{.17\pgf at circ@res at step}{-.17\pgf at circ@res at step}}
-    \pgfpathcosine{\pgfpoint{.17\pgf at circ@res at step}{.17\pgf at circ@res at step}}
-    \pgfusepath{draw}
-    \pgfpathmoveto{\pgfpoint{.14\pgf at circ@res at step}{-.35\pgf at circ@res at step}}
-    \pgfpathsine{\pgfpoint{.17\pgf at circ@res at step}{.17\pgf at circ@res at step}}
-    \pgfpathcosine{\pgfpoint{.17\pgf at circ@res at step}{-.17\pgf at circ@res at step}}
-    \pgfpathsine{\pgfpoint{.17\pgf at circ@res at step}{-.17\pgf at circ@res at step}}
-    \pgfpathcosine{\pgfpoint{.17\pgf at circ@res at step}{.17\pgf at circ@res at step}}
-    \pgfusepath{draw}
-
-
-
-
-    % draw equal sign
-    \pgfpathmoveto{\pgfpoint{-.2\pgf at circ@res at step}{.375\pgf at circ@res at step}}
-    \pgfpathlineto{\pgfpoint{-0.7\pgf at circ@res at step}{0.375\pgf at circ@res at step}}
-    \pgfusepath{draw}
-    \pgfpathmoveto{\pgfpoint{-.2\pgf at circ@res at step}{.625\pgf at circ@res at step}}
-    \pgfpathlineto{\pgfpoint{-0.7\pgf at circ@res at step}{0.625\pgf at circ@res at step}}
-    \pgfusepath{draw}
+    % draw inner text
+    \pgf at circ@text at strokecolor
+    \ifnum\@@rotation=180
+        \pgftransformrotate{180}
+        \pgftext[center,x=0.12\pgf at circ@res at step,y=0]{\ctikzvalof{bipoles/twoport/text}}
+    \else
+        \pgftext[center,x=-0.12\pgf at circ@res at step,y=0]{\ctikzvalof{bipoles/twoport/text}}
+    \fi
 }
 % %>>>
 
@@ -2294,8 +1447,10 @@
 \pgfcirc at activate@bipole at simple{l}{sacdc}
 \pgfcirc at activate@bipole at simple{l}{sdcac}
 \pgfcirc at activate@bipole at simple{l}{sdcdc}
+\pgfcirc at activate@bipole at simple{l}{sacac}
 \pgfcirc at activate@bipole at simple{l}{tacdc}
 \pgfcirc at activate@bipole at simple{l}{tdcac}
+\pgfcirc at activate@bipole at simple{l}{tacac}
 % %>>>
 
 %% Node shapes for  Block elements %<<<
@@ -2344,6 +1499,13 @@
     \anchor{in 2}{\northwest\pgf at y=-\pgf at y\pgf at x=0pt}
     \anchor{in2}{\northwest\pgf at y=-\pgf at y\pgf at x=0pt}
     \anchor{out}{\northwest\pgf at y=0pt\pgf at x=-\pgf at x}
+    \anchor{left down}{\northwest\pgf at y=-0.5\pgf at y}
+    \anchor{right down}{\northwest\pgf at x=-\pgf at x\pgf at y=-0.5\pgf at y}
+    \anchor{right up}{\northwest\pgf at x=-\pgf at x\pgf at y=0.5\pgf at y}
+    \anchor{left up}{\northwest\pgf at y=0.5\pgf at y}
+    \anchor{text}{\northwest
+        \advance\pgf at y\dimexpr-.5\dp\pgfnodeparttextbox+.5\ht\pgfnodeparttextbox\relax
+        \pgf at x=-.5\wd\pgfnodeparttextbox\relax}
 }
 % draw the body rectangle and circle if and when needed
 \def\pgf at circ@circular at rf@box at circle{%
@@ -2355,7 +1517,8 @@
     % draw outer circle
     \ifpgf at circuit@boxed
         \pgf at circ@res at step=.7\pgf at circ@res at step
-        \pgfsetdash{}{0pt}	% draw solid circle if boxed
+        % draw solid line for inner symbol if no box is drawn and not fully dashed
+        \ifpgf at circuit@full at dashed\else\pgfsetdash{}{0pt}\fi
     \else
         \pgf at circ@setlinewidth{bipoles}{\pgfstartlinewidth}
     \fi
@@ -2380,7 +1543,8 @@
         \pgfscope
             \pgf at circ@circular at rf@box at circle
             % draw inner stuff
-            \pgfsetdash{}{0pt}	% always draw solid line for inner symbol
+            % draw solid line for inner symbol if no box is drawn and not fully dashed
+            \ifpgf at circuit@full at dashed\else\pgfsetdash{}{0pt}\fi
             \pgfsetlinewidth{\pgfstartlinewidth}
             \pgfpathmoveto{\pgfpointorigin}
             \pgfpathmoveto{\pgfpointpolar{135}{0.5\pgf at circ@res at step}}
@@ -2408,7 +1572,8 @@
         \pgfscope
             \pgf at circ@circular at rf@box at circle
             % draw inner stuff
-            \pgfsetdash{}{0pt}	% always draw solid line for inner symbol
+            % draw solid line for inner symbol if no box is drawn and not fully dashed
+            \ifpgf at circuit@full at dashed\else\pgfsetdash{}{0pt}\fi
             \pgfsetlinewidth{\pgfstartlinewidth}
             \pgfpathmoveto{\pgfpointorigin}
             \pgfpathmoveto{\pgfpointpolar{0}{0.3\pgf at circ@res at step}}
@@ -2443,7 +1608,8 @@
         \pgfscope
             \pgf at circ@circular at rf@box at circle
             % draw inner sine waves
-            \pgfsetdash{}{0pt}	% always draw solid line for inner symbol
+            % draw solid line for inner symbol if no box is drawn and not fully dashed
+            \ifpgf at circuit@full at dashed\else\pgfsetdash{}{0pt}\fi
             \pgfsetlinewidth{\pgfstartlinewidth}
             \pgfsetcornersarced{\pgfpointorigin}% do not use rounded corners!
             \pgfpathmoveto{\pgfpoint{-0.3\pgf at circ@res at step}{0\pgf at circ@res at step}}
@@ -2471,7 +1637,8 @@
         \pgfscope
             \pgf at circ@circular at rf@box at circle
             % inner arrow
-            \pgfsetdash{}{0pt}	% always draw solid line for inner symbol
+            % draw solid line for inner symbol if no box is drawn and not fully dashed
+            \ifpgf at circuit@full at dashed\else\pgfsetdash{}{0pt}\fi
             \pgfsetlinewidth{\pgfstartlinewidth}
             \pgfsetarrowsend{latex}
             \pgfpathmoveto{\pgfpoint{-0.25\pgf at circ@res at step}{0}}
@@ -2494,63 +1661,16 @@
             \pgf at x=-\ctikzvalof{quadpoles/gridnode/width}\pgf at circ@scaled at Rlen
             \pgf at x=.5\pgf at x
     }
-    \anchor{center}{
-        \pgfpointorigin
-    }
-
-    \anchor{north}{
-        \northwest
-        \pgf at x=0pt
-    }
-    \anchor{up}{
-        \northwest
-        \pgf at x=0pt
-    }
-    \anchor{south}{
-        \northwest
-        \pgf at x=0pt
-        \pgf at y=-\pgf at y
-    }
-    \anchor{down}{
-        \northwest
-        \pgf at x=0pt
-        \pgf at y=-\pgf at y
-    }
-    \anchor{east}{
-        \northwest
-        \pgf at y=0pt
-        \pgf at x=-\pgf at x
-    }
-    \anchor{right}{
-        \northwest
-        \pgf at y=0pt
-        \pgf at x=-\pgf at x
-    }
-    \anchor{west}{
-        \northwest
-        \pgf at y=0pt
-    }
-    \anchor{left}{
-        \northwest
-        \pgf at y=0pt
-    }
-    \anchor{south west}{
-        \northwest
-        \pgf at y=-\pgf at y
-    }
-    \anchor{north east}{
-        \northwest
-        \pgf at x=-\pgf at x
-        \relax
-    }
-    \anchor{north west}{
-        \northwest
-    }
-    \anchor{south east}{
-        \northwest
-        \pgf at x=-\pgf at x
-        \pgf at y=-\pgf at y
-    }
+    \pgfcirc at northwest@symmetric at geoanchors
+    \anchor{center}{\pgfpointorigin}
+    \anchor{up}{\northwest\pgf at x=0pt}
+    \anchor{down}{\northwest\pgf at x=0pt\pgf at y=-\pgf at y}
+    \anchor{right}{\northwest\pgf at y=0pt\pgf at x=-\pgf at x}
+    \anchor{left}{\northwest\pgf at y=0pt}
+    \anchor{left down}{\northwest\pgf at y=-0.5\pgf at y}
+    \anchor{right down}{\northwest\pgf at x=-\pgf at x\pgf at y=-0.5\pgf at y}
+    \anchor{right up}{\northwest\pgf at x=-\pgf at x\pgf at y=0.5\pgf at y}
+    \anchor{left up}{\northwest\pgf at y=0.5\pgf at y}
     \anchor{text}{
         \pgf at x=-2\pgf at x
         \advance \pgf at x by -.5\wd\pgfnodeparttextbox
@@ -2559,50 +1679,39 @@
     \pgf at circ@draw at component{
         \pgf at circ@setcolor
         \pgf at circ@scaled at Rlen=\scaledRlen
-
         \pgf at circ@res at step=\ctikzvalof{quadpoles/gridnode/width}\pgf at circ@scaled at Rlen
-
         \northwest
         \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
         \pgf at circ@res at left = \pgf at x
-
         \pgf at circ@res at step = \ctikzvalof{quadpoles/gridnode/width}\pgf at circ@scaled at Rlen
         \divide \pgf at circ@res at step by 2
-
         \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
-
-        \ifpgf at circuit@dashed
-            \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
-        \fi
-
+        \pgfcirc at twoport@maybedash
         % draw outer box
         \pgf at circ@twoportbox
         \pgf at circ@inputarrow
-
         \pgfsetdash{}{0pt}	% always draw solid line for inner symbol
         \pgfsetarrows{-} %never draw arrows
         \pgfsetlinewidth{0.05mm}
-
         % draw grid
         \foreach \line in {-1,-.5,...,1}
         {
             \pgfpathmoveto{\pgfpoint{\line\pgf at circ@res at right}{\pgf at circ@res at up}}
             \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\line\pgf at circ@res at up}}
-
+            %
             \pgfpathmoveto{\pgfpoint{\line\pgf at circ@res at right}{\pgf at circ@res at up}}
             \pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\line\pgf at circ@res at down}}
         }
-
         %prevent from draw the inner cross twice
         \foreach \line in {-.5,0,...,.5}
         {
             \pgfpathmoveto{\pgfpoint{\line\pgf at circ@res at right}{\pgf at circ@res at down}}
             \pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\line\pgf at circ@res at up}}
-
+            %
             \pgfpathmoveto{\pgfpoint{\line\pgf at circ@res at right}{\pgf at circ@res at down}}
             \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\line\pgf at circ@res at down}}
         }
@@ -2623,59 +1732,19 @@
         \pgf at x=.5\pgf at x
         \pgf at x=-\ctikzvalof{tripoles/wilkinson/width}\pgf at x
     }
-    \anchor{center}{
-        \northwest
-        \pgf at x=0pt
-        \pgf at y=0pt
-    }
-    \anchor{north}{
-        \northwest
-        \pgf at x=0pt
-    }
-    \anchor{south}{
-        \northwest
-        \pgf at x=0pt
-        \pgf at y=-\pgf at y
-    }
-    \anchor{west}{
-        \northwest
-        \pgf at y=0pt
-    }
-    \anchor{east}{
-        \northwest
-        \pgf at y=0pt
-        \pgf at x=-\pgf at x
-    }
-    \anchor{south west}{
-        \northwest
-        \pgf at y=-\pgf at y
-    }
-    \anchor{north east}{
-        \northwest
-        \pgf at x=-\pgf at x
-    }
-    \anchor{north west}{
-        \northwest
-    }
-    \anchor{south east}{
-        \northwest
-        \pgf at x=-\pgf at x
-        \pgf at y=-\pgf at y
-    }
-    \anchor{in}{
-        \northwest
-        \pgf at y=0pt
-    }
-    \anchor{out1}{
-        \northwest
-        \pgf at x=-\pgf at x
-        \pgf at y=-0.5\pgf at y
-    }
-    \anchor{out2}{
-        \northwest
-        \pgf at x=-\pgf at x
-        \pgf at y=0.5\pgf at y
-    }
+    \pgfcirc at northwest@symmetric at geoanchors
+    \anchor{up}{\northwest\pgf at x=0pt}
+    \anchor{down}{\northwest\pgf at x=0pt\pgf at y=-\pgf at y}
+    \anchor{right}{\northwest\pgf at y=0pt\pgf at x=-\pgf at x}
+    \anchor{left}{\northwest\pgf at y=0pt}
+    \anchor{center}{\pgfpointorigin}
+    \anchor{in}{\northwest\pgf at y=0pt}
+    \anchor{out1}{\northwest\pgf at x=-\pgf at x\pgf at y=-0.5\pgf at y}
+    \anchor{out2}{\northwest\pgf at x=-\pgf at x\pgf at y=0.5\pgf at y}
+    \anchor{left down}{\northwest\pgf at y=-0.5\pgf at y}
+    \anchor{right down}{\northwest\pgf at x=-\pgf at x\pgf at y=-0.5\pgf at y}
+    \anchor{right up}{\northwest\pgf at x=-\pgf at x\pgf at y=0.5\pgf at y}
+    \anchor{left up}{\northwest\pgf at y=0.5\pgf at y}
     \anchor{text}{
         \northwest
         \advance \pgf at y by 0.5\ht\pgfnodeparttextbox
@@ -2684,20 +1753,17 @@
     \pgf at circ@draw at component{
         \pgf at circ@setcolor
         \pgf at circ@scaled at Rlen=\scaledRlen
-
+        %
         \northwest
         \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
         \pgf at circ@res at left = \pgf at x
-
+        %
         \pgfstartlinewidth=\pgflinewidth
-
         % draw outer box
         \pgf at circ@twoportbox
         \pgf at circ@inputarrow
-
-
         % draw inner stuff
         \pgfsetdash{}{0pt}	% always draw solid line for inner symbol
         \pgfsetarrows{-} %never draw arrows
@@ -2709,15 +1775,12 @@
         \pgfpathlineto{\pgfpoint{0.5\pgf at circ@res at left}{0pt}}
         \pgfpathlineto{\pgfpoint{0.5\pgf at circ@res at right}{0.5\pgf at circ@res at down}}
         \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{0.5\pgf at circ@res at down}}
-
         \pgfusepath{draw}
-
         \pgfsetdash{}{0pt}	% always draw solid line for inner symbol
         % draw inner resisitor - european or american style is recognised
         {
             \pgftransformshift{\pgfpoint{0.5\pgf at circ@res at right}{0pt}}
             \pgftransformrotate{90}
-
             % calculate size of resistor
             \ifpgf at circuit@europeanresistor
                 \pgfmathparse{\pgf at circ@res at up / \pgf at circ@scaled at Rlen / \ctikzvalof{bipoles/generic/width} / 2}
@@ -2729,14 +1792,11 @@
                 \pgfnode{resistorshape}{center}{}{wilk at int@R}{\pgfusepath{fill}}
             \fi
         }
-
         \pgfpathmoveto{\pgfpoint{0.5\pgf at circ@res at right}{0.5\pgf at circ@res at up}}
         \pgfpathlineto{\pgfpointanchor{wilk at int@R}{right}}
-
         \pgfpathmoveto{\pgfpointanchor{wilk at int@R}{left}}
         \pgfpathlineto{\pgfpoint{0.5\pgf at circ@res at right}{0.5\pgf at circ@res at down}}
         \pgfusepath{draw}
-
     }
 }
 
@@ -2746,65 +1806,25 @@
     \saveddimen{\scaledRlen}{\pgfmathsetlength{\pgf at x}{\ctikzvalof{\ctikzclass/scale}\pgf at circ@Rlen}}
     \savedanchor\northwest{%
         \pgfmathsetlength{\pgf at circ@scaled at Rlen}{\ctikzvalof{\ctikzclass/scale}\pgf at circ@Rlen}
-        \pgf at y=\ctikzvalof{tripoles/wilkinson/height}\pgf at circ@scaled at Rlen
+        \pgf at y=\ctikzvalof{tripoles/splitter/height}\pgf at circ@scaled at Rlen
         \pgf at y=.5\pgf at y
         \pgf at x= \pgf at circ@scaled at Rlen
         \pgf at x=.5\pgf at x
-        \pgf at x=-\ctikzvalof{tripoles/wilkinson/width}\pgf at x
+        \pgf at x=-\ctikzvalof{tripoles/splitter/width}\pgf at x
     }
-    \anchor{center}{
-        \northwest
-        \pgf at x=0pt
-        \pgf at y=0pt
-    }
-    \anchor{north}{
-        \northwest
-        \pgf at x=0pt
-    }
-    \anchor{south}{
-        \northwest
-        \pgf at x=0pt
-        \pgf at y=-\pgf at y
-    }
-    \anchor{west}{
-        \northwest
-        \pgf at y=0pt
-    }
-    \anchor{east}{
-        \northwest
-        \pgf at y=0pt
-        \pgf at x=-\pgf at x
-    }
-    \anchor{south west}{
-        \northwest
-        \pgf at y=-\pgf at y
-    }
-    \anchor{north east}{
-        \northwest
-        \pgf at x=-\pgf at x
-    }
-    \anchor{north west}{
-        \northwest
-    }
-    \anchor{south east}{
-        \northwest
-        \pgf at x=-\pgf at x
-        \pgf at y=-\pgf at y
-    }
-    \anchor{in}{
-        \northwest
-        \pgf at y=0pt
-    }
-    \anchor{out1}{
-        \northwest
-        \pgf at x=-\pgf at x
-        \pgf at y=-0.5\pgf at y
-    }
-    \anchor{out2}{
-        \northwest
-        \pgf at x=-\pgf at x
-        \pgf at y=0.5\pgf at y
-    }
+    \pgfcirc at northwest@symmetric at geoanchors
+    \anchor{center}{\pgfpointorigin}
+    \anchor{up}{\northwest\pgf at x=0pt}
+    \anchor{down}{\northwest\pgf at x=0pt\pgf at y=-\pgf at y}
+    \anchor{right}{\northwest\pgf at y=0pt\pgf at x=-\pgf at x}
+    \anchor{left}{\northwest\pgf at y=0pt}
+    \anchor{in}{\northwest\pgf at y=0pt}
+    \anchor{out1}{\northwest\pgf at x=-\pgf at x\pgf at y=-0.5\pgf at y}
+    \anchor{out2}{\northwest\pgf at x=-\pgf at x\pgf at y=0.5\pgf at y}
+    \anchor{left down}{\northwest\pgf at y=-0.5\pgf at y}
+    \anchor{right down}{\northwest\pgf at x=-\pgf at x\pgf at y=-0.5\pgf at y}
+    \anchor{right up}{\northwest\pgf at x=-\pgf at x\pgf at y=0.5\pgf at y}
+    \anchor{left up}{\northwest\pgf at y=0.5\pgf at y}
     \anchor{text}{
         \northwest
         \advance \pgf at y by 0.5\ht\pgfnodeparttextbox
@@ -2813,15 +1833,14 @@
     \pgf at circ@draw at component{
         \pgf at circ@setcolor
         \pgf at circ@scaled at Rlen=\scaledRlen
-
+        %
         \northwest
         \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
         \pgf at circ@res at left = \pgf at x
-
+        %
         \pgfstartlinewidth=\pgflinewidth
-
         % draw outer box
         \pgf at circ@twoportbox
         \pgf at circ@inputarrow
@@ -2836,9 +1855,8 @@
         \pgfpathmoveto{\pgfpoint{0.5\pgf at circ@res at left}{0pt}}
         \pgfpathmoveto{\pgfpoint{0.5\pgf at circ@res at right}{0.5\pgf at circ@res at down}}
         \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{0.5\pgf at circ@res at down}}
-
         \pgfusepath{draw}
-
+        %
         \pgfsetdash{}{0pt}	% always draw solid line for inner symbol
         % draw inner resisitors - european or american style is recognised
         \foreach \respt/\resang/\linepta/\lineptb in %
@@ -2852,7 +1870,6 @@
             {
                 \pgftransformshift{\respt}
                 \pgftransformrotate{\resang}
-
                 % calculate size of resistor
                 \ifpgf at circuit@europeanresistor
                     \pgfmathparse{\pgf at circ@res at up / \pgf at circ@scaled at Rlen / \ctikzvalof{bipoles/generic/width} / 2}
@@ -2864,10 +1881,8 @@
                     \pgfnode{resistorshape}{center}{}{wilk at int@R}{\pgfusepath{fill}}
                 \fi
             }
-
             \pgfpathmoveto{\linepta}
             \pgfpathlineto{\pgfpointanchor{wilk at int@R}{right}}
-
             \pgfpathmoveto{\pgfpointanchor{wilk at int@R}{left}}
             \pgfpathlineto{\lineptb}
             \pgfusepath{draw}
@@ -2875,17 +1890,81 @@
     }
 }
 
+%% generic splitter
+\pgfdeclareshape{genericsplitter}{
+    \savedmacro{\ctikzclass}{\edef\ctikzclass{blocks}}
+    \saveddimen{\scaledRlen}{\pgfmathsetlength{\pgf at x}{\ctikzvalof{\ctikzclass/scale}\pgf at circ@Rlen}}
+    \savedanchor\northwest{%
+        \pgfmathsetlength{\pgf at circ@scaled at Rlen}{\ctikzvalof{\ctikzclass/scale}\pgf at circ@Rlen}
+        \pgf at y=\ctikzvalof{tripoles/genericsplitter/height}\pgf at circ@scaled at Rlen
+        \pgf at y=.5\pgf at y
+        \pgf at x= \pgf at circ@scaled at Rlen
+        \pgf at x=.5\pgf at x
+        \pgf at x=-\ctikzvalof{tripoles/genericsplitter/width}\pgf at x
+    }
+    \pgfcirc at northwest@symmetric at geoanchors
+    \anchor{center}{\pgfpointorigin}
+    \anchor{up}{\northwest\pgf at x=0pt}
+    \anchor{down}{\northwest\pgf at x=0pt\pgf at y=-\pgf at y}
+    \anchor{right}{\northwest\pgf at y=0pt\pgf at x=-\pgf at x}
+    \anchor{left}{\northwest\pgf at y=0pt}
+    \anchor{in}{\northwest\pgf at y=0pt}
+    \anchor{out1}{\northwest\pgf at x=-\pgf at x\pgf at y=-0.5\pgf at y}
+    \anchor{out2}{\northwest\pgf at x=-\pgf at x\pgf at y=0.5\pgf at y}
+    \anchor{left down}{\northwest\pgf at y=-0.5\pgf at y}
+    \anchor{right down}{\northwest\pgf at x=-\pgf at x\pgf at y=-0.5\pgf at y}
+    \anchor{right up}{\northwest\pgf at x=-\pgf at x\pgf at y=0.5\pgf at y}
+    \anchor{left up}{\northwest\pgf at y=0.5\pgf at y}
+    \anchor{text}{
+        \northwest
+        \pgf at y=-.5\ht\pgfnodeparttextbox
+        \pgf at x=-.2\wd\pgfnodeparttextbox
+    }
+    \pgf at circ@draw at component{
+        \pgf at circ@setcolor
+        \pgf at circ@scaled at Rlen=\scaledRlen
+        %
+        \northwest
+        \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
+        \pgf at circ@res at left = \pgf at x
+        %
+        \pgfstartlinewidth=\pgflinewidth
+        % draw outer box
+        \pgf at circ@twoportbox
+        \pgf at circ@inputarrow
+        % draw inner stuff
+        \pgfsetdash{}{0pt}	% always draw solid line for inner symbol
+        \pgfsetarrows{-} %never draw arrows
+        \pgfsetlinewidth{\pgfstartlinewidth}
+        \pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{0pt}}
+        \pgfpathlineto{\pgfpoint{0.5\pgf at circ@res at left}{0pt}}
+        \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{0.5\pgf at circ@res at up}}
+        \pgfpathlineto{\pgfpoint{0.5\pgf at circ@res at right}{0.5\pgf at circ@res at up}}
+        \pgfpathmoveto{\pgfpoint{0.5\pgf at circ@res at left}{0pt}}
+        \pgfpathmoveto{\pgfpoint{0.5\pgf at circ@res at right}{0.5\pgf at circ@res at down}}
+        \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{0.5\pgf at circ@res at down}}
+        \pgfusepath{draw}
+        %
+        \pgfsetdash{}{0pt}	% always draw solid line for inner symbol
+        % draw inner resisitors - european or american style is recognised
+        \foreach \linepta/\lineptb in %
+        { \pgfpoint{0.5\pgf at circ@res at right}{0.5\pgf at circ@res at up}/\pgfpoint{0.5\pgf at circ@res at left}{0},%
+          \pgfpoint{0.5\pgf at circ@res at right}{0.5\pgf at circ@res at down}/\pgfpoint{0.5\pgf at circ@res at left}{0}}
+        {
+            \pgfpathmoveto{\linepta}
+            \pgfpathlineto{\lineptb}
+            \pgfusepath{draw}
+        }
+    }
+}
+
 %% couplers generics
 \long\def\pgfcircdeclarefourport#1#2{
-
     \pgfdeclareshape{#1}{
         \savedmacro{\ctikzclass}{\edef\ctikzclass{blocks}}
         \saveddimen{\scaledRlen}{\pgfmathsetlength{\pgf at x}{\ctikzvalof{\ctikzclass/scale}\pgf at circ@Rlen}}
-        \anchor{center}{
-            \northwest
-            \pgf at x=0pt
-            \pgf at y=0pt
-        }
         \savedanchor\northwest{%
             \pgfmathsetlength{\pgf at circ@scaled at Rlen}{\ctikzvalof{\ctikzclass/scale}\pgf at circ@Rlen}
             \pgf at y=\ctikzvalof{quadpoles/#1/height}\pgf at circ@scaled at Rlen
@@ -2893,95 +1972,25 @@
             \pgf at x=.5\pgf at circ@scaled at Rlen
             \pgf at x=-\ctikzvalof{quadpoles/#1/width}\pgf at x
         }
-        \anchor{north}{
-            \northwest
-            \pgf at x=0pt
-        }
-        \anchor{south}{
-            \northwest
-            \pgf at x=0pt
-            \pgf at y=-\pgf at y
-        }
-        \anchor{west}{
-            \northwest
-            \pgf at y=0pt
-        }
-        \anchor{east}{
-            \northwest
-            \pgf at y=0pt
-            \pgf at x=-\pgf at x
-        }
-        \anchor{south west}{
-            \northwest
-            \pgf at y=-\pgf at y
-        }
-        \anchor{north east}{
-            \northwest
-            \pgf at x=-\pgf at x
-        }
-        \anchor{north west}{
-            \northwest
-        }
-        \anchor{south east}{
-            \northwest
-            \pgf at x=-\pgf at x
-            \pgf at y=-\pgf at y
-        }
-        \anchor{port1}{
-            \northwest
-            \pgf at y=-0.5\pgf at y
-        }
-        \anchor{port2}{
-            \northwest
-            \pgf at x=-\pgf at x
-            \pgf at y=-0.5\pgf at y
-        }
-        \anchor{port3}{
-            \northwest
-            \pgf at x=-\pgf at x
-            \pgf at y=0.5\pgf at y
-        }
-        \anchor{port4}{
-            \northwest
-            \pgf at y=0.5\pgf at y
-        }
-        \anchor{left down}{
-            \northwest
-            \pgf at y=-0.5\pgf at y
-        }
-        \anchor{right down}{
-            \northwest
-            \pgf at x=-\pgf at x
-            \pgf at y=-0.5\pgf at y
-        }
-        \anchor{right up}{
-            \northwest
-            \pgf at x=-\pgf at x
-            \pgf at y=0.5\pgf at y
-        }
-        \anchor{left up}{
-            \northwest
-            \pgf at y=0.5\pgf at y
-        }
-        \anchor{1}{
-            \northwest
-            \pgf at y=-0.5\pgf at y
-        }
-        \anchor{2}{
-            \northwest
-            \pgf at x=-\pgf at x
-            \pgf at y=-0.5\pgf at y
-        }
-        \anchor{3}{
-            \northwest
-            \pgf at x=-\pgf at x
-            \pgf at y=0.5\pgf at y
-        }
-        \anchor{4}{
-            \northwest
-            \pgf at y=0.5\pgf at y
-        }
-
+        \pgfcirc at northwest@symmetric at geoanchors
+        \anchor{center}{\pgfpointorigin}
+        \anchor{up}{\northwest\pgf at x=0pt}
+        \anchor{down}{\northwest\pgf at x=0pt\pgf at y=-\pgf at y}
+        \anchor{right}{\northwest\pgf at y=0pt\pgf at x=-\pgf at x}
+        \anchor{left}{\northwest\pgf at y=0pt}
+        \anchor{port1}{\northwest\pgf at y=-0.5\pgf at y}
+        \anchor{port2}{\northwest\pgf at x=-\pgf at x\pgf at y=-0.5\pgf at y}
+        \anchor{port3}{\northwest\pgf at x=-\pgf at x\pgf at y=0.5\pgf at y}
+        \anchor{port4}{\northwest\pgf at y=0.5\pgf at y}
+        \anchor{left down}{\northwest\pgf at y=-0.5\pgf at y}
+        \anchor{right down}{\northwest\pgf at x=-\pgf at x\pgf at y=-0.5\pgf at y}
+        \anchor{right up}{\northwest\pgf at x=-\pgf at x\pgf at y=0.5\pgf at y}
+        \anchor{left up}{\northwest\pgf at y=0.5\pgf at y}
+        %1,2,3,4 are deprecated
+        \anchor{1}{\northwest\pgf at y=-0.5\pgf at y}
+        \anchor{2}{\northwest\pgf at x=-\pgf at x\pgf at y=-0.5\pgf at y}
+        \anchor{3}{\northwest\pgf at x=-\pgf at x\pgf at y=0.5\pgf at y}
+        \anchor{4}{\northwest\pgf at y=0.5\pgf at y}
         \anchor{text}{
             \northwest
             \advance \pgf at y by 0.5\ht\pgfnodeparttextbox
@@ -2989,7 +1998,6 @@
         }
         \pgf at circ@draw at component{
             \pgf at circ@setcolor
-
             \northwest
             \pgf at circ@res at up = \pgf at y
             \pgf at circ@res at down = -\pgf at y
@@ -2996,9 +2004,8 @@
             \pgf at circ@res at right = -\pgf at x
             \pgf at circ@res at left = \pgf at x
             \pgf at circ@scaled at Rlen=\scaledRlen
-
+            %
             \pgfstartlinewidth=\pgflinewidth
-
             % draw outer box
             \pgf at circ@setlinewidth{bipoles}{\pgfstartlinewidth}
             \pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
@@ -3081,58 +2088,11 @@
         \pgf at x=.5\pgf at x
         \pgf at x=-\ctikzvalof{tripoles/mzm/width}\pgf at x
     }
-    \anchor{center}{
-        \northwest
-        \pgf at x=0pt
-        \pgf at y=0pt
-    }
-    \anchor{north}{
-        \northwest
-        \pgf at x=0pt
-    }
-    \anchor{south}{
-        \northwest
-        \pgf at x=0pt
-        \pgf at y=-\pgf at y
-    }
-    \anchor{west}{
-        \northwest
-        \pgf at y=0pt
-    }
-    \anchor{east}{
-        \northwest
-        \pgf at y=0pt
-        \pgf at x=-\pgf at x
-    }
-    \anchor{south west}{
-        \northwest
-        \pgf at y=-\pgf at y
-    }
-    \anchor{north east}{
-        \northwest
-        \pgf at x=-\pgf at x
-    }
-    \anchor{north west}{
-        \northwest
-    }
-    \anchor{south east}{
-        \northwest
-        \pgf at x=-\pgf at x
-        \pgf at y=-\pgf at y
-    }
-    \anchor{in}{
-        \northwest
-        \pgf at y=0pt
-    }
-    \anchor{mod}{
-        \northwest
-        \pgf at x=0pt
-    }
-    \anchor{out}{
-        \northwest
-        \pgf at x=-\pgf at x
-        \pgf at y=0pt
-    }
+    \pgfcirc at northwest@symmetric at geoanchors
+    \anchor{center}{\pgfpointorigin}
+    \anchor{in}{ \northwest \pgf at y=0pt }
+    \anchor{mod}{ \northwest \pgf at x=0pt }
+    \anchor{out}{ \northwest \pgf at x=-\pgf at x \pgf at y=0pt }
     \anchor{text}{
         \northwest
         \advance \pgf at y by 0.5\ht\pgfnodeparttextbox
@@ -3141,74 +2101,50 @@
     \pgf at circ@draw at component{
         \pgf at circ@setcolor
         \pgf at circ@scaled at Rlen=\scaledRlen
-
         \northwest
         \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
         \pgf at circ@res at left = \pgf at x
-
         \pgfstartlinewidth=\pgflinewidth
-
         % draw outer box
         \pgf at circ@twoportbox
         \pgf at circ@inputarrow
-
         % draw inner stuff
-          % rotate inner symbol
-    \def\pgfcircmathresult{\expandafter\pgf at circ@stripdecimals\pgf at circ@direction\pgf at nil}
-    \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
-        \pgftransformrotate{270}
-    \fi\fi
-    \ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225  % 134 degree, because >= 135 is not possible
-        \pgftransformrotate{180}
-    \fi\fi
-    \ifnum \pgfcircmathresult > 224 \ifnum \pgfcircmathresult < 315
-        \pgftransformrotate{90}
-    \fi\fi
-
-    % draw inner symbol
-     \pgfsetdash{}{0pt}	% always draw solid line for inner symbol
-     \pgfsetarrows{-} %never draw arrows
-     \pgfsetlinewidth{\pgfstartlinewidth}
-	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
-	\pgfpathlineto{\pgfpoint{0.75\pgf at circ@res at left}{\pgf at circ@res at zero}}
-     \pgfusepath{draw}
-
-	\pgfpathmoveto{\pgfpoint{0.75\pgf at circ@res at left}{\pgf at circ@res at zero}}
-	\pgfpathlineto{\pgfpoint{0.5\pgf at circ@res at left}{0.25\pgf at circ@res at up}}
-	\pgfusepath{draw}
-
-	\pgfpathmoveto{\pgfpoint{0.75\pgf at circ@res at left}{\pgf at circ@res at zero}}
-	\pgfpathlineto{\pgfpoint{0.5\pgf at circ@res at left}{0.25\pgf at circ@res at down}}
-	\pgfusepath{draw}
-
-	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at zero}}
-	\pgfpathlineto{\pgfpoint{0.75\pgf at circ@res at right}{\pgf at circ@res at zero}}
-     \pgfusepath{draw}
-
-	\pgfpathmoveto{\pgfpoint{0.75\pgf at circ@res at right}{\pgf at circ@res at zero}}
-	\pgfpathlineto{\pgfpoint{0.5\pgf at circ@res at right}{0.25\pgf at circ@res at up}}
-	\pgfusepath{draw}
-
-	\pgfpathmoveto{\pgfpoint{0.75\pgf at circ@res at right}{\pgf at circ@res at zero}}
-	\pgfpathlineto{\pgfpoint{0.5\pgf at circ@res at right}{0.25\pgf at circ@res at down}}
-	\pgfusepath{draw}
-
-	\pgfpathmoveto{\pgfpoint{0.5\pgf at circ@res at right}{0.25\pgf at circ@res at up}}
-	\pgfpathlineto{\pgfpoint{0.5\pgf at circ@res at left}{0.25\pgf at circ@res at up}}
-	\pgfusepath{draw}
-
-	\pgfpathmoveto{\pgfpoint{0.5\pgf at circ@res at right}{0.25\pgf at circ@res at down}}
-	\pgfpathlineto{\pgfpoint{0.5\pgf at circ@res at left}{0.25\pgf at circ@res at down}}
-	\pgfusepath{draw}
-
-    \pgfpathmoveto{\pgfpoint{\pgf at circ@res at zero}{\pgf at circ@res at up}}
-	\pgfpathlineto{\pgfpoint{\pgf at circ@res at zero}{0.35\pgf at circ@res at up}}
-	\pgfpathlineto{\pgfpoint{0.25\pgf at circ@res at right}{0.1\pgf at circ@res at up}}
-	\pgfusepath{draw}
-
-    }
+        \pfgcirc at twoport@rotate at inner@symbol
+        % draw inner symbol
+        \ifpgf at circuit@full at dashed\else\pgfsetdash{}{0pt}\fi
+        \pgfsetarrows{-} %never draw arrows
+        \pgfsetlinewidth{\pgfstartlinewidth}
+        \pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
+        \pgfpathlineto{\pgfpoint{0.75\pgf at circ@res at left}{\pgf at circ@res at zero}}
+        %
+        \pgfpathmoveto{\pgfpoint{0.75\pgf at circ@res at left}{\pgf at circ@res at zero}}
+        \pgfpathlineto{\pgfpoint{0.5\pgf at circ@res at left}{0.25\pgf at circ@res at up}}
+        %
+        \pgfpathmoveto{\pgfpoint{0.75\pgf at circ@res at left}{\pgf at circ@res at zero}}
+        \pgfpathlineto{\pgfpoint{0.5\pgf at circ@res at left}{0.25\pgf at circ@res at down}}
+        %
+        \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at zero}}
+        \pgfpathlineto{\pgfpoint{0.75\pgf at circ@res at right}{\pgf at circ@res at zero}}
+        %
+        \pgfpathmoveto{\pgfpoint{0.75\pgf at circ@res at right}{\pgf at circ@res at zero}}
+        \pgfpathlineto{\pgfpoint{0.5\pgf at circ@res at right}{0.25\pgf at circ@res at up}}
+        %
+        \pgfpathmoveto{\pgfpoint{0.75\pgf at circ@res at right}{\pgf at circ@res at zero}}
+        \pgfpathlineto{\pgfpoint{0.5\pgf at circ@res at right}{0.25\pgf at circ@res at down}}
+        %
+        \pgfpathmoveto{\pgfpoint{0.5\pgf at circ@res at right}{0.25\pgf at circ@res at up}}
+        \pgfpathlineto{\pgfpoint{0.5\pgf at circ@res at left}{0.25\pgf at circ@res at up}}
+        %
+        \pgfpathmoveto{\pgfpoint{0.5\pgf at circ@res at right}{0.25\pgf at circ@res at down}}
+        \pgfpathlineto{\pgfpoint{0.5\pgf at circ@res at left}{0.25\pgf at circ@res at down}}
+        %
+        \pgfpathmoveto{\pgfpoint{\pgf at circ@res at zero}{\pgf at circ@res at up}}
+        \pgfpathlineto{\pgfpoint{\pgf at circ@res at zero}{0.35\pgf at circ@res at up}}
+        \pgfpathlineto{\pgfpoint{0.25\pgf at circ@res at right}{0.1\pgf at circ@res at up}}
+        \pgfusepath{draw}
+        }
 }
 % %>>>
 

Modified: trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex	2022-12-11 00:51:11 UTC (rev 65239)
+++ trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex	2022-12-11 21:34:32 UTC (rev 65240)
@@ -2859,6 +2859,13 @@
 \pgfkeys{/tikz/nosolderdot/.add code={}{\pgf at circuit@fet at solderdotfalse}}
 \ctikzset{nosolderdot/.add code={}{\pgf at circuit@fet at solderdotfalse}}
 
+%%%% activate doublegate
+\newif\ifpgf at circuit@fet at doublegate
+\pgfkeys{/tikz/doublegate/.add code={}{\pgf at circuit@fet at doublegatetrue}}
+\ctikzset{doublegate/.add code={}{\pgf at circuit@fet at doublegatetrue}}
+\pgfkeys{/tikz/nodoublegate/.add code={}{\pgf at circuit@fet at doublegatefalse}}
+\ctikzset{nodoublegate/.add code={}{\pgf at circuit@fet at doublegatefalse}}
+
 % Option bodydiode for fet
 \newif\ifpgf at circuit@fet at bodydiode
 \pgfkeys{/tikz/bodydiode/.add code={}{\pgf at circuit@fet at bodydiodetrue}}
@@ -3787,6 +3794,19 @@
             \left
             \pgf at y=-\ctikzvalof{tripoles/#1/curr direction}\pgf at circ@res at step
         }
+        \anchor{G1}{
+            \northeast
+            \pgf at circ@res at step=\ctikzvalof{tripoles/#1/conn height}\pgf at y
+            \left
+            \pgf at y=-\ctikzvalof{tripoles/#1/curr direction}\pgf at circ@res at step
+        }
+        \anchor{G2}{
+            \northeast
+            \pgf at circ@res at step=\ctikzvalof{tripoles/#1/conn height}\pgf at y
+            \pgf at circ@res at step=-0.3333333\pgf at circ@res at step
+            \left
+            \pgf at y=-\ctikzvalof{tripoles/#1/curr direction}\pgf at circ@res at step
+        }
         \anchor{gate}{
             \northeast
             \pgf at circ@res at step=\ctikzvalof{tripoles/#1/conn height}\pgf at y
@@ -3793,6 +3813,19 @@
             \left
             \pgf at y=-\ctikzvalof{tripoles/#1/curr direction}\pgf at circ@res at step
         }
+        \anchor{gate1}{
+            \northeast
+            \pgf at circ@res at step=\ctikzvalof{tripoles/#1/conn height}\pgf at y
+            \left
+            \pgf at y=-\ctikzvalof{tripoles/#1/curr direction}\pgf at circ@res at step
+        }
+        \anchor{gate2}{
+            \northeast
+            \pgf at circ@res at step=\ctikzvalof{tripoles/#1/conn height}\pgf at y
+            \pgf at circ@res at step=-0.3333333\pgf at circ@res at step
+            \left
+            \pgf at y=-\ctikzvalof{tripoles/#1/curr direction}\pgf at circ@res at step
+        }
         \anchor{nobase}{
             \left
             \pgf at x=\ctikzvalof{tripoles/#1/base width}\pgf at x
@@ -5359,10 +5392,19 @@
     \pgfusepath{draw}
 
     %draw thick gate line
-    \pgfscope
+    \pgfscope%%% gate line
         \pgfpathmoveto{\pgfpoint
             {\ctikzvalof{tripoles/#1/gate width}\pgf at circ@res at left}
         {\ctikzvalof{tripoles/#1/gate height}\pgf at circ@res at up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
+        \ifpgf at circuit@fet at doublegate
+            \edef\@@gateconnheight{(\ctikzvalof{tripoles/#1/conn height})}
+            \pgfpathlineto{\pgfpoint
+                {\ctikzvalof{tripoles/#1/gate width}\pgf at circ@res at left}
+                {\@@gateconnheight*\pgf at circ@res at up/3}}
+            \pgfpathmoveto{\pgfpoint
+                {\ctikzvalof{tripoles/#1/gate width}\pgf at circ@res at left}
+                {\@@gateconnheight*\pgf at circ@res at down/3}}
+        \fi
         \pgfpathlineto{\pgfpoint
             {\ctikzvalof{tripoles/#1/gate width}\pgf at circ@res at left}
         {\ctikzvalof{tripoles/#1/gate height}\pgf at circ@res at down-\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
@@ -5404,18 +5446,28 @@
 
     % GATE CONNECTION
     \ifpgf at circuit@bpt at drawgate
-        \ifpgf at circuit@trans at ntype
+        \pgfscope %% gate connection
+            \ifpgf at circuit@trans at ntype
+                \edef\@@gateconnheight{(\ctikzvalof{tripoles/#1/conn height})}
+            \else
+                \edef\@@gateconnheight{(-\ctikzvalof{tripoles/#1/conn height})}
+            \fi
             \pgfpathmoveto{\pgfpoint
                 {\ctikzvalof{tripoles/#1/gate width}\pgf at circ@res at left}
-            {\ctikzvalof{tripoles/#1/conn height}\pgf at circ@res at down}}
-            \pgfpathlineto{\pgfpoint{\pgf at circ@res at left-\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}{\ctikzvalof{tripoles/#1/conn height}\pgf at circ@res at down}}
-        \else
-            \pgfpathmoveto{\pgfpoint
-                {\ctikzvalof{tripoles/#1/gate width}\pgf at circ@res at left}
-            {-\ctikzvalof{tripoles/#1/conn height}\pgf at circ@res at down}}
-            \pgfpathlineto{\pgfpoint{\pgf at circ@res at left-\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}{-\ctikzvalof{tripoles/#1/conn height}\pgf at circ@res at down}}
-        \fi
-        \pgfusepath{draw}
+                {\@@gateconnheight*\pgf at circ@res at down}}
+            \pgfpathlineto{\pgfpoint
+                {\pgf at circ@res at left-\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}
+                {\@@gateconnheight*\pgf at circ@res at down}}
+            \ifpgf at circuit@fet at doublegate
+                \pgfpathmoveto{\pgfpoint
+                    {\ctikzvalof{tripoles/#1/gate width}\pgf at circ@res at left}
+                    {-\@@gateconnheight*\pgf at circ@res at down/3}}
+                \pgfpathlineto{\pgfpoint
+                    {\pgf at circ@res at left-\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}
+                    {-\@@gateconnheight*\pgf at circ@res at down/3}}
+            \fi
+            \pgfusepath{draw}
+        \endpgfscope
     \fi
 
     \pgfcirc at ferroelectric{#1}{0}

Modified: trunk/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty	2022-12-11 00:51:11 UTC (rev 65239)
+++ trunk/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty	2022-12-11 21:34:32 UTC (rev 65240)
@@ -16,8 +16,8 @@
 \providecommand\DeclareRelease[3]{}
 \providecommand\DeclareCurrentRelease[2]{}
 
-\def\pgfcircversion{1.5.5}
-\def\pgfcircversiondate{2022/11/12}
+\def\pgfcircversion{1.6.0}
+\def\pgfcircversiondate{2022/12/10}
 
 \DeclareRelease{0.4}{2012/12/20}{circuitikz-0.4-body.tex}
 \DeclareRelease{v0.4}{2012/12/20}{circuitikz-0.4-body.tex}



More information about the tex-live-commits mailing list.