diff --git a/readme.md b/readme.md
index b6373f3..6693fab 100644
--- a/readme.md
+++ b/readme.md
@@ -30,32 +30,34 @@ _Note_: WireViz is not designed to represent the complete wiring of a system. It
[WireViz input file](examples/demo01.yml):
- connectors:
- X1:
- type: D-Sub
- subtype: female
- pinout: [DCD, RX, TX, DTR, GND, DSR, RTS, CTS, RI]
- X2:
- type: Molex KK 254
- subtype: female
- pinout: [GND, RX, TX]
+```yaml
+connectors:
+ X1:
+ type: D-Sub
+ subtype: female
+ pinout: [DCD, RX, TX, DTR, GND, DSR, RTS, CTS, RI]
+ X2:
+ type: Molex KK 254
+ subtype: female
+ pinout: [GND, RX, TX]
- cables:
- W1:
- gauge: 0.25 mm2
- length: 0.2
- color_code: DIN
- wirecount: 3
- shield: true
+cables:
+ W1:
+ gauge: 0.25 mm2
+ length: 0.2
+ color_code: DIN
+ wirecount: 3
+ shield: true
- connections:
- -
- - X1: [5,2,1]
- - W1: [1,2,3]
- - X2: [1,3,2]
- -
- - X1: 5
- - W1: s
+connections:
+ -
+ - X1: [5,2,1]
+ - W1: [1,2,3]
+ - X2: [1,3,2]
+ -
+ - X1: 5
+ - W1: s
+```
Output file:
@@ -70,9 +72,10 @@ Output file:
[Source](examples/demo02.yml) - [Bill of Materials](examples/demo02.bom.tsv)
-### More examples
+### Tutorial and example gallery
-See the [example gallery](examples/) and included readme file.
+See the [tutorial page](tutorial/readme.md) for sample code,
+as well as the [example gallery](examples/readme.md) to see more of what WireViz can do.
## Status
diff --git a/src/batch.py b/src/batch.py
index 7ca203e..300cd84 100644
--- a/src/batch.py
+++ b/src/batch.py
@@ -1,21 +1,50 @@
import wireviz
import os
-readme = '../examples/readme.md'
-readme = os.path.abspath(readme)
+demos = 0 # 2
+examples = 0 # 6
+tutorials = 7 # 7
-with open(readme, 'w') as file:
- file.write('# Example gallery\n')
- for i in range(1,3):
+if demos:
+ for i in range(1,demos+1):
fn = '../examples/demo{:02d}.yml'.format(i)
print(fn)
wireviz.parse(fn, gen_bom=True)
- for i in range(1,7):
- fn = '../examples/ex{:02d}.yml'.format(i)
- print(fn)
- wireviz.parse(fn, gen_bom=True)
+if examples:
+ with open(os.path.abspath('../examples/readme.md'), 'w') as file:
+ file.write('# Example gallery\n')
+ for i in range(1,examples+1):
+ fn = '../examples/ex{:02d}.yml'.format(i)
+ print(fn)
+ wireviz.parse(fn, gen_bom=True)
- file.write('## Example {:02d}\n'.format(i))
- file.write('\n\n'.format(i))
- file.write('[Source](ex{:02d}.yml) - [Bill of Materials](ex{:02d}.bom.tsv)\n\n\n'.format(i,i))
+ file.write('## Example {:02d}\n'.format(i))
+ file.write('\n\n'.format(i))
+ file.write('[Source](ex{:02d}.yml) - [Bill of Materials](ex{:02d}.bom.tsv)\n\n\n'.format(i,i))
+
+if tutorials:
+ with open(os.path.abspath('../tutorial/readme.md'), 'w') as file:
+ file.write('# WireViz Tutorial\n')
+ for i in range(1,tutorials+1):
+ fn = '../tutorial/tutorial{:02d}.yml'.format(i)
+ print(fn)
+ wireviz.parse(fn, gen_bom=True)
+
+ with open(os.path.abspath('../tutorial/tutorial{:02d}.md'.format(i)), 'r') as info:
+ for line in info:
+ file.write(line.replace('## ', '## {} - '.format(i)))
+ file.write('\n[Source](tutorial{:02d}.yml):\n\n'.format(i))
+
+ with open(os.path.abspath('../tutorial/tutorial{:02d}.yml'.format(i)), 'r') as src:
+ file.write('```yaml\n')
+ for line in src:
+ file.write(line)
+ file.write('```\n')
+ file.write('\n')
+
+ file.write('\nOutput:\n\n'.format(i))
+
+ file.write('\n\n'.format(i))
+
+ file.write('[Bill of Materials](tutorial{:02d}.bom.tsv)\n\n\n'.format(i))
diff --git a/src/wireviz.py b/src/wireviz.py
index 19a9561..afe825d 100755
--- a/src/wireviz.py
+++ b/src/wireviz.py
@@ -96,7 +96,7 @@ class Harness:
dot.node(k, label=nested(l))
if len(n.loops) > 0:
- dot.attr('edge',color='#000000')
+ dot.attr('edge',color='#000000:#ffffff:#000000')
if n.ports_left:
loop_side = 'l'
loop_dir = 'w'
@@ -141,7 +141,8 @@ class Harness:
for bla in p:
html = html + '
{} | '.format(bla)
html = html + ''
- html = html + ' |
'.format(colspan=len(p), bgcolor=wv_colors.translate_color(x, 'hex'), port='w{}'.format(i))
+ bgcolor = wv_colors.translate_color(x, 'hex')
+ html = html + ' |
'.format(colspan=len(p), bgcolor=bgcolor if bgcolor != '' else '#ffffff', port='w{}'.format(i))
if c.shield:
p = ['', 'Shield', '']
@@ -170,19 +171,19 @@ class Harness:
if search_color in wv_colors.color_hex:
dot.attr('edge',color='#000000:{wire_color}:#000000'.format(wire_color=wv_colors.color_hex[search_color]))
else: # color name not found
- dot.attr('edge',color='#000000')
+ dot.attr('edge',color='#000000:#ffffff:#000000')
else: # it's a shield connection
dot.attr('edge',color='#000000')
if x.from_port is not None: # connect to left
- from_ferrule = self.connectors[x.from_name].category is 'ferrule'
+ from_ferrule = self.connectors[x.from_name].category == 'ferrule'
code_left_1 = '{from_name}{from_port}:e'.format(from_name=x.from_name, from_port=':p{}r'.format(x.from_port) if not from_ferrule else '')
code_left_2 = '{via_name}:w{via_wire}:w'.format(via_name=c.name, via_wire=x.via_port, via_subport='i' if c.show_pinout else '')
dot.edge(code_left_1, code_left_2)
from_string = '{}:{}'.format(x.from_name, x.from_port) if not from_ferrule else ''
html = html.replace(''.format(x.via_port), from_string)
if x.to_port is not None: # connect to right
- to_ferrule = self.connectors[x.to_name].category is 'ferrule'
+ to_ferrule = self.connectors[x.to_name].category == 'ferrule'
code_right_1 = '{via_name}:w{via_wire}:e'.format(via_name=c.name, via_wire=x.via_port, via_subport='o' if c.show_pinout else '')
code_right_2 = '{to_name}{to_port}:w'.format(to_name=x.to_name, to_port=':p{}l'.format(x.to_port) if not to_ferrule else '')
dot.edge(code_right_1, code_right_2)
@@ -240,9 +241,10 @@ class Harness:
shared = next(iter(items.values()))
designators = list(items.keys())
designators.sort()
- name = '{type}{subtype}{pincount}'.format(type = shared.type,
- subtype = ', {}'.format(shared.subtype) if shared.subtype else '',
- pincount = ', {} pins'.format(shared.pincount) if shared.category != 'ferrule' else '')
+ name = 'Connector{type}{subtype}{pincount}{color}'.format(type = ', {}'.format(shared.type) if shared.type else '',
+ subtype = ', {}'.format(shared.subtype) if shared.subtype else '',
+ pincount = ', {} pins'.format(shared.pincount) if shared.category != 'ferrule' else '',
+ color = ', {}'.format(shared.color) if shared.color else '')
item = {'item': name, 'qty': len(designators), 'unit': '', 'designators': designators if shared.category != 'ferrule' else ''}
bom_connectors.append(item)
bom_connectors = sorted(bom_connectors, key=lambda k: k['item']) # https://stackoverflow.com/a/73050
@@ -256,8 +258,8 @@ class Harness:
designators = list(items.keys())
designators.sort()
total_length = sum(i.length for i in items.values())
- name = 'Cable {wirecount} x{gauge}{shield}'.format(wirecount = shared.wirecount,
- gauge = ' {} {}'.format(shared.gauge, shared.gauge_unit) if shared.gauge else '',
+ name = 'Cable, {wirecount}{gauge}{shield}'.format(wirecount = shared.wirecount,
+ gauge = ' x {} {}'.format(shared.gauge, shared.gauge_unit) if shared.gauge else ' wires',
shield = ' shielded' if shared.shield else '')
item = {'item': name, 'qty': round(total_length, 3), 'unit': 'm', 'designators': designators}
bom_cables.append(item)
@@ -286,7 +288,8 @@ class Harness:
designators = list(dict.fromkeys(designators))
designators.sort()
total_length = sum(i['length'] for i in items)
- name = 'Wire {} {} {}'.format(shared['gauge'], shared['gauge_unit'], shared['color'])
+ 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)
bom_cables = sorted(bom_cables, key=lambda k: k['item']) # https://stackoverflow.com/a/73050
@@ -578,7 +581,7 @@ def parse(file_in, file_out=None, gen_bom=False):
ferrule_params = input['ferrules'][ferrule_name]
for cable_pin in cable_pins:
ferrule_counter = ferrule_counter + 1
- ferrule_id = 'F{}'.format(ferrule_counter)
+ ferrule_id = '_F{}'.format(ferrule_counter)
h.add_connector(ferrule_id, category='ferrule', **ferrule_params)
if fer_cbl:
diff --git a/todo.md b/todo.md
index 64c9a55..dc40abd 100644
--- a/todo.md
+++ b/todo.md
@@ -35,6 +35,8 @@
## Other
+* Imrpove tutorial texts
+* Create syntax reference / cheat sheet
* Set global parameters (show_pins, ...) and allow override on per-item basis
* Allow custom GraphViz code before/after WireViz-generated code
* Make "unit tests" for different features/situations
diff --git a/tutorial/readme.md b/tutorial/readme.md
new file mode 100644
index 0000000..7b01e5b
--- /dev/null
+++ b/tutorial/readme.md
@@ -0,0 +1,363 @@
+# WireViz Tutorial
+## 1 - Bare-bones example
+
+* Minimum working example
+* Only 1-to-1 sequential wiring
+
+[Source](tutorial01.yml):
+
+```yaml
+connectors:
+ X1:
+ pincount: 4
+ X2:
+ pincount: 4
+
+cables:
+ W1:
+ wirecount: 4
+ length: 1
+
+connections:
+ -
+ - X1: [1-4]
+ - W1: [1-4]
+ - X2: [1-4]
+```
+
+
+Output:
+
+
+
+[Bill of Materials](tutorial01.bom.tsv)
+
+
+## 2 - Adding parameters and colors
+
+* Parameters for connectors and cables
+* Auto-calculate equivalent AWG from mm2
+* Non-sequential wiring
+
+[Source](tutorial02.yml):
+
+```yaml
+connectors:
+ X1:
+ pincount: 4
+ # More connector parameters:
+ type: Molex KK 254
+ subtype: female
+ X2:
+ pincount: 4
+ type: Molex KK 254
+ subtype: female
+
+cables:
+ W1:
+ wirecount: 4
+ # more cable parameters:
+ length: 1
+ gauge: 0.25 mm2
+ show_equiv: true # auto-calculate AWG equivalent
+ colors: [WH, BN, GN, YE]
+
+connections:
+ -
+ - X1: [1-4]
+ - W1: [1-4]
+ # non-sequential wiring:
+ - X2: [1,2,4,3]
+```
+
+
+Output:
+
+
+
+[Bill of Materials](tutorial02.bom.tsv)
+
+
+## 3 - Pinouts, shielding, templates (I)
+
+* Connector pinouts
+ * Pincount implicit in pinout
+* Cable color codes
+* Cable shielding, shield wiring
+* Templates
+
+[Source](tutorial03.yml):
+
+```yaml
+connectors:
+ X1: &template1 # define a template for later use
+ pinout: [GND, VCC, RX, TX] # pincount implicit in pinout
+ type: Molex KK 254
+ subtype: female
+ X2:
+ <<: *template1 # reuse template
+
+cables:
+ W1:
+ wirecount: 4
+ length: 1
+ gauge: 0.25 mm2
+ show_equiv: true
+ color_code: DIN # auto-assign colors based on DIN 47100
+ shield: true # add cable shielding
+
+connections:
+ -
+ - X1: [1-4]
+ - W1: [1-4]
+ - X2: [1,2,4,3]
+ - # connect the shielding to a pin
+ - X1: 1
+ - W1: s
+```
+
+
+Output:
+
+
+
+[Bill of Materials](tutorial03.bom.tsv)
+
+
+## 4 - Templates (II), notes, American standards, daisy chaining (I)
+
+* Overriding template parameters
+* Add nodes to connectors and cables
+* American standards: AWG gauge and IEC colors
+* Linear daisy-chain
+ * Convenient for shorter chains
+
+[Source](tutorial04.yml):
+
+```yaml
+connectors:
+ X1: &template_con
+ pinout: [GND, VCC, SCL, SDA]
+ type: Molex KK 254
+ subtype: male
+ notes: to microcontroller # add notes
+ X2:
+ <<: *template_con # use template
+ subtype: female # but override certain parameters
+ notes: to accelerometer
+ X3:
+ <<: *template_con
+ subtype: female
+ notes: to temperature sensor
+
+cables:
+ W1: &template_cbl
+ wirecount: 4
+ length: 0.3
+ gauge: 24 AWG # specify gauge in AWG directly
+ color_code: IEC # IEC 62 colors also supported
+ notes: This cable is a bit longer
+ W2:
+ <<: *template_cbl
+ length: 0.1
+ notes: This cable is a bit shorter
+
+connections:
+ -
+ - X1: [1-4]
+ - W1: [1-4]
+ - X2: [1-4]
+ - # daisy chain connectors (in line)
+ - X2: [1-4]
+ - W2: [1-4]
+ - X3: [1-4]
+```
+
+
+Output:
+
+
+
+[Bill of Materials](tutorial04.bom.tsv)
+
+
+## 5 - Ferrules, wire bundles, custom wire colors
+
+* Ferrules
+ * Simpler than connectors
+ * Compact graphical representation
+ * Only one pin, only one connection, no designator
+ * Define once, auto-generate where needed
+* Wire bundles
+ * Internally treated as cables
+ * Different treatment in BOM: Each wire is listed individually
+ * Represented with dashed outline
+* Custom wire colors
+ * Wirecount can be implicit in color list
+
+[Source](tutorial05.yml):
+
+```yaml
+connectors:
+ X1:
+ pinout: [+12V, GND, GND, +5V]
+ type: Molex 8981
+ subtype: female
+
+ferrules: # ferrules
+ F1:
+ type: Ferrule, crimp
+ subtype: 0.5 mm²
+ color: OG # optional color
+
+cables:
+ W1:
+ category: bundle # bundle
+ length: 0.3
+ gauge: 0.5 mm2
+ colors: [YE, BK, BK, RD] # custom colors, wirecount is implicit
+
+connections:
+ - # attach ferrules
+ - F1 # no need for list of connections; one ferrule per wire is auto-generated and attached
+ - W1: [1-4] # a new ferrule is auto-generated for each wire
+ - # attach connectors (separetely from ferrules)
+ - W1: [1-4]
+ - X1: [1-4]
+```
+
+
+Output:
+
+
+
+[Bill of Materials](tutorial05.bom.tsv)
+
+
+## 6 - Custom ferrules
+
+* Custom ferrules
+ * Allows attaching more than one wire to a ferrule
+ * Requires defining them as regular connectors with unique designators, adding `category: ferrule` parameter
+
+[Source](tutorial06.yml):
+
+```yaml
+connectors:
+ X1:
+ pinout: [+12V, GND, GND, +5V]
+ type: Molex 8981
+ subtype: female
+ F_10_1: # manually define a ferrule (with unique designator)
+ category: ferrule
+ type: Ferrule, crimp
+ subtype: 1.0 mm²
+ color: YE
+
+ferrules: # ferrules
+ F_05:
+ type: Ferrule, crimp
+ subtype: 0.5 mm²
+ color: OG # optional color
+
+cables:
+ W1:
+ category: bundle # budnle
+ length: 0.3
+ gauge: 0.5 mm2
+ colors: [YE, BK, BK, RD] # custom colors, wirecount is implicit
+
+connections:
+ - # attach ferrules
+ - F_05
+ - W1: [1,4] # a new ferrule is auto-generated for each wire
+ - # attach connectors (separetely from ferrules)
+ - W1: [1-4]
+ - X1: [1-4]
+ -
+ - F_10_1: 1 # manually defined ferrules are treated like regular connectors,
+ # thus requiring a pin number
+ - W1: 2
+ -
+ - F_10_1: 1
+ - W1: 3
+```
+
+
+Output:
+
+
+
+[Bill of Materials](tutorial06.bom.tsv)
+
+
+## 7 - Daisy chaining (II)
+
+* Zig-zag daisy chain
+ * Convenient for longer chains
+
+[Source](tutorial07.yml):
+
+```yaml
+connectors:
+ X1: &template_con
+ type: Molex KK 254
+ subtype: female
+ pinout: [GND, VCC, SCL, SDA]
+ X2:
+ <<: *template_con
+ X3:
+ <<: *template_con
+ X4:
+ <<: *template_con
+ X5:
+ <<: *template_con
+ X6:
+ <<: *template_con
+
+cables:
+ W1: &template_wire
+ gauge: 0.25 mm2
+ length: 0.2
+ colors: [TQ, PK, YE, VT]
+ category: bundle
+ W2:
+ <<: *template_wire
+ W3:
+ <<: *template_wire
+ W4:
+ <<: *template_wire
+ W5:
+ <<: *template_wire
+
+connections:
+ -
+ - X1: [1-4]
+ - W1: [1-4]
+ - X2: [1-4]
+ -
+ - X3: [1-4]
+ - W2: [1-4]
+ - X2: [1-4]
+ -
+ - X3: [1-4]
+ - W3: [1-4]
+ - X4: [1-4]
+ -
+ - X5: [1-4]
+ - W4: [1-4]
+ - X4: [1-4]
+ -
+ - X5: [1-4]
+ - W5: [1-4]
+ - X6: [1-4]
+```
+
+
+Output:
+
+
+
+[Bill of Materials](tutorial07.bom.tsv)
+
+
diff --git a/tutorial/todo.md b/tutorial/todo.md
new file mode 100644
index 0000000..e4907f5
--- /dev/null
+++ b/tutorial/todo.md
@@ -0,0 +1,12 @@
+* Daisychain
+ * zig-zag
+* Connection types
+ * con-cbl-con
+ * con-cbl
+ * cbl-con
+ * fer-cbl
+ * cbl-fer
+* Custom color codes
+ * Looping
+ * Clipping
+* (Merging multiple templates)
diff --git a/tutorial/tutorial01.bom.tsv b/tutorial/tutorial01.bom.tsv
new file mode 100644
index 0000000..ff469a8
--- /dev/null
+++ b/tutorial/tutorial01.bom.tsv
@@ -0,0 +1,3 @@
+Item Qty Unit Designators
+Connector, 4 pins 2 X1, X2
+Cable, 4 wires 1 m W1
diff --git a/tutorial/tutorial01.gv b/tutorial/tutorial01.gv
new file mode 100644
index 0000000..a37a4ad
--- /dev/null
+++ b/tutorial/tutorial01.gv
@@ -0,0 +1,22 @@
+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|{4-pin}|{{1|2|3|4}}"]
+ X2 [label="X2|{4-pin}|{{1|2|3|4}}"]
+ edge [color="#000000:#ffffff:#000000"]
+ X1:p1r:e -- W1:w1:w
+ W1:w1:e -- X2:p1l:w
+ edge [color="#000000:#ffffff:#000000"]
+ X1:p2r:e -- W1:w2:w
+ W1:w2:e -- X2:p2l:w
+ edge [color="#000000:#ffffff:#000000"]
+ X1:p3r:e -- W1:w3:w
+ W1:w3:e -- X2:p3l:w
+ edge [color="#000000:#ffffff:#000000"]
+ X1:p4r:e -- W1:w4:w
+ W1:w4:e -- X2:p4l:w
+ W1 [label=< |
| |
| X1:1 | | X2:1 | | | X1:2 | | X2:2 | | | X1:3 | | X2:3 | | | X1:4 | | X2:4 | | | |
|
> fillcolor=white margin=0 shape=box style=""]
+}
diff --git a/tutorial/tutorial01.html b/tutorial/tutorial01.html
new file mode 100644
index 0000000..5672e80
--- /dev/null
+++ b/tutorial/tutorial01.html
@@ -0,0 +1,134 @@
+Diagram
+
+
+
+
+Bill of Materials
| Item | Qty | Unit | Designators |
|---|
| Connector, 4 pins | 2 | | X1, X2 |
| Cable, 4 wires | 1 | m | W1 |
\ No newline at end of file
diff --git a/tutorial/tutorial01.md b/tutorial/tutorial01.md
new file mode 100644
index 0000000..156556f
--- /dev/null
+++ b/tutorial/tutorial01.md
@@ -0,0 +1,4 @@
+## Bare-bones example
+
+* Minimum working example
+* Only 1-to-1 sequential wiring
diff --git a/tutorial/tutorial01.png b/tutorial/tutorial01.png
new file mode 100644
index 0000000..beab89d
Binary files /dev/null and b/tutorial/tutorial01.png differ
diff --git a/tutorial/tutorial01.svg b/tutorial/tutorial01.svg
new file mode 100644
index 0000000..861658f
--- /dev/null
+++ b/tutorial/tutorial01.svg
@@ -0,0 +1,133 @@
+
+
+
+
+
diff --git a/tutorial/tutorial01.yml b/tutorial/tutorial01.yml
new file mode 100644
index 0000000..24b5a8b
--- /dev/null
+++ b/tutorial/tutorial01.yml
@@ -0,0 +1,16 @@
+connectors:
+ X1:
+ pincount: 4
+ X2:
+ pincount: 4
+
+cables:
+ W1:
+ wirecount: 4
+ length: 1
+
+connections:
+ -
+ - X1: [1-4]
+ - W1: [1-4]
+ - X2: [1-4]
diff --git a/tutorial/tutorial02.bom.tsv b/tutorial/tutorial02.bom.tsv
new file mode 100644
index 0000000..726ee4d
--- /dev/null
+++ b/tutorial/tutorial02.bom.tsv
@@ -0,0 +1,3 @@
+Item Qty Unit Designators
+Connector, Molex KK 254, female, 4 pins 2 X1, X2
+Cable, 4 x 0.25 mm² 1 m W1
diff --git a/tutorial/tutorial02.gv b/tutorial/tutorial02.gv
new file mode 100644
index 0000000..deefec7
--- /dev/null
+++ b/tutorial/tutorial02.gv
@@ -0,0 +1,22 @@
+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|{Molex KK 254|female|4-pin}|{{1|2|3|4}}"]
+ X2 [label="X2|{Molex KK 254|female|4-pin}|{{1|2|3|4}}"]
+ edge [color="#000000:#ffffff:#000000"]
+ X1:p1r:e -- W1:w1:w
+ W1:w1:e -- X2:p1l:w
+ edge [color="#000000:#666600:#000000"]
+ X1:p2r:e -- W1:w2:w
+ W1:w2:e -- X2:p2l:w
+ edge [color="#000000:#00ff00:#000000"]
+ X1:p3r:e -- W1:w3:w
+ W1:w3:e -- X2:p4l:w
+ edge [color="#000000:#ffff00:#000000"]
+ X1:p4r:e -- W1:w4:w
+ W1:w4:e -- X2:p3l:w
+ W1 [label=< |
| |
| X1:1 | WH | X2:1 | | | X1:2 | BN | X2:2 | | | X1:3 | GN | X2:4 | | | X1:4 | YE | X2:3 | | | |
|
> fillcolor=white margin=0 shape=box style=""]
+}
diff --git a/tutorial/tutorial02.html b/tutorial/tutorial02.html
new file mode 100644
index 0000000..9ff939c
--- /dev/null
+++ b/tutorial/tutorial02.html
@@ -0,0 +1,148 @@
+Diagram
+
+
+
+
+Bill of Materials
| Item | Qty | Unit | Designators |
|---|
| Connector, Molex KK 254, female, 4 pins | 2 | | X1, X2 |
| Cable, 4 x 0.25 mm² | 1 | m | W1 |
\ No newline at end of file
diff --git a/tutorial/tutorial02.md b/tutorial/tutorial02.md
new file mode 100644
index 0000000..9d39bf7
--- /dev/null
+++ b/tutorial/tutorial02.md
@@ -0,0 +1,5 @@
+## Adding parameters and colors
+
+* Parameters for connectors and cables
+* Auto-calculate equivalent AWG from mm2
+* Non-sequential wiring
diff --git a/tutorial/tutorial02.png b/tutorial/tutorial02.png
new file mode 100644
index 0000000..3510d65
Binary files /dev/null and b/tutorial/tutorial02.png differ
diff --git a/tutorial/tutorial02.svg b/tutorial/tutorial02.svg
new file mode 100644
index 0000000..edeaf1f
--- /dev/null
+++ b/tutorial/tutorial02.svg
@@ -0,0 +1,147 @@
+
+
+
+
+
diff --git a/tutorial/tutorial02.yml b/tutorial/tutorial02.yml
new file mode 100644
index 0000000..030e42e
--- /dev/null
+++ b/tutorial/tutorial02.yml
@@ -0,0 +1,26 @@
+connectors:
+ X1:
+ pincount: 4
+ # More connector parameters:
+ type: Molex KK 254
+ subtype: female
+ X2:
+ pincount: 4
+ type: Molex KK 254
+ subtype: female
+
+cables:
+ W1:
+ wirecount: 4
+ # more cable parameters:
+ length: 1
+ gauge: 0.25 mm2
+ show_equiv: true # auto-calculate AWG equivalent
+ colors: [WH, BN, GN, YE]
+
+connections:
+ -
+ - X1: [1-4]
+ - W1: [1-4]
+ # non-sequential wiring:
+ - X2: [1,2,4,3]
diff --git a/tutorial/tutorial03.bom.tsv b/tutorial/tutorial03.bom.tsv
new file mode 100644
index 0000000..a9c25a8
--- /dev/null
+++ b/tutorial/tutorial03.bom.tsv
@@ -0,0 +1,3 @@
+Item Qty Unit Designators
+Connector, Molex KK 254, female, 4 pins 2 X1, X2
+Cable, 4 x 0.25 mm² shielded 1 m W1
diff --git a/tutorial/tutorial03.gv b/tutorial/tutorial03.gv
new file mode 100644
index 0000000..ce13013
--- /dev/null
+++ b/tutorial/tutorial03.gv
@@ -0,0 +1,24 @@
+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|{Molex KK 254|female|4-pin}|{{GND|VCC|RX|TX}|{1|2|3|4}}"]
+ X2 [label="X2|{Molex KK 254|female|4-pin}|{{1|2|3|4}|{GND|VCC|RX|TX}}"]
+ edge [color="#000000:#ffffff:#000000"]
+ X1:p1r:e -- W1:w1:w
+ W1:w1:e -- X2:p1l:w
+ edge [color="#000000:#666600:#000000"]
+ X1:p2r:e -- W1:w2:w
+ W1:w2:e -- X2:p2l:w
+ edge [color="#000000:#00ff00:#000000"]
+ X1:p3r:e -- W1:w3:w
+ W1:w3:e -- X2:p4l:w
+ edge [color="#000000:#ffff00:#000000"]
+ X1:p4r:e -- W1:w4:w
+ W1:w4:e -- X2:p3l:w
+ edge [color="#000000"]
+ X1:p1r:e -- W1:ws:w
+ W1 [label=<| W1 | | 4x | 0.25 mm² (24 AWG) | + S | 1 m |
|
| |
| X1:1 | WH | X2:1 | | | X1:2 | BN | X2:2 | | | X1:3 | GN | X2:4 | | | X1:4 | YE | X2:3 | | | | | X1:1 | Shield | | | | |
|
> fillcolor=white margin=0 shape=box style=""]
+}
diff --git a/tutorial/tutorial03.html b/tutorial/tutorial03.html
new file mode 100644
index 0000000..8e46c3f
--- /dev/null
+++ b/tutorial/tutorial03.html
@@ -0,0 +1,175 @@
+Diagram
+
+
+
+
+Bill of Materials
| Item | Qty | Unit | Designators |
|---|
| Connector, Molex KK 254, female, 4 pins | 2 | | X1, X2 |
| Cable, 4 x 0.25 mm² shielded | 1 | m | W1 |
\ No newline at end of file
diff --git a/tutorial/tutorial03.md b/tutorial/tutorial03.md
new file mode 100644
index 0000000..92fd7cf
--- /dev/null
+++ b/tutorial/tutorial03.md
@@ -0,0 +1,7 @@
+## Pinouts, shielding, templates (I)
+
+* Connector pinouts
+ * Pincount implicit in pinout
+* Cable color codes
+* Cable shielding, shield wiring
+* Templates
diff --git a/tutorial/tutorial03.png b/tutorial/tutorial03.png
new file mode 100644
index 0000000..e2f69a4
Binary files /dev/null and b/tutorial/tutorial03.png differ
diff --git a/tutorial/tutorial03.svg b/tutorial/tutorial03.svg
new file mode 100644
index 0000000..2fd3833
--- /dev/null
+++ b/tutorial/tutorial03.svg
@@ -0,0 +1,174 @@
+
+
+
+
+
diff --git a/tutorial/tutorial03.yml b/tutorial/tutorial03.yml
new file mode 100644
index 0000000..46f1625
--- /dev/null
+++ b/tutorial/tutorial03.yml
@@ -0,0 +1,25 @@
+connectors:
+ X1: &template1 # define a template for later use
+ pinout: [GND, VCC, RX, TX] # pincount implicit in pinout
+ type: Molex KK 254
+ subtype: female
+ X2:
+ <<: *template1 # reuse template
+
+cables:
+ W1:
+ wirecount: 4
+ length: 1
+ gauge: 0.25 mm2
+ show_equiv: true
+ color_code: DIN # auto-assign colors based on DIN 47100
+ shield: true # add cable shielding
+
+connections:
+ -
+ - X1: [1-4]
+ - W1: [1-4]
+ - X2: [1,2,4,3]
+ - # connect the shielding to a pin
+ - X1: 1
+ - W1: s
diff --git a/tutorial/tutorial04.bom.tsv b/tutorial/tutorial04.bom.tsv
new file mode 100644
index 0000000..92f70f8
--- /dev/null
+++ b/tutorial/tutorial04.bom.tsv
@@ -0,0 +1,4 @@
+Item Qty Unit Designators
+Connector, Molex KK 254, female, 4 pins 2 X2, X3
+Connector, Molex KK 254, male, 4 pins 1 X1
+Cable, 4 x 24 AWG 0.4 m W1, W2
diff --git a/tutorial/tutorial04.gv b/tutorial/tutorial04.gv
new file mode 100644
index 0000000..b61e32a
--- /dev/null
+++ b/tutorial/tutorial04.gv
@@ -0,0 +1,36 @@
+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|{Molex KK 254|male|4-pin}|{{GND|VCC|SCL|SDA}|{1|2|3|4}}|to microcontroller"]
+ X2 [label="X2|{Molex KK 254|female|4-pin}|{{1|2|3|4}|{GND|VCC|SCL|SDA}|{1|2|3|4}}|to accelerometer"]
+ X3 [label="X3|{Molex KK 254|female|4-pin}|{{1|2|3|4}|{GND|VCC|SCL|SDA}}|to temperature sensor"]
+ edge [color="#000000:#666600:#000000"]
+ X1:p1r:e -- W1:w1:w
+ W1:w1:e -- X2:p1l:w
+ edge [color="#000000:#ff0000:#000000"]
+ X1:p2r:e -- W1:w2:w
+ W1:w2:e -- X2:p2l:w
+ edge [color="#000000:#ff8000:#000000"]
+ X1:p3r:e -- W1:w3:w
+ W1:w3:e -- X2:p3l:w
+ edge [color="#000000:#ffff00:#000000"]
+ X1:p4r:e -- W1:w4:w
+ W1:w4:e -- X2:p4l:w
+ W1 [label=< |
| |
| X1:1 | BN | X2:1 | | | X1:2 | RD | X2:2 | | | X1:3 | OG | X2:3 | | | X1:4 | YE | X2:4 | | | |
|
| This cable is a bit longer |
| |
> fillcolor=white margin=0 shape=box style=""]
+ edge [color="#000000:#666600:#000000"]
+ X2:p1r:e -- W2:w1:w
+ W2:w1:e -- X3:p1l:w
+ edge [color="#000000:#ff0000:#000000"]
+ X2:p2r:e -- W2:w2:w
+ W2:w2:e -- X3:p2l:w
+ edge [color="#000000:#ff8000:#000000"]
+ X2:p3r:e -- W2:w3:w
+ W2:w3:e -- X3:p3l:w
+ edge [color="#000000:#ffff00:#000000"]
+ X2:p4r:e -- W2:w4:w
+ W2:w4:e -- X3:p4l:w
+ W2 [label=< |
| |
| X2:1 | BN | X3:1 | | | X2:2 | RD | X3:2 | | | X2:3 | OG | X3:3 | | | X2:4 | YE | X3:4 | | | |
|
| This cable is a bit shorter |
| |
> fillcolor=white margin=0 shape=box style=""]
+}
diff --git a/tutorial/tutorial04.html b/tutorial/tutorial04.html
new file mode 100644
index 0000000..c32828d
--- /dev/null
+++ b/tutorial/tutorial04.html
@@ -0,0 +1,305 @@
+Diagram
+
+
+
+
+Bill of Materials
| Item | Qty | Unit | Designators |
|---|
| Connector, Molex KK 254, female, 4 pins | 2 | | X2, X3 |
| Connector, Molex KK 254, male, 4 pins | 1 | | X1 |
| Cable, 4 x 24 AWG | 0.4 | m | W1, W2 |
\ No newline at end of file
diff --git a/tutorial/tutorial04.md b/tutorial/tutorial04.md
new file mode 100644
index 0000000..37cbe79
--- /dev/null
+++ b/tutorial/tutorial04.md
@@ -0,0 +1,7 @@
+## Templates (II), notes, American standards, daisy chaining (I)
+
+* Overriding template parameters
+* Add nodes to connectors and cables
+* American standards: AWG gauge and IEC colors
+* Linear daisy-chain
+ * Convenient for shorter chains
diff --git a/tutorial/tutorial04.png b/tutorial/tutorial04.png
new file mode 100644
index 0000000..51e24e5
Binary files /dev/null and b/tutorial/tutorial04.png differ
diff --git a/tutorial/tutorial04.svg b/tutorial/tutorial04.svg
new file mode 100644
index 0000000..31fbb73
--- /dev/null
+++ b/tutorial/tutorial04.svg
@@ -0,0 +1,304 @@
+
+
+
+
+
diff --git a/tutorial/tutorial04.yml b/tutorial/tutorial04.yml
new file mode 100644
index 0000000..6286e94
--- /dev/null
+++ b/tutorial/tutorial04.yml
@@ -0,0 +1,36 @@
+connectors:
+ X1: &template_con
+ pinout: [GND, VCC, SCL, SDA]
+ type: Molex KK 254
+ subtype: male
+ notes: to microcontroller # add notes
+ X2:
+ <<: *template_con # use template
+ subtype: female # but override certain parameters
+ notes: to accelerometer
+ X3:
+ <<: *template_con
+ subtype: female
+ notes: to temperature sensor
+
+cables:
+ W1: &template_cbl
+ wirecount: 4
+ length: 0.3
+ gauge: 24 AWG # specify gauge in AWG directly
+ color_code: IEC # IEC 62 colors also supported
+ notes: This cable is a bit longer
+ W2:
+ <<: *template_cbl
+ length: 0.1
+ notes: This cable is a bit shorter
+
+connections:
+ -
+ - X1: [1-4]
+ - W1: [1-4]
+ - X2: [1-4]
+ - # daisy chain connectors (in line)
+ - X2: [1-4]
+ - W2: [1-4]
+ - X3: [1-4]
diff --git a/tutorial/tutorial05.bom.tsv b/tutorial/tutorial05.bom.tsv
new file mode 100644
index 0000000..973d4cd
--- /dev/null
+++ b/tutorial/tutorial05.bom.tsv
@@ -0,0 +1,6 @@
+Item Qty Unit Designators
+Connector, Ferrule, crimp, 0.5 mm², OG 4
+Connector, Molex 8981, female, 4 pins 1 X1
+Wire, 0.5 mm², BK 0.6 m W1
+Wire, 0.5 mm², RD 0.3 m W1
+Wire, 0.5 mm², YE 0.3 m W1
diff --git a/tutorial/tutorial05.gv b/tutorial/tutorial05.gv
new file mode 100644
index 0000000..fff2bcc
--- /dev/null
+++ b/tutorial/tutorial05.gv
@@ -0,0 +1,65 @@
+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|{Molex 8981|female|4-pin}|{{1|2|3|4}|{+12V|GND|GND|+5V}}"]
+ _F1 [label=<
+
+
+ | Ferrule, crimp, 0.5 mm² OG |
+ |
+ |
+
+
+
+ > margin=0 orientation=180 shape=none style=filled]
+ _F2 [label=<
+
+
+ | Ferrule, crimp, 0.5 mm² OG |
+ |
+ |
+
+
+
+ > margin=0 orientation=180 shape=none style=filled]
+ _F3 [label=<
+
+
+ | Ferrule, crimp, 0.5 mm² OG |
+ |
+ |
+
+
+
+ > margin=0 orientation=180 shape=none style=filled]
+ _F4 [label=<
+
+
+ | Ferrule, crimp, 0.5 mm² OG |
+ |
+ |
+
+
+
+ > margin=0 orientation=180 shape=none style=filled]
+ edge [color="#000000:#ffff00:#000000"]
+ _F1:e -- W1:w1:w
+ edge [color="#000000:#000000:#000000"]
+ _F2:e -- W1:w2:w
+ edge [color="#000000:#000000:#000000"]
+ _F3:e -- W1:w3:w
+ edge [color="#000000:#ff0000:#000000"]
+ _F4:e -- W1:w4:w
+ edge [color="#000000:#ffff00:#000000"]
+ W1:w1:e -- X1:p1l:w
+ edge [color="#000000:#000000:#000000"]
+ W1:w2:e -- X1:p2l:w
+ edge [color="#000000:#000000:#000000"]
+ W1:w3:e -- X1:p3l:w
+ edge [color="#000000:#ff0000:#000000"]
+ W1:w4:e -- X1:p4l:w
+ W1 [label=<> fillcolor=white margin=0 shape=box style="filled,dashed"]
+}
diff --git a/tutorial/tutorial05.html b/tutorial/tutorial05.html
new file mode 100644
index 0000000..622ebc9
--- /dev/null
+++ b/tutorial/tutorial05.html
@@ -0,0 +1,176 @@
+Diagram
+
+
+
+
+Bill of Materials
| Item | Qty | Unit | Designators |
|---|
| Connector, Ferrule, crimp, 0.5 mm², OG | 4 | | |
| Connector, Molex 8981, female, 4 pins | 1 | | X1 |
| Wire, 0.5 mm², BK | 0.6 | m | W1 |
| Wire, 0.5 mm², RD | 0.3 | m | W1 |
| Wire, 0.5 mm², YE | 0.3 | m | W1 |
\ No newline at end of file
diff --git a/tutorial/tutorial05.md b/tutorial/tutorial05.md
new file mode 100644
index 0000000..2212756
--- /dev/null
+++ b/tutorial/tutorial05.md
@@ -0,0 +1,13 @@
+## Ferrules, wire bundles, custom wire colors
+
+* Ferrules
+ * Simpler than connectors
+ * Compact graphical representation
+ * Only one pin, only one connection, no designator
+ * Define once, auto-generate where needed
+* Wire bundles
+ * Internally treated as cables
+ * Different treatment in BOM: Each wire is listed individually
+ * Represented with dashed outline
+* Custom wire colors
+ * Wirecount can be implicit in color list
diff --git a/tutorial/tutorial05.png b/tutorial/tutorial05.png
new file mode 100644
index 0000000..8141e68
Binary files /dev/null and b/tutorial/tutorial05.png differ
diff --git a/tutorial/tutorial05.svg b/tutorial/tutorial05.svg
new file mode 100644
index 0000000..fc34a3c
--- /dev/null
+++ b/tutorial/tutorial05.svg
@@ -0,0 +1,175 @@
+
+
+
+
+
diff --git a/tutorial/tutorial05.yml b/tutorial/tutorial05.yml
new file mode 100644
index 0000000..148879b
--- /dev/null
+++ b/tutorial/tutorial05.yml
@@ -0,0 +1,26 @@
+connectors:
+ X1:
+ pinout: [+12V, GND, GND, +5V]
+ type: Molex 8981
+ subtype: female
+
+ferrules: # ferrules
+ F1:
+ type: Ferrule, crimp
+ subtype: 0.5 mm²
+ color: OG # optional color
+
+cables:
+ W1:
+ category: bundle # bundle
+ length: 0.3
+ gauge: 0.5 mm2
+ colors: [YE, BK, BK, RD] # custom colors, wirecount is implicit
+
+connections:
+ - # attach ferrules
+ - F1 # no need for list of connections; one ferrule per wire is auto-generated and attached
+ - W1: [1-4] # a new ferrule is auto-generated for each wire
+ - # attach connectors (separetely from ferrules)
+ - W1: [1-4]
+ - X1: [1-4]
diff --git a/tutorial/tutorial06.bom.tsv b/tutorial/tutorial06.bom.tsv
new file mode 100644
index 0000000..c6eda88
--- /dev/null
+++ b/tutorial/tutorial06.bom.tsv
@@ -0,0 +1,7 @@
+Item Qty Unit Designators
+Connector, Ferrule, crimp, 0.5 mm², OG 2
+Connector, Ferrule, crimp, 1.0 mm², YE 1
+Connector, Molex 8981, female, 4 pins 1 X1
+Wire, 0.5 mm², BK 0.6 m W1
+Wire, 0.5 mm², RD 0.3 m W1
+Wire, 0.5 mm², YE 0.3 m W1
diff --git a/tutorial/tutorial06.gv b/tutorial/tutorial06.gv
new file mode 100644
index 0000000..965cad3
--- /dev/null
+++ b/tutorial/tutorial06.gv
@@ -0,0 +1,55 @@
+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|{Molex 8981|female|4-pin}|{{1|2|3|4}|{+12V|GND|GND|+5V}}"]
+ F_10_1 [label=<
+
+
+ | Ferrule, crimp, 1.0 mm² YE |
+ |
+ |
+
+
+
+ > margin=0 orientation=180 shape=none style=filled]
+ _F1 [label=<
+
+
+ | Ferrule, crimp, 0.5 mm² OG |
+ |
+ |
+
+
+
+ > margin=0 orientation=180 shape=none style=filled]
+ _F2 [label=<
+
+
+ | Ferrule, crimp, 0.5 mm² OG |
+ |
+ |
+
+
+
+ > margin=0 orientation=180 shape=none style=filled]
+ edge [color="#000000:#ffff00:#000000"]
+ _F1:e -- W1:w1:w
+ edge [color="#000000:#ff0000:#000000"]
+ _F2:e -- W1:w4:w
+ edge [color="#000000:#ffff00:#000000"]
+ W1:w1:e -- X1:p1l:w
+ edge [color="#000000:#000000:#000000"]
+ W1:w2:e -- X1:p2l:w
+ edge [color="#000000:#000000:#000000"]
+ W1:w3:e -- X1:p3l:w
+ edge [color="#000000:#ff0000:#000000"]
+ W1:w4:e -- X1:p4l:w
+ edge [color="#000000:#000000:#000000"]
+ F_10_1:e -- W1:w2:w
+ edge [color="#000000:#000000:#000000"]
+ F_10_1:e -- W1:w3:w
+ W1 [label=<> fillcolor=white margin=0 shape=box style="filled,dashed"]
+}
diff --git a/tutorial/tutorial06.html b/tutorial/tutorial06.html
new file mode 100644
index 0000000..85af609
--- /dev/null
+++ b/tutorial/tutorial06.html
@@ -0,0 +1,165 @@
+Diagram
+
+
+
+
+Bill of Materials
| Item | Qty | Unit | Designators |
|---|
| Connector, Ferrule, crimp, 0.5 mm², OG | 2 | | |
| Connector, Ferrule, crimp, 1.0 mm², YE | 1 | | |
| Connector, Molex 8981, female, 4 pins | 1 | | X1 |
| Wire, 0.5 mm², BK | 0.6 | m | W1 |
| Wire, 0.5 mm², RD | 0.3 | m | W1 |
| Wire, 0.5 mm², YE | 0.3 | m | W1 |
\ No newline at end of file
diff --git a/tutorial/tutorial06.md b/tutorial/tutorial06.md
new file mode 100644
index 0000000..4e2a679
--- /dev/null
+++ b/tutorial/tutorial06.md
@@ -0,0 +1,5 @@
+## Custom ferrules
+
+* Custom ferrules
+ * Allows attaching more than one wire to a ferrule
+ * Requires defining them as regular connectors with unique designators, adding `category: ferrule` parameter
diff --git a/tutorial/tutorial06.png b/tutorial/tutorial06.png
new file mode 100644
index 0000000..b1314cd
Binary files /dev/null and b/tutorial/tutorial06.png differ
diff --git a/tutorial/tutorial06.svg b/tutorial/tutorial06.svg
new file mode 100644
index 0000000..75bae19
--- /dev/null
+++ b/tutorial/tutorial06.svg
@@ -0,0 +1,164 @@
+
+
+
+
+
diff --git a/tutorial/tutorial06.yml b/tutorial/tutorial06.yml
new file mode 100644
index 0000000..2f2ab64
--- /dev/null
+++ b/tutorial/tutorial06.yml
@@ -0,0 +1,38 @@
+connectors:
+ X1:
+ pinout: [+12V, GND, GND, +5V]
+ type: Molex 8981
+ subtype: female
+ F_10_1: # manually define a ferrule (with unique designator)
+ category: ferrule
+ type: Ferrule, crimp
+ subtype: 1.0 mm²
+ color: YE
+
+ferrules: # ferrules
+ F_05:
+ type: Ferrule, crimp
+ subtype: 0.5 mm²
+ color: OG # optional color
+
+cables:
+ W1:
+ category: bundle # budnle
+ length: 0.3
+ gauge: 0.5 mm2
+ colors: [YE, BK, BK, RD] # custom colors, wirecount is implicit
+
+connections:
+ - # attach ferrules
+ - F_05
+ - W1: [1,4] # a new ferrule is auto-generated for each wire
+ - # attach connectors (separetely from ferrules)
+ - W1: [1-4]
+ - X1: [1-4]
+ -
+ - F_10_1: 1 # manually defined ferrules are treated like regular connectors,
+ # thus requiring a pin number
+ - W1: 2
+ -
+ - F_10_1: 1
+ - W1: 3
diff --git a/tutorial/tutorial07.bom.tsv b/tutorial/tutorial07.bom.tsv
new file mode 100644
index 0000000..7885f32
--- /dev/null
+++ b/tutorial/tutorial07.bom.tsv
@@ -0,0 +1,6 @@
+Item Qty Unit Designators
+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/tutorial/tutorial07.gv b/tutorial/tutorial07.gv
new file mode 100644
index 0000000..a64e8c3
--- /dev/null
+++ b/tutorial/tutorial07.gv
@@ -0,0 +1,78 @@
+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|{Molex KK 254|female|4-pin}|{{GND|VCC|SCL|SDA}|{1|2|3|4}}"]
+ X2 [label="X2|{Molex KK 254|female|4-pin}|{{1|2|3|4}|{GND|VCC|SCL|SDA}}"]
+ X3 [label="X3|{Molex KK 254|female|4-pin}|{{GND|VCC|SCL|SDA}|{1|2|3|4}}"]
+ X4 [label="X4|{Molex KK 254|female|4-pin}|{{1|2|3|4}|{GND|VCC|SCL|SDA}}"]
+ X5 [label="X5|{Molex KK 254|female|4-pin}|{{GND|VCC|SCL|SDA}|{1|2|3|4}}"]
+ X6 [label="X6|{Molex KK 254|female|4-pin}|{{1|2|3|4}|{GND|VCC|SCL|SDA}}"]
+ edge [color="#000000:#00ffff:#000000"]
+ X1:p1r:e -- W1:w1:w
+ W1:w1:e -- X2:p1l:w
+ edge [color="#000000:#ff66cc:#000000"]
+ X1:p2r:e -- W1:w2:w
+ W1:w2:e -- X2:p2l:w
+ edge [color="#000000:#ffff00:#000000"]
+ X1:p3r:e -- W1:w3:w
+ W1:w3:e -- X2:p3l:w
+ edge [color="#000000:#8000ff:#000000"]
+ X1:p4r:e -- W1:w4:w
+ W1:w4:e -- X2:p4l:w
+ W1 [label=< |
| |
| X1:1 | TQ | X2:1 | | | X1:2 | PK | X2:2 | | | X1:3 | YE | X2:3 | | | X1:4 | VT | X2:4 | | | |
|
> fillcolor=white margin=0 shape=box style="filled,dashed"]
+ edge [color="#000000:#00ffff:#000000"]
+ X3:p1r:e -- W2:w1:w
+ W2:w1:e -- X2:p1l:w
+ edge [color="#000000:#ff66cc:#000000"]
+ X3:p2r:e -- W2:w2:w
+ W2:w2:e -- X2:p2l:w
+ edge [color="#000000:#ffff00:#000000"]
+ X3:p3r:e -- W2:w3:w
+ W2:w3:e -- X2:p3l:w
+ edge [color="#000000:#8000ff:#000000"]
+ X3:p4r:e -- W2:w4:w
+ W2:w4:e -- X2:p4l:w
+ W2 [label=< |
| |
| X3:1 | TQ | X2:1 | | | X3:2 | PK | X2:2 | | | X3:3 | YE | X2:3 | | | X3:4 | VT | X2:4 | | | |
|
> fillcolor=white margin=0 shape=box style="filled,dashed"]
+ edge [color="#000000:#00ffff:#000000"]
+ X3:p1r:e -- W3:w1:w
+ W3:w1:e -- X4:p1l:w
+ edge [color="#000000:#ff66cc:#000000"]
+ X3:p2r:e -- W3:w2:w
+ W3:w2:e -- X4:p2l:w
+ edge [color="#000000:#ffff00:#000000"]
+ X3:p3r:e -- W3:w3:w
+ W3:w3:e -- X4:p3l:w
+ edge [color="#000000:#8000ff:#000000"]
+ X3:p4r:e -- W3:w4:w
+ W3:w4:e -- X4:p4l:w
+ W3 [label=< |
| |
| X3:1 | TQ | X4:1 | | | X3:2 | PK | X4:2 | | | X3:3 | YE | X4:3 | | | X3:4 | VT | X4:4 | | | |
|
> fillcolor=white margin=0 shape=box style="filled,dashed"]
+ edge [color="#000000:#00ffff:#000000"]
+ X5:p1r:e -- W4:w1:w
+ W4:w1:e -- X4:p1l:w
+ edge [color="#000000:#ff66cc:#000000"]
+ X5:p2r:e -- W4:w2:w
+ W4:w2:e -- X4:p2l:w
+ edge [color="#000000:#ffff00:#000000"]
+ X5:p3r:e -- W4:w3:w
+ W4:w3:e -- X4:p3l:w
+ edge [color="#000000:#8000ff:#000000"]
+ X5:p4r:e -- W4:w4:w
+ W4:w4:e -- X4:p4l:w
+ W4 [label=< |
| |
| X5:1 | TQ | X4:1 | | | X5:2 | PK | X4:2 | | | X5:3 | YE | X4:3 | | | X5:4 | VT | X4:4 | | | |
|
> fillcolor=white margin=0 shape=box style="filled,dashed"]
+ edge [color="#000000:#00ffff:#000000"]
+ X5:p1r:e -- W5:w1:w
+ W5:w1:e -- X6:p1l:w
+ edge [color="#000000:#ff66cc:#000000"]
+ X5:p2r:e -- W5:w2:w
+ W5:w2:e -- X6:p2l:w
+ edge [color="#000000:#ffff00:#000000"]
+ X5:p3r:e -- W5:w3:w
+ W5:w3:e -- X6:p3l:w
+ edge [color="#000000:#8000ff:#000000"]
+ X5:p4r:e -- W5:w4:w
+ W5:w4:e -- X6:p4l:w
+ W5 [label=< |
| |
| X5:1 | TQ | X6:1 | | | X5:2 | PK | X6:2 | | | X5:3 | YE | X6:3 | | | X5:4 | VT | X6:4 | | | |
|
> fillcolor=white margin=0 shape=box style="filled,dashed"]
+}
diff --git a/tutorial/tutorial07.html b/tutorial/tutorial07.html
new file mode 100644
index 0000000..664cb22
--- /dev/null
+++ b/tutorial/tutorial07.html
@@ -0,0 +1,656 @@
+Diagram
+
+
+
+
+Bill of Materials
| Item | Qty | Unit | Designators |
|---|
| 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 |
\ No newline at end of file
diff --git a/tutorial/tutorial07.md b/tutorial/tutorial07.md
new file mode 100644
index 0000000..8b9bfd8
--- /dev/null
+++ b/tutorial/tutorial07.md
@@ -0,0 +1,4 @@
+## Daisy chaining (II)
+
+* Zig-zag daisy chain
+ * Convenient for longer chains
diff --git a/tutorial/tutorial07.png b/tutorial/tutorial07.png
new file mode 100644
index 0000000..8bf7569
Binary files /dev/null and b/tutorial/tutorial07.png differ
diff --git a/tutorial/tutorial07.svg b/tutorial/tutorial07.svg
new file mode 100644
index 0000000..af65aaf
--- /dev/null
+++ b/tutorial/tutorial07.svg
@@ -0,0 +1,655 @@
+
+
+
+
+
diff --git a/tutorial/tutorial07.yml b/tutorial/tutorial07.yml
new file mode 100644
index 0000000..2aefc83
--- /dev/null
+++ b/tutorial/tutorial07.yml
@@ -0,0 +1,52 @@
+connectors:
+ X1: &template_con
+ type: Molex KK 254
+ subtype: female
+ pinout: [GND, VCC, SCL, SDA]
+ X2:
+ <<: *template_con
+ X3:
+ <<: *template_con
+ X4:
+ <<: *template_con
+ X5:
+ <<: *template_con
+ X6:
+ <<: *template_con
+
+cables:
+ W1: &template_wire
+ gauge: 0.25 mm2
+ length: 0.2
+ colors: [TQ, PK, YE, VT]
+ category: bundle
+ W2:
+ <<: *template_wire
+ W3:
+ <<: *template_wire
+ W4:
+ <<: *template_wire
+ W5:
+ <<: *template_wire
+
+connections:
+ -
+ - X1: [1-4]
+ - W1: [1-4]
+ - X2: [1-4]
+ -
+ - X3: [1-4]
+ - W2: [1-4]
+ - X2: [1-4]
+ -
+ - X3: [1-4]
+ - W3: [1-4]
+ - X4: [1-4]
+ -
+ - X5: [1-4]
+ - W4: [1-4]
+ - X4: [1-4]
+ -
+ - X5: [1-4]
+ - W5: [1-4]
+ - X6: [1-4]