[Tex/LaTex] TikZ – flowchart nodes alignment

diagramsnodestikz-pgf

I'm trying to code a flowchart and I'm almost there, but I can't get the nodes properly aligned.

Lets say my flowchart has 3 columns: the nodes of the first are ok, but I need the nodes from 2nd and 3rd to be aligned as well.

My code and a picture of my actual drawing:

\begin{tikzpicture}[
    node distance = 1cm,  auto,
    status/.style={rectangle, draw, fill=red!10, text width=2.5cm, align=center, rounded corners, minimum height=1cm},
    acao/.style={regular polygon, regular polygon sides=6, draw, text width=2.5cm, align=center},
    decision/.style={diamond, draw, fill=blue!20, text width=2.5cm, align=center, inner sep=0pt},
    block/.style={rectangle, draw, text width=4.5cm, align=center, minimum height=1cm},
    line/.style={draw, -latex'}

  ]

    \node [status] (inicio) {Situação de Emergência};

    \node [block, below=of inicio]  (equipe)  {Equipe de Radiografia};
    \node [acao, below=of equipe] (planejamento) {Planejamento para controlar a Situação};

    \node [decision, below=of planejamento]   (decide) {Situação sob controle?};
    \node [status, node distance = 2cm, right=of decide] (pode) {Situação Normal};
    \node [block, node distance = 2cm, right=of pode] (SPR_ok) {Supervisor de Proteção Radiológica};


    \node [block,    below=of decide] (SPR_fu) {Supervisor de Proteção Radiológica};
    \node [acao, node distance = 2cm, below=of SPR_fu] (planejamento2) {Planejamento para controlar a Situação};
    \node [decision, node distance = 2cm, right=of planejamento2]   (decide2) {Situação sob controle?};
    \node [status, below=of decide2]  (auth)  {Autoridades Competentes};
    \node [status, node distance = 3cm, right=of decide2] (cnen) {Comunicar a CNEN};


    \path [line] (inicio) -- (equipe);
    \path [line] (equipe) -- (planejamento);
    \path [line] (planejamento) -- (decide);
    \path [line] (decide) -- node [near start] {Sim} (pode);
    \path [line] (decide) -- node [near start] {Não} (SPR_fu);
        \path [line] (pode) -- (SPR_ok);
            \path [line] (SPR_ok) -| (cnen);
                \path [line] (SPR_fu) -- (planejamento2);
                    \path [line] (planejamento2) -- (decide2);
                        \path [line] (decide2) -- node [near start] {Sim} (cnen);
                        \path [line] (decide2) -- node [near start] {Não} (auth);
                                            \path [line] (auth) -| (cnen);

\end{tikzpicture}

Actual flowchart

Best Answer

You can use a matrix to place all nodes, and draw lines after that.

\documentclass[tikz]{standalone}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usetikzlibrary{matrix,shapes,arrows}

\begin{document}

\begin{tikzpicture}[
    node distance = 1cm,  auto,
    status/.style={rectangle, draw, fill=red!10, text width=2.5cm, align=center, rounded corners, minimum height=1cm},
    acao/.style={regular polygon, regular polygon sides=6, draw, text width=2.5cm, align=center},
    decision/.style={diamond, draw, fill=blue!20, text width=2.5cm, align=center, inner sep=0pt},
    block/.style={rectangle, draw, text width=4.5cm, align=center, minimum height=1cm},
    line/.style={draw, -latex'}
  ]

    \matrix[column sep=1cm, row sep=1cm]{
    \node [status] (inicio) {Situação de Emergência}; & & \\

    \node [block]  (equipe)  {Equipe de Radiografia}; & & \\
    \node [acao] (planejamento) {Planejamento para controlar a Situação}; & & \\

    \node [decision]   (decide) {Situação sob controle?}; & 
    \node [status] (pode) {Situação Normal}; & 
    \node [block] (SPR_ok) {Supervisor de Proteção Radiológica}; \\


    \node [block] (SPR_fu) {Supervisor de Proteção Radiológica}; & & \\
    \node [acao] (planejamento2) {Planejamento para controlar a Situação}; & 
    \node [decision]   (decide2) {Situação sob controle?}; & 
    \node [status] (cnen) {Comunicar a CNEN}; \\

    & \node [status]  (auth)  {Autoridades Competentes}; &  \\};


    \path [line] (inicio) -- (equipe);
    \path [line] (equipe) -- (planejamento);
    \path [line] (planejamento) -- (decide);
    \path [line] (decide) -- node [near start] {Sim} (pode);
    \path [line] (decide) -- node [near start] {Não} (SPR_fu);
    \path [line] (pode) -- (SPR_ok);
            \path [line] (SPR_ok) -- (cnen);
                \path [line] (SPR_fu) -- (planejamento2);
                    \path [line] (planejamento2) -- (decide2);
                        \path [line] (decide2) -- node [near start] {Sim} (cnen);
                        \path [line] (decide2) -- node [near start] {Não} (auth);
                                            \path [line] (auth) -| (cnen);

\end{tikzpicture}
\end{document}

enter image description here