我想绘制一个电路,反转(镜像)触点的符号,但是当我这样做时,我会失去符号的垂直对齐,并且线条不再是水平的。
\documentclass[border=7pt,10pt]{standalone}
\usepackage[utf8]{inputenc}
\usepackage{tikz}
\usetikzlibrary{circuits.ee.IEC,positioning,chains,calc,fit}
\begin{document}
\begin{tikzpicture}[circuit ee IEC]
\node(Ov) at (0,2em){0V};
\node[make contact={info=$a_i$}] (ai) at (5em,0){};
\node[break contact={info=$b_i$},right=6em of ai,yscale=-1] (Nbi){};
\draw (Ov) |- (ai) -- (Nbi);
\node[break contact={info=$a_i$},below=2em of ai] (Nai){};
\node[make contact={info=$c_i$},right=13em of Nai,yscale=-1] (ci){};
\node[bulb={info=V}, above right=1em and 6em of ci](V){};
\draw (Ov) |- (Nai) -- (ci);
\node[make contact={info=$b_i$},below=5em of Nbi] (bi){};
\node[break contact={info=$c_i$},right=6em of bi,yscale=-1] (Nci){};
\draw (Ov) |- (bi) -- (Nci);
\draw (V) --++(-3em,0) |- (Nbi);
\draw (V) --++(-3em,0) |- (Nci);
\draw (V) --++(-3em,0) |- (ci);
\end{tikzpicture}
\end{document}
答案1
我找到了一个解决方案,在接触定义中使用 yscale =-1。剩下的就是移动标签的位置。
\documentclass[border=7pt,10pt]{standalone}
\usepackage[utf8]{inputenc}
\usepackage{tikz}
\usetikzlibrary{circuits.ee.IEC,positioning,chains,calc,fit}
\begin{document}
\begin{tikzpicture}[circuit ee IEC]
\draw (0,-1)coordinate(a0) to [make contact={info=$a_i$,name=ai}]+ (2,0) to [break contact={info=$b_i$,yscale=-1}] +(4,0)coordinate(ab);
\draw (0,-2.5) --+(2,0) to [make contact] +(4,0) to [break contact={info=$c_i$,yscale=-1}] +(6,0) coordinate(vv)to [bulb={info=V}] +(8,0);
\draw (0,-4)coordinate(a2) to [break contact={info=$a_i$,yscale=-1,name=Nai}]+(2,0) --+ (4,0) to [make contact={info=$c_i$}] +(6,0)--(vv);
\draw[dashed] (ai) -- (Nai);
\draw (0,-0.5)node[above]{$0V$} -- (0,-4.5) ;
\draw (8,-0.5)node[above]{$12 V$} -- (8,-4.5) ;
\draw (ab)-|(vv);
\end{tikzpicture}
\end{document}