diff --git a/examples/ex16.bom.tsv b/examples/ex16.bom.tsv index 32b8aff..1fb930f 100644 --- a/examples/ex16.bom.tsv +++ b/examples/ex16.bom.tsv @@ -1,6 +1,6 @@ Id Description Qty Unit Designators Manufacturer MPN 1 Cable, Serial, 4 x 0.25 mm² shielded 0.2 m W1 2 Connector, Molex KK 254, female, 7 pins 2 X1, X2 -3 shortPartA 42 mm X1-LO1 WireViz 42XCD42A5 -4 shortPartB 74 mm X1-LO2 WireViz 42XCD42A5 -5 shortPartC 21 mm X2-LO1; X2-LO2 WireViz 42XCD42A5 +3 loopPartA 42 mm X1-LO1 WireViz 42XCD42A5 +4 loopPartB 74 mm X1-LO2 WireViz 42XCD42A5 +5 loopPartC 21 mm X2-LO1; X2-LO2 WireViz 42XCD42A5 diff --git a/examples/ex16.gv b/examples/ex16.gv index 40df816..c679055 100644 --- a/examples/ex16.gv +++ b/examples/ex16.gv @@ -58,21 +58,21 @@ graph { - +
42 mm x LO1 x shortPartA
WireViz: 42XCD42A5
42 mm x LO1 x loopPartA
WireViz: 42XCD42A5
- +
74 mm x LO2 x shortPartB
WireViz: 42XCD42A5
74 mm x LO2 x loopPartB
WireViz: 42XCD42A5
> fillcolor="#FFFFFF" shape=box style=filled] edge [color="#000000:#FF66CC:#000000"] - X1:p1r:e -- X1:p5r:e - X1:p5r:e -- X1:p7r:e + X1:p1r:e -- X1:p5r:e [label="X1-LO1"] + X1:p5r:e -- X1:p7r:e [label="X1-LO1"] edge [color="#000000:#FF0000:#0066FF:#FF8000:#A0DFFF:#000000"] - X1:p2r:e -- X1:p6r:e + X1:p2r:e -- X1:p6r:e [label="X1-LO2"] edge [headclip=true style=bold tailclip=true] X2 [label=< @@ -127,16 +127,16 @@ graph {
- +
42 mm x LO1; LO2 x shortPartC
WireViz: 42XCD42A5
42 mm x LO1; LO2 x loopPartC
WireViz: 42XCD42A5
> fillcolor="#FFFFFF" shape=box style=filled] edge [color="#000000:#FF66CC:#000000"] - X2:p1l:w -- X2:p5l:w - X2:p5l:w -- X2:p7l:w + X2:p1l:w -- X2:p5l:w [label="X2-LO1"] + X2:p5l:w -- X2:p7l:w [label="X2-LO1"] edge [color="#000000:#FF66CC:#000000"] - X2:p2l:w -- X2:p6l:w + X2:p2l:w -- X2:p6l:w [label="X2-LO2"] edge [color="#000000:#895956:#000000"] X1:p1r:e -- W1:w1:w W1:w1:e -- X2:p1l:w diff --git a/examples/ex16.html b/examples/ex16.html index b12239a..b65cd03 100644 --- a/examples/ex16.html +++ b/examples/ex16.html @@ -33,10 +33,10 @@ - - - + + + X1 @@ -80,230 +80,236 @@ Additional components -42 mm x LO1 x shortPartA +42 mm x LO1 x loopPartA WireViz: 42XCD42A5 -74 mm x LO2 x shortPartB +74 mm x LO2 x loopPartB WireViz: 42XCD42A5 X1:e--X1:e - - - + + + +X1-LO1 X1:e--X1:e - - - + + + +X1-LO1 X1:e--X1:e - - - - - - + + + + + + +X1-LO2 W1 - - -W1 - -Serial - -4x - -0.25 mm² (24 AWG) - -+ S - -0.2 m -  -X1:1:GND -     1:BN     -X2:1:GND -X1:2:VCC -     2:RD     -X2:2:VCC -X1:3:RX -     3:OG     -X2:4:TX -X1:4:TX -     4:YE     -X2:3:RX -  -X1:1:GND -Shield -  + + +W1 + +Serial + +4x + +0.25 mm² (24 AWG) + ++ S + +0.2 m +  +X1:1:GND +     1:BN     +X2:1:GND +X1:2:VCC +     2:RD     +X2:2:VCC +X1:3:RX +     3:OG     +X2:4:TX +X1:4:TX +     4:YE     +X2:3:RX +  +X1:1:GND +Shield +  X1:e--W1:w - - - + + + X1:e--W1:w - - - + + + X1:e--W1:w - - - + + + X1:e--W1:w - - - + + + X1:e--W1:w - + W1:w--W1:e - - - + + + W1:w--W1:e - - - + + + W1:w--W1:e - - - + + + W1:w--W1:e - - - + + + W1:w--W1:e - + X2 - - -X2 - -Molex KK 254 - -female - -7-pin - -1 - -GND - -2 - -VCC - -3 - -RX - -4 - -TX - -5 - -GND - -6 - -VCC - -7 - -GND - -Additional components - -42 mm x LO1; LO2 x shortPartC -WireViz: 42XCD42A5 + + +X2 + +Molex KK 254 + +female + +7-pin + +1 + +GND + +2 + +VCC + +3 + +RX + +4 + +TX + +5 + +GND + +6 + +VCC + +7 + +GND + +Additional components + +42 mm x LO1; LO2 x loopPartC +WireViz: 42XCD42A5 W1:e--X2:w - - - + + + W1:e--X2:w - - - + + + W1:e--X2:w - - - + + + W1:e--X2:w - - - + + + X2:w--X2:w - - - + + + +X2-LO1 X2:w--X2:w - - - + + + +X2-LO1 X2:w--X2:w - - - + + + +X2-LO2 @@ -347,7 +353,7 @@
3 - shortPartA + loopPartA 42 mm X1-LO1 @@ -356,7 +362,7 @@
4 - shortPartB + loopPartB 74 mm X1-LO2 @@ -365,7 +371,7 @@
5 - shortPartC + loopPartC 21 mm X2-LO1; X2-LO2 diff --git a/examples/ex16.png b/examples/ex16.png index 28abb7d..ed6cd61 100644 Binary files a/examples/ex16.png and b/examples/ex16.png differ diff --git a/examples/ex16.svg b/examples/ex16.svg index 3248e97..050a2b4 100644 --- a/examples/ex16.svg +++ b/examples/ex16.svg @@ -4,10 +4,10 @@ - - - + + + X1 @@ -51,230 +51,236 @@ Additional components -42 mm x LO1 x shortPartA +42 mm x LO1 x loopPartA WireViz: 42XCD42A5 -74 mm x LO2 x shortPartB +74 mm x LO2 x loopPartB WireViz: 42XCD42A5 X1:e--X1:e - - - + + + +X1-LO1 X1:e--X1:e - - - + + + +X1-LO1 X1:e--X1:e - - - - - - + + + + + + +X1-LO2 W1 - - -W1 - -Serial - -4x - -0.25 mm² (24 AWG) - -+ S - -0.2 m -  -X1:1:GND -     1:BN     -X2:1:GND -X1:2:VCC -     2:RD     -X2:2:VCC -X1:3:RX -     3:OG     -X2:4:TX -X1:4:TX -     4:YE     -X2:3:RX -  -X1:1:GND -Shield -  + + +W1 + +Serial + +4x + +0.25 mm² (24 AWG) + ++ S + +0.2 m +  +X1:1:GND +     1:BN     +X2:1:GND +X1:2:VCC +     2:RD     +X2:2:VCC +X1:3:RX +     3:OG     +X2:4:TX +X1:4:TX +     4:YE     +X2:3:RX +  +X1:1:GND +Shield +  X1:e--W1:w - - - + + + X1:e--W1:w - - - + + + X1:e--W1:w - - - + + + X1:e--W1:w - - - + + + X1:e--W1:w - + W1:w--W1:e - - - + + + W1:w--W1:e - - - + + + W1:w--W1:e - - - + + + W1:w--W1:e - - - + + + W1:w--W1:e - + X2 - - -X2 - -Molex KK 254 - -female - -7-pin - -1 - -GND - -2 - -VCC - -3 - -RX - -4 - -TX - -5 - -GND - -6 - -VCC - -7 - -GND - -Additional components - -42 mm x LO1; LO2 x shortPartC -WireViz: 42XCD42A5 + + +X2 + +Molex KK 254 + +female + +7-pin + +1 + +GND + +2 + +VCC + +3 + +RX + +4 + +TX + +5 + +GND + +6 + +VCC + +7 + +GND + +Additional components + +42 mm x LO1; LO2 x loopPartC +WireViz: 42XCD42A5 W1:e--X2:w - - - + + + W1:e--X2:w - - - + + + W1:e--X2:w - - - + + + W1:e--X2:w - - - + + + X2:w--X2:w - - - + + + +X2-LO1 X2:w--X2:w - - - + + + +X2-LO1 X2:w--X2:w - - - + + + +X2-LO2 diff --git a/examples/ex16.yml b/examples/ex16.yml index f664edd..882302d 100644 --- a/examples/ex16.yml +++ b/examples/ex16.yml @@ -14,14 +14,14 @@ connectors: # This is based on ex1 and adds some Loops to the connectors color: PK # The color of the short, can also be multicolor manufacturer: WireViz mpn: 42XCD42A5 - type: shortPartA + type: loopPartA qty: 42 # The length or some other quantity unit: mm # The unit of the qty, in this example the length - references: LO2 color: RDBUOGLB # multicolor example manufacturer: WireViz mpn: 42XCD42A5 - type: shortPartB + type: loopPartB qty: 74 unit: mm @@ -37,7 +37,7 @@ connectors: # This is based on ex1 and adds some Loops to the connectors color: PK manufacturer: WireViz mpn: 42XCD42A5 - type: shortPartC + type: loopPartC qty: 21 unit: mm diff --git a/src/wireviz/Harness.py b/src/wireviz/Harness.py index 2a9845f..2c953d9 100644 --- a/src/wireviz/Harness.py +++ b/src/wireviz/Harness.py @@ -348,6 +348,7 @@ class Harness: dot.edge( f"{connector.name}:p{loopPins[i - 1]}{loop_side}:{loop_dir}", f"{connector.name}:p{loopPins[i]}{loop_side}:{loop_dir}", + label=f"{connector.name}-{loopName}", ) # if len(connector.loops) > 0: