Problème avec TikZ. Version ?
Un collègue m'a transmis un poly qu'il a réalisé il y a quelques temps (2017). temps, en 2017. Dans ce poly il y des figures `TikZ` Ti*k*Z que je souhaiterais récupérer. Quand je compile le poly poly, certaines figures ne sont pas correctes.
- Figure obtenue à l'époque :
![alt text][1]
- Figure que j'obtiens :
![alt text][2]
J'imagine - je ne suis pas du tout familier avec `TikZ` Ti*k*Z - qu'il s'agit d'un problème de version. Les fichiers `log` de `pdflatex` m'apprennent que la version de `TikZ` Ti*k*Z était 2.10 alors qu'aujourd'hui c'est 3.1.5
3.1.5.
Si quelqu'un a une petite idée de l'origine du problème qu'il n'hésite pas à me faire signe ;-)
Voici le fichier `.tex` pour ceux qui souhaitent tester :
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[scale = 0.75,x={(0.707cm,0.707cm)},y={(-0.966cm,0.259cm)},z={(0cm,1cm)}]
\draw[fill=gray!90] (0,1,1) -- (1,1,1) -- (1,4,1) -- (0,4,1) -- cycle;
\draw[fill=gray!90] (1,4,1) -- (0,4,1) -- (0,4,4) -- (1,4,4) -- cycle;
\draw[fill=gray!50] (0,0,0) -- (1,0,0) -- (1,0,5) -- (0,0,5) -- cycle;
\draw[fill=gray!90] (0,0,5) -- (0,5,5) -- (1,5,5) -- (1,0,5) -- cycle;
\draw[fill=gray!50,even odd rule] (0,0,0) -- (0,5,0) -- (0,5,5) -- (0,0,5) --cycle (0,1,1) -- (0,4,1) -- (0,4,4) -- (0,1,4) --cycle ;
%enroulement primaire
\draw[thick,line width = 0.5mm] (0,5,3) -- (0,7,3) ;
\draw[thick,line width = 0.5mm] (0,5,1.55) -- (0,7,1) ;
\draw[thick,line width = 0.5mm] (0,5,3) arc [start angle=0, delta angle =90, radius=12.1mm, rotate=240] -- (1,4,3) ;
\draw[thick,line width = 0.5mm] (1,4,3) arc [start angle=0, delta angle =-180, radius=0.5mm, rotate=90] ;
\draw[thick,line width = 0.5mm] (1,4,3) arc [start angle=0, delta angle =-180, radius=0.5mm, rotate=90] ;
\draw[thick,line width = 0.5mm] (0,5,3-0.1) arc [start angle=0, delta angle =180, radius=0.5mm, rotate=90] ;
\draw[thick,line width = 0.5mm] (0,5,3-0.2) arc [start angle=0, delta angle =90, radius=12.1mm, rotate=240] -- (1,4,3-0.2) ;
\draw[thick,line width = 0.5mm] (1,4,3-0.2) arc [start angle=0, delta angle =-180, radius=0.5mm, rotate=90] ;
\draw[thick,line width = 0.5mm] (0,5,3-0.3) arc [start angle=0, delta angle =180, radius=0.5mm, rotate=90] ;
\draw[thick,line width = 0.5mm] (0,5,3-0.4) arc [start angle=0, delta angle =90, radius=12.1mm, rotate=240] -- (1,4,3-0.4) ;
\draw[thick,line width = 0.5mm] (1,4,3-0.4) arc [start angle=0, delta angle =-180, radius=0.5mm, rotate=90] ;
\draw[thick,line width = 0.5mm] (0,5,3-0.5) arc [start angle=0, delta angle =180, radius=0.5mm, rotate=90] ;
\draw[thick,line width = 0.5mm] (0,5,3-0.6) arc [start angle=0, delta angle =90, radius=12.1mm, rotate=240] -- (1,4,3-0.6) ;
\draw[thick,line width = 0.5mm] (1,4,3-0.6) arc [start angle=0, delta angle =-180, radius=0.5mm, rotate=90] ;
\draw[thick,line width = 0.5mm] (0,5,3-0.7) arc [start angle=0, delta angle =180, radius=0.5mm, rotate=90] ;
\draw[thick,line width = 0.5mm] (0,5,3-0.8) arc [start angle=0, delta angle =90, radius=12.1mm, rotate=240] -- (1,4,3-0.8) ;
\draw[thick,line width = 0.5mm] (1,4,3-0.8) arc [start angle=0, delta angle =-180, radius=0.5mm, rotate=90] ;
\draw[thick,line width = 0.5mm] (0,5,3-0.9) arc [start angle=0, delta angle =180, radius=0.5mm, rotate=90] ;
\draw[thick,line width = 0.5mm] (0,5,3-1) arc [start angle=0, delta angle =90, radius=12.1mm, rotate=240] -- (1,4,3-1) ;
\draw[thick,line width = 0.5mm] (1,4,3-1) arc [start angle=0, delta angle =-180, radius=0.5mm, rotate=90] ;
\draw[thick,line width = 0.5mm] (0,5,3-1.1) arc [start angle=0, delta angle =180, radius=0.5mm, rotate=90] ;
\draw[thick,line width = 0.5mm] (0,5,3-1.2) arc [start angle=0, delta angle =90, radius=12.1mm, rotate=240] -- (1,4,3-1.2) ;
\draw[thick,line width = 0.5mm] (1,4,3-1.2) arc [start angle=0, delta angle =-180, radius=0.5mm, rotate=90] ;
\draw[thick,line width = 0.5mm] (0,5,3-1.3) arc [start angle=0, delta angle =180, radius=0.5mm, rotate=90] ;
\draw[thick,line width = 0.5mm] (0,5,3-1.4) arc [start angle=0, delta angle =90, radius=12.1mm, rotate=240] -- (1,4,3-1.4) ;
\draw[thick,line width = 0.5mm] (1,4,3-1.4) arc [start angle=0, delta angle =-180, radius=0.5mm, rotate=90] ;
\draw[thick,line width = 0.5mm] (0,5,3-1.5) arc [start angle=0, delta angle =180, radius=0.5mm, rotate=90] ;
\draw[thick,line width = 0.5mm] (0,5,3-1.6) arc [start angle=0, delta angle =90, radius=12.1mm, rotate=240] -- (1,4,3-1.6) ;
\draw[thick,line width = 0.5mm] (1,4,3-1.6) arc [start angle=0, delta angle =-180, radius=0.5mm, rotate=90] ;
%enroulement secondaire
\draw[thick,line width = 1mm] (0,1,3.4) --(0,-2.4,3.4);
\draw[thick,line width = 1mm] (0,1,3.4) arc [start angle=0, delta angle =180, radius=1mm, rotate=90] ;
\draw[thick,line width = 1mm] (0,1,3) arc [start angle=0, delta angle =90, radius=12.1mm, rotate=240];% -- (1,4,3-0.8) ;
\draw[thick,line width = 1mm] (1,0,3.2) arc [start angle=0, delta angle =-180, radius=1mm, rotate=90] ;
\draw[thick,line width = 1mm] (0,1,3) arc [start angle=0, delta angle =180, radius=1mm, rotate=90] ;
\draw[thick,line width = 1mm] (0,1,2.6) arc [start angle=0, delta angle =90, radius=12.1mm, rotate=240];% -- (1,4,3-0.8) ;
\draw[thick,line width = 1mm] (1,0,2.8) arc [start angle=0, delta angle =-180, radius=1mm, rotate=90] ;
\draw[thick,line width = 1mm] (0,1,2.6) arc [start angle=0, delta angle =180, radius=1mm, rotate=90] ;
\draw[thick,line width = 1mm] (0,1,2.2) arc [start angle=0, delta angle =90, radius=12.1mm, rotate=240];% -- (1,4,3-0.8) ;
\draw[thick,line width = 1mm] (1,0,2.4) arc [start angle=0, delta angle =-180, radius=1mm, rotate=90] ;
\draw[thick,line width = 1mm] (0,1,2.2) arc [start angle=0, delta angle =180, radius=1mm, rotate=90] ;
\draw[thick,line width = 1mm] (1,0,1.8)-- (1,-2,1.8) ;
%v_1 et v_2 et i_1 et i_2 etc
\draw[thick,line width = 0.2mm,>=latex,->] (0,7,1.2) -- (0,7,2.8) ; \node(a)at(0,7.5,2){$v_1(t)$};
\draw[thick,line width = 0.2mm,>=latex,->] (0,-2.7,2.9)-- (0.6,-2,2.8) ; \node(a)at(0,-3.3,3.2){$v_2(t)$};
\draw[thick,line width = 0.2mm,>=latex,->] (1,-0.5,2.8)-- (1,-1,2.8); \node(a)at(1,-3,4){ \textcolor{red}{$i_2(t)=0$ pour l'instant}};
\draw[thick,line width = 0.2mm,>=latex,<-] (0,6,3.2) -- (0,6.5,3.2) ; \node(a)at(0,6,3.6){$i_1(t)$};
\node(a)at(0,6,0.5){$N_1$ spires};
\node(a)at(0,-1.3,0.5){$N_2$ spires};
\node(a)at(0,2,4.7){$\Phi$ };
\node(a)at(0,0.2,3.7){{\large $\bullet$} };
\node(a)at(0,4.8,3.4){{\large $\bullet$} };
% ligne de champ
\draw[thick,line width = 0.2mm,dashed] (0,4.5,1) -- (0,4.5,4);
\draw[thick,line width = 0.2mm,dashed] (0,1,4.5) -- (0,4,4.5);
\draw[thick,line width = 0.5 mm,>=latex,->,dashed] (0,2.55,4.5) -- (0,2.5,4.5);
\draw[bend left=45,>=latex,dashed] (0,4.5,4) to (0,4,4.5);
\draw[thick,line width = 0.2mm,dashed] (0,0.5,1) -- (0,0.5,4);
\draw[bend left=45,>=latex,dashed] (0,1,4.5) to (0,0.5,4);
\draw[thick,line width = 0.5 mm,>=latex,->,dashed] (0,2.5,0.5) -- (0,2.55,0.5);
\draw[thick,line width = 0.2mm,dashed] (0,1,0.5) -- (0,4,0.5);
\draw[bend left=45,>=latex,dashed] (0,0.5,1) to (0,1,0.5) ;
\draw[bend left=45,>=latex,dashed] (0,4,0.5) to (0,4.5,1) ;
\end{tikzpicture}
\end{document}
[1]: https://texnique.fr/osqa/upfiles/ok_8ZHaoOW.png
[2]: https://texnique.fr/osqa/upfiles/nok_oxYRy0K.png