ternary connector - modelint/flatland-model-diagram-editor GitHub Wiki
A ternary connector is nothing more than a binary connector with a third node attached between the two other nodes. So we use the same specification, but with an optional ternary stem tacked on the end of the p stem like so:
nodes
Aircraft 1,1
Pilot 1,3
Flight 2,2
connectors
-R1 : +/1 r|Aircraft : +/1 l*|Pilot, b|Flight
The ternary stem is specified just like any other stem. It never uses a floating anchor, however. Also the ternary stem cannot bend, so it always forms a straight line to meet the binary connector. Its placement specification is always preceded by a comma and a space right after the p stem.
Here’s an example where a ternary connector is formed as part of a bending binary connector.
nodes
Aircraft 3,1
Pilot 1,4
Flight 4,3
connectors
-R1.3 : +/1 r|Aircraft : -/1 l|Pilot, b|Flight : L2 L2 L3R+1
When attaching a third node, make sure that the ternary stem will meet up with the binary connection. In this case we place the ternary node Flight
above and attach to its bottom face, so it works. Just as with any stem, you can move along the face using anchor points. In this example we have centered the ternary stem on the bottom face and it connects nicely. Had we changed our 3rd bend specification rut from R+1 to R-2 you can see that the ternary stem would have been left hanging.
We can now present the full syntax for binary/ternary connectors as follows:
<indent><side>[.<bend_num>]?<connector_name> : <t_stem> : <p_stem>[, <ternary_stem>[ : <bend_place> ...]?