Gyrator는 포트 사이에 수평 분리를 추가합니다.

Gyrator는 포트 사이에 수평 분리를 추가합니다.

자이레이터의 두 원 사이에 수평 공간을 추가할 수 있는 방법이 있나요?

\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}

여기에 이미지 설명을 입력하세요

여기에 이미지 설명을 입력하세요 나는 이것을 그리고 싶다

답변1

에 정의된 구성요소의 속성을 수정할 수 있습니다 pgfcircquadpoles.tex. 1cm 간격을 추가한 예입니다. \Space공간을 늘리기 위해 변수가 정의되었습니다. 비결은 구성 요소의 오른쪽 부분을 오른쪽으로 이동하는 것입니다 \Space.

여기에 이미지 설명을 입력하세요

\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}

관련 정보