From 277978fd69546e800dd8c46a0aec0d859d475ebb Mon Sep 17 00:00:00 2001
From: Norbert Preining <norbert@preining.info>
Date: Mon, 18 May 2020 03:02:35 +0000
Subject: CTAN sync 202005180302

---
 .../pgf/contrib/circuitikz/tex/pgfcircbipoles.tex  | 709 +++++++++++++++++++++
 1 file changed, 709 insertions(+)

(limited to 'graphics/pgf/contrib/circuitikz/tex/pgfcircbipoles.tex')

diff --git a/graphics/pgf/contrib/circuitikz/tex/pgfcircbipoles.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcircbipoles.tex
index dd62d7e9d8..1e9ada9775 100644
--- a/graphics/pgf/contrib/circuitikz/tex/pgfcircbipoles.tex
+++ b/graphics/pgf/contrib/circuitikz/tex/pgfcircbipoles.tex
@@ -265,6 +265,28 @@
     \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0pt}}
     \pgfusepath{draw}
 }
+
+\pgfcircdeclarebipole
+{}
+{\ctikzvalof{bipoles/multiwire/height}}
+{tmultiwire}
+{\ctikzvalof{bipoles/multiwire/height}}
+{\ctikzvalof{bipoles/multiwire/width}}
+{
+    \pgf@circ@res@other=\ctikzvalof{bipoles/multiwire/spacing}\pgf@circ@Rlen
+    \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
+    \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
+    \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left+\pgf@circ@res@other}{\pgf@circ@res@down}}
+    \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@up}}
+    \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left+2\pgf@circ@res@other}{\pgf@circ@res@down}}
+    \pgfpathlineto{\pgfpoint{2\pgf@circ@res@other}{\pgf@circ@res@up}}
+    \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}}
+    \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0pt}}
+    \pgfusepath{draw}
+}
+
+%
+%
 %% Generic bipole - used as resistor by some (bleah)
 \pgfcircdeclarebipolescaled{resistors}
 {}
@@ -1598,6 +1620,323 @@
     \pgfusepath{draw}
 }
 
+% % % winding symbols
+% triangle
+\def\pgf@circ@delta#1{
+    \pgfscope
+        \pgftransformscale{-.01\pgf@circ@res@left*#1}
+        \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
+            \pgftransformrotate{-\pgfcircmathresult}
+
+        \pgf@circ@setlinewidth{bipoles}{\pgfstartlinewidth}
+        \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
+        \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
+        \pgfpathlineto{\pgfpoint{0}{.866\pgf@circ@res@up}}
+        \pgfpathclose
+        \pgfusepath{stroke}
+    \endpgfscope
+}
+
+% star
+\def\pgf@circ@wye#1{
+    \pgfscope
+        \pgftransformscale{-.015\pgf@circ@res@left*#1}
+        \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
+            \pgftransformrotate{-\pgfcircmathresult}
+    
+        \pgf@circ@setlinewidth{bipoles}{\pgfstartlinewidth}
+        \pgfpathmoveto{\pgfpoint{0}{\pgf@circ@res@down}}
+        \pgfpathlineto{\pgfpointorigin}
+        \pgfpathlineto{\pgfpointpolar{-30}{\pgf@circ@res@down}}
+        \pgfpathmoveto{\pgfpointorigin}
+        \pgfpathlineto{\pgfpointpolar{-150}{\pgf@circ@res@down}}
+        \pgfusepath{stroke}
+    \endpgfscope
+}
+
+% zigzag
+\def\pgf@circ@zig#1{
+    \pgfscope
+        \pgftransformscale{-.015\pgf@circ@res@left*#1}
+        \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
+            \pgftransformrotate{-\pgfcircmathresult}
+    
+        \pgf@circ@setlinewidth{bipoles}{\pgfstartlinewidth}
+        \pgfpathmoveto{\pgfpointorigin}
+        \pgfpathlineto{\pgfpointpolar{90}{.5\pgf@circ@res@up}}
+        \pgfpathlineto{\pgfpointpolar{60}{\pgf@circ@res@up}}
+        
+        \pgfpathmoveto{\pgfpointorigin}
+        \pgfpathlineto{\pgfpointpolar{210}{.5\pgf@circ@res@up}}
+        \pgfpathlineto{\pgfpointpolar{0}{\pgf@circ@res@down}}
+        
+        \pgfpathmoveto{\pgfpointorigin}
+        \pgfpathlineto{\pgfpointpolar{330}{.5\pgf@circ@res@up}}
+        \pgfpathlineto{\pgfpointpolar{-60}{\pgf@circ@res@up}}
+        \pgfusepath{stroke}
+    \endpgfscope
+}
+
+% % % % round three-phase transformer
+\pgfcircdeclarebipolescaled{sources}
+{}
+{\ctikzvalof{bipoles/oosourcetrans/height}}
+{oosourcetrans}
+{\ctikzvalof{bipoles/oosourcetrans/height}}
+{\ctikzvalof{bipoles/oosourcetrans/width}}
+{
+    
+    \pgfpointorigin
+    \pgf@circ@setlinewidth{bipoles}{\pgfstartlinewidth}
+    \pgfpathcircle{\pgfpoint{\ctikzvalof{bipoles/oosourcetrans/circleoffset}\pgf@circ@res@left}{0}}
+        {\ctikzvalof{bipoles/oosourcetrans/circlesize}\pgf@circ@res@left}
+    \pgf@circ@maybefill
+    \pgfpathcircle{\pgfpoint{\ctikzvalof{bipoles/oosourcetrans/circleoffset}\pgf@circ@res@right}{0}}
+        {\ctikzvalof{bipoles/oosourcetrans/circlesize}\pgf@circ@res@right}
+    \pgf@circ@draworfill
+    \pgfpathcircle{\pgfpoint{\ctikzvalof{bipoles/oosourcetrans/circleoffset}\pgf@circ@res@left}{0}}
+        {\ctikzvalof{bipoles/oosourcetrans/circlesize}\pgf@circ@res@left}
+    \pgfusepath{draw}
+    
+    
+% % %     % draw inner symbols
+    
+    %%primary winding
+    \ifpgf@circ@prim@delta
+        \pgfscope
+            \pgftransformxshift{\ctikzvalof{bipoles/oosourcetrans/circlesize}\pgf@circ@res@left}
+            \pgf@circ@delta{\ctikzvalof{bipoles/oosourcetrans/vectorgroupscale}}
+        \endpgfscope
+        
+    \else\ifpgf@circ@prim@wye
+        \pgfscope
+            \pgftransformxshift{\ctikzvalof{bipoles/oosourcetrans/circlesize}\pgf@circ@res@left}
+            \pgf@circ@wye{\ctikzvalof{bipoles/oosourcetrans/vectorgroupscale}}
+        \endpgfscope
+    
+    \else\ifpgf@circ@prim@zig
+        \pgfscope
+            \pgftransformxshift{\ctikzvalof{bipoles/oosourcetrans/circlesize}\pgf@circ@res@left}
+            \pgf@circ@zig{\ctikzvalof{bipoles/oosourcetrans/vectorgroupscale}}
+        \endpgfscope
+    \fi\fi\fi
+    
+    %%secondary winding
+    \ifpgf@circ@sec@delta
+        \pgfscope
+            \pgftransformxshift{\ctikzvalof{bipoles/oosourcetrans/circlesize}\pgf@circ@res@right}
+            \pgf@circ@delta{\ctikzvalof{bipoles/oosourcetrans/vectorgroupscale}}
+        \endpgfscope
+        
+    \else\ifpgf@circ@sec@wye
+        \pgfscope
+            \pgftransformxshift{\ctikzvalof{bipoles/oosourcetrans/circlesize}\pgf@circ@res@right}
+            \pgf@circ@wye{\ctikzvalof{bipoles/oosourcetrans/vectorgroupscale}}
+        \endpgfscope
+    
+    \else\ifpgf@circ@sec@zig
+        \pgfscope
+            \pgftransformxshift{\ctikzvalof{bipoles/oosourcetrans/circlesize}\pgf@circ@res@right}
+            \pgf@circ@zig{\ctikzvalof{bipoles/oosourcetrans/vectorgroupscale}}
+        \endpgfscope
+    \fi\fi\fi
+}
+
+
+% % % % ooosource for three phase transformer
+\pgfcircdeclarebipolescaled{sources}
+{   
+    \anchor{right}{
+            \northeast
+            \pgf@y=0pt
+            \pgfmathparse{
+                \ctikzvalof{bipoles/ooosource/circleoffset}* sin(30) +
+    %%the sqrt must be > 0, the circles have to intersect
+                sqrt(
+                    pow(\ctikzvalof{bipoles/ooosource/circlesize},2) -
+                    pow(\ctikzvalof{bipoles/ooosource/circleoffset}*cos(30),2)
+                )
+            }
+            \pgf@x=\pgfmathresult\pgf@x
+    }
+    \anchor{east}{
+            \northeast
+            \pgf@y=0pt
+    }
+    \savedanchor{\centerprim}{
+            \pgf@circ@scaled@Rlen=\ctikzvalof{bipoles/ooosource/height}\pgf@circ@Rlen
+            \pgf@circ@scaled@Rlen=-\ctikzvalof{bipoles/ooosource/circleoffset}\pgf@circ@scaled@Rlen
+            \pgf@y=0pt
+            \pgf@x=.5\pgf@circ@scaled@Rlen
+    }
+    \anchor{centerprim}{
+            \centerprim
+    }
+    \savedanchor{\centersec}{
+            \pgf@circ@scaled@Rlen=\ctikzvalof{bipoles/ooosource/height}\pgf@circ@Rlen
+            \pgf@circ@scaled@Rlen=-\ctikzvalof{bipoles/ooosource/circleoffset}\pgf@circ@scaled@Rlen
+            \pgfpointpolar{60}{.5\pgf@circ@scaled@Rlen}
+            \pgf@y=-\pgf@y
+            \pgf@x=-\pgf@x
+    }
+    \anchor{centersec}{
+            \centersec
+    }
+    \savedanchor{\centertert}{
+            \pgf@circ@scaled@Rlen=\ctikzvalof{bipoles/ooosource/height}\pgf@circ@Rlen
+            \pgf@circ@scaled@Rlen=-\ctikzvalof{bipoles/ooosource/circleoffset}\pgf@circ@scaled@Rlen
+            \pgfpointpolar{60}{.5\pgf@circ@scaled@Rlen}
+            \pgf@y=\pgf@y
+            \pgf@x=-\pgf@x
+    }
+    \anchor{centertert}{
+            \centertert
+    }
+            
+    % add some anchors in case the are needed :)
+    \anchor{prim1}{
+            \pgf@circ@scaled@Rlen=\ctikzvalof{bipoles/ooosource/height}\pgf@circ@Rlen
+            \pgf@circ@scaled@Rlen=\ctikzvalof{bipoles/ooosource/circlesize}\pgf@circ@scaled@Rlen
+            \pgfpointadd{\centerprim}{\pgfpointpolar{135}{.5\pgf@circ@scaled@Rlen}}
+    }
+    \anchor{prim2}{
+            \pgf@circ@scaled@Rlen=\ctikzvalof{bipoles/ooosource/height}\pgf@circ@Rlen
+            \pgf@circ@scaled@Rlen=\ctikzvalof{bipoles/ooosource/circlesize}\pgf@circ@scaled@Rlen
+            \pgfpointadd{\centerprim}{\pgfpointpolar{-135}{.5\pgf@circ@scaled@Rlen}}
+    }
+    \anchor{sec1}{
+            \pgf@circ@scaled@Rlen=\ctikzvalof{bipoles/ooosource/height}\pgf@circ@Rlen
+            \pgf@circ@scaled@Rlen=\ctikzvalof{bipoles/ooosource/circlesize}\pgf@circ@scaled@Rlen
+            \pgfpointadd{\centersec}{\pgfpointpolar{0}{.5\pgf@circ@scaled@Rlen}}
+    }
+    \anchor{sec2}{
+            \pgf@circ@scaled@Rlen=\ctikzvalof{bipoles/ooosource/height}\pgf@circ@Rlen
+            \pgf@circ@scaled@Rlen=\ctikzvalof{bipoles/ooosource/circlesize}\pgf@circ@scaled@Rlen
+            \pgfpointadd{\centersec}{\pgfpointpolar{45}{.5\pgf@circ@scaled@Rlen}}
+    }
+    \anchor{sec3}{
+            \pgf@circ@scaled@Rlen=\ctikzvalof{bipoles/ooosource/height}\pgf@circ@Rlen
+            \pgf@circ@scaled@Rlen=\ctikzvalof{bipoles/ooosource/circlesize}\pgf@circ@scaled@Rlen
+            \pgfpointadd{\centersec}{\pgfpointpolar{90}{.5\pgf@circ@scaled@Rlen}}
+    }
+    \anchor{tert1}{
+            \pgf@circ@scaled@Rlen=\ctikzvalof{bipoles/ooosource/height}\pgf@circ@Rlen
+            \pgf@circ@scaled@Rlen=\ctikzvalof{bipoles/ooosource/circlesize}\pgf@circ@scaled@Rlen
+            \pgfpointadd{\centertert}{\pgfpointpolar{0}{.5\pgf@circ@scaled@Rlen}}
+    }
+    \anchor{tert2}{
+            \pgf@circ@scaled@Rlen=\ctikzvalof{bipoles/ooosource/height}\pgf@circ@Rlen
+            \pgf@circ@scaled@Rlen=\ctikzvalof{bipoles/ooosource/circlesize}\pgf@circ@scaled@Rlen
+            \pgfpointadd{\centertert}{\pgfpointpolar{-45}{.5\pgf@circ@scaled@Rlen}}
+    }
+    \anchor{tert3}{
+            \pgf@circ@scaled@Rlen=\ctikzvalof{bipoles/ooosource/height}\pgf@circ@Rlen
+            \pgf@circ@scaled@Rlen=\ctikzvalof{bipoles/ooosource/circlesize}\pgf@circ@scaled@Rlen
+            \pgfpointadd{\centertert}{\pgfpointpolar{-90}{.5\pgf@circ@scaled@Rlen}}
+    }
+}
+{\ctikzvalof{bipoles/ooosource/height}}
+{ooosource}
+{\ctikzvalof{bipoles/ooosource/height}}
+{\ctikzvalof{bipoles/ooosource/height}}
+{
+%     \pgf@circ@res@other = \ctikzvalof{bipoles/ooosource/vectorgroup} \pgf@circ@scaled@Rlen
+    
+%     % filling
+%     left
+    \pgf@circ@setlinewidth{bipoles}{\pgfstartlinewidth}
+        \pgfpathcircle{\pgfpoint{\ctikzvalof{bipoles/ooosource/circleoffset}\pgf@circ@res@left}{0}}{\ctikzvalof{bipoles/ooosource/circlesize}\pgf@circ@res@left}
+    \pgf@circ@maybefill 
+    
+    % up
+    \pgfscope
+        \pgfpointorigin
+        \pgfpathcircle{\pgfpointpolar{60}{\ctikzvalof{bipoles/ooosource/circleoffset}\pgf@circ@res@right}}{\ctikzvalof{bipoles/ooosource/circlesize}\pgf@circ@res@right}
+        \pgf@circ@maybefill
+    \endpgfscope
+%     down
+    \pgfscope
+        \pgfpointorigin
+        \pgfpathcircle{\pgfpointpolar{-60}{\ctikzvalof{bipoles/ooosource/circleoffset}\pgf@circ@res@right}}{\ctikzvalof{bipoles/ooosource/circlesize}\pgf@circ@res@right}
+        \pgf@circ@draworfill
+    \endpgfscope
+
+%     drawing
+    % left
+    \pgfpathcircle{\pgfpoint{\ctikzvalof{bipoles/ooosource/circleoffset}\pgf@circ@res@left}{0}}{\ctikzvalof{bipoles/ooosource/circlesize}\pgf@circ@res@left}
+    \pgfusepath{draw}
+    
+    % up
+    \pgfscope
+        \pgfpointorigin
+        \pgfpathcircle{\pgfpointpolar{60}{\ctikzvalof{bipoles/ooosource/circleoffset}\pgf@circ@res@right}}{\ctikzvalof{bipoles/ooosource/circlesize}\pgf@circ@res@right}
+        \pgfusepath{draw}
+    \endpgfscope
+    
+% % %     draw inner symbols
+
+% %     primary winding
+    \ifpgf@circ@prim@delta
+        \pgfscope
+            \pgftransformxshift{\ctikzvalof{bipoles/ooosource/circlesize}\pgf@circ@res@left}
+            \pgf@circ@delta{\ctikzvalof{bipoles/ooosource/vectorgroupscale}}
+        \endpgfscope
+        
+    \else\ifpgf@circ@prim@wye
+        \pgfscope
+            \pgftransformxshift{.6\pgf@circ@res@left}
+            \pgf@circ@wye{\ctikzvalof{bipoles/ooosource/vectorgroupscale}}
+        \endpgfscope
+    
+    \else\ifpgf@circ@prim@zig
+        \pgfscope
+            \pgftransformxshift{.6\pgf@circ@res@left}
+            \pgf@circ@zig{\ctikzvalof{bipoles/ooosource/vectorgroupscale}}
+        \endpgfscope
+    \fi\fi\fi
+    
+% %     secondary winding
+    \ifpgf@circ@sec@delta
+        \pgfscope
+            \pgfpointorigin
+            \pgftransformshift{\pgfpointpolar{60}{\ctikzvalof{bipoles/ooosource/circlesize}\pgf@circ@res@right}}
+            \pgf@circ@delta{\ctikzvalof{bipoles/ooosource/vectorgroupscale}}
+        \endpgfscope
+        
+    \else\ifpgf@circ@sec@wye
+        \pgfscope
+            \pgftransformshift{\pgfpointpolar{60}{\ctikzvalof{bipoles/ooosource/circlesize}\pgf@circ@res@right}}
+            \pgf@circ@wye{\ctikzvalof{bipoles/ooosource/vectorgroupscale}}
+        \endpgfscope
+    
+    \else\ifpgf@circ@sec@zig
+        \pgfscope
+            \pgftransformshift{\pgfpointpolar{60}{\ctikzvalof{bipoles/ooosource/circlesize}\pgf@circ@res@right}}
+            \pgf@circ@zig{\ctikzvalof{bipoles/ooosource/vectorgroupscale}}
+        \endpgfscope
+    \fi\fi\fi
+    
+% %     tertiary winding
+    \ifpgf@circ@tert@delta
+        \pgfscope
+            \pgftransformshift{\pgfpointpolar{-60}{\ctikzvalof{bipoles/ooosource/circlesize}\pgf@circ@res@right}}
+            \pgf@circ@delta{\ctikzvalof{bipoles/ooosource/vectorgroupscale}}
+        \endpgfscope
+        
+    \else\ifpgf@circ@tert@wye
+        \pgfscope
+            \pgftransformshift{\pgfpointpolar{-60}{\ctikzvalof{bipoles/ooosource/circlesize}\pgf@circ@res@right}}
+            \pgf@circ@wye{\ctikzvalof{bipoles/ooosource/vectorgroupscale}}
+        \endpgfscope
+    
+    \else\ifpgf@circ@tert@zig
+        \pgfscope
+            \pgftransformshift{\pgfpointpolar{-60}{\ctikzvalof{bipoles/ooosource/circlesize}\pgf@circ@res@right}}
+            \pgf@circ@zig{\ctikzvalof{bipoles/ooosource/vectorgroupscale}}
+        \endpgfscope
+    \fi\fi\fi
+}
+
 %% Independent current source - American
 \pgfcircdeclarebipolescaled{sources}
 {}
@@ -4711,6 +5050,376 @@
 
 }
 
+%% single phase ac/dc converter
+\pgfcircdeclarebipolescaled{blocks}
+{
+    \anchor{dc1}{
+        \northeast
+        \pgf@y=.4\pgf@y
+    }
+    \anchor{dc2}{
+        \northeast
+        \pgf@y=-.4\pgf@y
+    }
+}
+{\ctikzvalof{bipoles/sacdc/width}}
+{sacdc}
+{\ctikzvalof{bipoles/sacdc/width}}
+{\ctikzvalof{bipoles/sacdc/width}}
+{
+    \pgf@circ@res@step = \ctikzvalof{bipoles/sacdc/width}\pgf@circ@scaled@Rlen
+    \divide \pgf@circ@res@step by 2
+
+    \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
+    \pgf@circ@res@other = \pgf@circ@res@left
+    \advance\pgf@circ@res@other by \pgf@circ@res@step
+
+    \ifpgf@circuit@dashed
+        \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
+    \fi
+
+    % draw outer box
+    \pgf@circ@twoportbox
+
+    \ifpgf@circuit@inputarrow
+        {
+            \advance \pgf@circ@res@left by -.5\ctikzvalof{bipoles/thickness}\pgfstartlinewidth
+            \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
+            \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
+        }
+    \fi
+
+    % rotate inner symbol
+    \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
+    \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
+        \pgftransformrotate{270}
+    \fi\fi
+    \ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225  % 134 degree, because >= 135 is not possible
+        \pgftransformrotate{180}
+    \fi\fi
+    \ifnum \pgfcircmathresult > 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@circ@res@left}{\pgf@circ@res@down}}
+    \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
+    \pgfusepath{draw}
+    
+    % draw sin wave
+    \pgfpathmoveto{\pgfpoint{-.76\pgf@circ@res@step}{.5\pgf@circ@res@step}}
+    \pgfpathsine{\pgfpoint{.17\pgf@circ@res@step}{.17\pgf@circ@res@step}}
+    \pgfpathcosine{\pgfpoint{.17\pgf@circ@res@step}{-.17\pgf@circ@res@step}}
+    \pgfpathsine{\pgfpoint{.17\pgf@circ@res@step}{-.17\pgf@circ@res@step}}
+    \pgfpathcosine{\pgfpoint{.17\pgf@circ@res@step}{.17\pgf@circ@res@step}}
+    \pgfusepath{draw}
+    
+    % draw equal sign
+    \pgfpathmoveto{\pgfpoint{.2\pgf@circ@res@step}{-.375\pgf@circ@res@step}}
+    \pgfpathlineto{\pgfpoint{0.7\pgf@circ@res@step}{-0.375\pgf@circ@res@step}}
+    \pgfusepath{draw}
+    \pgfpathmoveto{\pgfpoint{.2\pgf@circ@res@step}{-.625\pgf@circ@res@step}}
+    \pgfpathlineto{\pgfpoint{0.7\pgf@circ@res@step}{-0.625\pgf@circ@res@step}}
+    \pgfusepath{draw}
+}
+
+
+
+%% single phase dc/ac converter
+\pgfcircdeclarebipolescaled{blocks}
+{
+    \anchor{dc1}{
+        \northeast
+        \pgf@y=.4\pgf@y
+        \pgf@x=-\pgf@x
+    }
+    \anchor{dc2}{
+        \northeast
+        \pgf@y=-.4\pgf@y
+        \pgf@x=-\pgf@x
+    }
+}
+{\ctikzvalof{bipoles/sdcac/width}}
+{sdcac}
+{\ctikzvalof{bipoles/sdcac/width}}
+{\ctikzvalof{bipoles/sdcac/width}}
+{
+    \pgf@circ@res@step = \ctikzvalof{bipoles/sdcac/width}\pgf@circ@scaled@Rlen
+    \divide \pgf@circ@res@step by 2
+
+    \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
+    \pgf@circ@res@other = \pgf@circ@res@left
+    \advance\pgf@circ@res@other by \pgf@circ@res@step
+
+    \ifpgf@circuit@dashed
+        \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
+    \fi
+
+    % draw outer box
+    \pgf@circ@twoportbox
+
+    \ifpgf@circuit@inputarrow
+        {
+            \advance \pgf@circ@res@left by -.5\ctikzvalof{bipoles/thickness}\pgfstartlinewidth
+            \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
+            \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
+        }
+    \fi
+
+    % rotate inner symbol
+    \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
+    \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
+        \pgftransformrotate{270}
+    \fi\fi
+    \ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225  % 134 degree, because >= 135 is not possible
+        \pgftransformrotate{180}
+    \fi\fi
+    \ifnum \pgfcircmathresult > 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@circ@res@left}{\pgf@circ@res@down}}
+    \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
+    \pgfusepath{draw}
+    
+    % draw sin wave
+    \pgfpathmoveto{\pgfpoint{.14\pgf@circ@res@step}{-.5\pgf@circ@res@step}}
+    \pgfpathsine{\pgfpoint{.17\pgf@circ@res@step}{.17\pgf@circ@res@step}}
+    \pgfpathcosine{\pgfpoint{.17\pgf@circ@res@step}{-.17\pgf@circ@res@step}}
+    \pgfpathsine{\pgfpoint{.17\pgf@circ@res@step}{-.17\pgf@circ@res@step}}
+    \pgfpathcosine{\pgfpoint{.17\pgf@circ@res@step}{.17\pgf@circ@res@step}}
+    \pgfusepath{draw}
+    
+    % draw equal sign
+    \pgfpathmoveto{\pgfpoint{-.2\pgf@circ@res@step}{.375\pgf@circ@res@step}}
+    \pgfpathlineto{\pgfpoint{-0.7\pgf@circ@res@step}{0.375\pgf@circ@res@step}}
+    \pgfusepath{draw}
+    \pgfpathmoveto{\pgfpoint{-.2\pgf@circ@res@step}{.625\pgf@circ@res@step}}
+    \pgfpathlineto{\pgfpoint{-0.7\pgf@circ@res@step}{0.625\pgf@circ@res@step}}
+    \pgfusepath{draw}
+}
+
+
+%% threephase ac/dc converter
+\pgfcircdeclarebipolescaled{blocks}
+{
+    \anchor{dc1}{
+        \northeast
+        \pgf@y=.4\pgf@y
+    }
+    \anchor{dc2}{
+        \northeast
+        \pgf@y=-.4\pgf@y
+    }
+    \anchor{ac1}{
+        \northeast
+        \pgf@y=.6\pgf@y
+        \pgf@x=-\pgf@x
+    }
+    \anchor{ac2}{
+        \northeast
+        \pgf@y=0\pgf@y
+        \pgf@x=-\pgf@x
+    }
+    \anchor{ac3}{
+        \northeast
+        \pgf@y=-.6\pgf@y
+        \pgf@x=-\pgf@x
+    }
+}
+{\ctikzvalof{bipoles/tacdc/width}}
+{tacdc}
+{\ctikzvalof{bipoles/tacdc/width}}
+{\ctikzvalof{bipoles/tacdc/width}}
+{
+    \pgf@circ@res@step = \ctikzvalof{bipoles/tacdc/width}\pgf@circ@scaled@Rlen
+    \divide \pgf@circ@res@step by 2
+
+    \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
+    \pgf@circ@res@other = \pgf@circ@res@left
+    \advance\pgf@circ@res@other by \pgf@circ@res@step
+
+    \ifpgf@circuit@dashed
+        \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
+    \fi
+
+    % draw outer box
+    \pgf@circ@twoportbox
+
+    \ifpgf@circuit@inputarrow
+        {
+            \advance \pgf@circ@res@left by -.5\ctikzvalof{bipoles/thickness}\pgfstartlinewidth
+            \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
+            \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
+        }
+    \fi
+
+    % rotate inner symbol
+    \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
+    \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
+        \pgftransformrotate{270}
+    \fi\fi
+    \ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225  % 134 degree, because >= 135 is not possible
+        \pgftransformrotate{180}
+    \fi\fi
+    \ifnum \pgfcircmathresult > 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@circ@res@left}{\pgf@circ@res@down}}
+    \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
+    \pgfusepath{draw}
+    
+    % draw sin waves
+    \pgfpathmoveto{\pgfpoint{-.76\pgf@circ@res@step}{.65\pgf@circ@res@step}}
+    \pgfpathsine{\pgfpoint{.17\pgf@circ@res@step}{.17\pgf@circ@res@step}}
+    \pgfpathcosine{\pgfpoint{.17\pgf@circ@res@step}{-.17\pgf@circ@res@step}}
+    \pgfpathsine{\pgfpoint{.17\pgf@circ@res@step}{-.17\pgf@circ@res@step}}
+    \pgfpathcosine{\pgfpoint{.17\pgf@circ@res@step}{.17\pgf@circ@res@step}}
+    \pgfusepath{draw}
+    \pgfpathmoveto{\pgfpoint{-.76\pgf@circ@res@step}{.5\pgf@circ@res@step}}
+    \pgfpathsine{\pgfpoint{.17\pgf@circ@res@step}{.17\pgf@circ@res@step}}
+    \pgfpathcosine{\pgfpoint{.17\pgf@circ@res@step}{-.17\pgf@circ@res@step}}
+    \pgfpathsine{\pgfpoint{.17\pgf@circ@res@step}{-.17\pgf@circ@res@step}}
+    \pgfpathcosine{\pgfpoint{.17\pgf@circ@res@step}{.17\pgf@circ@res@step}}
+    \pgfusepath{draw}
+    \pgfpathmoveto{\pgfpoint{-.76\pgf@circ@res@step}{.35\pgf@circ@res@step}}
+    \pgfpathsine{\pgfpoint{.17\pgf@circ@res@step}{.17\pgf@circ@res@step}}
+    \pgfpathcosine{\pgfpoint{.17\pgf@circ@res@step}{-.17\pgf@circ@res@step}}
+    \pgfpathsine{\pgfpoint{.17\pgf@circ@res@step}{-.17\pgf@circ@res@step}}
+    \pgfpathcosine{\pgfpoint{.17\pgf@circ@res@step}{.17\pgf@circ@res@step}}
+    \pgfusepath{draw}
+    
+    
+    
+    
+    % draw equal sign
+    \pgfpathmoveto{\pgfpoint{.2\pgf@circ@res@step}{-.375\pgf@circ@res@step}}
+    \pgfpathlineto{\pgfpoint{0.7\pgf@circ@res@step}{-0.375\pgf@circ@res@step}}
+    \pgfusepath{draw}
+    \pgfpathmoveto{\pgfpoint{.2\pgf@circ@res@step}{-.625\pgf@circ@res@step}}
+    \pgfpathlineto{\pgfpoint{0.7\pgf@circ@res@step}{-0.625\pgf@circ@res@step}}
+    \pgfusepath{draw}
+}
+
+
+%% threephase dc/ac converter
+\pgfcircdeclarebipolescaled{blocks}
+{
+    \anchor{dc1}{
+        \northeast
+        \pgf@y=.4\pgf@y
+        \pgf@x=-\pgf@x
+    }
+    \anchor{dc2}{
+        \northeast
+        \pgf@y=-.4\pgf@y
+        \pgf@x=-\pgf@x
+    }
+    \anchor{ac1}{
+        \northeast
+        \pgf@y=.6\pgf@y
+    }
+    \anchor{ac2}{
+        \northeast
+        \pgf@y=0\pgf@y
+    }
+    \anchor{ac3}{
+        \northeast
+        \pgf@y=-.6\pgf@y
+    }
+}
+{\ctikzvalof{bipoles/tdcac/width}}
+{tdcac}
+{\ctikzvalof{bipoles/tdcac/width}}
+{\ctikzvalof{bipoles/tdcac/width}}
+{
+    \pgf@circ@res@step = \ctikzvalof{bipoles/tdcac/width}\pgf@circ@scaled@Rlen
+    \divide \pgf@circ@res@step by 2
+
+    \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
+    \pgf@circ@res@other = \pgf@circ@res@left
+    \advance\pgf@circ@res@other by \pgf@circ@res@step
+
+    \ifpgf@circuit@dashed
+        \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
+    \fi
+
+    % draw outer box
+    \pgf@circ@twoportbox
+
+    \ifpgf@circuit@inputarrow
+        {
+            \advance \pgf@circ@res@left by -.5\ctikzvalof{bipoles/thickness}\pgfstartlinewidth
+            \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
+            \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
+        }
+    \fi
+
+    % rotate inner symbol
+    \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
+    \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
+        \pgftransformrotate{270}
+    \fi\fi
+    \ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225  % 134 degree, because >= 135 is not possible
+        \pgftransformrotate{180}
+    \fi\fi
+    \ifnum \pgfcircmathresult > 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@circ@res@left}{\pgf@circ@res@down}}
+    \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
+    \pgfusepath{draw}
+    
+    % draw sin waves
+    \pgfpathmoveto{\pgfpoint{.14\pgf@circ@res@step}{-.65\pgf@circ@res@step}}
+    \pgfpathsine{\pgfpoint{.17\pgf@circ@res@step}{.17\pgf@circ@res@step}}
+    \pgfpathcosine{\pgfpoint{.17\pgf@circ@res@step}{-.17\pgf@circ@res@step}}
+    \pgfpathsine{\pgfpoint{.17\pgf@circ@res@step}{-.17\pgf@circ@res@step}}
+    \pgfpathcosine{\pgfpoint{.17\pgf@circ@res@step}{.17\pgf@circ@res@step}}
+    \pgfusepath{draw}
+    \pgfpathmoveto{\pgfpoint{.14\pgf@circ@res@step}{-.5\pgf@circ@res@step}}
+    \pgfpathsine{\pgfpoint{.17\pgf@circ@res@step}{.17\pgf@circ@res@step}}
+    \pgfpathcosine{\pgfpoint{.17\pgf@circ@res@step}{-.17\pgf@circ@res@step}}
+    \pgfpathsine{\pgfpoint{.17\pgf@circ@res@step}{-.17\pgf@circ@res@step}}
+    \pgfpathcosine{\pgfpoint{.17\pgf@circ@res@step}{.17\pgf@circ@res@step}}
+    \pgfusepath{draw}
+    \pgfpathmoveto{\pgfpoint{.14\pgf@circ@res@step}{-.35\pgf@circ@res@step}}
+    \pgfpathsine{\pgfpoint{.17\pgf@circ@res@step}{.17\pgf@circ@res@step}}
+    \pgfpathcosine{\pgfpoint{.17\pgf@circ@res@step}{-.17\pgf@circ@res@step}}
+    \pgfpathsine{\pgfpoint{.17\pgf@circ@res@step}{-.17\pgf@circ@res@step}}
+    \pgfpathcosine{\pgfpoint{.17\pgf@circ@res@step}{.17\pgf@circ@res@step}}
+    \pgfusepath{draw}
+    
+    
+    
+    
+    % draw equal sign
+    \pgfpathmoveto{\pgfpoint{-.2\pgf@circ@res@step}{.375\pgf@circ@res@step}}
+    \pgfpathlineto{\pgfpoint{-0.7\pgf@circ@res@step}{0.375\pgf@circ@res@step}}
+    \pgfusepath{draw}
+    \pgfpathmoveto{\pgfpoint{-.2\pgf@circ@res@step}{.625\pgf@circ@res@step}}
+    \pgfpathlineto{\pgfpoint{-0.7\pgf@circ@res@step}{0.625\pgf@circ@res@step}}
+    \pgfusepath{draw}
+}
+
+
 %%%%%%%%%%%%%%%%%%%%%%%
 %% MECHANICAL SYMBOLS
 %%%%%%%%%%%%%%%%%%%%%%%
-- 
cgit v1.2.3

