Circuitikz 微调电容器

Circuitikz 微调电容器

Circuitikz 中是否有微调电容器的符号,或者有办法将可变电容器的箭头更改为看起来像微调电容器符号吗?我在 Circuitikz 1.3.2 手册中找不到任何与此相关的内容。

在此处输入图片描述像这样在此处输入图片描述

我当前的解决方案是绘制一个电容器并手动绘制“T”,我真的很感激有更好的解决方案。

答案1

这样可以吗?

演示

\documentclass{standalone}
\usepackage{circuitikz}
\usepgflibrary{arrows.meta}

\makeatletter
%% Trimmed Capacitor
\pgfcircdeclarebipolescaled{capacitors}
{}
{\ctikzvalof{bipoles/vcapacitor/height}}
{tcapacitor}
{\ctikzvalof{bipoles/vcapacitor/height}}
{\ctikzvalof{bipoles/vcapacitor/width}}
{
    \pgf@circ@res@step = \ctikzvalof{bipoles/vcapacitor/capacitor width} \pgf@circ@res@right

    \pgf@circ@setlinewidth{bipoles}{\pgfstartlinewidth}
    \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@step}{\pgf@circ@res@up}}
    \pgfpathlineto{\pgfpoint{-\pgf@circ@res@step}{\pgf@circ@res@down}}

    \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{\pgf@circ@res@up}}
    \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{\pgf@circ@res@down}}
    \pgfusepath{draw}

    \pgfscope
        \pgfsetarrowsend{Bar}% changed
        \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}
        \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
        \pgfusepath{draw}
    \endpgfscope

    \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}}
    \pgfpathlineto{\pgfpoint{-\pgf@circ@res@step}{0pt}}
    \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
    \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{0pt}}
    \pgfsetlinewidth{\pgfstartlinewidth}
    \pgfusepath{draw}
}
\pgfcirc@activate@bipole{l}{tcapacitor}{tcapacitor}{trimmed capacitor}
\pgfcirc@style@to@style{trimmed capacitor}{vC}
\makeatother

\begin{document}
\begin{circuitikz}
\draw (0,0) to[trimmed capacitor, mirror] (2,0);
\end{circuitikz}
\end{document} 

相关内容