Skip to content

Line display and visual separation #34

@danyill

Description

@danyill

One of the difficult challenges is to improve the line routing algorithm for the communication editor.

Open-source heuristic algorithms to do this are available but are a significant amount of work to implement.

I include some information on an algorithm used in Inkscape which I think has some potential but more mockups and discussion is required.

The library is the adaptagrams one, implemented in C++ https://github.com/mjwybrow/adaptagrams
There is a WASM based compilation to Javascript but I think it would be too heavy to use in our project and there are license issues as adaptagrams is GPL.

I am quite keen to have a go at implementing the algorithm or something like it when time allows. I've spent some tens of hours reading the code and implementing parts of it (I was initially very confused). Happy to discuss if this is of interest to anyone.

In particular I think:

  • We should have no more than an in and an out port per IED per side. The number of ports will constrain the algorithms performance.
  • The algorithm must space out lines so they are easy for the user to see, distinguish and click.
  • We should not target perfection but the ability to multi-select a few IEDs and show the lines in visually pleasing manner would be a good outcome.
  • Ideally we may want to treat IEDs and labels as obstacles but not worry about the SLD (too hard IMHO).

Resources

Original Wybrow algorithm

orthogonal_connector_routing.pdf

Improved over Wybrow for large diagrams:

edge-routing.pdf

Still more improved

marriott-diagrams-2014.pdf

No known open source implementation but appears to be a substantial improvement

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions