8

I’m building an application that superficially looks like Visio, so I need to be able to connect objects together with connectors. I want to make the connectors have multiple horizontal and vertical segments and be able to drag the corner of the connectors about and have them ‘intelligently’ add new corners or merge into existing parts of the connector as they are dragged. It would also be nice for connectors to snake around other objects rather than crossing though them.

I figure at the very least thier must be an algorithm for this, and if I’m really lucky some nice c# code!

Any ideas?

  • 1
    The Dunnart constraint based diagram editor does just this. You can find details, including a link to an open-source implementation of the algorithms, here: http://www.csse.monash.edu.au/~mwybrow/dunnart/ -- be aware that these algorithms are not trivial to implement, depending as they do on building a constraint solver. – Rafe Aug 18 '11 at 03:20

1 Answers1

1

Did you know that there is a "Visio SDK" which lets you embed editable Visio drawings in your own app? I was facing a similar problem, and I decided to let Visio solve it for me.

AShelly
  • 32,752
  • 12
  • 84
  • 142