Mindmap - ancoragem condicional para o nível 2

Mindmap - ancoragem condicional para o nível 2

Essesolução bonita da cfr permite usaros nós no nível 2 para estilizá-los como anotação.

Abordagem muito diferente daEsteouAqueleonde nós extras são adicionadosforao próprio mapa mental.

Porém estou lutando com a âncora level 2para que fique mais harmonioso como o seguinte (trapaceei na pintura para mostrar o resultado esperado).

Imagino que a ideia seja ter uma âncora móvel ( eastpara level 2nós do lado esquerdo, westâncora nos nós do lado direito do mapa mental? mais granularidade, inclinada para seguir o caminho do nível 1? Não sei o que poderia ser viável) . Dito isto, não consigo ter um ponto de partida sobre como diferenciar os casos :/

insira a descrição da imagem aqui

% original MWE from cfr.
\documentclass[border=10pt]{standalone}
\usepackage[condensed,math]{iwona}
\usepackage[T1]{fontenc}
\usepackage[dvipsnames,svgnames]{xcolor}
\usepackage{tikz}

\usetikzlibrary{mindmap,trees,positioning}
\tikzset{
  set angles for level/.style={level #1/.append style={sibling angle=360/(\the\tikznumberofchildren+4)}},
  level/.append code={
    \edef\tempa{#1}\edef\tempb{1}
    \ifx\tempa\tempb\tikzset{level 1/.append style={sibling angle=360/\the\tikznumberofchildren}}\else\tikzset{set angles for level=#1}\fi},
%     set angles for level=#1},% solution 1
  non-concept/.style={
    rectangle,
    text width=15em,
    text=black,
    align=left,
    font=\large,
  },
  cncc/.style={ edge from parent path={ (\tikzparentnode.#1) to [bend right] (\tikzchildnode)   } },
}
\begin{document}
\begin{tikzpicture}[level 1 concept/.append style={font=\large, level distance=150}]
  \path[mindmap, concept color=Aquamarine, grow cyclic]
  node[concept] {ICF Core \\ Competencies}%[clockwise from=45]
  child[concept color=blue!20!white] {
    node[concept] (def) {Setting the Foundation}
    child[level distance=5cm] { node[non-concept] {Meeting Ethical Guidelines \& Professional Standards} edge from parent[cncc=west] }
    child[level distance=5cm] { node[non-concept] {Establishing the Coaching Agreement} edge from parent[cncc=west] }
  }
  child[concept color=Pink]  { node[concept] {Co-creating the \\ Relationship} 
    child[level distance=5cm] { node[non-concept] {Establishing Trust \& Intimacy with the Client} edge from parent[cncc=south] }
    child[level distance=5cm] { node[non-concept] {Coaching Presence} edge from parent[cncc=south] } 
  }
  child[concept color=Bisque]{ node[concept] {Communicating Effectively} 
    [clockwise from=0]
    child[level distance=5cm] { node[non-concept] {Establishing Trust \& Intimacy with the Client} edge from parent[cncc=east] }
    child[level distance=5cm] { node[non-concept] {Coaching Presence} edge from parent[cncc=east] }    
    child[level distance=5cm] { node[non-concept] {Coaching Presence} edge from parent[cncc=south] }    
  }
  child[concept color=Cyan]  { node[concept] {Facilitating Learning \& Results} 
    [clockwise from=90]
    child[level distance=5cm] { node[non-concept] {Establishing Trust \& Intimacy with the Client} edge from parent[cncc=west] }
    child[level distance=5cm] { node[non-concept] {Coaching Presence} edge from parent[cncc=west] } 
    child[level distance=5cm] { node[non-concept] {Coaching Presence} edge from parent[cncc=north] } 
    child[level distance=5cm] { node[non-concept] {Coaching Presence} edge from parent[cncc=east] }     
  };
\end{tikzpicture}
\end{document}

Responder1

Se você deseja alinhar perfeitamente o caminho com as entradas do nível 2. Você precisa ajustá-los manualmente. Porque depende da largura do texto, tamanho mínimo e âncoras das entradas. Eu adiciono dois argumentos no non-concept/.stylee mais um argumento no arquivo cncc/.style. Em non-concept/.style, o primeiro argumento nº 1 é para especificar a largura do texto e o segundo argumento nº 2 é para especificar o tamanho mínimo do nó de nível 2. Em cncc/.style, o primeiro argumento nº 1 ainda é a âncora do nó pai de nível 1, o segundo argumento nº 2 é a âncora do nó filho de nível 2. Também adiciono quadros a cada entrada de nível 2, para ver o efeito explicitamente (comente que drawnão non-concept/.stylecriará quadros). Você pode ajustar esses argumentos para tornar o número próximo do resultado esperado em sua pergunta. Além disso, em alguns casos, pode ser necessário usar shiftpara ajustar manualmente os locais da entrada de nível 2 (por exemplo, child[shift={(2.5cm,-3cm)},level distance=5cm]).

Aqui está o código:

% original MWE from cfr.
\documentclass[border=10pt]{standalone}
\usepackage[condensed,math]{iwona}
\usepackage[T1]{fontenc}
\usepackage[dvipsnames,svgnames]{xcolor}
\usepackage{tikz}

\usetikzlibrary{mindmap,trees,positioning}
\tikzset{
set angles for level/.style={level #1/.append style={sibling angle=360/(\the\tikznumberofchildren+4)}},
level/.append code={
\edef\tempa{#1}\edef\tempb{1}%
\ifx\tempa\tempb\tikzset{level 1/.append style={sibling angle=360/\the\tikznumberofchildren}}\else\tikzset{set angles for level=#1}\fi},
%     set angles for level=#1},% solution 1
non-concept/.style 2 args={
draw, % comment to make no frames
minimum size=#2,
text width=#1,
text=black,
align=left,
font=\large,
},
cncc/.style n args={2}{ edge from parent path={ (\tikzparentnode.#1) to [bend right] (\tikzchildnode.#2)   } },
}
\begin{document}
\begin{tikzpicture}[level 1 concept/.append style={font=\large, level distance=150}]
\path[mindmap, concept color=Aquamarine, grow cyclic] 
node[concept] {ICF Core \\ Competencies}%[clockwise from=45]
child[concept color=blue!20!white] {
node[concept] (def) {Setting the Foundation}
child[level distance=5cm] { node[non-concept={14em}{1cm}] {Meeting Ethical Guidelines \& Professional Standards} edge from parent[cncc={west}{north}] }
child[shift={(-2cm,1.5cm)},level distance=5cm] { node[non-concept={12em}{1cm}] {Establishing the Coaching Agreement} edge from parent[cncc={west}{north west}]}
}
child[concept color=Pink] { 
node[concept] {Co-creating the \\ Relationship} 
child[level distance=5cm] { node[non-concept={14em}{1cm}] {Establishing Trust \& Intimacy with the Client} edge from parent[cncc={south}{north west}] }
child[level distance=6cm] { node[non-concept={9em}{0.5cm}] {Coaching Presence} edge from parent[cncc={south}{south west}] } 
}
child[text width=7em,concept color=Bisque]{ node[concept] {Communicating Effectively} [clockwise from=0]
child[shift={(2.5cm,-3cm)},level distance=5cm] { node[non-concept={14em}{1cm}] {Establishing Trust \& Intimacy with the Client} edge from parent[cncc={east}{south west}] }
child[level distance=5cm] { node[non-concept={9em}{0.5cm}] {Coaching Presence} edge from parent[cncc={east}{west}] }    
child[level distance=5cm] { node[non-concept={9em}{0.5cm}] {Coaching Presence} edge from parent[cncc={south}{north west}] }    
}
child[concept color=Cyan]  { node[concept] {Facilitating Learning \& Results} 
[clockwise from=90]
child[level distance=5cm] { node[non-concept={14em}{1cm}] {Establishing Trust \& Intimacy with the Client} edge from parent[cncc={west}{north}] }
child[level distance=5cm] { node[non-concept={8.8em}{0.5cm}] {Coaching Presence} edge from parent[cncc={west}{north east}] } 
child[level distance=5cm] { node[non-concept={8.8em}{0.5cm}] {Coaching Presence} edge from parent[cncc={north}{east}] } 
child[level distance=5cm] { node[non-concept={8.8em}{0.5cm}] {Coaching Presence} edge from parent[cncc={east}{south east}] }     
};
\end{tikzpicture}
\end{document}

insira a descrição da imagem aqui

informação relacionada