Fazendo o caminho curvo parecer paralelo em relação a um nó TikZ

Fazendo o caminho curvo parecer paralelo em relação a um nó TikZ

Eu tenho um diagrama que se parece com este:

insira a descrição da imagem aqui

Tenho nós alinhados horizontalmente be cem relação aos seus centros, mas isso causa um problema com o caminho curvo zdevido ao fato de ele não ser mais simétrico.

Como posso fazer com que as extremidades do caminho zfiquem paralelas entre si e o rótulo se alinhe com node a, como no diagrama abaixo, mantendo be calinhado centralmente?

insira a descrição da imagem aqui

Código:

\documentclass[border=3mm]{standalone}
\usepackage{tikz}
\usetikzlibrary{arrows,positioning,calc}
\begin{document}
\begin{tikzpicture}[auto,node distance=2cm, align=center,
block/.style={rectangle,draw, thick,inner sep=2pt,minimum size=10mm},
paths/.style={->, very thick, >=stealth'},
curve/.style={<->, thick, >=stealth', bend left=270, looseness=2, distance = 60mm},
]

%Draw, place, and label variables
\node [block] (a) {a};
\node [block] (b) [above right=of a] {bbbbbbbbbb};
\node [block] (c) [below= 4cm of b.south, anchor = north] {ccc};
%\node [block] (c) [below right= of a] {ccc}; % ideal curved path between b and c here, but block not centered

% Draw paths and label them
\draw [paths] (a) to node {x} (b);
\draw [paths] (a) to node [swap] {y} (c);
\draw [curve] (b) to node [swap,midway] {z} (c);
\end{tikzpicture}
\end{document}

Responder1

O exemplo a seguir primeiro coloca o nó zde "z" à esquerda do nó apara obter "z" na mesma linha de base de "a". Então a curva é dividida em duas partes, do nó b.westpara z.easte z.eastpara c.west. Os componentes .westgarantem .eastos pontos inicial e final corretos. Os ângulos inicial e final das partes da curva são especificados pelas opções ine outpelo operador de caminho to. Isso requer biblioteca topaths:

\documentclass[border=3mm]{standalone}
\usepackage{tikz}
\usetikzlibrary{arrows,positioning,calc,topaths}
\begin{document}
\begin{tikzpicture}[auto,node distance=2cm, align=center,
  block/.style={rectangle,draw, thick,inner sep=2pt,minimum size=10mm},
  paths/.style={->, very thick, >=stealth'},
  curve/.style={<->, thick, >=stealth'},
]

%Draw, place, and label variables
\node [block] (a) {a};
\node [block] (b) [above right=of a] {bbbbbbbbbb};
\node [block] (c) [below= 4cm of b.south, anchor = north] {ccc};
%\node [block] (c) [below right= of a] {ccc}; % ideal curved path between b
%and c here, but block not centered

% Draw paths and label them
\draw [paths] (a) to node {x} (b);
\draw [paths] (a) to node [swap] {y} (c);
\node [xshift=-3em, anchor=base east] (z) at (a.base west) {z};
\draw [curve] (b.west) to[out=180, in=90] (z.east)
                  to[out=-90, in=180] (c.west);
\end{tikzpicture}
\end{document}

Resultado

E uma variante, onde as conexões retas (a) -- (b)e (a) -- (c)são conectadas nos cantos. Neste caso, pode parecer melhor.

\documentclass[border=3mm]{standalone}
\usepackage{tikz}
\usetikzlibrary{arrows,positioning,calc,topaths}
\begin{document}
\begin{tikzpicture}[auto,node distance=2cm, align=center,
  block/.style={rectangle,draw, thick,inner sep=2pt,minimum size=10mm},
  paths/.style={->, very thick, >=stealth'},
  curve/.style={<->, thick, >=stealth'},
]

%Draw, place, and label variables
\node [block] (a) {a};
\node [block] (b) [above right=of a] {bbbbbbbbbb};
\node [block] (c) [below= 4cm of b.south, anchor = north] {ccc};
%\node [block] (c) [below right= of a] {ccc}; % ideal curved path between b
%and c here, but block not centered

% Draw paths and label them
\draw [
  paths,
  shorten <=-.7\pgflinewidth,
] (a.north east) to node {x} (b.south west);
\draw [
  paths,
  shorten <=-.7\pgflinewidth,
] (a.south east) to node [swap] {y} (c.north west);
\node [xshift=-3em, anchor=base east] (z) at (a.base west) {z};
\draw [curve] (b.west) to[out=180, in=90] (z.east)
                  to[out=-90, in=180] (c.west);
\end{tikzpicture}
\end{document}

Cantos da variante de resultado

informação relacionada