5

How can a bold arrow be bent correctly?

I use the following code, but it looks horrible:

\tikzset{%
    thick arrow/.style={
    -{Triangle[angle=90:1pt 1]},
    line width=1.0cm, 
    draw=gray
    }
}

\tikzstyle{software} = [draw, text width=10em, minimum height=6em, text centered, line width=1pt, color=mydarkblue, fill=mylightgray, text=mydarkblue, font=\normalsize\bf\sffamily]

\centering


\begin{tikzpicture}[node distance = 6em]

\node[software](softA) {Software A};
\node[software](softB)[left = of softA] {Software B};


\draw [thick arrow] ($(softB.north)+(1,1em)$) [bend left=45] to ($(softA.north)+(-1,1em)$);

\path [decorate,decoration={text along path,
text={|\footnotesize\bfseries\sffamily\color{white}|DATA A},text align=center}] ($(softB.north)+(1,1.5em)$) [bend left] to ($(softA.north)+(-1,1.5em)$);

\draw [thick arrow] ($(softA.south)-(1,1em)$) [bend left=45] to ($(softB.south)+(1,-1em)$);

\path [decorate,decoration={text along path, text={|\footnotesize\bfseries\sffamily\color{white}|DATA B},text align=center}] ($(softB.south)+(1,-1.5em)$) [bend right=45] to ($(softA.south)+(-1,-1.5em)$);


\end{tikzpicture}

Here is what the code creates: the arrows are very strangely bent and don't look curved properly and uniformly.

It looks like this

egreg
  • 1,121,712
Toby
  • 59
  • "Very strange" is a bit vague. What do you have in mind? They look fine to me! Could you provide a drawing of what you want, or a more precise description? – Clément Jan 11 '17 at 15:41
  • 3
    Does adding \usetikzlibrary{bending} help? (Incidentally, it is always best if you add a \documentclass (article is usually fine), and a minimal preamble with the necessary packages, TikZ libraries and color definitions. It can be a bit tedious to work that out for ourselves sometimes. Ideally we should be able to copy-paste your code into our editor, and compile without having to do any modifications.) – Torbjørn T. Jan 11 '17 at 16:31
  • Using -Triangle[bend, ...] together with @TorbjørnT. may give even better results. That is, mostly it does, but occasionally it doesn't. – cfr Jan 11 '17 at 23:46

1 Answers1

6

I do not know yours \documentclass{...} and \usetikzlibrary{...}. You may want to consider this source where you can add the two rectangles. My code is an adapt of this code.

enter image description here

\documentclass{article}
\usepackage[margin=0.3cm, paperwidth=3.3cm, paperheight=3.3cm]{geometry}
\usepackage{tikz}

\def\arrow{
  (10:1.1) -- (7:1) arc (7:120:1) [rounded corners=.8] --
  (120:0.9) [rounded corners=1] -- (130:1.1) [rounded corners=.8] --
  (120:1.3) [sharp corners] -- (120:1.2) arc (120:5.25:1.2)
  [rounded corners=1] -- (10.4:1.05) -- (8:1.05) -- cycle
}

\tikzset{
  ashadow/.style={opacity=.6, shadow xshift=0.1, shadow yshift=-0.07},
}

\def\arrows[#1]{         
  \begin{scope}[scale=#1]

    \draw[color=gray, left color=gray, right color=gray] [rotate=210] \arrow;

   \draw[color=yellow, left color=yellow, right color=yellow]  [rotate=20] \arrow;
  \end{scope}
}

\begin{document}
\begin{center}
  \begin{tikzpicture}
    \arrows[1];
  \end{tikzpicture}
\end{center}



\end{document}

or you take this example at the link Drawing a diagram of a three-cycle.

Sebastiano
  • 54,118