Controlling number of segments in GoLink

I want to customize GoLink class to have
1> Minimum nuber of bends in the link
2> bends should be orthogonal ( at 90 degree).
I could achieve <2> by setting Orthogonal property to true.
I could not find a way to fully achieve <2>
But depending on the location of connecting nodes, there will be more unnecessary bends. I think it might be because of having five segments. Can we set it three but keeping orthogonal property intact.
Here figure with green is expected, but sometimes, depending upon the position of nodes at the end of link, we get figure as shown in red. Could you help us to customize this? Is ther a way to implement this kind of behavior?
I am using GoDiagram.Net on Visual Stdio 2005 Visual C# on Windows XP SP2.


I could not find a way to fully achieve <1>

I’m sorry, but I don’t think anyone can see the GIF file you have on your machine. You can put the image up on the web somewhere, or you could mail it to us.

Since I'm not sure what situation you are describing, I'll just say that the general answer for your kind of question is to override GoLink.CalculateStroke to do what you want.

The gif file is with the post above. You can see the links in red and green color. All I wanted was to have only fixed 3 segments in orthogonal GoLink. Can we change from 5 to 3?

Again, I’m sorry, but I and everyone else cannot see the GIF file on your machine. It needs to be on a public web server for us to be able to see it.

Again, I'm not sure what situation you have, but you can override GoLink.CalculateStroke to do what you want. Perhaps you just want to call the base method and then in certain situations remove a couple of points and maybe adjust another one.

I can send you the gif image by e-mail. Please provide your email id. Also I could not find sample source code for calculateStroke. Is it available anywhere?

Send e-mail to GoDiagram.

The default behavior for GoLink.CalculateStroke is quite complicated, because it needs to handle many different kinds of situations.