ortho-graph - compute orthogonal routing
ortho-graph --file graph_description.yaml
cat graph_description.yaml | ortho-graph
cat yaml/json/perl/xml/dot | translator | ortho-graph --json | visualisation-tool
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
- minimal edge turns
- minimal edge overlap
--json -gives json format as output
--file -graph description file path
The graph description is in YAML format. (https://yaml.org/)
- 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
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
passed as-is to output
user_attributes = { ... }
The output is in JSON format
{"Graph": {"placed nodes": {"A": [0, 0], "B": [0, 3], "D": [3, 0], "C": [0, 6]}}}
| code | description |
|---|---|
| 0 | graph routed ok |
| 2 | wrong number of arguments |
| 10 | invalid graph description |
Thomas Astley 2023
GNU GPL Version 3, see LICENSE.txt file