线与线之间的间隙

线与线之间的间隙

我正在尝试绘制环形调制器,但线条没有连接,

\documentclass[11pt]{{standalone}}
\usepackage{tikz,pgfplots} 
 \usetikzlibrary{arrows} 
 \usepackage[RPvoltages, american,cuteinductors]{circuitikz}[=v1.4.6]
\begin{document}



\begin{circuitikz}[american,thick]
\draw (0,0) node [transformer core](T){};
%%\draw (T.A1) --++(-2,0);
%%\draw (T.A2) --++(-2,0);
\draw (6,0) node [transformer core](T2){};
\node[](P1)at($(T.B1)!0.2!(T2.A1)$){};
\node[](P2)at($(T.B2)!0.2!(T2.A2)$){};
\node[](P3)at($(T.B2)!0.8!(T2.A2)$){};
\node[](P4)at($(T.B1)!0.8!(T2.A1)$){};
\node[yshift=-1cm](P5)at($(T.B2)!0.6!(T2.A2)$){};
\coordinate (A) at ($(T.B1)!0.8!(T2.A1)$);
\coordinate (B) at ($(T.B2)!0.8!(T2.A2)$);
\ctikzset{diodes/scale=0.6}
\draw (A)--($(P2)!0.6!(P4)$)to[D](P2) ;      
\draw (B)--($(P1)!0.6!(P3)$)to[D](P1) ; 
\draw (P1)to[D](P4) ; 
\draw (P2)to [D](P3) ;   
%
\draw (T.B1)--(T2.A1);
\draw (T.B2)--(T2.A2);
\draw(T.A1) to[open,v<={$m(t)$}](T.A2);
\draw (T2.B2)to[open,v>={$v_{\textrm{out}}(t)$}] (T2.B1) ;
%
\node [oscillator](osc)at(P5) {};
\node[below, yshift=-0.75cm, align=center]at(osc){Square-wave carrier \\ at $f=f_c$};
\draw (T2-L1.midtap) to[short] (T2.A1 |- T2-L1.midtap)|-(osc.east);
\draw (T-L2.midtap) to[short] (T.B1 |- T-L2.midtap)|-(osc.west);
%
%%\draw(T.B2) to[open,v>=$12V_{rms}$](T.B1);
\end{circuitikz}

\end{document}

答案1

将所有空节点更改为坐标

\documentclass{standalone}
\usepackage{tikz} 
\usepackage[RPvoltages, american,cuteinductors]{circuitikz}[=v1.4.6]
\begin{document}
\begin{circuitikz}[american,thick]
\draw (0,0) node [transformer core](T){};
%%\draw (T.A1) --++(-2,0);
%%\draw (T.A2) --++(-2,0);
\draw (6,0) node [transformer core](T2){};
\coordinate (P1)at($(T.B1)!0.2!(T2.A1)$);
\coordinate (P2)at($(T.B2)!0.2!(T2.A2)$);
\coordinate (P3)at($(T.B2)!0.8!(T2.A2)$);
\coordinate (P4)at($(T.B1)!0.8!(T2.A1)$);
\coordinate [yshift=-1cm](P5)at($(T.B2)!0.6!(T2.A2)$);
\coordinate (A) at ($(T.B1)!0.8!(T2.A1)$);
\coordinate (B) at ($(T.B2)!0.8!(T2.A2)$);
\ctikzset{diodes/scale=0.6}
\draw (A)--($(P2)!0.6!(P4)$)to[D](P2) ;  
\draw (B)--($(P1)!0.6!(P3)$)to[D](P1) ; 
\draw (P1)to[D](P4) ; 
\draw (P2)to [D](P3) ;   
%
\draw (T.B1)--(T2.A1);
\draw (T.B2)--(T2.A2);
\draw(T.A1) to[open,v<={$m(t)$}](T.A2);
\draw (T2.B2)to[open,v>={$v_{\textrm{out}}(t)$}] (T2.B1) ;
%
\coordinate [oscillator](osc)at(P5);
\node[below, yshift=-0.75cm, align=center]at(osc){Square-wave carrier \\ at $f=f_c$};
\draw (T2-L1.midtap) to[short] (T2.A1 |- T2-L1.midtap)|-(osc.east);
\draw (T-L2.midtap) to[short] (T.B1 |- T-L2.midtap)|-(osc.west);
%
%%\draw(T.B2) to[open,v>=$12V_{rms}$](T.B1);
\end{circuitikz}
\end{document}

电路原理图

相关内容