Advanced Features > Link Shape Policies > Orthogonal Link Shape Policy > Chaining of Link Shape Policies

It is possible to apply multiple link shape policies to the same link, if these policies do not contradict each other. In particular, it is possible to chain an orthogonal link shape policy with a crossing link shape policy, as illustrated in the following code:

policy = new IlvOrthogonalLinkShapePolicy();
policy.setChildPolicy(new IlvCrossingLinkShapePolicy());
link.setLinkShapePolicy(policy);

In this case, the orthogonal policy first forces the link to an orthogonal shape, and then the crossing policy calculates the display of the link crossings.