diff --git a/tutorial/MolexKK254.jpg b/tutorial/MolexKK254.jpg new file mode 100644 index 0000000..755cfe9 Binary files /dev/null and b/tutorial/MolexKK254.jpg differ diff --git a/tutorial/MolexKK254MALE.jpg b/tutorial/MolexKK254MALE.jpg new file mode 100644 index 0000000..c2dc5a7 Binary files /dev/null and b/tutorial/MolexKK254MALE.jpg differ diff --git a/tutorial/readme.md b/tutorial/readme.md index 56f9cce..51ed8c4 100644 --- a/tutorial/readme.md +++ b/tutorial/readme.md @@ -417,3 +417,135 @@ additional_bom_items: [Source](tutorial08.yml) - [Bill of Materials](tutorial08.bom.tsv) +![](tutorial09.png) + +[Source](tutorial09.yml) - [Bill of Materials](tutorial09.bom.tsv) +## 09 - Hidden wire information and using a template for nice display as a DIN6771 document + +* Sometimes the box around the wire will be distrating + * unfurtionaly some fields can not (yet) be suppressed: + # length + # gauge + # color_code + # manufacturer + # mpn + # supplier + # spn + # pn +* Formatting the end result in a DIN-6771 template makes for a very nice result. + * using a template ensures all your wiring diagrams will have a uniform look + * the template can be found at: /home/[USER]/.local/lib/python3.10/site-packages/wireviz/templates/din-6771.html + + +* Ad an image to your connector (or wire) + +```yaml +connectors: + X1: &template1 # define a template for later use + type: Molex KK 254 + pincount: 4 + subtype: female + # manufacturer: 'Molex' # set manufacter name + # mpn: '22013047' # set manufacturer part number + # supplier: Digimouse + # spn: 1234 + image: + src: MolexKK254.jpg + # add a list of additional components to a part (shown in graph) + additional_components: + - type: Crimp # short identifier used in graph + subtype: Molex KK 254, 22-30 AWG # extra information added to type in bom + qty_multiplier: populated # multipier for quantity (number of populated pins) + manufacturer: Molex # set manufacter name + mpn: 08500030 # set manufacturer part number + - type: Test + qty: 1 + pn: ABC + manufacturer: Molex + mpn: 45454 + supplier: Mousikey + spn: 9999 + X2: + <<: *template1 # reuse template + pn: CON4 # set an internal part number for just this connector + X3: + <<: *template1 # reuse template + +cables: + W1: + wirecount: 4 + length: 1 + gauge: 0.25 mm2 + color_code: IEC + manufacturer: CablesCo + mpn: ABC123 + supplier: Cables R Us + spn: 999-888-777 + pn: CAB1 + ############# + show_name: false + show_wirecount: false + show_wirenumbers: false + ############# + W2: + category: bundle + length: 1 + gauge: 0.25 mm2 + colors: [YE, BK, BK, RD] + manufacturer: [WiresCo, WiresCo, WiresCo, WiresCo] # set a manufacter per wire + mpn: [W1-YE, W1-BK, W1-BK, W1-RD] + supplier: [WireShack, WireShack, WireShack, WireShack] + spn: [1001, 1002, 1002, 1009] + pn: [WIRE1, WIRE2, WIRE2, WIRE3] + # add a list of additional components to a part (shown in graph) + additional_components: + - type: Sleve # short identifier used in graph + subtype: Braided nylon, black, 3mm # extra information added to type in bom + qty_multiplier: length # multipier for quantity (length of cable) + unit: m + pn: SLV-1 + +connections: + - - X1: [1-4] + - W1: [1-4] + - X2: [1-4] + - - X1: [1-4] + - W2: [1-4] + - X3: [1-4] + ############# +tweak: + override: + graph: + ranksep: "0.5" # Reduce the horizontal spacing (default 2) + wireTweak: &wireTweak + shape: none # Hide the surrounding frame + fontsize: "12" # Reduce the space needed for text + fontcolor: white # Same as background to hide the text + + W1: + <<: *wireTweak + ############### + + ###### the din template, A4 format + metadata: &metadata + title: Power supplies + pn: PSU + + authors: + Created: + name: Ton + date: 2025-03-11 + Approved: + name: Ton + date: 2025-03-11 + + revisions: + A: + name: Ton + date: 2025-03-12 + changelog: updates] + + template: + name: din-6771 + sheetsize: A4 +``` \ No newline at end of file diff --git a/tutorial/tutorial09.bom.tsv b/tutorial/tutorial09.bom.tsv new file mode 100644 index 0000000..07c8c2c --- /dev/null +++ b/tutorial/tutorial09.bom.tsv @@ -0,0 +1,11 @@ +Id Description Qty Unit Designators P/N Manufacturer MPN Supplier SPN +1 Cable, 4 wires 0 m +2 Connector, Molex KK 254, female, 4 pins 1 X1 Molex 22013047 Digimouse 1234 +3 Connector, Molex KK 254, male, 4 pins 1 X3 Molex 22013047 Digimouse 1234 +4 Connector, Molex KK 254, male, 4 pins 1 X2 CON4 Molex 22013047 Digimouse 1234 +5 Crimp, Molex KK 254, 22-30 AWG 12 X1, X2, X3 Molex 08500030 +6 Sleve, Braided nylon, black, 3mm 1 m W2 SLV-1 +7 Test 3 X1, X2, X3 ABC Molex 45454 Mousikey 9999 +8 Wire, 0.25 mm², BK 2 m W2 WIRE2 WiresCo W1-BK WireShack 1002 +9 Wire, 0.25 mm², RD 1 m W2 WIRE3 WiresCo W1-RD WireShack 1009 +10 Wire, 0.25 mm², YE 1 m W2 WIRE1 WiresCo W1-YE WireShack 1001 diff --git a/tutorial/tutorial09.html b/tutorial/tutorial09.html new file mode 100644 index 0000000..029d11f --- /dev/null +++ b/tutorial/tutorial09.html @@ -0,0 +1,730 @@ + + + + + + + Power supplies + + + + +
+
+ +
+ +
+ +
+ + + + + + +%3 + + + +X1 + + +X1 + +Molex: 22013047 + +Digimouse: 1234 + +Molex KK 254 + +female + +4-pin + +1 + +2 + +3 + +4 + + + +Additional components + +4 x #5 (Crimp) + +1 x #7 (Test) + + + +W1 + +  +X1:1 +          +X2:1 + + + +X1:2 +          +X2:2 + + + +X1:3 +          +X2:3 + + + +X1:4 +          +X2:4 + + + +  + + + +X1:e--W1:w + + + + + + +X1:e--W1:w + + + + + + +X1:e--W1:w + + + + + + +X1:e--W1:w + + + + + + +W2 + + +W2 + +4x + +0.25 mm² + +1 m +  +X1:1 +     YE     +X3:1 + + + +P/N: WIRE1 +WiresCo: W1-YE +WireShack: 1001 +X1:2 +     BK     +X3:2 + + + +P/N: WIRE2 +WiresCo: W1-BK +WireShack: 1002 +X1:3 +     BK     +X3:3 + + + +P/N: WIRE2 +WiresCo: W1-BK +WireShack: 1002 +X1:4 +     RD     +X3:4 + + + +P/N: WIRE3 +WiresCo: W1-RD +WireShack: 1009 +  + +Additional components + +1 m x #6 (Sleve) + + + +X1:e--W2:w + + + + + + +X1:e--W2:w + + + + + + +X1:e--W2:w + + + + + + +X1:e--W2:w + + + + + + +X2 + + +X2 + +P/N: CON4 + +Molex: 22013047 + +Digimouse: 1234 + +Molex KK 254 + +male + +4-pin + +1 + +2 + +3 + +4 + + + +Additional components + +4 x #5 (Crimp) + +1 x #7 (Test) + + + +X3 + + +X3 + +Molex: 22013047 + +Digimouse: 1234 + +Molex KK 254 + +male + +4-pin + +1 + +2 + +3 + +4 + + + +Additional components + +4 x #5 (Crimp) + +1 x #7 (Test) + + + +W1:e--X2:w + + + + + + +W1:e--X2:w + + + + + + +W1:e--X2:w + + + + + + +W1:e--X2:w + + + + + + +W2:e--X3:w + + + + + + +W2:e--X3:w + + + + + + +W2:e--X3:w + + + + + + +W2:e--X3:w + + + + + + + + +
+ +
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
10Wire, 0.25 mm², YE1mW2WIRE1WiresCoW1-YEWireShack1001
9Wire, 0.25 mm², RD1mW2WIRE3WiresCoW1-RDWireShack1009
8Wire, 0.25 mm², BK2mW2WIRE2WiresCoW1-BKWireShack1002
7Test3X1, X2, X3ABCMolex45454Mousikey9999
6Sleve, Braided nylon, black, 3mm1mW2SLV-1
5Crimp, Molex KK 254, 22-30 AWG12X1, X2, X3Molex08500030
4Connector, Molex KK 254, male, 4 pins1X2CON4Molex22013047Digimouse1234
3Connector, Molex KK 254, male, 4 pins1X3Molex22013047Digimouse1234
2Connector, Molex KK 254, female, 4 pins1X1Molex22013047Digimouse1234
1Cable, 4 wires0m
IdDescriptionQtyUnitDesignatorsP/NManufacturerMPNSupplierSPN
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
DateNamePower supplies
Created2025-03-11Ton
Approved2025-03-11Ton
PSUSheet
1
Aupdates]2025-03-12Tonof 1
RevChangelogDateName
+
+ +
+
+ + diff --git a/tutorial/tutorial09.png b/tutorial/tutorial09.png new file mode 100644 index 0000000..0d78fb6 Binary files /dev/null and b/tutorial/tutorial09.png differ diff --git a/tutorial/tutorial09.svg b/tutorial/tutorial09.svg new file mode 100644 index 0000000..b5b33a6 --- /dev/null +++ b/tutorial/tutorial09.svg @@ -0,0 +1,312 @@ + + + + + + +%3 + + + +X1 + + +X1 + +Molex: 22013047 + +Digimouse: 1234 + +Molex KK 254 + +female + +4-pin + +1 + +2 + +3 + +4 + + + +Additional components + +4 x #5 (Crimp) + +1 x #7 (Test) + + + +W1 + +  +X1:1 +          +X2:1 + + + +X1:2 +          +X2:2 + + + +X1:3 +          +X2:3 + + + +X1:4 +          +X2:4 + + + +  + + + +X1:e--W1:w + + + + + + +X1:e--W1:w + + + + + + +X1:e--W1:w + + + + + + +X1:e--W1:w + + + + + + +W2 + + +W2 + +4x + +0.25 mm² + +1 m +  +X1:1 +     YE     +X3:1 + + + +P/N: WIRE1 +WiresCo: W1-YE +WireShack: 1001 +X1:2 +     BK     +X3:2 + + + +P/N: WIRE2 +WiresCo: W1-BK +WireShack: 1002 +X1:3 +     BK     +X3:3 + + + +P/N: WIRE2 +WiresCo: W1-BK +WireShack: 1002 +X1:4 +     RD     +X3:4 + + + +P/N: WIRE3 +WiresCo: W1-RD +WireShack: 1009 +  + +Additional components + +1 m x #6 (Sleve) + + + +X1:e--W2:w + + + + + + +X1:e--W2:w + + + + + + +X1:e--W2:w + + + + + + +X1:e--W2:w + + + + + + +X2 + + +X2 + +P/N: CON4 + +Molex: 22013047 + +Digimouse: 1234 + +Molex KK 254 + +male + +4-pin + +1 + +2 + +3 + +4 + + + +Additional components + +4 x #5 (Crimp) + +1 x #7 (Test) + + + +X3 + + +X3 + +Molex: 22013047 + +Digimouse: 1234 + +Molex KK 254 + +male + +4-pin + +1 + +2 + +3 + +4 + + + +Additional components + +4 x #5 (Crimp) + +1 x #7 (Test) + + + +W1:e--X2:w + + + + + + +W1:e--X2:w + + + + + + +W1:e--X2:w + + + + + + +W1:e--X2:w + + + + + + +W2:e--X3:w + + + + + + +W2:e--X3:w + + + + + + +W2:e--X3:w + + + + + + +W2:e--X3:w + + + + + + diff --git a/tutorial/tutorial09.yml b/tutorial/tutorial09.yml new file mode 100644 index 0000000..d54220f --- /dev/null +++ b/tutorial/tutorial09.yml @@ -0,0 +1,116 @@ +connectors: + X1: &template1 # define a template for later use + type: Molex KK 254 + pincount: 4 + subtype: female + manufacturer: 'Molex' # set manufacter name + mpn: '22013047' # set manufacturer part number + supplier: Digimouse + spn: 1234 + image: + src: MolexKK254.jpg + # add a list of additional components to a part (shown in graph) + additional_components: + - type: Crimp # short identifier used in graph + subtype: Molex KK 254, 22-30 AWG # extra information added to type in bom + qty_multiplier: populated # multipier for quantity (number of populated pins) + manufacturer: Molex # set manufacter name + mpn: 08500030 # set manufacturer part number + - type: Test + qty: 1 + pn: ABC + manufacturer: Molex + mpn: 45454 + supplier: Mousikey + spn: 9999 + X2: + <<: *template1 # reuse template + pn: CON4 # set an internal part number for just this connector + subtype: male + image: + src: MolexKK254MALE.jpg + + X3: + <<: *template1 # reuse template + subtype: male + image: + src: MolexKK254MALE.jpg +cables: + W1: + wirecount: 4 + # length: 1 + # gauge: 0.25 mm2 + # color_code: IEC + # manufacturer: CablesCo + # mpn: ABC123 + # supplier: Cables R Us + # spn: 999-888-777 + # pn: CAB1 + ############# + show_name: false + show_wirecount: false + show_wirenumbers: false + ############# + W2: + category: bundle + length: 1 + gauge: 0.25 mm2 + colors: [YE, BK, BK, RD] + manufacturer: [WiresCo, WiresCo, WiresCo, WiresCo] # set a manufacter per wire + mpn: [W1-YE, W1-BK, W1-BK, W1-RD] + supplier: [WireShack, WireShack, WireShack, WireShack] + spn: [1001, 1002, 1002, 1009] + pn: [WIRE1, WIRE2, WIRE2, WIRE3] + # add a list of additional components to a part (shown in graph) + additional_components: + - type: Sleve # short identifier used in graph + subtype: Braided nylon, black, 3mm # extra information added to type in bom + qty_multiplier: length # multipier for quantity (length of cable) + unit: m + pn: SLV-1 + +connections: + - - X1: [1-4] + - W1: [1-4] + - X2: [1-4] + - - X1: [1-4] + - W2: [1-4] + - X3: [1-4] + ############# +tweak: + override: + graph: + ranksep: "0.5" # Reduce the horizontal spacing (default 2) + wireTweak: &wireTweak + shape: none # Hide the surrounding frame + fontsize: "12" # Reduce the space needed for text + fontcolor: white # Same as background to hide the text + X1: + <<: *wireTweak + ## W1 uses the gauge and length field, they can not be suppressed at the moment. There was an issue #221 + W1: + <<: *wireTweak + ############### + +###### the din template, A4 format +metadata: + title: Power supplies + pn: PSU + + authors: + Created: + name: Ton + date: 2025-03-11 + Approved: + name: Ton + date: 2025-03-11 + + revisions: + A: + name: Ton + date: 2025-03-12 + changelog: updates] + + template: + name: din-6771 + sheetsize: A4 \ No newline at end of file