Link Routing

How can I make the link routing (AvoidsNodes) take nodes that are children of other nodes into account (not members of the Document.Layer). It seems that you have to use GoSubGraph, but that isn’t quite the behavior I want.

I've tried several combinations of work arounds, but the basic fact is I can't figure out how to make it happen. Anyone else run into this problem?
Joe

It sounds like you have subgraphs without using GoSubGraph. Do you want the links routed in between these sub-nodes, or around the parent?

A screenshot might help....

Here is a screenshot. GoSubGraph doesn’t work because I want to be able to reparent between subgraphs and I want the bounds of the subgraph to be fixed (not calculated by the bounds of the children). Every time I tried overriding methods I started to get funky behavior.

What I would really like is a way to maintain the list of collidable nodes myself, rather than have to rely on them being in the base document layer or a node of a certain type. Certainly seems like something that could be handled with a virtual method in the Document class.
Thanks for any suggestions.
Joe

The SwimmingPool class in Demo1 does what you want in terms of subgraph behavior.

but the bad news is that AvoidsNodes only works at the top level, not in subgraphs.
If you really want AvoidsNodes, you'll have to implement the swimlanes as a background object.

Jake,

I will look at it. What are the chances of getting a new Document virtual method GetAvoidableNodes()? That would let me manage the nodes that I want the links to avoid, regardless of where they are at in the subgraph hierarchy. Is would complement the current IsAvoidable method.
Thanks,
Joe

You can override GoDocument.IsAvoidable, but you can’t do that on a per-link basis. And there is caching of the internal “avoidable structures” that would make per-link-avoidable-nodes way too slow.