2

I am trying to bend circuit elements in bigger circuits for clarity of the values/labels of elements. However, whenever I use bend command, the circuit element is replaced by a line. Any suggestion on how to bend branches of a circuit. Here is my MWE:

\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{arrows, circuits.ee.IEC, positioning}
\usepackage[american voltages, american currents,siunitx]{circuitikz}

\begin{document}
\begin{minipage}{0.5\linewidth}
\centering%
\begin{tikzpicture}[circuit ee IEC, x=3.5cm, y=3.5cm]
\draw (1.0,0.0) node[circ]{} 
        to [V,l=5<\volt>] (0.0,0.0) node[circ]{}
        to [R,l=1<\ohm>] (0.5,1.0) node[circ]{}
        to [R,l=1<\ohm>] (1.0,0.0)
        to [R,l=1<\ohm>] (0.5,0.5) node[circ]{}
        to [R,l=1<\ohm>] (0.0,0.0)
        to [R,l=1<\ohm>] (0.5,1.5) node[circ]{}
        to [R,l=1<\ohm>] (1.0,0.0);
\draw (0.5,0.5) to [R,l=1<\ohm>] (0.5,1.0)
        to [R,l=1<\ohm>] (0.5,1.5);
\end{tikzpicture}
\end{minipage}
\begin{minipage}{0.5\linewidth}
\centering%
\begin{tikzpicture}[circuit ee IEC, x=3.5cm, y=3.5cm, bend angle=45]
\draw (1.0,0.0) node[circ]{} 
        to [V,l=5<\volt>] (0.0,0.0) node[circ]{}
        to [R,l=1<\ohm>, bend left] (0.5,1.0) node[circ]{}
        to [R,l=1<\ohm>, bend left] (1.0,0.0)
        to [R,l=1<\ohm>] (0.5,0.5) node[circ]{}
        to [R,l=1<\ohm>] (0.0,0.0)
        to [R,l=1<\ohm>, bend left] (0.5,1.5) node[circ]{}
        to [R,l=1<\ohm>, bend left] (1.0,0.0);
\draw (0.5,0.5) to [R,l=1<\ohm>] (0.5,1.0)
        to [R,l=1<\ohm>] (0.5,1.5);
\end{tikzpicture}
\end{minipage}
\end{document}

I want to have resistors instead of lines in second circuit diagram! enter image description here

I have made changes as per suggestion of John Kormylo. Following is the modified MWE:

\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{arrows, circuits.ee.IEC, positioning}
\usepackage[american voltages, american currents,siunitx]{circuitikz}

\begin{document}
\begin{minipage}{\linewidth}
\centering%
\begin{tikzpicture}[circuit ee IEC, x=3.5cm, y=3.5cm, bend angle=45]
\draw (0.0,0.0) node[circ]{} to[bend left]
    coordinate[pos=0.45] (A) coordinate[pos=0.70] (B)  (0.8,1.0) node[circ] {};
\fill[white] (A) rectangle (B);
\draw (0.0,0.0) node[circ]{} to [bend left]
    coordinate[pos=0.55] (C) coordinate[pos=0.75] (D)  (0.8,1.5) node[circ] {};
\fill[white] (C) rectangle (D);
\draw (0.8,1.5) node[circ]{} to [bend left]
    coordinate[pos=0.25] (E) coordinate[pos=0.45] (F)  (1.6,0.0) node[circ] {};
\fill[white] (E) rectangle (F);
\draw (0.8,1.0) node[circ]{} to [bend left]
    coordinate[pos=0.35] (G) coordinate[pos=0.60] (H)  (1.6,0.0) node[circ] {};
\fill[white] (G) rectangle (H);
\draw (1.6,0.0) node[circ]{} 
        to [V,l=5<\volt>] (0.0,0.0) node[circ]{}
        to [R,l=1<\ohm>] (0.8,0.5) node[circ]{};
 \draw (0.8,0.5) to [R,l=1<\ohm>] (1.6,0.0);
\draw (0.8,0.5) to [R,l=1<\ohm>] (0.8,1.0)
        to [R,l=1<\ohm>] (0.8,1.5);
\draw (A) to [R,l=1<\ohm>] (B);
\draw (C) to [R,l=1<\ohm>] (D);
\draw (E) to [R,l_=1<\ohm>] (F);
\draw (G) to [R,l=1<\ohm>] (H);
\end{tikzpicture}
\end{minipage}
\end{document}

And the output after running the above code:

enter image description here

  • You will have to supply intermediate points to connect the resistors, just as you would to make a right angle bend. – John Kormylo Oct 10 '15 at 0:06
  • But supplying intermediate co-ordinates on bend is very incovinient. I want to use bend features/commands of tikz actually. – Khaaba Oct 10 '15 at 3:19
  • 1
    What can I say? Resistors don't bend, even if you use tikz resistors instead of circuitikz resistors.. – John Kormylo Oct 10 '15 at 3:56
  • Yes, circuit elements can not be bent but I was thinking if we can conveniently bend connecting wires while using bend command together with circuit element commands. I have been drawing all this while by bending wire first starting from one node and then connecting element followed by another bend wire till it reaches other node. Thank you for the tips. – Khaaba Oct 10 '15 at 4:19
1

As you can see, I first drew a curved line and located two coordinates along the way. I then erased the section in the middle and drew the resistor connecting these coordinates. The pos parameters were tweaked a bit to fit the resistor into the gap.

\documentclass[multi={tikzpicture}]{standalone}
\usepackage{tikz}
\usetikzlibrary{arrows, circuits.ee.IEC, positioning}
\usepackage[american voltages, american currents,siunitx]{circuitikz}

\begin{document}
\begin{tikzpicture}[x=3.5cm, y=3.5cm, bend angle=45]
\draw (0.0,0.0) node[circ]{} to[bend left]
        coordinate[pos=.35] (A) coordinate[pos=.65] (B)  (0.5,1.) node[circ] {};
\fill[white] (A) rectangle (B);
\draw (A) to[R,l=1<\ohm>] (B);
\end{tikzpicture}

\end{document}

curved resistor

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.