-
Notifications
You must be signed in to change notification settings - Fork 226
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feature] Ability to specify twisted wires #3
Comments
I made a quick mockup how this could be visually achieved with hacking a little bit on the intermediate files graphviz can produce. This is similar to the solution I proposed in #120 and in my branch https://github.com/SnowMB/WireViz/tree/banded_wires_pydot. I switched the order of wire row and text row for the 2nd wire in the twisted pairs so I can draw them overlapping without touching the text. I added a few points to the splines that make up the wire inside of the table to produce the twisting effect. This could be tweaked a little bit more to make a better looking. Actually twisting them (switching which wire is drawn in front for each crossing) is way harder because they have to be split in peaces and each section has to be drawn in a different order. Hacked file
Run this file with: neato -n2 tutorial02.gv -Tpng > test.png |
@SnowMB It might take some time to get this, or the banded stripes from #120 fully implemented and merged, but I love seeing the results of your GraphViz hackery! Regarding the definition of the twisted pairs:
or, as was suggested somewhere, even allow adding additional attributes to each pair, such as a twist rate...
You probably wouldn't render the actual difference in twist rates, but it might be a reasonable parameter to include. Question for the EEs: |
I thought about this a little bit more and actually it's not that hard. The only problem I'm facing right now is that the spliced wire has a noticable black mark where the 2 sections meet. @formatc1702 I really like this project. I'm looking forward to play with the 0.2 release! Maybe after that we can start discussing some fundamental changes that would be needed for my proposal. Feel free to message me when you're ready. Then I'm willing to put in the work in to rebase my branch on the latest changes. So long I'm just using the issues / pr as documentation for my ideas 😉 |
Sounds good. |
Sure. Here you go: graph G {
outputorder=nodesfirst;
rankdir=LR;
graph [bb="0,0,1031,280", bgcolor=white, fontname=arial, nodesep="0.33", rankdir=LR, ranksep=2];
node [fillcolor=white, fontname=arial, label="\N", shape=record, style=filled];
edge [fontname=arial, style=bold];
X1 [height="3.1944", label=<<table border="0" cellspacing="0" cellpadding="0"><tr><td><table border="0" cellspacing="0" cellpadding="3" cellborder="1"><tr><td balign="left">X1</td></tr></table></td></tr><tr><td><table border="0" cellspacing="0" cellpadding="3" cellborder="1"><tr><td balign="left">Stewart Connector SS-37000-002</td><td balign="left">male</td><td balign="left">8-pin</td></tr></table></td></tr><tr><td><table border="0" cellspacing="0" cellpadding="3" cellborder="1"><tr><td>DA+</td><td port="p1r">1</td></tr><tr><td>DA-</td><td port="p2r">2</td></tr><tr><td>DB+</td><td port="p3r">3</td></tr><tr><td>DC+</td><td port="p4r">4</td></tr><tr><td>DC-</td><td port="p5r">5</td></tr><tr><td>DB-</td><td port="p6r">6</td></tr><tr><td>DD+</td><td port="p7r">7</td></tr><tr><td>DD-</td><td port="p8r">8</td></tr></table></td></tr></table>>, margin=0, pos="144.5,133", shape=none, width="4.0139"];
W1 [height="3.8889", label=<<table border="0" cellspacing="0" cellpadding="0"><tr><td><table border="0" cellspacing="0" cellpadding="3" cellborder="1"><tr><td colspan="4">W1</td></tr><tr><td balign="left">CAT5e</td><td balign="left">8x</td><td balign="left">24 AWG</td><td balign="left">1 m</td></tr></table></td></tr><tr><td> </td></tr><tr><td><table border="0" cellspacing="0" cellborder="0"><tr><td>X1:1</td><td>WHGN</td><td>X2:3</td></tr><tr><td colspan="3" border="0" cellspacing="0" cellpadding="0" port="w1" height="6"></td></tr><tr><td colspan="3" border="0" cellspacing="0" cellpadding="0" port="w2" height="6"></td></tr><tr><td>X1:2</td><td>GN</td><td>X2:6</td></tr><tr><td>X1:3</td><td>WHOG</td><td>X2:1</td></tr><tr><td colspan="3" border="0" cellspacing="0" cellpadding="0" port="w3" height="6"></td></tr><tr><td colspan="3" border="0" cellspacing="0" cellpadding="0" port="w4" height="6"></td></tr><tr><td>X1:4</td><td>OG</td><td>X2:7</td></tr><tr><td>X1:5</td><td>WHBU</td><td>X2:8</td></tr><tr><td colspan="3" border="0" cellspacing="0" cellpadding="0" port="w5" height="6"></td></tr><tr><td colspan="3" border="0" cellspacing="0" cellpadding="0" port="w6" height="6"></td></tr><tr><td>X1:6</td><td>BU</td><td>X2:2</td></tr><tr><td>X1:7</td><td>WHBN</td><td>X2:4</td></tr><tr><td colspan="3" border="0" cellspacing="0" cellpadding="0" port="w7" height="6"></td></tr><tr><td colspan="3" border="0" cellspacing="0" cellpadding="0" port="w8" height="6"></td></tr><tr><td>X1:8</td><td>BN</td><td>X2:5</td></tr><tr><td> </td></tr></table></td></tr></table>>, margin=0, pos="515.5,140", shape=box, style="", width="2.2917"];
X2 [height="3.1944", label=<<table border="0" cellspacing="0" cellpadding="0"><tr><td><table border="0" cellspacing="0" cellpadding="3" cellborder="1"><tr><td balign="left">X2</td></tr></table></td></tr><tr><td><table border="0" cellspacing="0" cellpadding="3" cellborder="1"><tr><td balign="left">Stewart Connector SS-37000-002</td><td balign="left">male</td><td balign="left">8-pin</td></tr></table></td></tr><tr><td><table border="0" cellspacing="0" cellpadding="3" cellborder="1"><tr><td port="p1l">1</td><td>DB+</td></tr><tr><td port="p2l">2</td><td>DB-</td></tr><tr><td port="p3l">3</td><td>DA+</td></tr><tr><td port="p4l">4</td><td>DD+</td></tr><tr><td port="p5l">5</td><td>DD-</td></tr><tr><td port="p6l">6</td><td>DA-</td></tr><tr><td port="p7l">7</td><td>DC+</td></tr><tr><td port="p8l">8</td><td>DC-</td></tr></table></td></tr></table>>, margin=0, pos="886.5,137", shape=none, width="4.0139"];
X1:p2r -- X2:p6l [penwidth="4.0", pos="289.000,168.000 353.020,168.000 368.980,184.500 433.000,184.500 466.000,184.500 490.750,194.500 515.500,194.500", wv_wire=1];
X1:p2r -- X2:p6l [color="#00ff00", penwidth="3.0", pos="289.000,168.000 353.020,168.000 368.980,184.500 433.000,184.500 466.000,184.500 490.750,194.500 515.500,194.500", wv_wire=1];
X1:p1r -- X2:p3l [penwidth="4.0", pos="289.000,191.000 353.060,191.000 368.940,197.000 433.000,197.000 466.000,197.000 490.750,187.000 515.500,187.000 540.250,187.000 565.000,197.000 598.000,197.000 665.460,197.000 674.540,149.000 742.000,149.000", wv_wire=0];
X1:p1r -- X2:p3l [color="#ffffff", penwidth="3.0", pos="289.000,191.000 353.060,191.000 368.940,197.000 433.000,197.000 466.000,197.000 490.750,187.000 515.500,187.000 540.250,187.000 565.000,197.000 598.000,197.000 665.460,197.000 674.540,149.000 742.000,149.000", wv_wire=0];
X1:p1r -- X2:p3l [color="#00ff00", penwidth="3.0", pos="289.000,191.000 353.060,191.000 368.940,197.000 433.000,197.000 466.000,197.000 490.750,187.000 515.500,187.000 540.250,187.000 565.000,197.000 598.000,197.000 665.460,197.000 674.540,149.000 742.000,149.000", style=dashed, wv_wire=0];
X1:p2r -- X2:p6l [penwidth="4.0", pos="515.500,194.500 540.250,194.500 565.000,184.500 598.000,184.500 674.190,184.500 665.810,79.000 742.000,79.000", wv_wire=1];
X1:p2r -- X2:p6l [color="#00ff00", penwidth="3.0", pos="515.500,194.500 540.250,194.500 565.000,184.500 598.000,184.500 674.190,184.500 665.810,79.000 742.000,79.000", wv_wire=1];
X1:p4r -- X2:p7l [penwidth="4.0", pos="289.000,121.000 353.000,121.000 369.000,134.500 433.000,134.500 466.000,134.500 490.750,144.500 515.500,144.500", wv_wire=3];
X1:p4r -- X2:p7l [color="#ff8000", penwidth="3.0", pos="289.000,121.000 353.000,121.000 369.000,134.500 433.000,134.500 466.000,134.500 490.750,144.500 515.500,144.500", wv_wire=3];
X1:p3r -- X2:p1l [penwidth="4.0", pos="289.000,145.000 353.010,145.000 368.990,147.000 433.000,147.000 466.000,147.000 490.750,137.000 515.500,137.000 540.250,137.000 565.000,147.000 598.000,147.000 665.460,147.000 674.540,195.000 742.000,195.000", wv_wire=2];
X1:p3r -- X2:p1l [color="#ffffff", penwidth="3.0", pos="289.000,145.000 353.010,145.000 368.990,147.000 433.000,147.000 466.000,147.000 490.750,137.000 515.500,137.000 540.250,137.000 565.000,147.000 598.000,147.000 665.460,147.000 674.540,195.000 742.000,195.000", wv_wire=2];
X1:p3r -- X2:p1l [color="#ff8000", penwidth="3.0", pos="289.000,145.000 353.010,145.000 368.990,147.000 433.000,147.000 466.000,147.000 490.750,137.000 515.500,137.000 540.250,137.000 565.000,147.000 598.000,147.000 665.460,147.000 674.540,195.000 742.000,195.000", style=dashed, wv_wire=2];
X1:p4r -- X2:p7l [penwidth="4.0", pos="515.500,144.500 540.250,144.500 565.000,134.500 598.000,134.500 668.400,134.500 671.600,56.000 742.000,56.000", wv_wire=3];
X1:p4r -- X2:p7l [color="#ff8000", penwidth="3.0", pos="515.500,144.500 540.250,144.500 565.000,134.500 598.000,134.500 668.400,134.500 671.600,56.000 742.000,56.000", wv_wire=3];
X1:p6r -- X2:p2l [penwidth="4.0", pos="289.000,75.000 353.010,75.000 368.990,84.500 433.000,84.500 466.000,84.500 490.750,94.500 515.500,94.500", wv_wire=5];
X1:p6r -- X2:p2l [color="#0066ff", penwidth="3.0", pos="289.000,75.000 353.010,75.000 368.990,84.500 433.000,84.500 466.000,84.500 490.750,94.500 515.500,94.500", wv_wire=5];
X1:p5r -- X2:p8l [penwidth="4.0", pos="289.000,98.000 353.000,98.000 369.000,97.000 433.000,97.000 466.000,97.000 490.750,87.000 515.500,87.000 540.250,87.000 565.000,97.000 598.000,97.000 668.040,97.000 671.960,33.000 742.000,33.000", wv_wire=4];
X1:p5r -- X2:p8l [color="#ffffff", penwidth="3.0", pos="289.000,98.000 353.000,98.000 369.000,97.000 433.000,97.000 466.000,97.000 490.750,87.000 515.500,87.000 540.250,87.000 565.000,97.000 598.000,97.000 668.040,97.000 671.960,33.000 742.000,33.000", wv_wire=4];
X1:p5r -- X2:p8l [color="#0066ff", penwidth="3.0", pos="289.000,98.000 353.000,98.000 369.000,97.000 433.000,97.000 466.000,97.000 490.750,87.000 515.500,87.000 540.250,87.000 565.000,97.000 598.000,97.000 668.040,97.000 671.960,33.000 742.000,33.000", style=dashed, wv_wire=4];
X1:p6r -- X2:p2l [penwidth="4.0", pos="515.500,94.500 540.250,94.500 565.000,84.500 598.000,84.500 675.920,84.500 664.080,172.000 742.000,172.000", wv_wire=5];
X1:p6r -- X2:p2l [color="#0066ff", penwidth="3.0", pos="515.500,94.500 540.250,94.500 565.000,84.500 598.000,84.500 675.920,84.500 664.080,172.000 742.000,172.000", wv_wire=5];
X1:p8r -- X2:p5l [penwidth="4.0", pos="289.000,29.000 353.080,29.000 368.920,34.500 433.000,34.500 466.000,34.500 490.750,44.500 515.500,44.500", wv_wire=7];
X1:p8r -- X2:p5l [color="#895956", penwidth="3.0", pos="289.000,29.000 353.080,29.000 368.920,34.500 433.000,34.500 466.000,34.500 490.750,44.500 515.500,44.500", wv_wire=7];
X1:p7r -- X2:p4l [penwidth="4.0", pos="289.000,52.000 353.040,52.000 368.960,47.000 433.000,47.000 466.000,47.000 490.750,37.000 515.500,37.000 540.250,37.000 565.000,47.000 598.000,47.000 670.790,47.000 669.210,125.000 742.000,125.000", wv_wire=6];
X1:p7r -- X2:p4l [color="#ffffff", penwidth="3.0", pos="289.000,52.000 353.040,52.000 368.960,47.000 433.000,47.000 466.000,47.000 490.750,37.000 515.500,37.000 540.250,37.000 565.000,47.000 598.000,47.000 670.790,47.000 669.210,125.000 742.000,125.000", wv_wire=6];
X1:p7r -- X2:p4l [color="#895956", penwidth="3.0", pos="289.000,52.000 353.040,52.000 368.960,47.000 433.000,47.000 466.000,47.000 490.750,37.000 515.500,37.000 540.250,37.000 565.000,47.000 598.000,47.000 670.790,47.000 669.210,125.000 742.000,125.000", style=dashed, wv_wire=6];
X1:p8r -- X2:p5l [penwidth="4.0", pos="515.500,44.500 540.250,44.500 565.000,34.500 598.000,34.500 671.210,34.500 668.790,102.000 742.000,102.000", wv_wire=7];
X1:p8r -- X2:p5l [color="#895956", penwidth="3.0", pos="515.500,44.500 540.250,44.500 565.000,34.500 598.000,34.500 671.210,34.500 668.790,102.000 742.000,102.000", wv_wire=7];
} The wire distances could be tweaked a little bit more, so the image does not look as cluttered, but since I'm doing this by hand for now it's very time consuming to try different parameters. Something to do later when there's an implementation. |
Sorry, there was a misunderstanding. |
Ah of course. Here ya go graph G {
outputorder=nodesfirst;
rankdir=LR;
graph [bb="0,0,1031,280", bgcolor=white, fontname=arial, nodesep="0.33", rankdir=LR, ranksep=2];
node [fillcolor=white, fontname=arial, label="\N", shape=record, style=filled];
edge [fontname=arial, style=bold];
X1 [height="3.1944", label=<<table border="0" cellspacing="0" cellpadding="0"><tr><td><table border="0" cellspacing="0" cellpadding="3" cellborder="1"><tr><td balign="left">X1</td></tr></table></td></tr><tr><td><table border="0" cellspacing="0" cellpadding="3" cellborder="1"><tr><td balign="left">Stewart Connector SS-37000-002</td><td balign="left">male</td><td balign="left">8-pin</td></tr></table></td></tr><tr><td><table border="0" cellspacing="0" cellpadding="3" cellborder="1"><tr><td>DA+</td><td port="p1r">1</td></tr><tr><td>DA-</td><td port="p2r">2</td></tr><tr><td>DB+</td><td port="p3r">3</td></tr><tr><td>DC+</td><td port="p4r">4</td></tr><tr><td>DC-</td><td port="p5r">5</td></tr><tr><td>DB-</td><td port="p6r">6</td></tr><tr><td>DD+</td><td port="p7r">7</td></tr><tr><td>DD-</td><td port="p8r">8</td></tr></table></td></tr></table>>, margin=0, pos="144.5,133", shape=none, width="4.0139"];
W1 [height="3.8889", label=<<table border="0" cellspacing="0" cellpadding="0"><tr><td><table border="0" cellspacing="0" cellpadding="3" cellborder="1"><tr><td colspan="4">W1</td></tr><tr><td balign="left">CAT5e</td><td balign="left">8x</td><td balign="left">24 AWG</td><td balign="left">1 m</td></tr></table></td></tr><tr><td> </td></tr><tr><td><table border="0" cellspacing="0" cellborder="0"><tr><td>X1:1</td><td>WHGN</td><td>X2:3</td></tr><tr><td colspan="3" border="0" cellspacing="0" cellpadding="0" port="w1" height="6"></td></tr><tr><td colspan="3" border="0" cellspacing="0" cellpadding="0" port="w2" height="6"></td></tr><tr><td>X1:2</td><td>GN</td><td>X2:6</td></tr><tr><td>X1:3</td><td>WHOG</td><td>X2:1</td></tr><tr><td colspan="3" border="0" cellspacing="0" cellpadding="0" port="w3" height="6"></td></tr><tr><td colspan="3" border="0" cellspacing="0" cellpadding="0" port="w4" height="6"></td></tr><tr><td>X1:4</td><td>OG</td><td>X2:7</td></tr><tr><td>X1:5</td><td>WHBU</td><td>X2:8</td></tr><tr><td colspan="3" border="0" cellspacing="0" cellpadding="0" port="w5" height="6"></td></tr><tr><td colspan="3" border="0" cellspacing="0" cellpadding="0" port="w6" height="6"></td></tr><tr><td>X1:6</td><td>BU</td><td>X2:2</td></tr><tr><td>X1:7</td><td>WHBN</td><td>X2:4</td></tr><tr><td colspan="3" border="0" cellspacing="0" cellpadding="0" port="w7" height="6"></td></tr><tr><td colspan="3" border="0" cellspacing="0" cellpadding="0" port="w8" height="6"></td></tr><tr><td>X1:8</td><td>BN</td><td>X2:5</td></tr><tr><td> </td></tr></table></td></tr></table>>, margin=0, pos="515.5,140", shape=box, style="", width="2.2917"];
X2 [height="3.1944", label=<<table border="0" cellspacing="0" cellpadding="0"><tr><td><table border="0" cellspacing="0" cellpadding="3" cellborder="1"><tr><td balign="left">X2</td></tr></table></td></tr><tr><td><table border="0" cellspacing="0" cellpadding="3" cellborder="1"><tr><td balign="left">Stewart Connector SS-37000-002</td><td balign="left">male</td><td balign="left">8-pin</td></tr></table></td></tr><tr><td><table border="0" cellspacing="0" cellpadding="3" cellborder="1"><tr><td port="p1l">1</td><td>DB+</td></tr><tr><td port="p2l">2</td><td>DB-</td></tr><tr><td port="p3l">3</td><td>DA+</td></tr><tr><td port="p4l">4</td><td>DD+</td></tr><tr><td port="p5l">5</td><td>DD-</td></tr><tr><td port="p6l">6</td><td>DA-</td></tr><tr><td port="p7l">7</td><td>DC+</td></tr><tr><td port="p8l">8</td><td>DC-</td></tr></table></td></tr></table>>, margin=0, pos="886.5,137", shape=none, width="4.0139"];
X1:p2r -- X2:p6l [penwidth="4.0", pos="289.000,191.000 353.060,191.000 368.940,197.000 433.000,197.000 446.750,197.000 460.500,193.000 474.250,193.000", wv_wire=1];
X1:p2r -- X2:p6l [color="#00ff00", penwidth="3.0", pos="289.000,191.000 353.060,191.000 368.940,197.000 433.000,197.000 446.750,197.000 460.500,193.000 474.250,193.000", wv_wire=1];
X1:p2r -- X2:p6l [penwidth="4.0", pos="515.500,197.000 529.250,197.000 543.000,193.000 556.750,193.000", wv_wire=1];
X1:p2r -- X2:p6l [color="#00ff00", penwidth="3.0", pos="515.500,197.000 529.250,197.000 543.000,193.000 556.750,193.000", wv_wire=1];
X1:p1r -- X2:p3l [penwidth="4.0", pos="289.000,168.000 353.020,168.000 368.980,192.000 433.000,192.000 446.750,192.000 460.500,196.000 474.250,196.000 488.000,196.000 501.750,192.000 515.500,192.000 529.250,192.000 543.000,196.000 556.750,196.000 570.500,196.000 584.250,192.000 598.000,192.000 674.190,192.000 665.810,79.000 742.000,79.000", wv_wire=0];
X1:p1r -- X2:p3l [color="#ffffff", penwidth="3.0", pos="289.000,168.000 353.020,168.000 368.980,192.000 433.000,192.000 446.750,192.000 460.500,196.000 474.250,196.000 488.000,196.000 501.750,192.000 515.500,192.000 529.250,192.000 543.000,196.000 556.750,196.000 570.500,196.000 584.250,192.000 598.000,192.000 674.190,192.000 665.810,79.000 742.000,79.000", wv_wire=0];
X1:p1r -- X2:p3l [color="#00ff00", penwidth="3.0", pos="289.000,168.000 353.020,168.000 368.980,192.000 433.000,192.000 446.750,192.000 460.500,196.000 474.250,196.000 488.000,196.000 501.750,192.000 515.500,192.000 529.250,192.000 543.000,196.000 556.750,196.000 570.500,196.000 584.250,192.000 598.000,192.000 674.190,192.000 665.810,79.000 742.000,79.000", style=dashed, wv_wire=0];
X1:p2r -- X2:p6l [penwidth="4.0", pos="474.250,193.000 488.000,193.000 501.750,197.000 515.500,197.000", wv_wire=1];
X1:p2r -- X2:p6l [color="#00ff00", penwidth="3.0", pos="474.250,193.000 488.000,193.000 501.750,197.000 515.500,197.000", wv_wire=1];
X1:p2r -- X2:p6l [penwidth="4.0", pos="556.750,193.000 570.500,193.000 584.250,197.000 598.000,197.000 665.460,197.000 674.540,149.000 742.000,149.000", wv_wire=1];
X1:p2r -- X2:p6l [color="#00ff00", penwidth="3.0", pos="556.750,193.000 570.500,193.000 584.250,197.000 598.000,197.000 665.460,197.000 674.540,149.000 742.000,149.000", wv_wire=1];
X1:p4r -- X2:p7l [penwidth="4.0", pos="289.000,145.000 353.010,145.000 368.990,147.000 433.000,147.000 446.750,147.000 460.500,143.000 474.250,143.000", wv_wire=3];
X1:p4r -- X2:p7l [color="#ff8000", penwidth="3.0", pos="289.000,145.000 353.010,145.000 368.990,147.000 433.000,147.000 446.750,147.000 460.500,143.000 474.250,143.000", wv_wire=3];
X1:p4r -- X2:p7l [penwidth="4.0", pos="515.500,147.000 529.250,147.000 543.000,143.000 556.750,143.000", wv_wire=3];
X1:p4r -- X2:p7l [color="#ff8000", penwidth="3.0", pos="515.500,147.000 529.250,147.000 543.000,143.000 556.750,143.000", wv_wire=3];
X1:p3r -- X2:p1l [penwidth="4.0", pos="289.000,121.000 353.000,121.000 369.000,142.000 433.000,142.000 446.750,142.000 460.500,146.000 474.250,146.000 488.000,146.000 501.750,142.000 515.500,142.000 529.250,142.000 543.000,146.000 556.750,146.000 570.500,146.000 584.250,142.000 598.000,142.000 668.400,142.000 671.600,56.000 742.000,56.000", wv_wire=2];
X1:p3r -- X2:p1l [color="#ffffff", penwidth="3.0", pos="289.000,121.000 353.000,121.000 369.000,142.000 433.000,142.000 446.750,142.000 460.500,146.000 474.250,146.000 488.000,146.000 501.750,142.000 515.500,142.000 529.250,142.000 543.000,146.000 556.750,146.000 570.500,146.000 584.250,142.000 598.000,142.000 668.400,142.000 671.600,56.000 742.000,56.000", wv_wire=2];
X1:p3r -- X2:p1l [color="#ff8000", penwidth="3.0", pos="289.000,121.000 353.000,121.000 369.000,142.000 433.000,142.000 446.750,142.000 460.500,146.000 474.250,146.000 488.000,146.000 501.750,142.000 515.500,142.000 529.250,142.000 543.000,146.000 556.750,146.000 570.500,146.000 584.250,142.000 598.000,142.000 668.400,142.000 671.600,56.000 742.000,56.000", style=dashed, wv_wire=2];
X1:p4r -- X2:p7l [penwidth="4.0", pos="474.250,143.000 488.000,143.000 501.750,147.000 515.500,147.000", wv_wire=3];
X1:p4r -- X2:p7l [color="#ff8000", penwidth="3.0", pos="474.250,143.000 488.000,143.000 501.750,147.000 515.500,147.000", wv_wire=3];
X1:p4r -- X2:p7l [penwidth="4.0", pos="556.750,143.000 570.500,143.000 584.250,147.000 598.000,147.000 665.460,147.000 674.540,195.000 742.000,195.000", wv_wire=3];
X1:p4r -- X2:p7l [color="#ff8000", penwidth="3.0", pos="556.750,143.000 570.500,143.000 584.250,147.000 598.000,147.000 665.460,147.000 674.540,195.000 742.000,195.000", wv_wire=3];
X1:p6r -- X2:p2l [penwidth="4.0", pos="289.000,98.000 353.000,98.000 369.000,97.000 433.000,97.000 446.750,97.000 460.500,93.000 474.250,93.000", wv_wire=5];
X1:p6r -- X2:p2l [color="#0066ff", penwidth="3.0", pos="289.000,98.000 353.000,98.000 369.000,97.000 433.000,97.000 446.750,97.000 460.500,93.000 474.250,93.000", wv_wire=5];
X1:p6r -- X2:p2l [penwidth="4.0", pos="515.500,97.000 529.250,97.000 543.000,93.000 556.750,93.000", wv_wire=5];
X1:p6r -- X2:p2l [color="#0066ff", penwidth="3.0", pos="515.500,97.000 529.250,97.000 543.000,93.000 556.750,93.000", wv_wire=5];
X1:p5r -- X2:p8l [penwidth="4.0", pos="289.000,75.000 353.010,75.000 368.990,92.000 433.000,92.000 446.750,92.000 460.500,96.000 474.250,96.000 488.000,96.000 501.750,92.000 515.500,92.000 529.250,92.000 543.000,96.000 556.750,96.000 570.500,96.000 584.250,92.000 598.000,92.000 675.920,92.000 664.080,172.000 742.000,172.000", wv_wire=4];
X1:p5r -- X2:p8l [color="#ffffff", penwidth="3.0", pos="289.000,75.000 353.010,75.000 368.990,92.000 433.000,92.000 446.750,92.000 460.500,96.000 474.250,96.000 488.000,96.000 501.750,92.000 515.500,92.000 529.250,92.000 543.000,96.000 556.750,96.000 570.500,96.000 584.250,92.000 598.000,92.000 675.920,92.000 664.080,172.000 742.000,172.000", wv_wire=4];
X1:p5r -- X2:p8l [color="#0066ff", penwidth="3.0", pos="289.000,75.000 353.010,75.000 368.990,92.000 433.000,92.000 446.750,92.000 460.500,96.000 474.250,96.000 488.000,96.000 501.750,92.000 515.500,92.000 529.250,92.000 543.000,96.000 556.750,96.000 570.500,96.000 584.250,92.000 598.000,92.000 675.920,92.000 664.080,172.000 742.000,172.000", style=dashed, wv_wire=4];
X1:p6r -- X2:p2l [penwidth="4.0", pos="474.250,93.000 488.000,93.000 501.750,97.000 515.500,97.000", wv_wire=5];
X1:p6r -- X2:p2l [color="#0066ff", penwidth="3.0", pos="474.250,93.000 488.000,93.000 501.750,97.000 515.500,97.000", wv_wire=5];
X1:p6r -- X2:p2l [penwidth="4.0", pos="556.750,93.000 570.500,93.000 584.250,97.000 598.000,97.000 668.040,97.000 671.960,33.000 742.000,33.000", wv_wire=5];
X1:p6r -- X2:p2l [color="#0066ff", penwidth="3.0", pos="556.750,93.000 570.500,93.000 584.250,97.000 598.000,97.000 668.040,97.000 671.960,33.000 742.000,33.000", wv_wire=5];
X1:p8r -- X2:p5l [penwidth="4.0", pos="289.000,52.000 353.040,52.000 368.960,47.000 433.000,47.000 446.750,47.000 460.500,43.000 474.250,43.000", wv_wire=7];
X1:p8r -- X2:p5l [color="#895956", penwidth="3.0", pos="289.000,52.000 353.040,52.000 368.960,47.000 433.000,47.000 446.750,47.000 460.500,43.000 474.250,43.000", wv_wire=7];
X1:p8r -- X2:p5l [penwidth="4.0", pos="515.500,47.000 529.250,47.000 543.000,43.000 556.750,43.000", wv_wire=7];
X1:p8r -- X2:p5l [color="#895956", penwidth="3.0", pos="515.500,47.000 529.250,47.000 543.000,43.000 556.750,43.000", wv_wire=7];
X1:p7r -- X2:p4l [penwidth="4.0", pos="289.000,29.000 353.080,29.000 368.920,42.000 433.000,42.000 446.750,42.000 460.500,46.000 474.250,46.000 488.000,46.000 501.750,42.000 515.500,42.000 529.250,42.000 543.000,46.000 556.750,46.000 570.500,46.000 584.250,42.000 598.000,42.000 671.210,42.000 668.790,102.000 742.000,102.000", wv_wire=6];
X1:p7r -- X2:p4l [color="#ffffff", penwidth="3.0", pos="289.000,29.000 353.080,29.000 368.920,42.000 433.000,42.000 446.750,42.000 460.500,46.000 474.250,46.000 488.000,46.000 501.750,42.000 515.500,42.000 529.250,42.000 543.000,46.000 556.750,46.000 570.500,46.000 584.250,42.000 598.000,42.000 671.210,42.000 668.790,102.000 742.000,102.000", wv_wire=6];
X1:p7r -- X2:p4l [color="#895956", penwidth="3.0", pos="289.000,29.000 353.080,29.000 368.920,42.000 433.000,42.000 446.750,42.000 460.500,46.000 474.250,46.000 488.000,46.000 501.750,42.000 515.500,42.000 529.250,42.000 543.000,46.000 556.750,46.000 570.500,46.000 584.250,42.000 598.000,42.000 671.210,42.000 668.790,102.000 742.000,102.000", style=dashed, wv_wire=6];
X1:p8r -- X2:p5l [penwidth="4.0", pos="474.250,43.000 488.000,43.000 501.750,47.000 515.500,47.000", wv_wire=7];
X1:p8r -- X2:p5l [color="#895956", penwidth="3.0", pos="474.250,43.000 488.000,43.000 501.750,47.000 515.500,47.000", wv_wire=7];
X1:p8r -- X2:p5l [penwidth="4.0", pos="556.750,43.000 570.500,43.000 584.250,47.000 598.000,47.000 670.790,47.000 669.210,125.000 742.000,125.000", wv_wire=7];
X1:p8r -- X2:p5l [color="#895956", penwidth="3.0", pos="556.750,43.000 570.500,43.000 584.250,47.000 598.000,47.000 670.790,47.000 669.210,125.000 742.000,125.000", wv_wire=7];
} I think this looks pretty neat 😄 |
Agree 100% :) I can already see another parameter for the twisting... whether it's clockwise or counterclockwise... it might be relevant when having multiple pairs next to each other perhaps? I'm not too familiar with the specifics; just a thought. |
Yes, there are twisted triads, though in most cases I think the twisting is more for mechanical durability than electrical significance, there might be cases where it matters. (Twisted triad is almost always shielded too, whether it's a solo cable or a component of a larger one.) Also, at least in prototyping, I've seen 3-twist used as an expedient substitute for an individually-shielded-pair with a drain wire. (Should individually shielded pairs or subgroups get their own issue?) There's also the somewhat special case of star-quad. (Special in that the physical location of the individual conductors is significant, but this can be left to the designer. At some point, there might occur a situation where someone's designing with star-quad but doesn't know what colors it'll be supplied with, and wishes to express "whichever two conductors are diagonally opposite each other". But that should be resolved before anyone's encoding it into YML so I don't think it needs to be provided for.) I think the mechanical details can be ignored here, but support for displaying 4-twist might come in handy. Personally I would put more-than-2-twist support as a super low priority, but it does exist in the wild. |
There's also this craziness: And this, although calling this a twist might be a stretch. Both of these may very well be their own mechanical thing unnecessary to visualize. And outside the scope of this issue. |
Spot-on. IMHO: Twisted-pair support is very important. Individually shielded pair support is very important. Twisted triad and star-quad is not important but still conceivably within scope. Rope-lay construction is either part of the cable spec as-ordered, or a mechanical construction detail, and either way is out-of-scope for electrical description. Service loops are a mechanical detail as well. (Unless scope is gonna creep to be a one-stop-shop electrical and mechanical guide, in which case there's a bunch of other stuff that could be useful.) (Again IMHO, those sorts of practices are part of shop workmanship/craft standards, and best described by their own manuals rather than a per-harness diagram.) |
@SnowMB Is your implementation of twisted wires in your fork? |
I would like to test it too. |
Hey, The twisted wires was just a quick hack in directly in the intermediate .dot file generated by my branch, so no python implementation available. Sorry 🥲 |
Any progress in this feature? Would be really nice having this for ethernet like cables |
Hello from 2024 :) |
@rusefillc wrote:
Welcome to this old discussion about a feature wanted by many. As you can see, @SnowMB did a great job in his PR #120, but it seems he got stuck with limitations in "the used graphviz library". His contributions here were based on his code in that PR, but with time-consuming extra manual editing of the If you or someone else are motivated to dive into such low-level Graphviz hacking and (even better) create code to automate it, your contributions into this project are more than welcome! |
@martinrieder wrote:
That would only make a twist between the bundle box and the connector box. If you look at the graphic examples earlier in this issue, you can see that twisted wires inside the cable box is the wanted feature.
That might work, but be aware that such virtual splices are implemented as nodes in Graphviz, and will demand rank space as other nodes in the diagram. Try it out, to see the demanded space for each twist.
In the current version, you can add |
Thanks for pointing out the differences to the approach above by @SnowMB. The issue description by @s7726 leaves it open whether the twists should be shown inside or outside the wire box. It is of course more accurate to depict the twisting along with the wire definitions inside the cable box. In simple cases, it might be sufficient to show the twisting outside and just hide the cable and connector boxes using a tweak.
Note the difference between styles |
Add ability to specify, and visualize, twisted wires with appropriate call outs for twist specs.
The text was updated successfully, but these errors were encountered: