Skip to content

nkh/ortho-graph

 
 

Repository files navigation

NAME

ortho-graph - compute orthogonal routing

Simple Graph

SYNOPSIS

ortho-graph --file graph_description.yaml

cat graph_description.yaml | ortho-graph 

cat yaml/json/perl/xml/dot | translator | ortho-graph --json | visualisation-tool

DESCRIPTION

Given a graph description, compute orthogonal routes between the graphs nodes.

A graph ‘G’ is a set of nodes 'n' connected by directional edges 'e': G = (n, e)

An edge is either:

  • uni-directional, from one node to another
  • bi-directional, between two nodes
  • from one node to itself

There can be multiple edges:

  • between each pair of nodes
  • from a node to itself

Computation

  • minimal edge turns
  • minimal edge overlap

OPTIONS

--json -gives json format as output

--file -graph description file path

INPUT

The graph description is in YAML format. (https://yaml.org/)

node

  • no coordinates, default case
  • specify node coordinates
  • computed given another node as origin and direction
  • node shape
    • size width/ length
    • size computed based on label

edge

A: { B, C, ... }

Defines edges AB, AC, ...

  • uni-directional, from one node to another
  • bi-directional, between two nodes
  • from one node to itself
  • edge start, end

Multiple edges:

  • for each pair of nodes
  • for each node

user attributes

passed as-is to output

user_attributes = { ... }

OUTPUT

The output is in JSON format

{"Graph": {"placed nodes": {"A": [0, 0], "B": [0, 3], "D": [3, 0], "C": [0, 6]}}}

EXIT STATUS

code description
0 graph routed ok
2 wrong number of arguments
10 invalid graph description

DOCUMENTATION

EXAMPLES

COPYRIGHT AND LICENSE

Thomas Astley 2023

GNU GPL Version 3, see LICENSE.txt file

SEE ALSO

Orthogonal Layouts Lecture

Lecture

Graph::Easy

cpan

documentation

Orthogonal Connector Routing

module

Orthogonal edge router

documentation

Orthogonal Layout Algorithm Research papers

paper 1

paper 2

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.5%
  • Shell 0.5%