4
\documentclass{article}
\usepackage[shellescape]{gmp}
\begin{document}

\begin{mpost}[use,mpsettings={input metauml;}]
Class.A("A")()();
Class.B("B")()();
Class.C("C")()();
Class.D("D")()();

B.n = A.s + (0,-80);
C.w = D.w + (-80,0);
A.s = C.w + (50,40);
drawObjects(A, B, C, D);
clink(association)(A,B);
clink(association)(C,D);
\end{mpost}
\end{document}

The ouput I get:
what I get

As you can see lines A--B and C--D intersect.

I really need something like this:

what I need

How can I do that?

5
+50

Take a look at section 8 and especially subsection 8.5 of the metauml manual.

Code

\documentclass{article}
\usepackage[shellescape]{gmp}
\begin{document}

\begin{mpost}[use,mpsettings={input metauml;}]
Class.A("A")()();
Class.B("B")()();
Class.C("C")()();
Class.D("D")()();

B.n = A.s + (0,-80);
C.w = D.w + (-80,0);
A.s = C.w + (50,40);
drawObjects(A, B, C, D);
clink(association)(A,B);
%clink(association)(C,D);
path cool;
cool := C.e -- C.c+(38,0) .. C.c+(40,2) .. D.c+(-38,0) -- D.w;
link(association)(cool);
\end{mpost}
\end{document}

Output

Output of posted code

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.