如何绘制电机的横截面?

如何绘制电机的横截面?

我怎样才能绘制这样的电机横截面: 在此处输入图片描述

你能帮我吗?

答案1

这种图片不需要特别高超的技能,但对语句有一定了解\foreach将有助于您用相对较短的代码绘制它。基本上,我们可以用一个 foreach 来绘制较小的圆圈。

输出

在此处输入图片描述

代码

\documentclass[margin=10pt]{standalone}
\usepackage{tikz}

\usetikzlibrary{arrows.meta, shapes.misc}

\tikzset{
    cross/.style={draw, label={[font=\large]center:$\times$}, circle,
        inner sep=1mm, outer sep=0pt},
    dot/.style={draw, circle, inner sep=1mm, outer sep=0, label={[fill=black, circle, inner sep=.5mm]center:}},
    point/.style={fill=black, circle, inner sep=1pt, node contents={}},
}

\begin{document}
\begin{tikzpicture}
\draw (0,0) circle (2cm);
\draw (0,0) circle (2.5cm);
\draw (0,0) circle (3.5cm);

\foreach \one/\two [count=\xi, evaluate=\xi as \angle using int (60*\xi)] in {rb/sB, ra'/sA', rc/sC, rb'/sB', ra/sA, rc'/sC'}{
    \pgfmathsetmacro\switch{int(mod(\xi,2)) ? "cross" : "dot"}
    \node[\switch, label={\angle+195:\one}] at (\angle:1.85cm) {};
    \node[\switch, label={[label distance=-1mm]\angle-25:\two}] at (\angle-30:2.65cm) {};
}

\draw[-{Latex}] (0,0) -- (0,5) node[above] {sQ};
\draw[-{Latex}, dashed] (0,0) -- (120:5cm) node[above left] {sB};

\draw[-{Latex}] (0,0) -- (5,0) node[below] {sD};
\draw[-{Latex}, dashed] (0,0) -- (25:5cm) node[below right] {$r\alpha$};

\draw[-{Latex}] ++(4,0) node[point] arc (0:25:4) node[point] node[midway, right] {$\theta_{r}$};

\draw[-{Latex}] ++(20:6) arc (15:25:6) node[midway, right] {$\omega_{r}$};
\end{tikzpicture}
\end{document} 

答案2

\documentclass[margin=10pt]{standalone}
\usepackage{tikz}
\begin{document}             
\def\inwinding#1#2#3#4#5{
\begin{scope}[shift={#1}, rotate=#2]
\draw [fill=white](0,0) circle (2mm) node[yshift=#3,xshift=#4]{#5};
\draw [thick](1.414mm,1.414mm) -- (0,0) -- (-1.414mm,-1.414mm);
\draw [thick](-1.414mm,1.414mm) -- (0,0) -- (1.414mm,-1.414mm);
\end{scope}
}
\def\outwinding#1#2#3#4#5{
\begin{scope}[shift={#1}, rotate=#2]
\draw [fill=white](0,0) circle (2mm) node[yshift=#3,xshift=#4]{#5};
\draw [fill=black](0,0) circle (0.5mm);
\end{scope}
 }
  \begin{tikzpicture}[scale=1]      
  \coordinate (A) at (0,0);
  \coordinate (B) at (5,0);
  \coordinate (C) at (25:5cm);
  \coordinate (F) at (90:5cm);
   \coordinate (G) at (120:5cm);
    \draw[fill=white] (0:3cm) arc (0:360:3cm);
    \draw[fill=white] (0:2cm) arc (0:360:2cm);
    \draw[fill=gray!30] (0:1.75cm) arc (0:360:1.75cm);
% % % for rotor:       
 \outwinding{(0:1.45cm)}{0}{-5mm}{0mm}{$\mathbf{c^{'}}$}
  \outwinding{(120:1.45cm)}{0}{2mm}{5mm}{$\mathbf{a^{'}}$}
  \outwinding{(240:1.45cm)}{0}{3mm}{-3mm}{$\mathbf{b^{'}}$}

 \inwinding{(60:1.45cm)}{0}{-2mm}{4mm}{$\mathbf{b^{}}$}
  \inwinding{(180:1.45cm)}{0}{4mm}{0mm}{$\mathbf{c^{}}$}
   \inwinding{(300:1.45cm)}{0}{-1mm}{-4mm}{$\mathbf{a^{}}$}
 % % % for stator
 \outwinding{(330:2.3cm)}{0}{5mm}{2mm}{$\mathbf{C^{'}}$}
  \outwinding{(90:2.3cm)}{0}{0}{-4mm}{$\mathbf{A^{'}}$}
    \outwinding{(210:2.3cm)}{0}{-5mm}{3mm}{$\mathbf{B^{'}}$}

 \inwinding{(30:2.3cm)}{0}{4mm}{-2mm}{$\mathbf{B^{}}$}
   \inwinding{(150:2.3cm)}{0}{-5mm}{-2mm}{$\mathbf{C^{}}$}
     \inwinding{(270:2.3cm)}{0}{0}{5mm}{$\mathbf{A^{}}$}
 % % % % % % % % % % % % % % % %555        
\draw[very thick,->,black] (A) -- (B) node [at end,sloped,right,black]{{\small{sD} }} coordinate (sD axis);
   \draw[->,dashed,very thick,black] (A) -> (C) node [at end,sloped,right]{{\small{$r\alpha$} }}; 
      \draw[->,very thick,black] (A) -> (F) node [at end,rotate=-90,sloped,yshift=2mm,black]{{\small{sQ} }}coordinate (sQ axis);
       \draw[->,dashed,very thick,black] (A) -> (G) node [at end,rotate=-290,sloped,yshift=2mm]{{\small{$r\beta$} }};
      \draw[->] (0:4cm) arc (0:25:4.0cm) node [midway,sloped,above]{{\small $\theta_{r}$ }};       
      \end{tikzpicture}
\end{document}

相关内容