So far only pair diagrams can be generated from predefined matrices. We need also thread diagrams for real added value over the template based diagrams.
The generated D3-data (just before conversion to a raw-js object) can be input for an algorithm that generates pair diagrams. Strip all properties but the source/target of links, and the title of nodes. Some mapping from node-title to predefined snippets per stitch for thread stitches might help to replace the nodes in the pair diagram. The file sample.js contains an example snippet for ptcptc, note that no stitch has two pins, they sit there to demonstrate the behaviour of pins. Do not connect this example (with substituted node numbers) by merging nodes but by merging links. The merged link starts at the source of the bobbin-link and ends at the target of the start-link as illustrated with the double links in the image below.
So far only pair diagrams can be generated from predefined matrices. We need also thread diagrams for real added value over the template based diagrams.
The generated D3-data (just before conversion to a raw-js object) can be input for an algorithm that generates pair diagrams. Strip all properties but the source/target of links, and the title of nodes. Some mapping from node-title to predefined snippets per stitch for thread stitches might help to replace the nodes in the pair diagram. The file
sample.js
contains an example snippet for ptcptc, note that no stitch has two pins, they sit there to demonstrate the behaviour of pins. Do not connect this example (with substituted node numbers) by merging nodes but by merging links. The merged link starts at the source of the bobbin-link and ends at the target of the start-link as illustrated with the double links in the image below.