distancias en TikZ

distancias en TikZ

No sé qué números deben configurarse para tener una buena apariencia de este código.

\documentclass{article}
\usepackage{times}
\usepackage[latin1]{inputenc}
\usepackage{tikz}
\usetikzlibrary{shapes,arrows}
\begin{document}
\pagestyle{empty}


% Define block styles
\tikzstyle{decision} = [diamond, draw, fill=white!20, 
text width=4.5em, text badly centered, node distance=3cm, inner sep=0pt]
    \tikzstyle{block} = [rectangle, draw, fill=white!20, 
text width=5em, text centered, rounded corners, minimum height=4em]
    \tikzstyle{line} = [draw, -latex']
    \tikzstyle{cloud} = [draw, ellipse,fill=white!20, node distance=3cm,
minimum height=2em]

    \begin{tikzpicture}[node distance = 2cm, auto]
% Place nodes
    \node [block] (seg) {seg};
    \node [cloud, left of=seg] (ct1) {ct};
%\node [cloud, right of=init] (system) {system};
    \node [block, below of=seg] (smoo) {smoo};
    \node [block, below of=seg] (vol) {vol};
%\node [block, left of=evaluate, node distance=5cm] (update) {update model};
    \node [block, below of=vol] (drr) {drr};
    \node [block, below of=drr] (acqu) {acqu};
    \node [cloud, left of=acqu] (target1) {target};    
    \node [block, below of=acqu] (comp) {comp}; 
    \node [block, below of=comp] (trans) {trans};
    \node [decision, below of=trans] (3d) {3d}; 
    \node [block, below of=3d, node distance=3cm] (cloud) {cloud};     
    \node [block, below of=cloud] (estab) {estab};   
    \node [block, below of=estab] (meas) {meas};
    \node [block, left of=meas] (meas2) {meas}; 
    \node [cloud, below of=meas] (ct2) {ct set};                        
    \node [cloud, below of=meas2] (target2) {target};      
%\node [block, below of=decide, node distance=3cm] (stop) {stop};
% Draw edges
\path [line] (ct1) -- (seg);
\path [line] (seg) -- (smoo);
\path [line] (smoo) -- (vol);
\path [line] (vol) -- (drr);
\path [line] (drr) -- (acqu);
\path [line] (acqu) -- (comp);
\path [line] (comp) -- (trans);
\path [line] (trans) -- (3d);
\path [line] (cloud) -- (3d);
\path [line] (estab) -- (cloud);
\path [line] (meas) -- (estab);
\path [line] (ct2) -- (meas);
\path [line] (target2) -- (meas2);
\path [line] (meas2) |- (cloud);
\path [line] (target2) -- (meas2);
\path [line] (target1) -- (acqu);


\end{tikzpicture}


\end{document}

Respuesta1

Esta es una posible solución donde la propuesta divide un largo diagrama de flujo de arriba hacia abajo, que excede la longitud de la página, en 4 segmentos, que se extienden horizontalmente.

El truco principal es cambiarse below of = xxen right = xx cm of yyel punto que uno quiere romper y luego usar, por ejemplo, draw[line] (acqu.east) -- ++(1cm,0) |- (comp.west); que dice dibujar desde acqu.east 1 cm hacia la derecha, luego verticalmente hacia arriba y gira horizontalmente hacia el comp.west.

ingrese la descripción de la imagen aquí

Código

\documentclass{article}
\usepackage[margin=1in]{geometry}
\usepackage{times}
\usepackage[latin1]{inputenc}
\usepackage{tikz}
\usetikzlibrary{shapes,arrows,positioning}
\begin{document}
\pagestyle{empty}


% Define block styles
\tikzstyle{decision} = [diamond, draw, fill=white!20, 
text width=4.5em, text badly centered, node distance=2cm, inner sep=0pt]
    \tikzstyle{block} = [rectangle, draw, fill=white!20, 
text width=5em, text centered, rounded corners, minimum height=4em]
    \tikzstyle{line} = [draw, -latex']
    \tikzstyle{cloud} = [draw, ellipse,fill=white!20, node distance=2cm,
minimum height=2em]

    \begin{tikzpicture}[node distance = 2cm, auto]
% Place nodes
    \node [block] (seg) {seg};
    \node [cloud, left of=seg] (ct1) {ct};
%\node [cloud, right of=init] (system) {system};
    \node [block, below of=seg] (smoo) {smoo};
    \node [block, below of=smoo] (vol) {vol};
%\node [block, left of=evaluate, node distance=5cm] (update) {update model};
    \node [block, below of=vol] (drr) {drr};
    \node [block, below of=drr] (acqu) {acqu};
    \node [cloud, left of=acqu] (target1) {target};    
    \node [block, right =2cm of seg] (comp) {comp}; 
    \node [block, below of=comp] (trans) {trans};
    \node [decision, below of=trans] (3d) {3d}; 
    \node [block, right = 2cm of comp] (cloud) {cloud};     
    \node [block, below of=cloud] (estab) {estab};   
    \node [block, below of=estab] (meas) {meas};
    \node [block, right = 1cm of meas] (meas2) {meas}; 
    \node [cloud, below of=meas] (ct2) {ct set};                        
    \node [cloud, below of=meas2] (target2) {target};      
%\node [block, below of=decide, node distance=3cm] (stop) {stop};
% Draw edges
\path [line] (ct1) -- (seg);
\path [line] (seg) -- (smoo);
\path [line] (smoo) -- (vol);
\path [line] (vol) -- (drr);
\path [line] (drr) -- (acqu);
\path [line] (acqu.east) -- ++(1cm,0) |- (comp.west);
\path [line] (comp) -- (trans);
\path [line] (trans) -- (3d);
\path [line] (cloud.west) -- ++ (-1cm,0) |- (3d.east);
\path [line] (estab) -- (cloud);
\path [line] (meas) -- (estab);
\path [line] (ct2) -- (meas);
\path [line] (target2) -- (meas2);
\path [line] (meas2) |- (cloud);
\path [line] (target2) -- (meas2);
\path [line] (target1) -- (acqu);
\end{tikzpicture}
\end{document}

información relacionada