Gyrator fügt horizontale Trennung zwischen den Ports hinzu

Gyrator fügt horizontale Trennung zwischen den Ports hinzu

Gibt es eine Möglichkeit, zwischen den beiden Kreisen des Gyrators einen horizontalen Abstand einzufügen?

\documentclass{article}
\usepackage[english]{babel}
\usepackage[]{circuitikz}

\begin{document}
\begin{circuitikz} 
\draw(0,0) 
    node[gyrator] (G) {}
 (G.A1) node[anchor=east] {A1}
 (G.A2) node[anchor=east] {A2}
 (G.B1) node[anchor=west] {B1}
 (G.B2) node[anchor=west] {B2}
 (G.base) node{};
\end{circuitikz}
\end{document}

Bildbeschreibung hier eingeben

Bildbeschreibung hier eingeben Ich möchte dies zeichnen

Antwort1

Sie können die Eigenschaften der Komponente ändern, die in definiert ist pgfcircquadpoles.tex. Dies ist ein Beispiel für das Hinzufügen eines Abstands von 1 cm. Die Variable \Spaceist für die Vergrößerung des Abstands definiert. Der Trick besteht darin, den rechten Teil der Komponente um nach rechts zu verschieben \Space.

Bildbeschreibung hier eingeben

\documentclass{standalone}
\usepackage[english]{babel}
\usepackage[]{circuitikz}

\def\Space{1cm}

\makeatletter
\pgfcircdeclarequadpole{gyrator}{

    \def\stretto{.4}

    \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}
    \pgfpathlineto{\pgfpoint{\stretto\pgf@circ@res@left}{\pgf@circ@res@up}}
    \pgfpathlineto{\pgfpoint{\stretto\pgf@circ@res@left}{\pgf@circ@res@down}}
    \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}

    \pgfpathmoveto{\pgfpoint{\Space+\pgf@circ@res@right}{\pgf@circ@res@up}}
    \pgfpathlineto{\pgfpoint{\Space+\stretto\pgf@circ@res@right}{\pgf@circ@res@up}}
    \pgfpathlineto{\pgfpoint{\Space+\stretto\pgf@circ@res@right}{\pgf@circ@res@down}}
    \pgfpathlineto{\pgfpoint{\Space+\pgf@circ@res@right}{\pgf@circ@res@down}}

    \pgfusepath{draw}

    \pgfsetlinewidth{2\pgflinewidth}
    \pgfpathmoveto{\pgfpoint{\stretto\pgf@circ@res@left}{.7*\stretto\pgf@circ@res@down}}
    \pgfpatharc{90}{270}{.7*\stretto\pgf@circ@res@down}

    \pgfpathmoveto{\pgfpoint{\Space+\stretto\pgf@circ@res@right}{.7*\stretto\pgf@circ@res@up}}
    \pgfpatharc{-90}{90}{.7*\stretto\pgf@circ@res@down}
    \pgfusepath{draw}

}{}
\makeatother




\begin{document}
\begin{circuitikz} 
\draw(0,0) 
    node[gyrator] (G) {}
 (G.A1) node[anchor=east] {A1}
 (G.A2) node[anchor=east] {A2}
 (G.B1) node[anchor=west,xshift=\Space] {B1}
 (G.B2) node[anchor=west,xshift=\Space] {B2}
 (G.base) node{};
\end{circuitikz}
\end{document}

verwandte Informationen