Merge branch 'dev'
@ -17,7 +17,7 @@ WireViz is a tool for easily documenting cables, wiring harnesses and connector
|
||||
* [DIN 47100](https://en.wikipedia.org/wiki/DIN_47100) (WT/BN/GN/YE/GY/PK/BU/RD/BK/VT/...)
|
||||
* [IEC 62](https://en.wikipedia.org/wiki/Electronic_color_code#Color_band_system) (BN/RD/OR/YE/GN/BU/VT/GY/WT/BK/...)
|
||||
* Understands wire gauge in mm² or AWG
|
||||
* Optionally auto-calculates and displays AWG equivalent when specifying mm²
|
||||
* Optionally auto-calculates equivalent gauge between mm² and AWG
|
||||
* Allows more than one connector per side, as well as loopbacks
|
||||
* Allows for easy-autorouting for 1-to-1 wiring
|
||||
* Generates BOM (Bill of Materials)
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
Item Qty Unit Designators
|
||||
Connector, Molex Micro-Fit, female, 2 pins 3 X2, X3, X4
|
||||
Connector, Molex Micro-Fit, male, 2 pins 1 X1
|
||||
Cable, 2 x 0.25 mm² 0.6 m W1, W2, W3
|
||||
Cable, 2 x 0.25 mm² 0.4 m W1, W2
|
||||
Cable, 2 x 20 AWG 0.2 m W3
|
||||
|
||||
|
@ -28,5 +28,5 @@ graph {
|
||||
edge [color="#000000:#ff0000:#000000"]
|
||||
X1:p2r:e -- W3:w2:w
|
||||
W3:w2:e -- X4:p2l:w
|
||||
W3 [label=<<table border="0" cellspacing="0" cellpadding="0"><tr><td><table border="0" cellspacing="0" cellpadding="3" cellborder="1"><tr><td colspan="3">W3</td></tr><tr><td>2x</td><td>0.25 mm² (24 AWG)</td><td>0.2 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>BK</td><td>X4:1</td></tr><tr><td colspan="3" cellpadding="0" height="6" bgcolor="#000000" border="2" sides="tb" port="w1"></td></tr><tr><td>X1:2</td><td>RD</td><td>X4:2</td></tr><tr><td colspan="3" cellpadding="0" height="6" bgcolor="#ff0000" border="2" sides="tb" port="w2"></td></tr><tr><td> </td></tr></table></td></tr></table>> fillcolor=white margin=0 shape=box style=""]
|
||||
W3 [label=<<table border="0" cellspacing="0" cellpadding="0"><tr><td><table border="0" cellspacing="0" cellpadding="3" cellborder="1"><tr><td colspan="3">W3</td></tr><tr><td>2x</td><td>20 AWG (0.75 mm²)</td><td>0.2 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>BK</td><td>X4:1</td></tr><tr><td colspan="3" cellpadding="0" height="6" bgcolor="#000000" border="2" sides="tb" port="w1"></td></tr><tr><td>X1:2</td><td>RD</td><td>X4:2</td></tr><tr><td colspan="3" cellpadding="0" height="6" bgcolor="#ff0000" border="2" sides="tb" port="w2"></td></tr><tr><td> </td></tr></table></td></tr></table>> fillcolor=white margin=0 shape=box style=""]
|
||||
}
|
||||
|
||||
@ -119,7 +119,7 @@
|
||||
<polygon fill="none" stroke="black" points="348,-84 348,-107 371,-107 371,-84 348,-84"/>
|
||||
<text text-anchor="start" x="352" y="-91.8" font-family="arial" font-size="14.00">2x</text>
|
||||
<polygon fill="none" stroke="black" points="371,-84 371,-107 503,-107 503,-84 371,-84"/>
|
||||
<text text-anchor="start" x="375" y="-91.8" font-family="arial" font-size="14.00">0.25 mm² (24 AWG)</text>
|
||||
<text text-anchor="start" x="375" y="-91.8" font-family="arial" font-size="14.00">20 AWG (0.75 mm²)</text>
|
||||
<polygon fill="none" stroke="black" points="503,-84 503,-107 546,-107 546,-84 503,-84"/>
|
||||
<text text-anchor="start" x="507" y="-91.8" font-family="arial" font-size="14.00">0.2 m</text>
|
||||
<text text-anchor="start" x="445" y="-72.8" font-family="arial" font-size="14.00"> </text>
|
||||
@ -255,4 +255,4 @@
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
<h1>Bill of Materials</h1><table style="border:1px solid #000000; font-size: 14pt; border-spacing: 0px"><tr><th align="left" style="border:1px solid #000000; padding: 8px">Item</th><th align="left" style="border:1px solid #000000; padding: 8px">Qty</th><th align="left" style="border:1px solid #000000; padding: 8px">Unit</th><th align="left" style="border:1px solid #000000; padding: 8px">Designators</th></tr><tr><td style="border:1px solid #000000; padding: 4px">Connector, Molex Micro-Fit, female, 2 pins</td><td align="right" style="border:1px solid #000000; padding: 4px">3</td><td style="border:1px solid #000000; padding: 4px"></td><td style="border:1px solid #000000; padding: 4px">X2, X3, X4</td></tr><tr><td style="border:1px solid #000000; padding: 4px">Connector, Molex Micro-Fit, male, 2 pins</td><td align="right" style="border:1px solid #000000; padding: 4px">1</td><td style="border:1px solid #000000; padding: 4px"></td><td style="border:1px solid #000000; padding: 4px">X1</td></tr><tr><td style="border:1px solid #000000; padding: 4px">Cable, 2 x 0.25 mm²</td><td align="right" style="border:1px solid #000000; padding: 4px">0.6</td><td style="border:1px solid #000000; padding: 4px">m</td><td style="border:1px solid #000000; padding: 4px">W1, W2, W3</td></tr></table></body></html>
|
||||
<h1>Bill of Materials</h1><table style="border:1px solid #000000; font-size: 14pt; border-spacing: 0px"><tr><th align="left" style="border:1px solid #000000; padding: 8px">Item</th><th align="left" style="border:1px solid #000000; padding: 8px">Qty</th><th align="left" style="border:1px solid #000000; padding: 8px">Unit</th><th align="left" style="border:1px solid #000000; padding: 8px">Designators</th></tr><tr><td style="border:1px solid #000000; padding: 4px">Connector, Molex Micro-Fit, female, 2 pins</td><td align="right" style="border:1px solid #000000; padding: 4px">3</td><td style="border:1px solid #000000; padding: 4px"></td><td style="border:1px solid #000000; padding: 4px">X2, X3, X4</td></tr><tr><td style="border:1px solid #000000; padding: 4px">Connector, Molex Micro-Fit, male, 2 pins</td><td align="right" style="border:1px solid #000000; padding: 4px">1</td><td style="border:1px solid #000000; padding: 4px"></td><td style="border:1px solid #000000; padding: 4px">X1</td></tr><tr><td style="border:1px solid #000000; padding: 4px">Cable, 2 x 0.25 mm²</td><td align="right" style="border:1px solid #000000; padding: 4px">0.4</td><td style="border:1px solid #000000; padding: 4px">m</td><td style="border:1px solid #000000; padding: 4px">W1, W2</td></tr><tr><td style="border:1px solid #000000; padding: 4px">Cable, 2 x 20 AWG</td><td align="right" style="border:1px solid #000000; padding: 4px">0.2</td><td style="border:1px solid #000000; padding: 4px">m</td><td style="border:1px solid #000000; padding: 4px">W3</td></tr></table></body></html>
|
||||
|
Before Width: | Height: | Size: 79 KiB After Width: | Height: | Size: 79 KiB |
@ -119,7 +119,7 @@
|
||||
<polygon fill="none" stroke="black" points="348,-84 348,-107 371,-107 371,-84 348,-84"/>
|
||||
<text text-anchor="start" x="352" y="-91.8" font-family="arial" font-size="14.00">2x</text>
|
||||
<polygon fill="none" stroke="black" points="371,-84 371,-107 503,-107 503,-84 371,-84"/>
|
||||
<text text-anchor="start" x="375" y="-91.8" font-family="arial" font-size="14.00">0.25 mm² (24 AWG)</text>
|
||||
<text text-anchor="start" x="375" y="-91.8" font-family="arial" font-size="14.00">20 AWG (0.75 mm²)</text>
|
||||
<polygon fill="none" stroke="black" points="503,-84 503,-107 546,-107 546,-84 503,-84"/>
|
||||
<text text-anchor="start" x="507" y="-91.8" font-family="arial" font-size="14.00">0.2 m</text>
|
||||
<text text-anchor="start" x="445" y="-72.8" font-family="arial" font-size="14.00"> </text>
|
||||
|
||||
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
@ -22,6 +22,7 @@ cables:
|
||||
<<: *wire_power # create from template
|
||||
W3:
|
||||
<<: *wire_power # create from template
|
||||
gauge: 20 awg
|
||||
|
||||
connections:
|
||||
-
|
||||
|
||||
@ -4,7 +4,7 @@ graph {
|
||||
graph [bgcolor=white fontname=arial nodesep=0.33 rankdir=LR ranksep=2]
|
||||
node [fillcolor=white fontname=arial shape=record style=filled]
|
||||
edge [fontname=arial style=bold]
|
||||
Key [label="Key|{Phone Connector|male 3.5|3-pin}|{{Dot|Dash|Ground}|{<pTr>T|<pRr>R|<pSr>S}}"]
|
||||
Key [label="Key|{Phone Connector|male 3.5}|{{Dot|Dash|Ground}|{<pTr>T|<pRr>R|<pSr>S}}"]
|
||||
edge [color="#000000:#ffffff:#000000"]
|
||||
Key:pSr:e -- W1:w1:w
|
||||
edge [color="#000000:#666600:#000000"]
|
||||
|
||||
@ -4,95 +4,93 @@
|
||||
<!-- Generated by graphviz version 2.44.0 (20200408.0750)
|
||||
-->
|
||||
<!-- Pages: 1 -->
|
||||
<svg width="546pt" height="207pt"
|
||||
viewBox="0.00 0.00 546.00 207.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<svg width="499pt" height="207pt"
|
||||
viewBox="0.00 0.00 499.00 207.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 203)">
|
||||
<polygon fill="white" stroke="transparent" points="-4,4 -4,-203 542,-203 542,4 -4,4"/>
|
||||
<polygon fill="white" stroke="transparent" points="-4,4 -4,-203 495,-203 495,4 -4,4"/>
|
||||
<!-- Key -->
|
||||
<g id="node1" class="node">
|
||||
<title>Key</title>
|
||||
<polygon fill="white" stroke="black" points="0,-33 0,-148 238,-148 238,-33 0,-33"/>
|
||||
<text text-anchor="middle" x="119" y="-132.8" font-family="arial" font-size="14.00">Key</text>
|
||||
<polyline fill="none" stroke="black" points="0,-125 238,-125 "/>
|
||||
<polygon fill="white" stroke="black" points="0,-33 0,-148 191,-148 191,-33 0,-33"/>
|
||||
<text text-anchor="middle" x="95.5" y="-132.8" font-family="arial" font-size="14.00">Key</text>
|
||||
<polyline fill="none" stroke="black" points="0,-125 191,-125 "/>
|
||||
<text text-anchor="middle" x="61" y="-109.8" font-family="arial" font-size="14.00">Phone Connector</text>
|
||||
<polyline fill="none" stroke="black" points="122,-102 122,-125 "/>
|
||||
<text text-anchor="middle" x="156.5" y="-109.8" font-family="arial" font-size="14.00">male 3.5</text>
|
||||
<polyline fill="none" stroke="black" points="191,-102 191,-125 "/>
|
||||
<text text-anchor="middle" x="214.5" y="-109.8" font-family="arial" font-size="14.00">3-pin</text>
|
||||
<polyline fill="none" stroke="black" points="0,-102 238,-102 "/>
|
||||
<text text-anchor="middle" x="68.5" y="-86.8" font-family="arial" font-size="14.00">Dot</text>
|
||||
<polyline fill="none" stroke="black" points="0,-79 137,-79 "/>
|
||||
<text text-anchor="middle" x="68.5" y="-63.8" font-family="arial" font-size="14.00">Dash</text>
|
||||
<polyline fill="none" stroke="black" points="0,-56 137,-56 "/>
|
||||
<text text-anchor="middle" x="68.5" y="-40.8" font-family="arial" font-size="14.00">Ground</text>
|
||||
<polyline fill="none" stroke="black" points="137,-33 137,-102 "/>
|
||||
<text text-anchor="middle" x="187.5" y="-86.8" font-family="arial" font-size="14.00">T</text>
|
||||
<polyline fill="none" stroke="black" points="137,-79 238,-79 "/>
|
||||
<text text-anchor="middle" x="187.5" y="-63.8" font-family="arial" font-size="14.00">R</text>
|
||||
<polyline fill="none" stroke="black" points="137,-56 238,-56 "/>
|
||||
<text text-anchor="middle" x="187.5" y="-40.8" font-family="arial" font-size="14.00">S</text>
|
||||
<polyline fill="none" stroke="black" points="0,-102 191,-102 "/>
|
||||
<text text-anchor="middle" x="56.5" y="-86.8" font-family="arial" font-size="14.00">Dot</text>
|
||||
<polyline fill="none" stroke="black" points="0,-79 113,-79 "/>
|
||||
<text text-anchor="middle" x="56.5" y="-63.8" font-family="arial" font-size="14.00">Dash</text>
|
||||
<polyline fill="none" stroke="black" points="0,-56 113,-56 "/>
|
||||
<text text-anchor="middle" x="56.5" y="-40.8" font-family="arial" font-size="14.00">Ground</text>
|
||||
<polyline fill="none" stroke="black" points="113,-33 113,-102 "/>
|
||||
<text text-anchor="middle" x="152" y="-86.8" font-family="arial" font-size="14.00">T</text>
|
||||
<polyline fill="none" stroke="black" points="113,-79 191,-79 "/>
|
||||
<text text-anchor="middle" x="152" y="-63.8" font-family="arial" font-size="14.00">R</text>
|
||||
<polyline fill="none" stroke="black" points="113,-56 191,-56 "/>
|
||||
<text text-anchor="middle" x="152" y="-40.8" font-family="arial" font-size="14.00">S</text>
|
||||
</g>
|
||||
<!-- W1 -->
|
||||
<g id="node2" class="node">
|
||||
<title>W1</title>
|
||||
<polygon fill="none" stroke="black" points="538,-199 382,-199 382,0 538,0 538,-199"/>
|
||||
<polygon fill="none" stroke="black" points="382,-175.5 382,-198.5 538,-198.5 538,-175.5 382,-175.5"/>
|
||||
<text text-anchor="start" x="449" y="-183.3" font-family="arial" font-size="14.00">W1</text>
|
||||
<polygon fill="none" stroke="black" points="382,-152.5 382,-175.5 405,-175.5 405,-152.5 382,-152.5"/>
|
||||
<text text-anchor="start" x="386" y="-160.3" font-family="arial" font-size="14.00">3x</text>
|
||||
<polygon fill="none" stroke="black" points="405,-152.5 405,-175.5 465,-175.5 465,-152.5 405,-152.5"/>
|
||||
<text text-anchor="start" x="409" y="-160.3" font-family="arial" font-size="14.00">24 AWG</text>
|
||||
<polygon fill="none" stroke="black" points="465,-152.5 465,-175.5 495,-175.5 495,-152.5 465,-152.5"/>
|
||||
<text text-anchor="start" x="469" y="-160.3" font-family="arial" font-size="14.00">+ S</text>
|
||||
<polygon fill="none" stroke="black" points="495,-152.5 495,-175.5 538,-175.5 538,-152.5 495,-152.5"/>
|
||||
<text text-anchor="start" x="499" y="-160.3" font-family="arial" font-size="14.00">0.2 m</text>
|
||||
<text text-anchor="start" x="458" y="-141.3" font-family="arial" font-size="14.00"> </text>
|
||||
<text text-anchor="start" x="395.5" y="-124.3" font-family="arial" font-size="14.00">Key:S</text>
|
||||
<text text-anchor="start" x="466.5" y="-124.3" font-family="arial" font-size="14.00">WH</text>
|
||||
<polygon fill="#ffffff" stroke="transparent" points="382,-112.5 382,-118.5 538,-118.5 538,-112.5 382,-112.5"/>
|
||||
<polyline fill="none" stroke="black" stroke-width="2" points="383,-113.5 537,-113.5 "/>
|
||||
<polyline fill="none" stroke="black" stroke-width="2" points="537,-117.5 383,-117.5 "/>
|
||||
<text text-anchor="start" x="395.5" y="-99.3" font-family="arial" font-size="14.00">Key:R</text>
|
||||
<text text-anchor="start" x="469" y="-99.3" font-family="arial" font-size="14.00">BN</text>
|
||||
<polygon fill="#666600" stroke="transparent" stroke-width="2" points="382,-87.5 382,-93.5 538,-93.5 538,-87.5 382,-87.5"/>
|
||||
<polyline fill="none" stroke="black" stroke-width="2" points="383,-88.5 537,-88.5 "/>
|
||||
<polyline fill="none" stroke="black" stroke-width="2" points="537,-92.5 383,-92.5 "/>
|
||||
<text text-anchor="start" x="396" y="-74.3" font-family="arial" font-size="14.00">Key:T</text>
|
||||
<text text-anchor="start" x="467.5" y="-74.3" font-family="arial" font-size="14.00">GN</text>
|
||||
<polygon fill="#00ff00" stroke="transparent" stroke-width="2" points="382,-62.5 382,-68.5 538,-68.5 538,-62.5 382,-62.5"/>
|
||||
<polyline fill="none" stroke="black" stroke-width="2" points="383,-63.5 537,-63.5 "/>
|
||||
<polyline fill="none" stroke="black" stroke-width="2" points="537,-67.5 383,-67.5 "/>
|
||||
<text text-anchor="start" x="412" y="-49.3" font-family="arial" font-size="14.00"> </text>
|
||||
<text text-anchor="start" x="395.5" y="-30.3" font-family="arial" font-size="14.00">Key:S</text>
|
||||
<text text-anchor="start" x="459.5" y="-30.3" font-family="arial" font-size="14.00">Shield</text>
|
||||
<polyline fill="none" stroke="black" stroke-width="2" points="383,-19.5 537,-19.5 "/>
|
||||
<text text-anchor="start" x="412" y="-5.3" font-family="arial" font-size="14.00"> </text>
|
||||
<polygon fill="none" stroke="black" points="491,-199 335,-199 335,0 491,0 491,-199"/>
|
||||
<polygon fill="none" stroke="black" points="335,-175.5 335,-198.5 491,-198.5 491,-175.5 335,-175.5"/>
|
||||
<text text-anchor="start" x="402" y="-183.3" font-family="arial" font-size="14.00">W1</text>
|
||||
<polygon fill="none" stroke="black" points="335,-152.5 335,-175.5 358,-175.5 358,-152.5 335,-152.5"/>
|
||||
<text text-anchor="start" x="339" y="-160.3" font-family="arial" font-size="14.00">3x</text>
|
||||
<polygon fill="none" stroke="black" points="358,-152.5 358,-175.5 418,-175.5 418,-152.5 358,-152.5"/>
|
||||
<text text-anchor="start" x="362" y="-160.3" font-family="arial" font-size="14.00">24 AWG</text>
|
||||
<polygon fill="none" stroke="black" points="418,-152.5 418,-175.5 448,-175.5 448,-152.5 418,-152.5"/>
|
||||
<text text-anchor="start" x="422" y="-160.3" font-family="arial" font-size="14.00">+ S</text>
|
||||
<polygon fill="none" stroke="black" points="448,-152.5 448,-175.5 491,-175.5 491,-152.5 448,-152.5"/>
|
||||
<text text-anchor="start" x="452" y="-160.3" font-family="arial" font-size="14.00">0.2 m</text>
|
||||
<text text-anchor="start" x="411" y="-141.3" font-family="arial" font-size="14.00"> </text>
|
||||
<text text-anchor="start" x="348.5" y="-124.3" font-family="arial" font-size="14.00">Key:S</text>
|
||||
<text text-anchor="start" x="419.5" y="-124.3" font-family="arial" font-size="14.00">WH</text>
|
||||
<polygon fill="#ffffff" stroke="transparent" points="335,-112.5 335,-118.5 491,-118.5 491,-112.5 335,-112.5"/>
|
||||
<polyline fill="none" stroke="black" stroke-width="2" points="336,-113.5 490,-113.5 "/>
|
||||
<polyline fill="none" stroke="black" stroke-width="2" points="490,-117.5 336,-117.5 "/>
|
||||
<text text-anchor="start" x="348.5" y="-99.3" font-family="arial" font-size="14.00">Key:R</text>
|
||||
<text text-anchor="start" x="422" y="-99.3" font-family="arial" font-size="14.00">BN</text>
|
||||
<polygon fill="#666600" stroke="transparent" stroke-width="2" points="335,-87.5 335,-93.5 491,-93.5 491,-87.5 335,-87.5"/>
|
||||
<polyline fill="none" stroke="black" stroke-width="2" points="336,-88.5 490,-88.5 "/>
|
||||
<polyline fill="none" stroke="black" stroke-width="2" points="490,-92.5 336,-92.5 "/>
|
||||
<text text-anchor="start" x="349" y="-74.3" font-family="arial" font-size="14.00">Key:T</text>
|
||||
<text text-anchor="start" x="420.5" y="-74.3" font-family="arial" font-size="14.00">GN</text>
|
||||
<polygon fill="#00ff00" stroke="transparent" stroke-width="2" points="335,-62.5 335,-68.5 491,-68.5 491,-62.5 335,-62.5"/>
|
||||
<polyline fill="none" stroke="black" stroke-width="2" points="336,-63.5 490,-63.5 "/>
|
||||
<polyline fill="none" stroke="black" stroke-width="2" points="490,-67.5 336,-67.5 "/>
|
||||
<text text-anchor="start" x="365" y="-49.3" font-family="arial" font-size="14.00"> </text>
|
||||
<text text-anchor="start" x="348.5" y="-30.3" font-family="arial" font-size="14.00">Key:S</text>
|
||||
<text text-anchor="start" x="412.5" y="-30.3" font-family="arial" font-size="14.00">Shield</text>
|
||||
<polyline fill="none" stroke="black" stroke-width="2" points="336,-19.5 490,-19.5 "/>
|
||||
<text text-anchor="start" x="365" y="-5.3" font-family="arial" font-size="14.00"> </text>
|
||||
</g>
|
||||
<!-- Key--W1 -->
|
||||
<g id="edge1" class="edge">
|
||||
<title>Key:e--W1:w</title>
|
||||
<path fill="none" stroke="#000000" stroke-width="2" d="M238,-42.5C311.36,-44.46 312.64,-115.46 382,-113.5"/>
|
||||
<path fill="none" stroke="#ffffff" stroke-width="2" d="M238,-44.5C309.36,-44.5 310.64,-115.5 382,-115.5"/>
|
||||
<path fill="none" stroke="#000000" stroke-width="2" d="M238,-46.5C307.36,-44.54 308.64,-115.54 382,-117.5"/>
|
||||
<path fill="none" stroke="#000000" stroke-width="2" d="M191,-42.5C264.36,-44.46 265.64,-115.46 335,-113.5"/>
|
||||
<path fill="none" stroke="#ffffff" stroke-width="2" d="M191,-44.5C262.36,-44.5 263.64,-115.5 335,-115.5"/>
|
||||
<path fill="none" stroke="#000000" stroke-width="2" d="M191,-46.5C260.36,-44.54 261.64,-115.54 335,-117.5"/>
|
||||
</g>
|
||||
<!-- Key--W1 -->
|
||||
<g id="edge2" class="edge">
|
||||
<title>Key:e--W1:w</title>
|
||||
<path fill="none" stroke="#000000" stroke-width="2" d="M238,-65.5C304.51,-66.44 318.88,-89.44 382,-88.5"/>
|
||||
<path fill="none" stroke="#666600" stroke-width="2" d="M238,-67.5C302.81,-67.5 317.19,-90.5 382,-90.5"/>
|
||||
<path fill="none" stroke="#000000" stroke-width="2" d="M238,-69.5C301.12,-68.56 315.49,-91.56 382,-92.5"/>
|
||||
<path fill="none" stroke="#000000" stroke-width="2" d="M191,-65.5C257.51,-66.44 271.88,-89.44 335,-88.5"/>
|
||||
<path fill="none" stroke="#666600" stroke-width="2" d="M191,-67.5C255.81,-67.5 270.19,-90.5 335,-90.5"/>
|
||||
<path fill="none" stroke="#000000" stroke-width="2" d="M191,-69.5C254.12,-68.56 268.49,-91.56 335,-92.5"/>
|
||||
</g>
|
||||
<!-- Key--W1 -->
|
||||
<g id="edge3" class="edge">
|
||||
<title>Key:e--W1:w</title>
|
||||
<path fill="none" stroke="#000000" stroke-width="2" d="M238,-88.5C301.21,-89.52 315.3,-64.52 382,-63.5"/>
|
||||
<path fill="none" stroke="#00ff00" stroke-width="2" d="M238,-90.5C302.96,-90.5 317.04,-65.5 382,-65.5"/>
|
||||
<path fill="none" stroke="#000000" stroke-width="2" d="M238,-92.5C304.7,-91.48 318.79,-66.48 382,-67.5"/>
|
||||
<path fill="none" stroke="#000000" stroke-width="2" d="M191,-88.5C254.21,-89.52 268.3,-64.52 335,-63.5"/>
|
||||
<path fill="none" stroke="#00ff00" stroke-width="2" d="M191,-90.5C255.96,-90.5 270.04,-65.5 335,-65.5"/>
|
||||
<path fill="none" stroke="#000000" stroke-width="2" d="M191,-92.5C257.7,-91.48 271.79,-66.48 335,-67.5"/>
|
||||
</g>
|
||||
<!-- Key--W1 -->
|
||||
<g id="edge4" class="edge">
|
||||
<title>Key:e--W1:w</title>
|
||||
<path fill="none" stroke="#000000" stroke-width="2" d="M238,-44.5C302.81,-44.5 317.19,-21.5 382,-21.5"/>
|
||||
<path fill="none" stroke="#000000" stroke-width="2" d="M191,-44.5C255.81,-44.5 270.19,-21.5 335,-21.5"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
@ -4,95 +4,93 @@
|
||||
<!-- Generated by graphviz version 2.44.0 (20200408.0750)
|
||||
-->
|
||||
<!-- Pages: 1 -->
|
||||
<svg width="546pt" height="207pt"
|
||||
viewBox="0.00 0.00 546.00 207.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<svg width="499pt" height="207pt"
|
||||
viewBox="0.00 0.00 499.00 207.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 203)">
|
||||
<polygon fill="white" stroke="transparent" points="-4,4 -4,-203 542,-203 542,4 -4,4"/>
|
||||
<polygon fill="white" stroke="transparent" points="-4,4 -4,-203 495,-203 495,4 -4,4"/>
|
||||
<!-- Key -->
|
||||
<g id="node1" class="node">
|
||||
<title>Key</title>
|
||||
<polygon fill="white" stroke="black" points="0,-33 0,-148 238,-148 238,-33 0,-33"/>
|
||||
<text text-anchor="middle" x="119" y="-132.8" font-family="arial" font-size="14.00">Key</text>
|
||||
<polyline fill="none" stroke="black" points="0,-125 238,-125 "/>
|
||||
<polygon fill="white" stroke="black" points="0,-33 0,-148 191,-148 191,-33 0,-33"/>
|
||||
<text text-anchor="middle" x="95.5" y="-132.8" font-family="arial" font-size="14.00">Key</text>
|
||||
<polyline fill="none" stroke="black" points="0,-125 191,-125 "/>
|
||||
<text text-anchor="middle" x="61" y="-109.8" font-family="arial" font-size="14.00">Phone Connector</text>
|
||||
<polyline fill="none" stroke="black" points="122,-102 122,-125 "/>
|
||||
<text text-anchor="middle" x="156.5" y="-109.8" font-family="arial" font-size="14.00">male 3.5</text>
|
||||
<polyline fill="none" stroke="black" points="191,-102 191,-125 "/>
|
||||
<text text-anchor="middle" x="214.5" y="-109.8" font-family="arial" font-size="14.00">3-pin</text>
|
||||
<polyline fill="none" stroke="black" points="0,-102 238,-102 "/>
|
||||
<text text-anchor="middle" x="68.5" y="-86.8" font-family="arial" font-size="14.00">Dot</text>
|
||||
<polyline fill="none" stroke="black" points="0,-79 137,-79 "/>
|
||||
<text text-anchor="middle" x="68.5" y="-63.8" font-family="arial" font-size="14.00">Dash</text>
|
||||
<polyline fill="none" stroke="black" points="0,-56 137,-56 "/>
|
||||
<text text-anchor="middle" x="68.5" y="-40.8" font-family="arial" font-size="14.00">Ground</text>
|
||||
<polyline fill="none" stroke="black" points="137,-33 137,-102 "/>
|
||||
<text text-anchor="middle" x="187.5" y="-86.8" font-family="arial" font-size="14.00">T</text>
|
||||
<polyline fill="none" stroke="black" points="137,-79 238,-79 "/>
|
||||
<text text-anchor="middle" x="187.5" y="-63.8" font-family="arial" font-size="14.00">R</text>
|
||||
<polyline fill="none" stroke="black" points="137,-56 238,-56 "/>
|
||||
<text text-anchor="middle" x="187.5" y="-40.8" font-family="arial" font-size="14.00">S</text>
|
||||
<polyline fill="none" stroke="black" points="0,-102 191,-102 "/>
|
||||
<text text-anchor="middle" x="56.5" y="-86.8" font-family="arial" font-size="14.00">Dot</text>
|
||||
<polyline fill="none" stroke="black" points="0,-79 113,-79 "/>
|
||||
<text text-anchor="middle" x="56.5" y="-63.8" font-family="arial" font-size="14.00">Dash</text>
|
||||
<polyline fill="none" stroke="black" points="0,-56 113,-56 "/>
|
||||
<text text-anchor="middle" x="56.5" y="-40.8" font-family="arial" font-size="14.00">Ground</text>
|
||||
<polyline fill="none" stroke="black" points="113,-33 113,-102 "/>
|
||||
<text text-anchor="middle" x="152" y="-86.8" font-family="arial" font-size="14.00">T</text>
|
||||
<polyline fill="none" stroke="black" points="113,-79 191,-79 "/>
|
||||
<text text-anchor="middle" x="152" y="-63.8" font-family="arial" font-size="14.00">R</text>
|
||||
<polyline fill="none" stroke="black" points="113,-56 191,-56 "/>
|
||||
<text text-anchor="middle" x="152" y="-40.8" font-family="arial" font-size="14.00">S</text>
|
||||
</g>
|
||||
<!-- W1 -->
|
||||
<g id="node2" class="node">
|
||||
<title>W1</title>
|
||||
<polygon fill="none" stroke="black" points="538,-199 382,-199 382,0 538,0 538,-199"/>
|
||||
<polygon fill="none" stroke="black" points="382,-175.5 382,-198.5 538,-198.5 538,-175.5 382,-175.5"/>
|
||||
<text text-anchor="start" x="449" y="-183.3" font-family="arial" font-size="14.00">W1</text>
|
||||
<polygon fill="none" stroke="black" points="382,-152.5 382,-175.5 405,-175.5 405,-152.5 382,-152.5"/>
|
||||
<text text-anchor="start" x="386" y="-160.3" font-family="arial" font-size="14.00">3x</text>
|
||||
<polygon fill="none" stroke="black" points="405,-152.5 405,-175.5 465,-175.5 465,-152.5 405,-152.5"/>
|
||||
<text text-anchor="start" x="409" y="-160.3" font-family="arial" font-size="14.00">24 AWG</text>
|
||||
<polygon fill="none" stroke="black" points="465,-152.5 465,-175.5 495,-175.5 495,-152.5 465,-152.5"/>
|
||||
<text text-anchor="start" x="469" y="-160.3" font-family="arial" font-size="14.00">+ S</text>
|
||||
<polygon fill="none" stroke="black" points="495,-152.5 495,-175.5 538,-175.5 538,-152.5 495,-152.5"/>
|
||||
<text text-anchor="start" x="499" y="-160.3" font-family="arial" font-size="14.00">0.2 m</text>
|
||||
<text text-anchor="start" x="458" y="-141.3" font-family="arial" font-size="14.00"> </text>
|
||||
<text text-anchor="start" x="395.5" y="-124.3" font-family="arial" font-size="14.00">Key:S</text>
|
||||
<text text-anchor="start" x="466.5" y="-124.3" font-family="arial" font-size="14.00">WH</text>
|
||||
<polygon fill="#ffffff" stroke="transparent" points="382,-112.5 382,-118.5 538,-118.5 538,-112.5 382,-112.5"/>
|
||||
<polyline fill="none" stroke="black" stroke-width="2" points="383,-113.5 537,-113.5 "/>
|
||||
<polyline fill="none" stroke="black" stroke-width="2" points="537,-117.5 383,-117.5 "/>
|
||||
<text text-anchor="start" x="395.5" y="-99.3" font-family="arial" font-size="14.00">Key:R</text>
|
||||
<text text-anchor="start" x="469" y="-99.3" font-family="arial" font-size="14.00">BN</text>
|
||||
<polygon fill="#666600" stroke="transparent" stroke-width="2" points="382,-87.5 382,-93.5 538,-93.5 538,-87.5 382,-87.5"/>
|
||||
<polyline fill="none" stroke="black" stroke-width="2" points="383,-88.5 537,-88.5 "/>
|
||||
<polyline fill="none" stroke="black" stroke-width="2" points="537,-92.5 383,-92.5 "/>
|
||||
<text text-anchor="start" x="396" y="-74.3" font-family="arial" font-size="14.00">Key:T</text>
|
||||
<text text-anchor="start" x="467.5" y="-74.3" font-family="arial" font-size="14.00">GN</text>
|
||||
<polygon fill="#00ff00" stroke="transparent" stroke-width="2" points="382,-62.5 382,-68.5 538,-68.5 538,-62.5 382,-62.5"/>
|
||||
<polyline fill="none" stroke="black" stroke-width="2" points="383,-63.5 537,-63.5 "/>
|
||||
<polyline fill="none" stroke="black" stroke-width="2" points="537,-67.5 383,-67.5 "/>
|
||||
<text text-anchor="start" x="412" y="-49.3" font-family="arial" font-size="14.00"> </text>
|
||||
<text text-anchor="start" x="395.5" y="-30.3" font-family="arial" font-size="14.00">Key:S</text>
|
||||
<text text-anchor="start" x="459.5" y="-30.3" font-family="arial" font-size="14.00">Shield</text>
|
||||
<polyline fill="none" stroke="black" stroke-width="2" points="383,-19.5 537,-19.5 "/>
|
||||
<text text-anchor="start" x="412" y="-5.3" font-family="arial" font-size="14.00"> </text>
|
||||
<polygon fill="none" stroke="black" points="491,-199 335,-199 335,0 491,0 491,-199"/>
|
||||
<polygon fill="none" stroke="black" points="335,-175.5 335,-198.5 491,-198.5 491,-175.5 335,-175.5"/>
|
||||
<text text-anchor="start" x="402" y="-183.3" font-family="arial" font-size="14.00">W1</text>
|
||||
<polygon fill="none" stroke="black" points="335,-152.5 335,-175.5 358,-175.5 358,-152.5 335,-152.5"/>
|
||||
<text text-anchor="start" x="339" y="-160.3" font-family="arial" font-size="14.00">3x</text>
|
||||
<polygon fill="none" stroke="black" points="358,-152.5 358,-175.5 418,-175.5 418,-152.5 358,-152.5"/>
|
||||
<text text-anchor="start" x="362" y="-160.3" font-family="arial" font-size="14.00">24 AWG</text>
|
||||
<polygon fill="none" stroke="black" points="418,-152.5 418,-175.5 448,-175.5 448,-152.5 418,-152.5"/>
|
||||
<text text-anchor="start" x="422" y="-160.3" font-family="arial" font-size="14.00">+ S</text>
|
||||
<polygon fill="none" stroke="black" points="448,-152.5 448,-175.5 491,-175.5 491,-152.5 448,-152.5"/>
|
||||
<text text-anchor="start" x="452" y="-160.3" font-family="arial" font-size="14.00">0.2 m</text>
|
||||
<text text-anchor="start" x="411" y="-141.3" font-family="arial" font-size="14.00"> </text>
|
||||
<text text-anchor="start" x="348.5" y="-124.3" font-family="arial" font-size="14.00">Key:S</text>
|
||||
<text text-anchor="start" x="419.5" y="-124.3" font-family="arial" font-size="14.00">WH</text>
|
||||
<polygon fill="#ffffff" stroke="transparent" points="335,-112.5 335,-118.5 491,-118.5 491,-112.5 335,-112.5"/>
|
||||
<polyline fill="none" stroke="black" stroke-width="2" points="336,-113.5 490,-113.5 "/>
|
||||
<polyline fill="none" stroke="black" stroke-width="2" points="490,-117.5 336,-117.5 "/>
|
||||
<text text-anchor="start" x="348.5" y="-99.3" font-family="arial" font-size="14.00">Key:R</text>
|
||||
<text text-anchor="start" x="422" y="-99.3" font-family="arial" font-size="14.00">BN</text>
|
||||
<polygon fill="#666600" stroke="transparent" stroke-width="2" points="335,-87.5 335,-93.5 491,-93.5 491,-87.5 335,-87.5"/>
|
||||
<polyline fill="none" stroke="black" stroke-width="2" points="336,-88.5 490,-88.5 "/>
|
||||
<polyline fill="none" stroke="black" stroke-width="2" points="490,-92.5 336,-92.5 "/>
|
||||
<text text-anchor="start" x="349" y="-74.3" font-family="arial" font-size="14.00">Key:T</text>
|
||||
<text text-anchor="start" x="420.5" y="-74.3" font-family="arial" font-size="14.00">GN</text>
|
||||
<polygon fill="#00ff00" stroke="transparent" stroke-width="2" points="335,-62.5 335,-68.5 491,-68.5 491,-62.5 335,-62.5"/>
|
||||
<polyline fill="none" stroke="black" stroke-width="2" points="336,-63.5 490,-63.5 "/>
|
||||
<polyline fill="none" stroke="black" stroke-width="2" points="490,-67.5 336,-67.5 "/>
|
||||
<text text-anchor="start" x="365" y="-49.3" font-family="arial" font-size="14.00"> </text>
|
||||
<text text-anchor="start" x="348.5" y="-30.3" font-family="arial" font-size="14.00">Key:S</text>
|
||||
<text text-anchor="start" x="412.5" y="-30.3" font-family="arial" font-size="14.00">Shield</text>
|
||||
<polyline fill="none" stroke="black" stroke-width="2" points="336,-19.5 490,-19.5 "/>
|
||||
<text text-anchor="start" x="365" y="-5.3" font-family="arial" font-size="14.00"> </text>
|
||||
</g>
|
||||
<!-- Key--W1 -->
|
||||
<g id="edge1" class="edge">
|
||||
<title>Key:e--W1:w</title>
|
||||
<path fill="none" stroke="#000000" stroke-width="2" d="M238,-42.5C311.36,-44.46 312.64,-115.46 382,-113.5"/>
|
||||
<path fill="none" stroke="#ffffff" stroke-width="2" d="M238,-44.5C309.36,-44.5 310.64,-115.5 382,-115.5"/>
|
||||
<path fill="none" stroke="#000000" stroke-width="2" d="M238,-46.5C307.36,-44.54 308.64,-115.54 382,-117.5"/>
|
||||
<path fill="none" stroke="#000000" stroke-width="2" d="M191,-42.5C264.36,-44.46 265.64,-115.46 335,-113.5"/>
|
||||
<path fill="none" stroke="#ffffff" stroke-width="2" d="M191,-44.5C262.36,-44.5 263.64,-115.5 335,-115.5"/>
|
||||
<path fill="none" stroke="#000000" stroke-width="2" d="M191,-46.5C260.36,-44.54 261.64,-115.54 335,-117.5"/>
|
||||
</g>
|
||||
<!-- Key--W1 -->
|
||||
<g id="edge2" class="edge">
|
||||
<title>Key:e--W1:w</title>
|
||||
<path fill="none" stroke="#000000" stroke-width="2" d="M238,-65.5C304.51,-66.44 318.88,-89.44 382,-88.5"/>
|
||||
<path fill="none" stroke="#666600" stroke-width="2" d="M238,-67.5C302.81,-67.5 317.19,-90.5 382,-90.5"/>
|
||||
<path fill="none" stroke="#000000" stroke-width="2" d="M238,-69.5C301.12,-68.56 315.49,-91.56 382,-92.5"/>
|
||||
<path fill="none" stroke="#000000" stroke-width="2" d="M191,-65.5C257.51,-66.44 271.88,-89.44 335,-88.5"/>
|
||||
<path fill="none" stroke="#666600" stroke-width="2" d="M191,-67.5C255.81,-67.5 270.19,-90.5 335,-90.5"/>
|
||||
<path fill="none" stroke="#000000" stroke-width="2" d="M191,-69.5C254.12,-68.56 268.49,-91.56 335,-92.5"/>
|
||||
</g>
|
||||
<!-- Key--W1 -->
|
||||
<g id="edge3" class="edge">
|
||||
<title>Key:e--W1:w</title>
|
||||
<path fill="none" stroke="#000000" stroke-width="2" d="M238,-88.5C301.21,-89.52 315.3,-64.52 382,-63.5"/>
|
||||
<path fill="none" stroke="#00ff00" stroke-width="2" d="M238,-90.5C302.96,-90.5 317.04,-65.5 382,-65.5"/>
|
||||
<path fill="none" stroke="#000000" stroke-width="2" d="M238,-92.5C304.7,-91.48 318.79,-66.48 382,-67.5"/>
|
||||
<path fill="none" stroke="#000000" stroke-width="2" d="M191,-88.5C254.21,-89.52 268.3,-64.52 335,-63.5"/>
|
||||
<path fill="none" stroke="#00ff00" stroke-width="2" d="M191,-90.5C255.96,-90.5 270.04,-65.5 335,-65.5"/>
|
||||
<path fill="none" stroke="#000000" stroke-width="2" d="M191,-92.5C257.7,-91.48 271.79,-66.48 335,-67.5"/>
|
||||
</g>
|
||||
<!-- Key--W1 -->
|
||||
<g id="edge4" class="edge">
|
||||
<title>Key:e--W1:w</title>
|
||||
<path fill="none" stroke="#000000" stroke-width="2" d="M238,-44.5C302.81,-44.5 317.19,-21.5 382,-21.5"/>
|
||||
<path fill="none" stroke="#000000" stroke-width="2" d="M191,-44.5C255.81,-44.5 270.19,-21.5 335,-21.5"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 6.5 KiB |
@ -6,6 +6,7 @@ connectors:
|
||||
subtype: male 3.5
|
||||
pinnumbers: [T, R, S]
|
||||
pinout: [Dot, Dash, Ground]
|
||||
show_pincount: false
|
||||
|
||||
cables:
|
||||
W1:
|
||||
|
||||
2
setup.py
@ -26,7 +26,7 @@ setup(
|
||||
],
|
||||
license='GPLv3',
|
||||
keywords='cable connector hardware harness wiring wiring-diagram wiring-harness',
|
||||
url='https://github.com/n42/WireViz',
|
||||
url='https://github.com/formatc1702/WireViz',
|
||||
package_dir={'': 'src'},
|
||||
packages=find_packages('src'),
|
||||
entry_points={
|
||||
|
||||
@ -83,7 +83,12 @@ class Cable:
|
||||
except Exception:
|
||||
raise Exception('Gauge must be a number, or number and unit separated by a space')
|
||||
self.gauge = g
|
||||
self.gauge_unit = u.replace('mm2', 'mm\u00B2')
|
||||
|
||||
if u.upper() == 'AWG':
|
||||
self.gauge_unit = u.upper()
|
||||
else:
|
||||
self.gauge_unit = u.replace('mm2', 'mm\u00B2')
|
||||
|
||||
elif self.gauge is not None: # gauge specified, assume mm2
|
||||
if self.gauge_unit is None:
|
||||
self.gauge_unit = 'mm\u00B2'
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
from wireviz.DataClasses import Connector, Cable
|
||||
from graphviz import Graph
|
||||
from wireviz import wv_colors
|
||||
from wireviz.wv_helper import awg_equiv, tuplelist2tsv, nested, flatten2d
|
||||
from wireviz.wv_helper import awg_equiv, mm2_equiv, tuplelist2tsv, nested, flatten2d
|
||||
from collections import Counter
|
||||
from typing import List
|
||||
|
||||
@ -113,9 +113,19 @@ class Harness:
|
||||
f'{connector.name}:p{loop[1]}{loop_side}:{loop_dir}')
|
||||
|
||||
for _, cable in self.cables.items():
|
||||
awg_fmt = f' ({awg_equiv(cable.gauge)} AWG)' if cable.gauge_unit == 'mm\u00B2' and cable.show_equiv else ''
|
||||
|
||||
awg_fmt = ''
|
||||
if cable.show_equiv:
|
||||
# Only convert units we actually know about, i.e. currently
|
||||
# mm2 and awg --- other units _are_ technically allowed,
|
||||
# and passed through as-is.
|
||||
if cable.gauge_unit =='mm\u00B2':
|
||||
awg_fmt = f' ({awg_equiv(cable.gauge)} AWG)'
|
||||
elif cable.gauge_unit.upper() == 'AWG':
|
||||
awg_fmt = f' ({mm2_equiv(cable.gauge)} mm\u00B2)'
|
||||
|
||||
attributes = [f'{len(cable.colors)}x' if cable.show_wirecount else '',
|
||||
f'{cable.gauge} {cable.gauge_unit}{awg_fmt}' if cable.gauge else '', # TODO: show equiv
|
||||
f'{cable.gauge} {cable.gauge_unit}{awg_fmt}' if cable.gauge else '',
|
||||
'+ S' if cable.shield else '',
|
||||
f'{cable.length} m' if cable.length > 0 else '']
|
||||
attributes = list(filter(None, attributes))
|
||||
|
||||
@ -3,32 +3,32 @@
|
||||
|
||||
from typing import List
|
||||
|
||||
awg_equiv_table = {
|
||||
'0.09': '28',
|
||||
'0.14': '26',
|
||||
'0.25': '24',
|
||||
'0.34': '22',
|
||||
'0.5': '21',
|
||||
'0.75': '20',
|
||||
'1': '18',
|
||||
'1.5': '16',
|
||||
'2.5': '14',
|
||||
'4': '12',
|
||||
'6': '10',
|
||||
'10': '8',
|
||||
'16': '6',
|
||||
'25': '4',
|
||||
'35': '2',
|
||||
'50': '1',
|
||||
}
|
||||
|
||||
mm2_equiv_table = {v:k for k,v in awg_equiv_table.items()}
|
||||
|
||||
def awg_equiv(mm2):
|
||||
awg_equiv_table = {
|
||||
'0.09': 28,
|
||||
'0.14': 26,
|
||||
'0.25': 24,
|
||||
'0.34': 22,
|
||||
'0.5': 21,
|
||||
'0.75': 20,
|
||||
'1': 18,
|
||||
'1.5': 16,
|
||||
'2.5': 14,
|
||||
'4': 12,
|
||||
'6': 10,
|
||||
'10': 8,
|
||||
'16': 6,
|
||||
'25': 4,
|
||||
'35': 2,
|
||||
'50': 1,
|
||||
}
|
||||
k = str(mm2)
|
||||
if k in awg_equiv_table:
|
||||
return awg_equiv_table[k]
|
||||
else:
|
||||
return 'unknown'
|
||||
return awg_equiv_table.get(str(mm2), 'Unknown')
|
||||
|
||||
def mm2_equiv(awg):
|
||||
return mm2_equiv_table.get(str(awg), 'Unknown')
|
||||
|
||||
def nested(inp):
|
||||
l = []
|
||||
|
||||