bug at paths with a node as starting point #76
Comments
This basically remove the patches introduced for issue circuitikz#58 and circuitikz#76 Reverts these: circuitikz@6efc2ee circuitikz@352d2bf Then, it carefully builds the anchors without moving the start of the path, and then join it with a leading --.
|
The new path fixes this. Notice that now the original example compiles like this: Which is correct --- The behavior of forcing the start point at the center of the node is not standard and creates a lot of problems. |
This basically remove the patches introduced for issue circuitikz#58 and circuitikz#76 Reverts these: circuitikz@6efc2ee circuitikz@352d2bf Then, it carefully builds the anchors without moving the start of the path, and then join it with a leading --.
|
Hi @Rmano , EDIT: Did a closer look to this example. In this case it is ok, because P3 should really be declared as coordinate, not as path. Nevertheless, I am not sure if it does not break some other stuff. Here I posted some other example: https://tex.stackexchange.com/questions/360264/correct-linejoins-at-tikz-to-path |
|
Hi, I understand what you say, but the correct behavior in tikz is to connect the border of the nodes (even if invisible): \documentclass[border=10pt]{standalone}
\usepackage{tikz}
\usetikzlibrary{arrows.meta,positioning,calc}
\begin{document}
\begin{tikzpicture}
\node [](A) at (0,.2) {};
\node [](B) at (2,.2) {};
\node [](C) at (0,0) {};
\node [](D) at (2,0) {};
\draw (A) -- (B);
\draw (C.center) -- (D.center);
\end{tikzpicture}
\end{document}For this Forcing the behavior of substitute the start and end node with the center to the center of nodes has as the effect of
So I think it's a good thing to do (I created an embedded rollback point at 1.1.2 for backward compatibility on purpose); the original code is now correctly rendered by TikZ standard (and it's easily fixable by changing To explain point 1 here: this code \begin{tikzpicture}[every node/.style={inner sep=1cm}]
\node [draw](A) at (0,0) {A};
\node [draw](B) at (4,2) {B};
\draw (A) to[R] (B);
\end{tikzpicture}renders as in 1.1.2 and previous now --- you can easily have the old behavior (if you really wanted it) with using |
Thanks, I will study this. |
|
Notice that in the example posted above now it works as should (in my opinion): \begin{tikzpicture}[very thick]
\draw (2,2) node[draw=red](A){};
\draw (2,2) coordinate(B);
\draw (0,0) to[esource](0,2) to[esource](A) to[esource] ++(2,-2);
\begin{scope}[xshift=4.5cm]
\draw (2,2) coordinate(B);
\draw (0,0) to[esource](0,2) to[esource] (B) to[esource] ++(2,-2);
\end{scope}
\end{tikzpicture}The line joins are correct and the landing/starting positions from the node are the expected ones. |






There is a bug, if a node is used as a starting point of a path without defining an explicit anchor:
There appear anwanted lines(between emitter of T2 and R1 as well as from LO- to R2):

The text was updated successfully, but these errors were encountered: