Diagram connector algorithm
Asked Answered
L

1

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?

Leastwise answered 17/8, 2011 at 15:9 Comment(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: 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.Scramble
E
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.

Elam answered 13/12, 2011 at 1:33 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.