diff --git a/examples/demo01.bom.tsv b/examples/demo01.bom.tsv index 43f2d71..d753410 100644 --- a/examples/demo01.bom.tsv +++ b/examples/demo01.bom.tsv @@ -1,4 +1,4 @@ Item Qty Unit Designators -D-Sub, female, 9 pins 1 X1 -Molex KK 254, female, 3 pins 1 X2 -Cable 3 x 0.25 mm² shielded 0.2 m W1 +Connector, D-Sub, female, 9 pins 1 X1 +Connector, Molex KK 254, female, 3 pins 1 X2 +Cable, 3 x 0.25 mm² shielded 0.2 m W1 diff --git a/examples/demo01.html b/examples/demo01.html index f490520..cfedd06 100644 --- a/examples/demo01.html +++ b/examples/demo01.html @@ -168,4 +168,4 @@ -

Bill of Materials

ItemQtyUnitDesignators
D-Sub, female, 9 pins1X1
Molex KK 254, female, 3 pins1X2
Cable 3 x 0.25 mm² shielded0.2mW1
\ No newline at end of file +

Bill of Materials

ItemQtyUnitDesignators
Connector, D-Sub, female, 9 pins1X1
Connector, Molex KK 254, female, 3 pins1X2
Cable, 3 x 0.25 mm² shielded0.2mW1
\ No newline at end of file diff --git a/examples/demo02.bom.tsv b/examples/demo02.bom.tsv index 5fe7ab1..bbaf4a1 100644 --- a/examples/demo02.bom.tsv +++ b/examples/demo02.bom.tsv @@ -1,13 +1,13 @@ Item Qty Unit Designators -Crimp ferrule, 0.25 mm² 2 -Molex KK 254, female, 4 pins 2 X2, X3 -Molex KK 254, female, 5 pins 1 X4 -Molex KK 254, female, 8 pins 1 X1 -Cable 2 x 0.25 mm² 0.3 m W4 -Wire 0.14 mm² BK 0.9 m W1, W2, W3 -Wire 0.14 mm² BU 0.3 m W3 -Wire 0.14 mm² GN 0.6 m W1, W2 -Wire 0.14 mm² OG 0.3 m W3 -Wire 0.14 mm² RD 0.6 m W1, W2 -Wire 0.14 mm² VT 0.3 m W3 -Wire 0.14 mm² YE 0.6 m W1, W2 +Connector, Crimp ferrule, 0.25 mm² 2 +Connector, Molex KK 254, female, 4 pins 2 X2, X3 +Connector, Molex KK 254, female, 5 pins 1 X4 +Connector, Molex KK 254, female, 8 pins 1 X1 +Cable, 2 x 0.25 mm² 0.3 m W4 +Wire, 0.14 mm², BK 0.9 m W1, W2, W3 +Wire, 0.14 mm², BU 0.3 m W3 +Wire, 0.14 mm², GN 0.6 m W1, W2 +Wire, 0.14 mm², OG 0.3 m W3 +Wire, 0.14 mm², RD 0.6 m W1, W2 +Wire, 0.14 mm², VT 0.3 m W3 +Wire, 0.14 mm², YE 0.6 m W1, W2 diff --git a/examples/demo02.gv b/examples/demo02.gv index fa19809..3e8f42d 100644 --- a/examples/demo02.gv +++ b/examples/demo02.gv @@ -8,7 +8,7 @@ graph { X2 [label="X2|{Molex KK 254|female|4-pin}|{{1|2|3|4}|{GND|+5V|SCL|SDA}}"] X3 [label="X3|{Molex KK 254|female|4-pin}|{{1|2|3|4}|{GND|+5V|SCL|SDA}}"] X4 [label="X4|{Molex KK 254|female|5-pin}|{{1|2|3|4|5}|{GND|+12V|MISO|MOSI|SCK}}"] - F1 [label=< + _F1 [label=< @@ -18,7 +18,7 @@ graph { > margin=0 orientation=180 shape=none style=filled] - F2 [label=< + _F2 [label=<
Crimp ferrule, 0.25 mm²
@@ -68,9 +68,9 @@ graph { W3:w4:e -- X4:p5l:w W3 [label=<
Crimp ferrule, 0.25 mm²
W3
4x0.14 mm² (26 AWG)0.3 m
 
X1:1BKX4:1
X1:5BUX4:3
X1:6OGX4:4
X1:7VTX4:5
 
> fillcolor=white margin=0 shape=box style="filled,dashed"] edge [color="#000000:#000000:#000000"] - F1:e -- W4:w1:w + _F1:e -- W4:w1:w edge [color="#000000:#ff0000:#000000"] - F2:e -- W4:w2:w + _F2:e -- W4:w2:w edge [color="#000000:#000000:#000000"] W4:w1:e -- X4:p1l:w edge [color="#000000:#ff0000:#000000"] diff --git a/examples/demo02.html b/examples/demo02.html index 25797b0..a63a0c6 100644 --- a/examples/demo02.html +++ b/examples/demo02.html @@ -341,9 +341,9 @@ SCK - + -F1 +_F1 Crimp ferrule, 0.25 mm²     @@ -374,24 +374,24 @@   - + -F1:e--W4:w +_F1:e--W4:w - + -F2 +_F2 Crimp ferrule, 0.25 mm²     - + -F2:e--W4:w +_F2:e--W4:w @@ -496,4 +496,4 @@ -

Bill of Materials

ItemQtyUnitDesignators
Crimp ferrule, 0.25 mm²2
Molex KK 254, female, 4 pins2X2, X3
Molex KK 254, female, 5 pins1X4
Molex KK 254, female, 8 pins1X1
Cable 2 x 0.25 mm²0.3mW4
Wire 0.14 mm² BK0.9mW1, W2, W3
Wire 0.14 mm² BU0.3mW3
Wire 0.14 mm² GN0.6mW1, W2
Wire 0.14 mm² OG0.3mW3
Wire 0.14 mm² RD0.6mW1, W2
Wire 0.14 mm² VT0.3mW3
Wire 0.14 mm² YE0.6mW1, W2
\ No newline at end of file +

Bill of Materials

ItemQtyUnitDesignators
Connector, Crimp ferrule, 0.25 mm²2
Connector, Molex KK 254, female, 4 pins2X2, X3
Connector, Molex KK 254, female, 5 pins1X4
Connector, Molex KK 254, female, 8 pins1X1
Cable, 2 x 0.25 mm²0.3mW4
Wire, 0.14 mm², BK0.9mW1, W2, W3
Wire, 0.14 mm², BU0.3mW3
Wire, 0.14 mm², GN0.6mW1, W2
Wire, 0.14 mm², OG0.3mW3
Wire, 0.14 mm², RD0.6mW1, W2
Wire, 0.14 mm², VT0.3mW3
Wire, 0.14 mm², YE0.6mW1, W2
\ No newline at end of file diff --git a/examples/demo02.svg b/examples/demo02.svg index 60a0a9e..3b8a93e 100644 --- a/examples/demo02.svg +++ b/examples/demo02.svg @@ -341,9 +341,9 @@ SCK - + -F1 +_F1 Crimp ferrule, 0.25 mm²     @@ -374,24 +374,24 @@   - + -F1:e--W4:w +_F1:e--W4:w - + -F2 +_F2 Crimp ferrule, 0.25 mm²     - + -F2:e--W4:w +_F2:e--W4:w diff --git a/examples/ex01.bom.tsv b/examples/ex01.bom.tsv index f1a36cd..6eeb436 100644 --- a/examples/ex01.bom.tsv +++ b/examples/ex01.bom.tsv @@ -1,3 +1,3 @@ Item Qty Unit Designators -Molex KK 254, female, 4 pins 2 X1, X2 -Cable 4 x 0.25 mm² shielded 0.2 m W1 +Connector, Molex KK 254, female, 4 pins 2 X1, X2 +Cable, 4 x 0.25 mm² shielded 0.2 m W1 diff --git a/examples/ex01.html b/examples/ex01.html index 22856aa..5c03d91 100644 --- a/examples/ex01.html +++ b/examples/ex01.html @@ -172,4 +172,4 @@ -

Bill of Materials

ItemQtyUnitDesignators
Molex KK 254, female, 4 pins2X1, X2
Cable 4 x 0.25 mm² shielded0.2mW1
\ No newline at end of file +

Bill of Materials

ItemQtyUnitDesignators
Connector, Molex KK 254, female, 4 pins2X1, X2
Cable, 4 x 0.25 mm² shielded0.2mW1
\ No newline at end of file diff --git a/examples/ex02.bom.tsv b/examples/ex02.bom.tsv index 61e34ab..4c8d11e 100644 --- a/examples/ex02.bom.tsv +++ b/examples/ex02.bom.tsv @@ -1,4 +1,4 @@ Item Qty Unit Designators -Molex Micro-Fit, female, 2 pins 3 X2, X3, X4 -Molex Micro-Fit, male, 2 pins 1 X1 -Cable 2 x 0.25 mm² 0.6 m W1, W2, W3 +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 diff --git a/examples/ex02.html b/examples/ex02.html index 152b7a2..148fa57 100644 --- a/examples/ex02.html +++ b/examples/ex02.html @@ -255,4 +255,4 @@ -

Bill of Materials

ItemQtyUnitDesignators
Molex Micro-Fit, female, 2 pins3X2, X3, X4
Molex Micro-Fit, male, 2 pins1X1
Cable 2 x 0.25 mm²0.6mW1, W2, W3
\ No newline at end of file +

Bill of Materials

ItemQtyUnitDesignators
Connector, Molex Micro-Fit, female, 2 pins3X2, X3, X4
Connector, Molex Micro-Fit, male, 2 pins1X1
Cable, 2 x 0.25 mm²0.6mW1, W2, W3
\ No newline at end of file diff --git a/examples/ex03.bom.tsv b/examples/ex03.bom.tsv index bb66fbc..98d3491 100644 --- a/examples/ex03.bom.tsv +++ b/examples/ex03.bom.tsv @@ -1,5 +1,5 @@ Item Qty Unit Designators -Molex Micro-Fit, female, 2 pins 3 X2, X3, X4 -Molex Micro-Fit, male, 2 pins 1 X1 -Wire 0.25 mm² BK 0.6 m W1 -Wire 0.25 mm² RD 0.6 m W1 +Connector, Molex Micro-Fit, female, 2 pins 3 X2, X3, X4 +Connector, Molex Micro-Fit, male, 2 pins 1 X1 +Wire, 0.25 mm², BK 0.6 m W1 +Wire, 0.25 mm², RD 0.6 m W1 diff --git a/examples/ex03.html b/examples/ex03.html index fa7fe59..9490593 100644 --- a/examples/ex03.html +++ b/examples/ex03.html @@ -225,4 +225,4 @@ -

Bill of Materials

ItemQtyUnitDesignators
Molex Micro-Fit, female, 2 pins3X2, X3, X4
Molex Micro-Fit, male, 2 pins1X1
Wire 0.25 mm² BK0.6mW1
Wire 0.25 mm² RD0.6mW1
\ No newline at end of file +

Bill of Materials

ItemQtyUnitDesignators
Connector, Molex Micro-Fit, female, 2 pins3X2, X3, X4
Connector, Molex Micro-Fit, male, 2 pins1X1
Wire, 0.25 mm², BK0.6mW1
Wire, 0.25 mm², RD0.6mW1
\ No newline at end of file diff --git a/examples/ex04.bom.tsv b/examples/ex04.bom.tsv index cfa8f84..edee58d 100644 --- a/examples/ex04.bom.tsv +++ b/examples/ex04.bom.tsv @@ -1,8 +1,8 @@ Item Qty Unit Designators -Crimp ferrule 12 -Wire 0.25 mm² BN 0.2 m W1 -Wire 0.25 mm² BU 0.2 m W1 -Wire 0.25 mm² GN 0.2 m W1 -Wire 0.25 mm² OG 0.2 m W1 -Wire 0.25 mm² RD 0.2 m W1 -Wire 0.25 mm² YE 0.2 m W1 +Connector, Crimp ferrule 12 +Wire, 0.25 mm², BN 0.2 m W1 +Wire, 0.25 mm², BU 0.2 m W1 +Wire, 0.25 mm², GN 0.2 m W1 +Wire, 0.25 mm², OG 0.2 m W1 +Wire, 0.25 mm², RD 0.2 m W1 +Wire, 0.25 mm², YE 0.2 m W1 diff --git a/examples/ex04.gv b/examples/ex04.gv index 5715530..7d4428b 100644 --- a/examples/ex04.gv +++ b/examples/ex04.gv @@ -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] - F1 [label=< + _F1 [label=< @@ -14,7 +14,7 @@ graph { > margin=0 orientation=180 shape=none style=filled] - F2 [label=< + _F2 [label=<
Crimp ferrule
@@ -24,7 +24,7 @@ graph { > margin=0 orientation=180 shape=none style=filled] - F3 [label=< + _F3 [label=<
Crimp ferrule
@@ -34,7 +34,7 @@ graph { > margin=0 orientation=180 shape=none style=filled] - F4 [label=< + _F4 [label=<
Crimp ferrule
@@ -44,7 +44,7 @@ graph { > margin=0 orientation=180 shape=none style=filled] - F5 [label=< + _F5 [label=<
Crimp ferrule
@@ -54,7 +54,7 @@ graph { > margin=0 orientation=180 shape=none style=filled] - F6 [label=< + _F6 [label=<
Crimp ferrule
@@ -64,7 +64,7 @@ graph { > margin=0 orientation=180 shape=none style=filled] - F7 [label=< + _F7 [label=<
Crimp ferrule
@@ -74,7 +74,7 @@ graph { > margin=0 orientation=0 shape=none style=filled] - F8 [label=< + _F8 [label=<
@@ -84,7 +84,7 @@ graph { > margin=0 orientation=0 shape=none style=filled] - F9 [label=< + _F9 [label=<
@@ -94,7 +94,7 @@ graph { > margin=0 orientation=0 shape=none style=filled] - F10 [label=< + _F10 [label=<
@@ -104,7 +104,7 @@ graph { > margin=0 orientation=0 shape=none style=filled] - F11 [label=< + _F11 [label=<
@@ -114,7 +114,7 @@ graph { > margin=0 orientation=0 shape=none style=filled] - F12 [label=< + _F12 [label=<
@@ -125,28 +125,28 @@ graph { > margin=0 orientation=0 shape=none style=filled] edge [color="#000000:#666600:#000000"] - F1:e -- W1:w1:w + _F1:e -- W1:w1:w edge [color="#000000:#ff0000:#000000"] - F2:e -- W1:w2:w + _F2:e -- W1:w2:w edge [color="#000000:#ff8000:#000000"] - F3:e -- W1:w3:w + _F3:e -- W1:w3:w edge [color="#000000:#ffff00:#000000"] - F4:e -- W1:w4:w + _F4:e -- W1:w4:w edge [color="#000000:#00ff00:#000000"] - F5:e -- W1:w5:w + _F5:e -- W1:w5:w edge [color="#000000:#0066ff:#000000"] - F6:e -- W1:w6:w + _F6:e -- W1:w6:w edge [color="#000000:#0066ff:#000000"] - W1:w6:e -- F7:w + W1:w6:e -- _F7:w edge [color="#000000:#00ff00:#000000"] - W1:w5:e -- F8:w + W1:w5:e -- _F8:w edge [color="#000000:#ffff00:#000000"] - W1:w4:e -- F9:w + W1:w4:e -- _F9:w edge [color="#000000:#ff8000:#000000"] - W1:w3:e -- F10:w + W1:w3:e -- _F10:w edge [color="#000000:#ff0000:#000000"] - W1:w2:e -- F11:w + W1:w2:e -- _F11:w edge [color="#000000:#666600:#000000"] - W1:w1:e -- F12:w + W1:w1:e -- _F12:w W1 [label=<
W1
6x0.25 mm² (24 AWG)0.2 m
 
BN
RD
OG
YE
GN
BU
 
> fillcolor=white margin=0 shape=box style="filled,dashed"] } diff --git a/examples/ex04.html b/examples/ex04.html index 807969f..4c44171 100644 --- a/examples/ex04.html +++ b/examples/ex04.html @@ -8,9 +8,9 @@ viewBox="0.00 0.00 712.00 344.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> - + -F1 +_F1 Crimp ferrule     @@ -55,178 +55,178 @@   - + -F1:e--W1:w +_F1:e--W1:w - + -F2 +_F2 Crimp ferrule     - + -F2:e--W1:w +_F2:e--W1:w - + -F3 +_F3 Crimp ferrule     - + -F3:e--W1:w +_F3:e--W1:w - + -F4 +_F4 Crimp ferrule     - + -F4:e--W1:w +_F4:e--W1:w - + -F5 +_F5 Crimp ferrule     - + -F5:e--W1:w +_F5:e--W1:w - + -F6 +_F6 Crimp ferrule     - + -F6:e--W1:w +_F6:e--W1:w - + -F7 +_F7   Crimp ferrule   - + -F8 +_F8   Crimp ferrule   - + -F9 +_F9   Crimp ferrule   - + -F10 +_F10   Crimp ferrule   - + -F11 +_F11   Crimp ferrule   - + -F12 +_F12   Crimp ferrule   - + -W1:e--F7:w +W1:e--_F7:w - + -W1:e--F8:w +W1:e--_F8:w - + -W1:e--F9:w +W1:e--_F9:w - + -W1:e--F10:w +W1:e--_F10:w - + -W1:e--F11:w +W1:e--_F11:w - + -W1:e--F12:w +W1:e--_F12:w -

Bill of Materials

ItemQtyUnitDesignators
Crimp ferrule12
Wire 0.25 mm² BN0.2mW1
Wire 0.25 mm² BU0.2mW1
Wire 0.25 mm² GN0.2mW1
Wire 0.25 mm² OG0.2mW1
Wire 0.25 mm² RD0.2mW1
Wire 0.25 mm² YE0.2mW1
\ No newline at end of file +

Bill of Materials

ItemQtyUnitDesignators
Connector, Crimp ferrule12
Wire, 0.25 mm², BN0.2mW1
Wire, 0.25 mm², BU0.2mW1
Wire, 0.25 mm², GN0.2mW1
Wire, 0.25 mm², OG0.2mW1
Wire, 0.25 mm², RD0.2mW1
Wire, 0.25 mm², YE0.2mW1
\ No newline at end of file diff --git a/examples/ex04.svg b/examples/ex04.svg index 8272dec..ecf2e71 100644 --- a/examples/ex04.svg +++ b/examples/ex04.svg @@ -8,9 +8,9 @@ viewBox="0.00 0.00 712.00 344.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> - + -F1 +_F1 Crimp ferrule     @@ -55,174 +55,174 @@   - + -F1:e--W1:w +_F1:e--W1:w - + -F2 +_F2 Crimp ferrule     - + -F2:e--W1:w +_F2:e--W1:w - + -F3 +_F3 Crimp ferrule     - + -F3:e--W1:w +_F3:e--W1:w - + -F4 +_F4 Crimp ferrule     - + -F4:e--W1:w +_F4:e--W1:w - + -F5 +_F5 Crimp ferrule     - + -F5:e--W1:w +_F5:e--W1:w - + -F6 +_F6 Crimp ferrule     - + -F6:e--W1:w +_F6:e--W1:w - + -F7 +_F7   Crimp ferrule   - + -F8 +_F8   Crimp ferrule   - + -F9 +_F9   Crimp ferrule   - + -F10 +_F10   Crimp ferrule   - + -F11 +_F11   Crimp ferrule   - + -F12 +_F12   Crimp ferrule   - + -W1:e--F7:w +W1:e--_F7:w - + -W1:e--F8:w +W1:e--_F8:w - + -W1:e--F9:w +W1:e--_F9:w - + -W1:e--F10:w +W1:e--_F10:w - + -W1:e--F11:w +W1:e--_F11:w - + -W1:e--F12:w +W1:e--_F12:w diff --git a/examples/ex05.bom.tsv b/examples/ex05.bom.tsv index 3314de6..d80fedd 100644 --- a/examples/ex05.bom.tsv +++ b/examples/ex05.bom.tsv @@ -1,6 +1,6 @@ Item Qty Unit Designators -Molex KK 254, female, 4 pins 3 X1, X2, X3 -Wire 0.25 mm² PK 0.4 m W1, W2 -Wire 0.25 mm² TQ 0.4 m W1, W2 -Wire 0.25 mm² VT 0.4 m W1, W2 -Wire 0.25 mm² YE 0.4 m W1, W2 +Connector, Molex KK 254, female, 4 pins 3 X1, X2, X3 +Wire, 0.25 mm², PK 0.4 m W1, W2 +Wire, 0.25 mm², TQ 0.4 m W1, W2 +Wire, 0.25 mm², VT 0.4 m W1, W2 +Wire, 0.25 mm², YE 0.4 m W1, W2 diff --git a/examples/ex05.html b/examples/ex05.html index dc6d5dd..f8fc416 100644 --- a/examples/ex05.html +++ b/examples/ex05.html @@ -292,4 +292,4 @@ -

Bill of Materials

ItemQtyUnitDesignators
Molex KK 254, female, 4 pins3X1, X2, X3
Wire 0.25 mm² PK0.4mW1, W2
Wire 0.25 mm² TQ0.4mW1, W2
Wire 0.25 mm² VT0.4mW1, W2
Wire 0.25 mm² YE0.4mW1, W2
\ No newline at end of file +

Bill of Materials

ItemQtyUnitDesignators
Connector, Molex KK 254, female, 4 pins3X1, X2, X3
Wire, 0.25 mm², PK0.4mW1, W2
Wire, 0.25 mm², TQ0.4mW1, W2
Wire, 0.25 mm², VT0.4mW1, W2
Wire, 0.25 mm², YE0.4mW1, W2
\ No newline at end of file diff --git a/examples/ex06.bom.tsv b/examples/ex06.bom.tsv index d4bb657..7885f32 100644 --- a/examples/ex06.bom.tsv +++ b/examples/ex06.bom.tsv @@ -1,6 +1,6 @@ Item Qty Unit Designators -Molex KK 254, female, 4 pins 6 X1, X2, X3, X4, X5, X6 -Wire 0.25 mm² PK 1.0 m W1, W2, W3, W4, W5 -Wire 0.25 mm² TQ 1.0 m W1, W2, W3, W4, W5 -Wire 0.25 mm² VT 1.0 m W1, W2, W3, W4, W5 -Wire 0.25 mm² YE 1.0 m W1, W2, W3, W4, W5 +Connector, Molex KK 254, female, 4 pins 6 X1, X2, X3, X4, X5, X6 +Wire, 0.25 mm², PK 1.0 m W1, W2, W3, W4, W5 +Wire, 0.25 mm², TQ 1.0 m W1, W2, W3, W4, W5 +Wire, 0.25 mm², VT 1.0 m W1, W2, W3, W4, W5 +Wire, 0.25 mm², YE 1.0 m W1, W2, W3, W4, W5 diff --git a/examples/ex06.html b/examples/ex06.html index 1700d54..ea542d0 100644 --- a/examples/ex06.html +++ b/examples/ex06.html @@ -653,4 +653,4 @@ -

Bill of Materials

ItemQtyUnitDesignators
Molex KK 254, female, 4 pins6X1, X2, X3, X4, X5, X6
Wire 0.25 mm² PK1.0mW1, W2, W3, W4, W5
Wire 0.25 mm² TQ1.0mW1, W2, W3, W4, W5
Wire 0.25 mm² VT1.0mW1, W2, W3, W4, W5
Wire 0.25 mm² YE1.0mW1, W2, W3, W4, W5
\ No newline at end of file +

Bill of Materials

ItemQtyUnitDesignators
Connector, Molex KK 254, female, 4 pins6X1, X2, X3, X4, X5, X6
Wire, 0.25 mm², PK1.0mW1, W2, W3, W4, W5
Wire, 0.25 mm², TQ1.0mW1, W2, W3, W4, W5
Wire, 0.25 mm², VT1.0mW1, W2, W3, W4, W5
Wire, 0.25 mm², YE1.0mW1, W2, W3, W4, W5
\ No newline at end of file diff --git a/examples/ex07.bom.tsv b/examples/ex07.bom.tsv new file mode 100644 index 0000000..ff4b2d7 --- /dev/null +++ b/examples/ex07.bom.tsv @@ -0,0 +1,4 @@ +Item Qty Unit Designators +Connector, D-Sub, female, 9 pins 1 X2 +Connector, TE 776164-1, female, 35 pins 1 X1 +Cable, 2 x 20 AWG 1 m C1 diff --git a/examples/ex07.gv b/examples/ex07.gv new file mode 100644 index 0000000..2a10a84 --- /dev/null +++ b/examples/ex07.gv @@ -0,0 +1,16 @@ +graph { +// Graph generated by WireViz +// https://github.com/formatc1702/WireViz + 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] + X1 [label="X1|{TE 776164-1|female|35-pin}|{{5|6}}|Unconnected pins are not shown"] + X2 [label="X2|{D-Sub|female|9-pin}|{{2|7}}|Unconnected pins are not shown"] + edge [color="#000000:#ffff00:#000000"] + X1:p5r:e -- C1:w1:w + C1:w1:e -- X2:p7l:w + edge [color="#000000:#00ff00:#000000"] + X1:p6r:e -- C1:w2:w + C1:w2:e -- X2:p2l:w + C1 [label=<
C1
2x20 AWG1 m
 
X1:5YEX2:7
X1:6GNX2:2
 
> fillcolor=white margin=0 shape=box style=""] +} diff --git a/examples/ex07.html b/examples/ex07.html new file mode 100644 index 0000000..c206174 --- /dev/null +++ b/examples/ex07.html @@ -0,0 +1,104 @@ +

Diagram

+ + + + + + + + +X1 + +X1 + +TE 776164-1 + +female + +35-pin + +5 + +6 + +Unconnected pins are not shown + + + +C1 + + +C1 + +2x + +20 AWG + +1 m +  +X1:5 +YE +X2:7 + + + +X1:6 +GN +X2:2 + + + +  + + + +X1:e--C1:w + + + + + + +X1:e--C1:w + + + + + + +X2 + +X2 + +D-Sub + +female + +9-pin + +2 + +7 + +Unconnected pins are not shown + + + +C1:e--X2:w + + + + + + +C1:e--X2:w + + + + + + +

Bill of Materials

ItemQtyUnitDesignators
Connector, D-Sub, female, 9 pins1X2
Connector, TE 776164-1, female, 35 pins1X1
Cable, 2 x 20 AWG1mC1
\ No newline at end of file diff --git a/examples/ex07.png b/examples/ex07.png new file mode 100644 index 0000000..2fc2ce6 Binary files /dev/null and b/examples/ex07.png differ diff --git a/examples/ex07.svg b/examples/ex07.svg new file mode 100644 index 0000000..a89b0a4 --- /dev/null +++ b/examples/ex07.svg @@ -0,0 +1,103 @@ + + + + + + + + + +X1 + +X1 + +TE 776164-1 + +female + +35-pin + +5 + +6 + +Unconnected pins are not shown + + + +C1 + + +C1 + +2x + +20 AWG + +1 m +  +X1:5 +YE +X2:7 + + + +X1:6 +GN +X2:2 + + + +  + + + +X1:e--C1:w + + + + + + +X1:e--C1:w + + + + + + +X2 + +X2 + +D-Sub + +female + +9-pin + +2 + +7 + +Unconnected pins are not shown + + + +C1:e--X2:w + + + + + + +C1:e--X2:w + + + + + + diff --git a/examples/ex07.yml b/examples/ex07.yml new file mode 100644 index 0000000..9ba9477 --- /dev/null +++ b/examples/ex07.yml @@ -0,0 +1,29 @@ +# contributed by @elliotmr + +connectors: + X1: + type: TE 776164-1 + subtype: female + hide_disconnected_pins: True + pincount: 35 + notes: Unconnected pins are not shown + + X2: + type: D-Sub + subtype: female + pincount: 9 + hide_disconnected_pins: True + notes: Unconnected pins are not shown + +cables: + C1: + wirecount: 2 + gauge: 20 AWG + colors: [YE, GN] + length: 1 + +connections: + - + - X1: [5,6] + - C1: [1,2] + - X2: [7,2] diff --git a/examples/ex08.bom.tsv b/examples/ex08.bom.tsv new file mode 100644 index 0000000..3457bbb --- /dev/null +++ b/examples/ex08.bom.tsv @@ -0,0 +1,3 @@ +Item Qty Unit Designators +Connector, Phone Connector, male 3.5, 3 pins 1 Key +Cable, 3 x 24 AWG shielded 0.2 m W1 diff --git a/examples/ex08.gv b/examples/ex08.gv new file mode 100644 index 0000000..a949333 --- /dev/null +++ b/examples/ex08.gv @@ -0,0 +1,17 @@ +graph { +// Graph generated by WireViz +// https://github.com/formatc1702/WireViz + 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}|{T|R|S}}"] + edge [color="#000000:#ffffff:#000000"] + Key:pSr:e -- W1:w1:w + edge [color="#000000:#666600:#000000"] + Key:pRr:e -- W1:w2:w + edge [color="#000000:#00ff00:#000000"] + Key:pTr:e -- W1:w3:w + edge [color="#000000"] + Key:pSr:e -- W1:ws:w + W1 [label=<
W1
3x24 AWG+ S0.2 m
 
Key:SWH
Key:RBN
Key:TGN
 
Key:SShield
 
> fillcolor=white margin=0 shape=box style=""] +} diff --git a/examples/ex08.html b/examples/ex08.html new file mode 100644 index 0000000..c290a0f --- /dev/null +++ b/examples/ex08.html @@ -0,0 +1,99 @@ +

Diagram

+ + + + + + + + +Key + +Key + +Phone Connector + +male 3.5 + +3-pin + +Dot + +Dash + +Ground + +T + +R + +S + + + +W1 + + +W1 + +3x + +24 AWG + ++ S + +0.2 m +  +Key:S +WH + + + +Key:R +BN + + + +Key:T +GN + + + +  +Key:S +Shield + +  + + + +Key:e--W1:w + + + + + + +Key:e--W1:w + + + + + + +Key:e--W1:w + + + + + + +Key:e--W1:w + + + + +

Bill of Materials

ItemQtyUnitDesignators
Connector, Phone Connector, male 3.5, 3 pins1Key
Cable, 3 x 24 AWG shielded0.2mW1
\ No newline at end of file diff --git a/examples/ex08.png b/examples/ex08.png new file mode 100644 index 0000000..a0270f7 Binary files /dev/null and b/examples/ex08.png differ diff --git a/examples/ex08.svg b/examples/ex08.svg new file mode 100644 index 0000000..0599c11 --- /dev/null +++ b/examples/ex08.svg @@ -0,0 +1,98 @@ + + + + + + + + + +Key + +Key + +Phone Connector + +male 3.5 + +3-pin + +Dot + +Dash + +Ground + +T + +R + +S + + + +W1 + + +W1 + +3x + +24 AWG + ++ S + +0.2 m +  +Key:S +WH + + + +Key:R +BN + + + +Key:T +GN + + + +  +Key:S +Shield + +  + + + +Key:e--W1:w + + + + + + +Key:e--W1:w + + + + + + +Key:e--W1:w + + + + + + +Key:e--W1:w + + + + diff --git a/examples/ex08.yml b/examples/ex08.yml new file mode 100644 index 0000000..0d42be5 --- /dev/null +++ b/examples/ex08.yml @@ -0,0 +1,24 @@ +# contributed by @cocide + +connectors: + Key: + type: Phone Connector + subtype: male 3.5 + pinnumbers: [T, R, S] + pinout: [Dot, Dash, Ground] + +cables: + W1: + gauge: 24 AWG + length: 0.2 + color_code: DIN + wirecount: 3 + shield: true + +connections: + - + - Key: [S,R,T] + - W1: [1,2,3] + - + - Key: S + - W1: s diff --git a/examples/ex09.bom.tsv b/examples/ex09.bom.tsv new file mode 100644 index 0000000..b07a154 --- /dev/null +++ b/examples/ex09.bom.tsv @@ -0,0 +1,4 @@ +Item Qty Unit Designators +Connector, D-Sub, male, 25 pins 1 X1 +Connector, F48, female, 48 pins 1 X2 +Cable, 12 x 0.25 mm² shielded 0.2 m W1 diff --git a/examples/ex09.gv b/examples/ex09.gv new file mode 100644 index 0000000..52df78a --- /dev/null +++ b/examples/ex09.gv @@ -0,0 +1,48 @@ +graph { +// Graph generated by WireViz +// https://github.com/formatc1702/WireViz + 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] + X1 [label="X1|{D-Sub|male|25-pin}|{{SENSE_P_1|SENSE_N_1|SENSE_P_2|SENSE_N_2|SENSE_P_3|SENSE_N_3|SENSE_P_4|SENSE_N_4|SENSE_P_5|SENSE_N_5|SENSE_P_6|SENSE_N_6|GND}|{1|14|3|16|5|18|7|20|9|22|11|24|13}}"] + X2 [label="X2|{F48|female|48-pin}|{{z2|b2|d2|z4|b4|d4|z6|b6|d6|z8|b8|d8|z10|b10|d10|z12|b12|d12|z14|b14|d14|z16|b16|d16|z18|b18|d18|z20|b20|d20|z22|b22|d22|z24|b24|d24|z26|b26|d26|z28|b28|d28|z30|b30|d30|z32|b32|d32}}"] + edge [color="#000000:#666600:#000000"] + X1:p1r:e -- W1:w2:w + W1:w2:e -- X2:pd4l:w + edge [color="#000000:#ffffff:#000000"] + X1:p14r:e -- W1:w1:w + W1:w1:e -- X2:pz2l:w + edge [color="#000000:#ffff00:#000000"] + X1:p3r:e -- W1:w4:w + W1:w4:e -- X2:pd10l:w + edge [color="#000000:#00ff00:#000000"] + X1:p16r:e -- W1:w3:w + W1:w3:e -- X2:pz8l:w + edge [color="#000000:#ff66cc:#000000"] + X1:p5r:e -- W1:w6:w + W1:w6:e -- X2:pd16l:w + edge [color="#000000:#999999:#000000"] + X1:p18r:e -- W1:w5:w + W1:w5:e -- X2:pz14l:w + edge [color="#000000:#ff0000:#000000"] + X1:p7r:e -- W1:w8:w + W1:w8:e -- X2:pd20l:w + edge [color="#000000:#0066ff:#000000"] + X1:p20r:e -- W1:w7:w + W1:w7:e -- X2:pz18l:w + edge [color="#000000:#8000ff:#000000"] + X1:p9r:e -- W1:w10:w + W1:w10:e -- X2:pd26l:w + edge [color="#000000:#000000:#000000"] + X1:p22r:e -- W1:w9:w + W1:w9:e -- X2:pz24l:w + edge [color="#000000:#666600:#000000"] + X1:p11r:e -- W1:w12:w + W1:w12:e -- X2:pd32l:w + edge [color="#000000:#ffffff:#000000"] + X1:p24r:e -- W1:w11:w + W1:w11:e -- X2:pz30l:w + edge [color="#000000"] + X1:p13r:e -- W1:ws:w + W1 [label=<
W1
12x0.25 mm²+ S0.2 m
 
X1:14WHX2:z2
X1:1BNX2:d4
X1:16GNX2:z8
X1:3YEX2:d10
X1:18GYX2:z14
X1:5PKX2:d16
X1:20BUX2:z18
X1:7RDX2:d20
X1:22BKX2:z24
X1:9VTX2:d26
X1:24WHX2:z30
X1:11BNX2:d32
 
X1:13Shield
 
> fillcolor=white margin=0 shape=box style=""] +} diff --git a/examples/ex09.html b/examples/ex09.html new file mode 100644 index 0000000..ccce9d5 --- /dev/null +++ b/examples/ex09.html @@ -0,0 +1,451 @@ +

Diagram

+ + + + + + + + +X1 + +X1 + +D-Sub + +male + +25-pin + +SENSE_P_1 + +SENSE_N_1 + +SENSE_P_2 + +SENSE_N_2 + +SENSE_P_3 + +SENSE_N_3 + +SENSE_P_4 + +SENSE_N_4 + +SENSE_P_5 + +SENSE_N_5 + +SENSE_P_6 + +SENSE_N_6 + +GND + +1 + +14 + +3 + +16 + +5 + +18 + +7 + +20 + +9 + +22 + +11 + +24 + +13 + + + +W1 + + +W1 + +12x + +0.25 mm² + ++ S + +0.2 m +  +X1:14 +WH +X2:z2 + + + +X1:1 +BN +X2:d4 + + + +X1:16 +GN +X2:z8 + + + +X1:3 +YE +X2:d10 + + + +X1:18 +GY +X2:z14 + + + +X1:5 +PK +X2:d16 + + + +X1:20 +BU +X2:z18 + + + +X1:7 +RD +X2:d20 + + + +X1:22 +BK +X2:z24 + + + +X1:9 +VT +X2:d26 + + + +X1:24 +WH +X2:z30 + + + +X1:11 +BN +X2:d32 + + + +  +X1:13 +Shield + +  + + + +X1:e--W1:w + + + + + + +X1:e--W1:w + + + + + + +X1:e--W1:w + + + + + + +X1:e--W1:w + + + + + + +X1:e--W1:w + + + + + + +X1:e--W1:w + + + + + + +X1:e--W1:w + + + + + + +X1:e--W1:w + + + + + + +X1:e--W1:w + + + + + + +X1:e--W1:w + + + + + + +X1:e--W1:w + + + + + + +X1:e--W1:w + + + + + + +X1:e--W1:w + + + + +X2 + +X2 + +F48 + +female + +48-pin + +z2 + +b2 + +d2 + +z4 + +b4 + +d4 + +z6 + +b6 + +d6 + +z8 + +b8 + +d8 + +z10 + +b10 + +d10 + +z12 + +b12 + +d12 + +z14 + +b14 + +d14 + +z16 + +b16 + +d16 + +z18 + +b18 + +d18 + +z20 + +b20 + +d20 + +z22 + +b22 + +d22 + +z24 + +b24 + +d24 + +z26 + +b26 + +d26 + +z28 + +b28 + +d28 + +z30 + +b30 + +d30 + +z32 + +b32 + +d32 + + + +W1:e--X2:w + + + + + + +W1:e--X2:w + + + + + + +W1:e--X2:w + + + + + + +W1:e--X2:w + + + + + + +W1:e--X2:w + + + + + + +W1:e--X2:w + + + + + + +W1:e--X2:w + + + + + + +W1:e--X2:w + + + + + + +W1:e--X2:w + + + + + + +W1:e--X2:w + + + + + + +W1:e--X2:w + + + + + + +W1:e--X2:w + + + + + + +

Bill of Materials

ItemQtyUnitDesignators
Connector, D-Sub, male, 25 pins1X1
Connector, F48, female, 48 pins1X2
Cable, 12 x 0.25 mm² shielded0.2mW1
\ No newline at end of file diff --git a/examples/ex09.png b/examples/ex09.png new file mode 100644 index 0000000..80c7662 Binary files /dev/null and b/examples/ex09.png differ diff --git a/examples/ex09.svg b/examples/ex09.svg new file mode 100644 index 0000000..29ba2bb --- /dev/null +++ b/examples/ex09.svg @@ -0,0 +1,450 @@ + + + + + + + + + +X1 + +X1 + +D-Sub + +male + +25-pin + +SENSE_P_1 + +SENSE_N_1 + +SENSE_P_2 + +SENSE_N_2 + +SENSE_P_3 + +SENSE_N_3 + +SENSE_P_4 + +SENSE_N_4 + +SENSE_P_5 + +SENSE_N_5 + +SENSE_P_6 + +SENSE_N_6 + +GND + +1 + +14 + +3 + +16 + +5 + +18 + +7 + +20 + +9 + +22 + +11 + +24 + +13 + + + +W1 + + +W1 + +12x + +0.25 mm² + ++ S + +0.2 m +  +X1:14 +WH +X2:z2 + + + +X1:1 +BN +X2:d4 + + + +X1:16 +GN +X2:z8 + + + +X1:3 +YE +X2:d10 + + + +X1:18 +GY +X2:z14 + + + +X1:5 +PK +X2:d16 + + + +X1:20 +BU +X2:z18 + + + +X1:7 +RD +X2:d20 + + + +X1:22 +BK +X2:z24 + + + +X1:9 +VT +X2:d26 + + + +X1:24 +WH +X2:z30 + + + +X1:11 +BN +X2:d32 + + + +  +X1:13 +Shield + +  + + + +X1:e--W1:w + + + + + + +X1:e--W1:w + + + + + + +X1:e--W1:w + + + + + + +X1:e--W1:w + + + + + + +X1:e--W1:w + + + + + + +X1:e--W1:w + + + + + + +X1:e--W1:w + + + + + + +X1:e--W1:w + + + + + + +X1:e--W1:w + + + + + + +X1:e--W1:w + + + + + + +X1:e--W1:w + + + + + + +X1:e--W1:w + + + + + + +X1:e--W1:w + + + + +X2 + +X2 + +F48 + +female + +48-pin + +z2 + +b2 + +d2 + +z4 + +b4 + +d4 + +z6 + +b6 + +d6 + +z8 + +b8 + +d8 + +z10 + +b10 + +d10 + +z12 + +b12 + +d12 + +z14 + +b14 + +d14 + +z16 + +b16 + +d16 + +z18 + +b18 + +d18 + +z20 + +b20 + +d20 + +z22 + +b22 + +d22 + +z24 + +b24 + +d24 + +z26 + +b26 + +d26 + +z28 + +b28 + +d28 + +z30 + +b30 + +d30 + +z32 + +b32 + +d32 + + + +W1:e--X2:w + + + + + + +W1:e--X2:w + + + + + + +W1:e--X2:w + + + + + + +W1:e--X2:w + + + + + + +W1:e--X2:w + + + + + + +W1:e--X2:w + + + + + + +W1:e--X2:w + + + + + + +W1:e--X2:w + + + + + + +W1:e--X2:w + + + + + + +W1:e--X2:w + + + + + + +W1:e--X2:w + + + + + + +W1:e--X2:w + + + + + + diff --git a/examples/ex09.yml b/examples/ex09.yml new file mode 100644 index 0000000..baef3ab --- /dev/null +++ b/examples/ex09.yml @@ -0,0 +1,31 @@ +# contributed by @kimmoli + +connectors: + X1: + type: D-Sub + subtype: male + pincount: 25 + pinnumbers: [1,14,3,16,5,18,7,20,9,22,11,24,13] + pinout: [ SENSE_P_1, SENSE_N_1, SENSE_P_2, SENSE_N_2, SENSE_P_3, SENSE_N_3, SENSE_P_4,SENSE_N_4, SENSE_P_5, SENSE_N_5, SENSE_P_6, SENSE_N_6, GND ] + X2: + type: F48 + subtype: female + pincount: 48 + pinnumbers: [ z2,b2,d2,z4,b4,d4,z6,b6,d6,z8,b8,d8,z10,b10,d10,z12,b12,d12,z14,b14,d14,z16,b16,d16,z18,b18,d18,z20,b20,d20,z22,b22,d22,z24,b24,d24,z26,b26,d26,z28,b28,d28,z30,b30,d30,z32,b32,d32 ] + +cables: + W1: + gauge: 0.25 mm2 + length: 0.2 + color_code: DIN + wirecount: 12 + shield: true + +connections: + - + - X1: [1,14,3,16,5,18,7,20,9,22,11,24] + - W1: [2,1,4,3,6,5,8,7,10,9,12,11] + - X2: [d4,z2,d10,z8,d16,z14,d20,z18,d26,z24,d32,z30] + - + - X1: 13 + - W1: s diff --git a/examples/readme.md b/examples/readme.md index 5330f73..e90e593 100644 --- a/examples/readme.md +++ b/examples/readme.md @@ -35,3 +35,21 @@ [Source](ex06.yml) - [Bill of Materials](ex06.bom.tsv) +## Example 07 +![](ex07.png) + +[Source](ex07.yml) - [Bill of Materials](ex07.bom.tsv) + + +## Example 08 +![](ex08.png) + +[Source](ex08.yml) - [Bill of Materials](ex08.bom.tsv) + + +## Example 09 +![](ex09.png) + +[Source](ex09.yml) - [Bill of Materials](ex09.bom.tsv) + + diff --git a/src/batch.py b/src/batch.py index 300cd84..6add6a9 100644 --- a/src/batch.py +++ b/src/batch.py @@ -1,8 +1,8 @@ import wireviz import os -demos = 0 # 2 -examples = 0 # 6 +demos = 2 # 2 +examples = 9 # 9 tutorials = 7 # 7 if demos: diff --git a/src/wireviz.py b/src/wireviz.py index 284d310..2be00a2 100755 --- a/src/wireviz.py +++ b/src/wireviz.py @@ -27,6 +27,10 @@ class Harness: def connect(self, from_name, from_pin, via_name, via_pin, to_name, to_pin): self.cables[via_name].connect(from_name, from_pin, via_pin, to_name, to_pin) + if from_name in self.connectors: + self.connectors[from_name].activate_pin(from_pin) + if to_name in self.connectors: + self.connectors[to_name].activate_pin(to_pin) def create_graph(self): dot = Graph() @@ -85,20 +89,15 @@ class Harness: '{}-pin'.format(n.pincount) if n.show_pincount else ''] # p = pinout p = [[],[],[]] - p[1] = list(n.pinout) - if (n.pinnumbers): - for i in n.pinnumbers: - if n.ports_left: - p[0].append('{portno}'.format(portno=i)) - if n.ports_right: - p[2].append('{portno}'.format(portno=i)) - else: - for i, x in enumerate(n.pinout, 1): - if n.ports_left: - p[0].append('{portno}'.format(portno=i)) - if n.ports_right: - p[2].append('{portno}'.format(portno=i)) - # l = label + for pinnumber, pinname in zip(n.pinnumbers, n.pinout): + if n.hide_disconnected_pins and not n.visible_pins.get(pinnumber, False): + continue + p[1].append(pinname) + if n.ports_left: + p[0].append('{portno}'.format(portno=pinnumber)) + if n.ports_right: + p[2].append('{portno}'.format(portno=pinnumber)) + # l = label l = [n.name if n.show_name else '', a, p, n.notes] dot.node(k, label=nested(l)) @@ -295,7 +294,7 @@ class Harness: designators = list(dict.fromkeys(designators)) designators.sort() total_length = sum(i['length'] for i in items) - name = 'Wire, {gauge}{color}'.format(gauge='{} {}'.format(shared['gauge'], shared['gauge_unit']) if shared['gauge'] else '', + name = 'Wire{gauge}{color}'.format(gauge=', {} {}'.format(shared['gauge'], shared['gauge_unit']) if shared['gauge'] else '', color=', {}'.format(shared['color']) if shared['color'] != '' else '') item = {'item': name, 'qty': round(total_length, 3), 'unit': 'm', 'designators': designators} bom_cables.append(item) @@ -329,17 +328,21 @@ class Connector: color: str = None show_name: bool = True show_pincount: bool = True + hide_disconnected_pins: bool = False def __post_init__(self): self.ports_left = False self.ports_right = False self.loops = [] + self.visible_pins = {} if self.pincount is None: if self.pinout: self.pincount = len(self.pinout) elif self.pinnumbers: self.pincount = len(self.pinnumbers) + elif self.category == 'ferrule': + self.pincount = 1 else: raise Exception('You need to specify at least one, pincount, pinout or pinnumbers') @@ -347,11 +350,20 @@ class Connector: if len(self.pinout) != len(self.pinnumbers): raise Exception('Given pinout and pinnumbers size mismatch') - if not self.pinout and not self.pinnumbers: + # create default lists for pinnumbers (sequential) and pinouts (blank) if not specified + if not self.pinnumbers: self.pinnumbers = list(range(1,self.pincount + 1)) + if not self.pinout: + self.pinout = [''] * self.pincount def loop(self, from_pin, to_pin): self.loops.append((from_pin, to_pin)) + if self.hide_disconnected_pins: + self.visible_pins[from_pin] = True + self.visible_pins[to_pin] = True + + def activate_pin(self, pin): + self.visible_pins[pin] = True @dataclass class Cable: