From 80b7510c8099f6ddd6cd5c1cc672b679d7789a9e Mon Sep 17 00:00:00 2001 From: "Salvador E. Tropea" Date: Fri, 12 Feb 2021 11:08:09 -0300 Subject: [PATCH] Made the JLCPCB position example more clear and easier to reuse. --- README.md | 27 ++-- docs/README.in | 27 ++-- docs/samples/JLCPCB_position.kibot.yaml | 62 +++++++++ tests/board_samples/kicad_5/light_control.sch | 118 +++++++++--------- .../simple_position_rot_1.kibot.yaml | 10 +- .../simple_position_rot_2.kibot.yaml | 10 +- 6 files changed, 159 insertions(+), 95 deletions(-) create mode 100644 docs/samples/JLCPCB_position.kibot.yaml diff --git a/README.md b/README.md index 1b933153..132dcfe9 100644 --- a/README.md +++ b/README.md @@ -1941,14 +1941,14 @@ filters: comment: 'Only parts with JLC code' type: generic include_only: - - column: Field4 + - column: 'LCSC#' regex: '^C\d+' variants: - - name: default + - name: rotated comment: 'Just a place holder for the rotation filter' type: kibom - variant: default + variant: rotated pre_transform: _rot_footprint outputs: @@ -1956,7 +1956,7 @@ outputs: comment: "Pick and place file, JLC style" type: position options: - variant: default + variant: rotated output: '%f_cpl_jlc.%x' format: CSV units: millimeters @@ -1989,7 +1989,7 @@ outputs: - field: References name: Designator - Footprint - - field: Field4 + - field: 'LCSC#' name: 'LCSC Part #' csv: hide_pcb_info: true @@ -1997,10 +1997,11 @@ outputs: quote_all: true ``` -The `only_jlc_parts` filter is used to generate the BoM and assumes you put the JLC component code in a field named `Field4`. -This is what the blog author does, but I suggest using a more descriptive name, like `JLC#` or `LCSC#`. +The `only_jlc_parts` filter is used to generate the BoM and assumes you put the JLC component code in a field named `LCSC#` (JLC uses [LCSC](https://lcsc.com/) as supplier). +Note that the author of the blog simply used `Field4` for this and his script searches for any field containing the `^C\d+` pattern. +I think this isn't a good idea and I suggest using a defined name, like in this example. -The `default` variant is used only to apply the `_rot_footprint` transformation filter. This filter is an internal filter of type `rot_footprint`. +The `rotated` variant is used only to apply the `_rot_footprint` transformation filter. This filter is an internal filter of type `rot_footprint`. Here is the same configuration file making explicit use of the rotation filter: ```yaml @@ -2016,14 +2017,14 @@ filters: comment: 'Only parts with JLC code' type: generic include_only: - - column: Field4 + - column: 'LCSC#' regex: '^C\d+' variants: - - name: default + - name: rotated comment: 'Just a place holder for the rotation filter' type: kibom - variant: default + variant: rotated pre_transform: fix_rotation outputs: @@ -2031,7 +2032,7 @@ outputs: comment: "Pick and place file, JLC style" type: position options: - variant: default + variant: rotated output: '%f_cpl_jlc.%x' format: CSV units: millimeters @@ -2064,7 +2065,7 @@ outputs: - field: References name: Designator - Footprint - - field: Field4 + - field: 'LCSC#' name: 'LCSC Part #' csv: hide_pcb_info: true diff --git a/docs/README.in b/docs/README.in index 767f5746..bb296366 100644 --- a/docs/README.in +++ b/docs/README.in @@ -1027,14 +1027,14 @@ filters: comment: 'Only parts with JLC code' type: generic include_only: - - column: Field4 + - column: 'LCSC#' regex: '^C\d+' variants: - - name: default + - name: rotated comment: 'Just a place holder for the rotation filter' type: kibom - variant: default + variant: rotated pre_transform: _rot_footprint outputs: @@ -1042,7 +1042,7 @@ outputs: comment: "Pick and place file, JLC style" type: position options: - variant: default + variant: rotated output: '%f_cpl_jlc.%x' format: CSV units: millimeters @@ -1075,7 +1075,7 @@ outputs: - field: References name: Designator - Footprint - - field: Field4 + - field: 'LCSC#' name: 'LCSC Part #' csv: hide_pcb_info: true @@ -1083,10 +1083,11 @@ outputs: quote_all: true ``` -The `only_jlc_parts` filter is used to generate the BoM and assumes you put the JLC component code in a field named `Field4`. -This is what the blog author does, but I suggest using a more descriptive name, like `JLC#` or `LCSC#`. +The `only_jlc_parts` filter is used to generate the BoM and assumes you put the JLC component code in a field named `LCSC#` (JLC uses [LCSC](https://lcsc.com/) as supplier). +Note that the author of the blog simply used `Field4` for this and his script searches for any field containing the `^C\d+` pattern. +I think this isn't a good idea and I suggest using a defined name, like in this example. -The `default` variant is used only to apply the `_rot_footprint` transformation filter. This filter is an internal filter of type `rot_footprint`. +The `rotated` variant is used only to apply the `_rot_footprint` transformation filter. This filter is an internal filter of type `rot_footprint`. Here is the same configuration file making explicit use of the rotation filter: ```yaml @@ -1102,14 +1103,14 @@ filters: comment: 'Only parts with JLC code' type: generic include_only: - - column: Field4 + - column: 'LCSC#' regex: '^C\d+' variants: - - name: default + - name: rotated comment: 'Just a place holder for the rotation filter' type: kibom - variant: default + variant: rotated pre_transform: fix_rotation outputs: @@ -1117,7 +1118,7 @@ outputs: comment: "Pick and place file, JLC style" type: position options: - variant: default + variant: rotated output: '%f_cpl_jlc.%x' format: CSV units: millimeters @@ -1150,7 +1151,7 @@ outputs: - field: References name: Designator - Footprint - - field: Field4 + - field: 'LCSC#' name: 'LCSC Part #' csv: hide_pcb_info: true diff --git a/docs/samples/JLCPCB_position.kibot.yaml b/docs/samples/JLCPCB_position.kibot.yaml new file mode 100644 index 00000000..04f8634c --- /dev/null +++ b/docs/samples/JLCPCB_position.kibot.yaml @@ -0,0 +1,62 @@ +kibot: + version: 1 + +filters: + - name: only_jlc_parts + comment: 'Only parts with JLC (LCSC) code' + type: generic + include_only: + - column: 'LCSC#' + regex: '^C\d+' + +variants: + - name: rotated + comment: 'Just a place holder for the rotation filter' + type: kibom + variant: rotated + pre_transform: _rot_footprint + +outputs: + - name: 'JLCPCB_position' + comment: "Pick and place file, JLCPCB style" + type: position + options: + variant: rotated + output: '%f_cpl_jlc.%x' + format: CSV + units: millimeters + separate_files_for_front_and_back: false + only_smd: true + columns: + - id: Ref + name: Designator + - Val + - Package + - id: PosX + name: "Mid X" + - id: PosY + name: "Mid Y" + - id: Rot + name: Rotation + - id: Side + name: Layer + + - name: 'JLCPCB_bom' + comment: "BoM for JLCPCB" + type: bom + options: + output: '%f_%i_jlc.%x' + exclude_filter: 'only_jlc_parts' + ref_separator: ',' + columns: + - field: Value + name: Comment + - field: References + name: Designator + - Footprint + - field: 'LCSC#' + name: 'LCSC Part #' + csv: + hide_pcb_info: true + hide_stats_info: true + quote_all: true diff --git a/tests/board_samples/kicad_5/light_control.sch b/tests/board_samples/kicad_5/light_control.sch index 14bdcd6c..776d8bbc 100644 --- a/tests/board_samples/kicad_5/light_control.sch +++ b/tests/board_samples/kicad_5/light_control.sch @@ -32,7 +32,7 @@ F 0 "Q3" H 8806 1796 50 0000 L CNN F 1 "Q_NMOS_GSD" H 8806 1705 50 0000 L CNN F 2 "Package_TO_SOT_SMD:SOT-23" H 8800 1850 50 0001 C CNN F 3 "~" H 8600 1750 50 0001 C CNN -F 4 "C20917" H 8600 1750 50 0001 C CNN "Field4" +F 4 "C20917" H 8600 1750 50 0001 C CNN "LCSC#" 1 8600 1750 1 0 0 -1 $EndComp @@ -44,7 +44,7 @@ F 0 "U1" H 2950 1642 50 0000 C CNN F 1 "AZ1117-3.3" H 2950 1551 50 0000 C CNN F 2 "Package_TO_SOT_SMD:SOT-223-3_TabPin2" H 2950 1650 50 0001 C CIN F 3 "https://www.diodes.com/assets/Datasheets/AZ1117.pdf" H 2950 1400 50 0001 C CNN -F 4 "C92102" H 2950 1400 50 0001 C CNN "Field4" +F 4 "C92102" H 2950 1400 50 0001 C CNN "LCSC#" 1 2950 1400 1 0 0 -1 $EndComp @@ -56,7 +56,7 @@ F 0 "C4" H 2615 1696 50 0000 L CNN F 1 "1uF" H 2615 1605 50 0000 L CNN F 2 "Resistor_SMD:R_0603_1608Metric" H 2538 1500 50 0001 C CNN F 3 "~" H 2500 1650 50 0001 C CNN -F 4 "C15849" H 2500 1650 50 0001 C CNN "Field4" +F 4 "C15849" H 2500 1650 50 0001 C CNN "LCSC#" 1 2500 1650 1 0 0 -1 $EndComp @@ -68,7 +68,7 @@ F 0 "D1" H 1850 1350 50 0000 C CNN F 1 "D_Schottky" H 1950 1500 50 0000 C CNN F 2 "Diode_SMD:D_SOD-123" H 2000 1400 50 0001 C CNN F 3 "~" H 2000 1400 50 0001 C CNN -F 4 "C8598" H 2000 1400 50 0001 C CNN "Field4" +F 4 "C8598" H 2000 1400 50 0001 C CNN "LCSC#" 1 2000 1400 -1 0 0 1 $EndComp @@ -162,7 +162,7 @@ F 0 "D2" H 1850 1600 50 0000 C CNN F 1 "D_Schottky" H 1950 1750 50 0000 C CNN F 2 "Diode_SMD:D_SOD-123" H 2000 1650 50 0001 C CNN F 3 "~" H 2000 1650 50 0001 C CNN -F 4 "C8598" H 2000 1650 50 0001 C CNN "Field4" +F 4 "C8598" H 2000 1650 50 0001 C CNN "LCSC#" 1 2000 1650 -1 0 0 1 $EndComp @@ -249,7 +249,7 @@ F 0 "U2" H 2750 2800 50 0000 C CNN F 1 "CP2104" H 3000 2800 50 0000 C CNN F 2 "Package_DFN_QFN:QFN-24-1EP_4x4mm_P0.5mm_EP2.6x2.6mm" H 3400 2800 50 0001 L CNN F 3 "https://www.silabs.com/documents/public/data-sheets/cp2104.pdf" H 2700 5000 50 0001 C CNN -F 4 "C47742" H 3250 3750 50 0001 C CNN "Field4" +F 4 "C47742" H 3250 3750 50 0001 C CNN "LCSC#" 1 3250 3750 1 0 0 -1 $EndComp @@ -292,7 +292,7 @@ F 0 "C5" H 3515 1696 50 0000 L CNN F 1 "22uF" H 3515 1605 50 0000 L CNN F 2 "Resistor_SMD:R_0603_1608Metric" H 3438 1500 50 0001 C CNN F 3 "~" H 3400 1650 50 0001 C CNN -F 4 "C59461" H 3400 1650 50 0001 C CNN "Field4" +F 4 "C59461" H 3400 1650 50 0001 C CNN "LCSC#" 1 3400 1650 1 0 0 -1 $EndComp @@ -358,7 +358,7 @@ F 0 "C2" H 2265 2996 50 0000 L CNN F 1 "0.1uF" H 2265 2905 50 0000 L CNN F 2 "Resistor_SMD:R_0402_1005Metric" H 2188 2800 50 0001 C CNN F 3 "~" H 2150 2950 50 0001 C CNN -F 4 "C1525" H 2150 2950 50 0001 C CNN "Field4" +F 4 "C1525" H 2150 2950 50 0001 C CNN "LCSC#" 1 2150 2950 1 0 0 -1 $EndComp @@ -370,7 +370,7 @@ F 0 "C1" H 1700 3000 50 0000 L CNN F 1 "1uF" H 1600 2900 50 0000 L CNN F 2 "Resistor_SMD:R_0402_1005Metric" H 1938 2800 50 0001 C CNN F 3 "~" H 1900 2950 50 0001 C CNN -F 4 "C52923" H 1900 2950 50 0001 C CNN "Field4" +F 4 "C52923" H 1900 2950 50 0001 C CNN "LCSC#" 1 1900 2950 1 0 0 -1 $EndComp @@ -411,7 +411,7 @@ F 0 "C3" H 2465 4746 50 0000 L CNN F 1 "4.7uF" H 2465 4655 50 0000 L CNN F 2 "Resistor_SMD:R_0603_1608Metric" H 2388 4550 50 0001 C CNN F 3 "~" H 2350 4700 50 0001 C CNN -F 4 "C19666" H 2350 4700 50 0001 C CNN "Field4" +F 4 "C19666" H 2350 4700 50 0001 C CNN "LCSC#" 1 2350 4700 1 0 0 -1 $EndComp @@ -490,7 +490,7 @@ F 0 "Q1" H 3391 6046 50 0000 L CNN F 1 "Q_NPN_BEC" H 3391 5955 50 0000 L CNN F 2 "Package_TO_SOT_SMD:SOT-23" H 3400 6100 50 0001 C CNN F 3 "~" H 3200 6000 50 0001 C CNN -F 4 "C2150" H 3200 6000 50 0001 C CNN "Field4" +F 4 "C2150" H 3200 6000 50 0001 C CNN "LCSC#" 1 3200 6000 1 0 0 -1 $EndComp @@ -502,7 +502,7 @@ F 0 "Q2" H 3391 6654 50 0000 L CNN F 1 "Q_NPN_BEC" H 3391 6745 50 0000 L CNN F 2 "Package_TO_SOT_SMD:SOT-23" H 3400 6800 50 0001 C CNN F 3 "~" H 3200 6700 50 0001 C CNN -F 4 "C2150" H 3200 6700 50 0001 C CNN "Field4" +F 4 "C2150" H 3200 6700 50 0001 C CNN "LCSC#" 1 3200 6700 1 0 0 1 $EndComp @@ -514,7 +514,7 @@ F 0 "R1" V 2493 6000 50 0000 C CNN F 1 "10kR" V 2584 6000 50 0000 C CNN F 2 "Resistor_SMD:R_0402_1005Metric" V 2630 6000 50 0001 C CNN F 3 "~" H 2700 6000 50 0001 C CNN -F 4 "C25744" V 2700 6000 50 0001 C CNN "Field4" +F 4 "C25744" V 2700 6000 50 0001 C CNN "LCSC#" 1 2700 6000 0 1 1 0 $EndComp @@ -526,7 +526,7 @@ F 0 "R2" V 2493 6700 50 0000 C CNN F 1 "10kR" V 2584 6700 50 0000 C CNN F 2 "Resistor_SMD:R_0402_1005Metric" V 2630 6700 50 0001 C CNN F 3 "~" H 2700 6700 50 0001 C CNN -F 4 "C25744" V 2700 6700 50 0001 C CNN "Field4" +F 4 "C25744" V 2700 6700 50 0001 C CNN "LCSC#" 1 2700 6700 0 1 1 0 $EndComp @@ -585,7 +585,7 @@ F 0 "C8" H 6115 1496 50 0000 L CNN F 1 "0.1uF" H 6115 1405 50 0000 L CNN F 2 "Resistor_SMD:R_0402_1005Metric" H 6038 1300 50 0001 C CNN F 3 "~" H 6000 1450 50 0001 C CNN -F 4 "C1525" H 6000 1450 50 0001 C CNN "Field4" +F 4 "C1525" H 6000 1450 50 0001 C CNN "LCSC#" 1 6000 1450 1 0 0 -1 $EndComp @@ -597,7 +597,7 @@ F 0 "C7" H 5550 1550 50 0000 L CNN F 1 "10uF" H 5500 1350 50 0000 L CNN F 2 "Resistor_SMD:R_0402_1005Metric" H 5738 1300 50 0001 C CNN F 3 "~" H 5700 1450 50 0001 C CNN -F 4 "C15525" H 5700 1450 50 0001 C CNN "Field4" +F 4 "C15525" H 5700 1450 50 0001 C CNN "LCSC#" 1 5700 1450 1 0 0 -1 $EndComp @@ -643,7 +643,7 @@ F 0 "C6" H 5165 2196 50 0000 L CNN F 1 "4.7uF" H 5165 2105 50 0000 L CNN F 2 "Resistor_SMD:R_0402_1005Metric" H 5088 2000 50 0001 C CNN F 3 "~" H 5050 2150 50 0001 C CNN -F 4 "C23733" H 5050 2150 50 0001 C CNN "Field4" +F 4 "C23733" H 5050 2150 50 0001 C CNN "LCSC#" 1 5050 2150 1 0 0 -1 $EndComp @@ -671,7 +671,7 @@ F 0 "R3" H 4980 1654 50 0000 R CNN F 1 "10kR" H 4980 1745 50 0000 R CNN F 2 "Resistor_SMD:R_0402_1005Metric" V 4980 1700 50 0001 C CNN F 3 "~" H 5050 1700 50 0001 C CNN -F 4 "C25744" V 5050 1700 50 0001 C CNN "Field4" +F 4 "C25744" V 5050 1700 50 0001 C CNN "LCSC#" 1 5050 1700 -1 0 0 1 $EndComp @@ -696,7 +696,7 @@ F 0 "SW1" V 4796 2152 50 0000 R CNN F 1 "SW_Push" V 4705 2152 50 0000 R CNN F 2 "footprints:TS-1187A" H 4750 2400 50 0001 C CNN F 3 "~" H 4750 2400 50 0001 C CNN -F 4 "C318888" V 4750 2200 50 0001 C CNN "Field4" +F 4 "C318888" V 4750 2200 50 0001 C CNN "LCSC#" 1 4750 2200 0 -1 -1 0 $EndComp @@ -736,7 +736,7 @@ F 0 "R4" V 8043 1750 50 0000 C CNN F 1 "100R" V 8134 1750 50 0000 C CNN F 2 "Resistor_SMD:R_0402_1005Metric" V 8180 1750 50 0001 C CNN F 3 "~" H 8250 1750 50 0001 C CNN -F 4 "C25076" V 8250 1750 50 0001 C CNN "Field4" +F 4 "C25076" V 8250 1750 50 0001 C CNN "LCSC#" 1 8250 1750 0 1 1 0 $EndComp @@ -785,7 +785,7 @@ F 0 "D3" H 8350 1300 50 0000 C CNN F 1 "D_Schottky" H 8450 1450 50 0000 C CNN F 2 "Diode_SMD:D_SOD-123" H 8500 1350 50 0001 C CNN F 3 "~" H 8500 1350 50 0001 C CNN -F 4 "C8598" H 8500 1350 50 0001 C CNN "Field4" +F 4 "C8598" H 8500 1350 50 0001 C CNN "LCSC#" 1 8500 1350 0 1 1 0 $EndComp @@ -811,7 +811,7 @@ F 0 "Q7" H 10256 1796 50 0000 L CNN F 1 "Q_NMOS_GDS" H 10256 1705 50 0000 L CNN F 2 "Package_TO_SOT_SMD:SOT-23" H 10250 1850 50 0001 C CNN F 3 "~" H 10050 1750 50 0001 C CNN -F 4 "C20917" H 10050 1750 50 0001 C CNN "Field4" +F 4 "C20917" H 10050 1750 50 0001 C CNN "LCSC#" 1 10050 1750 1 0 0 -1 $EndComp @@ -823,7 +823,7 @@ F 0 "R8" V 9493 1750 50 0000 C CNN F 1 "100R" V 9584 1750 50 0000 C CNN F 2 "Resistor_SMD:R_0402_1005Metric" V 9630 1750 50 0001 C CNN F 3 "~" H 9700 1750 50 0001 C CNN -F 4 "C25076" V 9700 1750 50 0001 C CNN "Field4" +F 4 "C25076" V 9700 1750 50 0001 C CNN "LCSC#" 1 9700 1750 0 1 1 0 $EndComp @@ -886,7 +886,7 @@ F 0 "Q4" H 8806 3096 50 0000 L CNN F 1 "Q_NMOS_GDS" H 8806 3005 50 0000 L CNN F 2 "Package_TO_SOT_SMD:SOT-23" H 8800 3150 50 0001 C CNN F 3 "~" H 8600 3050 50 0001 C CNN -F 4 "C20917" H 8600 3050 50 0001 C CNN "Field4" +F 4 "C20917" H 8600 3050 50 0001 C CNN "LCSC#" 1 8600 3050 1 0 0 -1 $EndComp @@ -898,7 +898,7 @@ F 0 "R5" V 8043 3050 50 0000 C CNN F 1 "100R" V 8134 3050 50 0000 C CNN F 2 "Resistor_SMD:R_0402_1005Metric" V 8180 3050 50 0001 C CNN F 3 "~" H 8250 3050 50 0001 C CNN -F 4 "C25076" V 8250 3050 50 0001 C CNN "Field4" +F 4 "C25076" V 8250 3050 50 0001 C CNN "LCSC#" 1 8250 3050 0 1 1 0 $EndComp @@ -961,7 +961,7 @@ F 0 "Q8" H 10256 3096 50 0000 L CNN F 1 "Q_NMOS_GDS" H 10256 3005 50 0000 L CNN F 2 "Package_TO_SOT_SMD:SOT-23" H 10250 3150 50 0001 C CNN F 3 "~" H 10050 3050 50 0001 C CNN -F 4 "C20917" H 10050 3050 50 0001 C CNN "Field4" +F 4 "C20917" H 10050 3050 50 0001 C CNN "LCSC#" 1 10050 3050 1 0 0 -1 $EndComp @@ -973,7 +973,7 @@ F 0 "R9" V 9493 3050 50 0000 C CNN F 1 "100R" V 9584 3050 50 0000 C CNN F 2 "Resistor_SMD:R_0402_1005Metric" V 9630 3050 50 0001 C CNN F 3 "~" H 9700 3050 50 0001 C CNN -F 4 "C25076" V 9700 3050 50 0001 C CNN "Field4" +F 4 "C25076" V 9700 3050 50 0001 C CNN "LCSC#" 1 9700 3050 0 1 1 0 $EndComp @@ -1036,7 +1036,7 @@ F 0 "Q5" H 8806 4496 50 0000 L CNN F 1 "Q_NMOS_GDS" H 8806 4405 50 0000 L CNN F 2 "Package_TO_SOT_SMD:SOT-23" H 8800 4550 50 0001 C CNN F 3 "~" H 8600 4450 50 0001 C CNN -F 4 "C20917" H 8600 4450 50 0001 C CNN "Field4" +F 4 "C20917" H 8600 4450 50 0001 C CNN "LCSC#" 1 8600 4450 1 0 0 -1 $EndComp @@ -1048,7 +1048,7 @@ F 0 "R6" V 8043 4450 50 0000 C CNN F 1 "100R" V 8134 4450 50 0000 C CNN F 2 "Resistor_SMD:R_0402_1005Metric" V 8180 4450 50 0001 C CNN F 3 "~" H 8250 4450 50 0001 C CNN -F 4 "C25076" V 8250 4450 50 0001 C CNN "Field4" +F 4 "C25076" V 8250 4450 50 0001 C CNN "LCSC#" 1 8250 4450 0 1 1 0 $EndComp @@ -1111,7 +1111,7 @@ F 0 "Q9" H 10256 4496 50 0000 L CNN F 1 "Q_NMOS_GDS" H 10256 4405 50 0000 L CNN F 2 "Package_TO_SOT_SMD:SOT-23" H 10250 4550 50 0001 C CNN F 3 "~" H 10050 4450 50 0001 C CNN -F 4 "C20917" H 10050 4450 50 0001 C CNN "Field4" +F 4 "C20917" H 10050 4450 50 0001 C CNN "LCSC#" 1 10050 4450 1 0 0 -1 $EndComp @@ -1123,7 +1123,7 @@ F 0 "R10" V 9493 4450 50 0000 C CNN F 1 "100R" V 9584 4450 50 0000 C CNN F 2 "Resistor_SMD:R_0402_1005Metric" V 9630 4450 50 0001 C CNN F 3 "~" H 9700 4450 50 0001 C CNN -F 4 "C25076" V 9700 4450 50 0001 C CNN "Field4" +F 4 "C25076" V 9700 4450 50 0001 C CNN "LCSC#" 1 9700 4450 0 1 1 0 $EndComp @@ -1186,7 +1186,7 @@ F 0 "Q6" H 8806 5796 50 0000 L CNN F 1 "Q_NMOS_GDS" H 8806 5705 50 0000 L CNN F 2 "Package_TO_SOT_SMD:SOT-23" H 8800 5850 50 0001 C CNN F 3 "~" H 8600 5750 50 0001 C CNN -F 4 "C20917" H 8600 5750 50 0001 C CNN "Field4" +F 4 "C20917" H 8600 5750 50 0001 C CNN "LCSC#" 1 8600 5750 1 0 0 -1 $EndComp @@ -1198,7 +1198,7 @@ F 0 "R7" V 8043 5750 50 0000 C CNN F 1 "100R" V 8134 5750 50 0000 C CNN F 2 "Resistor_SMD:R_0402_1005Metric" V 8180 5750 50 0001 C CNN F 3 "~" H 8250 5750 50 0001 C CNN -F 4 "C25076" V 8250 5750 50 0001 C CNN "Field4" +F 4 "C25076" V 8250 5750 50 0001 C CNN "LCSC#" 1 8250 5750 0 1 1 0 $EndComp @@ -1261,7 +1261,7 @@ F 0 "Q10" H 10256 5796 50 0000 L CNN F 1 "Q_NMOS_GDS" H 10256 5705 50 0000 L CNN F 2 "Package_TO_SOT_SMD:SOT-23" H 10250 5850 50 0001 C CNN F 3 "~" H 10050 5750 50 0001 C CNN -F 4 "C20917" H 10050 5750 50 0001 C CNN "Field4" +F 4 "C20917" H 10050 5750 50 0001 C CNN "LCSC#" 1 10050 5750 1 0 0 -1 $EndComp @@ -1273,7 +1273,7 @@ F 0 "R11" V 9493 5750 50 0000 C CNN F 1 "100R" V 9584 5750 50 0000 C CNN F 2 "Resistor_SMD:R_0402_1005Metric" V 9630 5750 50 0001 C CNN F 3 "~" H 9700 5750 50 0001 C CNN -F 4 "C25076" V 9700 5750 50 0001 C CNN "Field4" +F 4 "C25076" V 9700 5750 50 0001 C CNN "LCSC#" 1 9700 5750 0 1 1 0 $EndComp @@ -1336,7 +1336,7 @@ F 0 "D7" H 9800 1300 50 0000 C CNN F 1 "D_Schottky" H 9900 1450 50 0000 C CNN F 2 "Diode_SMD:D_SOD-123" H 9950 1350 50 0001 C CNN F 3 "~" H 9950 1350 50 0001 C CNN -F 4 "C8598" H 9950 1350 50 0001 C CNN "Field4" +F 4 "C8598" H 9950 1350 50 0001 C CNN "LCSC#" 1 9950 1350 0 1 1 0 $EndComp @@ -1348,7 +1348,7 @@ F 0 "D4" H 8350 2600 50 0000 C CNN F 1 "D_Schottky" H 8450 2750 50 0000 C CNN F 2 "Diode_SMD:D_SOD-123" H 8500 2650 50 0001 C CNN F 3 "~" H 8500 2650 50 0001 C CNN -F 4 "C8598" H 8500 2650 50 0001 C CNN "Field4" +F 4 "C8598" H 8500 2650 50 0001 C CNN "LCSC#" 1 8500 2650 0 1 1 0 $EndComp @@ -1360,7 +1360,7 @@ F 0 "D8" H 9800 2600 50 0000 C CNN F 1 "D_Schottky" H 9900 2750 50 0000 C CNN F 2 "Diode_SMD:D_SOD-123" H 9950 2650 50 0001 C CNN F 3 "~" H 9950 2650 50 0001 C CNN -F 4 "C8598" H 9950 2650 50 0001 C CNN "Field4" +F 4 "C8598" H 9950 2650 50 0001 C CNN "LCSC#" 1 9950 2650 0 1 1 0 $EndComp @@ -1372,7 +1372,7 @@ F 0 "D5" H 8350 4000 50 0000 C CNN F 1 "D_Schottky" H 8450 4150 50 0000 C CNN F 2 "Diode_SMD:D_SOD-123" H 8500 4050 50 0001 C CNN F 3 "~" H 8500 4050 50 0001 C CNN -F 4 "C8598" H 8500 4050 50 0001 C CNN "Field4" +F 4 "C8598" H 8500 4050 50 0001 C CNN "LCSC#" 1 8500 4050 0 1 1 0 $EndComp @@ -1384,7 +1384,7 @@ F 0 "D9" H 9800 4000 50 0000 C CNN F 1 "D_Schottky" H 9900 4150 50 0000 C CNN F 2 "Diode_SMD:D_SOD-123" H 9950 4050 50 0001 C CNN F 3 "~" H 9950 4050 50 0001 C CNN -F 4 "C8598" H 9950 4050 50 0001 C CNN "Field4" +F 4 "C8598" H 9950 4050 50 0001 C CNN "LCSC#" 1 9950 4050 0 1 1 0 $EndComp @@ -1396,7 +1396,7 @@ F 0 "D10" H 9800 5300 50 0000 C CNN F 1 "D_Schottky" H 9900 5450 50 0000 C CNN F 2 "Diode_SMD:D_SOD-123" H 9950 5350 50 0001 C CNN F 3 "~" H 9950 5350 50 0001 C CNN -F 4 "C8598" H 9950 5350 50 0001 C CNN "Field4" +F 4 "C8598" H 9950 5350 50 0001 C CNN "LCSC#" 1 9950 5350 0 1 1 0 $EndComp @@ -1408,7 +1408,7 @@ F 0 "D6" H 8350 5300 50 0000 C CNN F 1 "D_Schottky" H 8450 5450 50 0000 C CNN F 2 "Diode_SMD:D_SOD-123" H 8500 5350 50 0001 C CNN F 3 "~" H 8500 5350 50 0001 C CNN -F 4 "C8598" H 8500 5350 50 0001 C CNN "Field4" +F 4 "C8598" H 8500 5350 50 0001 C CNN "LCSC#" 1 8500 5350 0 1 1 0 $EndComp @@ -1582,7 +1582,7 @@ F 0 "D11" V 4496 6032 50 0000 R CNN F 1 "Green" V 4405 6032 50 0000 R CNN F 2 "LED_SMD:LED_0603_1608Metric" V 4450 6100 50 0001 C CNN F 3 "~" V 4450 6100 50 0001 C CNN -F 4 "C72043" V 4450 6100 50 0001 C CNN "Field4" +F 4 "C72043" V 4450 6100 50 0001 C CNN "LCSC#" 1 4450 6100 0 -1 -1 0 $EndComp @@ -1594,7 +1594,7 @@ F 0 "D13" V 5196 6032 50 0000 R CNN F 1 "Red" V 5105 6032 50 0000 R CNN F 2 "LED_SMD:LED_0603_1608Metric" V 5150 6100 50 0001 C CNN F 3 "~" V 5150 6100 50 0001 C CNN -F 4 "C2286" V 5150 6100 50 0001 C CNN "Field4" +F 4 "C2286" V 5150 6100 50 0001 C CNN "LCSC#" 1 5150 6100 0 -1 -1 0 $EndComp @@ -1606,7 +1606,7 @@ F 0 "D12" V 4846 6032 50 0000 R CNN F 1 "Green" V 4755 6032 50 0000 R CNN F 2 "LED_SMD:LED_0603_1608Metric" V 4800 6100 50 0001 C CNN F 3 "~" V 4800 6100 50 0001 C CNN -F 4 "C72043" V 4800 6100 50 0001 C CNN "Field4" +F 4 "C72043" V 4800 6100 50 0001 C CNN "LCSC#" 1 4800 6100 0 -1 -1 0 $EndComp @@ -1618,7 +1618,7 @@ F 0 "R13" H 4870 5796 50 0000 L CNN F 1 "47R" H 4870 5705 50 0000 L CNN F 2 "Resistor_SMD:R_0402_1005Metric" V 4730 5750 50 0001 C CNN F 3 "~" H 4800 5750 50 0001 C CNN -F 4 "C25118" H 4800 5750 50 0001 C CNN "Field4" +F 4 "C25118" H 4800 5750 50 0001 C CNN "LCSC#" 1 4800 5750 1 0 0 -1 $EndComp @@ -1630,7 +1630,7 @@ F 0 "D14" V 5496 6032 50 0000 R CNN F 1 "Red" V 5405 6032 50 0000 R CNN F 2 "LED_SMD:LED_0603_1608Metric" V 5450 6100 50 0001 C CNN F 3 "~" V 5450 6100 50 0001 C CNN -F 4 "C2286" V 5450 6100 50 0001 C CNN "Field4" +F 4 "C2286" V 5450 6100 50 0001 C CNN "LCSC#" 1 5450 6100 0 -1 -1 0 $EndComp @@ -1642,7 +1642,7 @@ F 0 "R14" H 5220 5796 50 0000 L CNN F 1 "150R" H 5220 5705 50 0000 L CNN F 2 "Resistor_SMD:R_0402_1005Metric" V 5080 5750 50 0001 C CNN F 3 "~" H 5150 5750 50 0001 C CNN -F 4 "C25082" H 5150 5750 50 0001 C CNN "Field4" +F 4 "C25082" H 5150 5750 50 0001 C CNN "LCSC#" 1 5150 5750 1 0 0 -1 $EndComp @@ -1654,7 +1654,7 @@ F 0 "R15" H 5520 5796 50 0000 L CNN F 1 "150R" H 5520 5705 50 0000 L CNN F 2 "Resistor_SMD:R_0402_1005Metric" V 5380 5750 50 0001 C CNN F 3 "~" H 5450 5750 50 0001 C CNN -F 4 "C25082" H 5450 5750 50 0001 C CNN "Field4" +F 4 "C25082" H 5450 5750 50 0001 C CNN "LCSC#" 1 5450 5750 1 0 0 -1 $EndComp @@ -1718,7 +1718,7 @@ F 0 "R12" H 4520 5796 50 0000 L CNN F 1 "47R" H 4520 5705 50 0000 L CNN F 2 "Resistor_SMD:R_0402_1005Metric" V 4380 5750 50 0001 C CNN F 3 "~" H 4450 5750 50 0001 C CNN -F 4 "C25118" H 4450 5750 50 0001 C CNN "Field4" +F 4 "C25118" H 4450 5750 50 0001 C CNN "LCSC#" 1 4450 5750 1 0 0 -1 $EndComp @@ -1787,7 +1787,7 @@ F 0 "R16" H 5080 6854 50 0000 R CNN F 1 "10kR" H 5080 6945 50 0000 R CNN F 2 "Resistor_SMD:R_0402_1005Metric" V 5080 6900 50 0001 C CNN F 3 "~" H 5150 6900 50 0001 C CNN -F 4 "C25744" V 5150 6900 50 0001 C CNN "Field4" +F 4 "C25744" V 5150 6900 50 0001 C CNN "LCSC#" 1 5150 6900 -1 0 0 1 $EndComp @@ -1817,7 +1817,7 @@ F 0 "R17" H 7980 1904 50 0000 R CNN F 1 "10kR" H 7980 1995 50 0000 R CNN F 2 "Resistor_SMD:R_0402_1005Metric" V 7980 1950 50 0001 C CNN F 3 "~" H 8050 1950 50 0001 C CNN -F 4 "C25744" V 8050 1950 50 0001 C CNN "Field4" +F 4 "C25744" V 8050 1950 50 0001 C CNN "LCSC#" 1 8050 1950 -1 0 0 1 $EndComp @@ -1847,7 +1847,7 @@ F 0 "R21" H 9430 1904 50 0000 R CNN F 1 "10kR" H 9430 1995 50 0000 R CNN F 2 "Resistor_SMD:R_0402_1005Metric" V 9430 1950 50 0001 C CNN F 3 "~" H 9500 1950 50 0001 C CNN -F 4 "C25744" V 9500 1950 50 0001 C CNN "Field4" +F 4 "C25744" V 9500 1950 50 0001 C CNN "LCSC#" 1 9500 1950 -1 0 0 1 $EndComp @@ -1877,7 +1877,7 @@ F 0 "R18" H 7980 3204 50 0000 R CNN F 1 "10kR" H 7980 3295 50 0000 R CNN F 2 "Resistor_SMD:R_0402_1005Metric" V 7980 3250 50 0001 C CNN F 3 "~" H 8050 3250 50 0001 C CNN -F 4 "C25744" V 8050 3250 50 0001 C CNN "Field4" +F 4 "C25744" V 8050 3250 50 0001 C CNN "LCSC#" 1 8050 3250 -1 0 0 1 $EndComp @@ -1907,7 +1907,7 @@ F 0 "R22" H 9430 3204 50 0000 R CNN F 1 "10kR" H 9430 3295 50 0000 R CNN F 2 "Resistor_SMD:R_0402_1005Metric" V 9430 3250 50 0001 C CNN F 3 "~" H 9500 3250 50 0001 C CNN -F 4 "C25744" V 9500 3250 50 0001 C CNN "Field4" +F 4 "C25744" V 9500 3250 50 0001 C CNN "LCSC#" 1 9500 3250 -1 0 0 1 $EndComp @@ -1937,7 +1937,7 @@ F 0 "R19" H 7980 4604 50 0000 R CNN F 1 "10kR" H 7980 4695 50 0000 R CNN F 2 "Resistor_SMD:R_0402_1005Metric" V 7980 4650 50 0001 C CNN F 3 "~" H 8050 4650 50 0001 C CNN -F 4 "C25744" V 8050 4650 50 0001 C CNN "Field4" +F 4 "C25744" V 8050 4650 50 0001 C CNN "LCSC#" 1 8050 4650 -1 0 0 1 $EndComp @@ -1967,7 +1967,7 @@ F 0 "R23" H 9430 4604 50 0000 R CNN F 1 "10kR" H 9430 4695 50 0000 R CNN F 2 "Resistor_SMD:R_0402_1005Metric" V 9430 4650 50 0001 C CNN F 3 "~" H 9500 4650 50 0001 C CNN -F 4 "C25744" V 9500 4650 50 0001 C CNN "Field4" +F 4 "C25744" V 9500 4650 50 0001 C CNN "LCSC#" 1 9500 4650 -1 0 0 1 $EndComp @@ -1997,7 +1997,7 @@ F 0 "R20" H 7980 5904 50 0000 R CNN F 1 "10kR" H 7980 5995 50 0000 R CNN F 2 "Resistor_SMD:R_0402_1005Metric" V 7980 5950 50 0001 C CNN F 3 "~" H 8050 5950 50 0001 C CNN -F 4 "C25744" V 8050 5950 50 0001 C CNN "Field4" +F 4 "C25744" V 8050 5950 50 0001 C CNN "LCSC#" 1 8050 5950 -1 0 0 1 $EndComp @@ -2027,7 +2027,7 @@ F 0 "R24" H 9430 5904 50 0000 R CNN F 1 "10kR" H 9430 5995 50 0000 R CNN F 2 "Resistor_SMD:R_0402_1005Metric" V 9430 5950 50 0001 C CNN F 3 "~" H 9500 5950 50 0001 C CNN -F 4 "C25744" V 9500 5950 50 0001 C CNN "Field4" +F 4 "C25744" V 9500 5950 50 0001 C CNN "LCSC#" 1 9500 5950 -1 0 0 1 $EndComp diff --git a/tests/yaml_samples/simple_position_rot_1.kibot.yaml b/tests/yaml_samples/simple_position_rot_1.kibot.yaml index 7cf11ec9..217172b6 100644 --- a/tests/yaml_samples/simple_position_rot_1.kibot.yaml +++ b/tests/yaml_samples/simple_position_rot_1.kibot.yaml @@ -10,14 +10,14 @@ filters: comment: 'Only parts with JLC code' type: generic include_only: - - column: Field4 + - column: 'LCSC#' regex: '^C\d+' variants: - - name: default + - name: rotated comment: 'Just a place holder for the rotation filter' type: kibom - variant: default + variant: rotated pre_transform: fix_rotation outputs: @@ -25,7 +25,7 @@ outputs: comment: "Pick and place file, JLC style" type: position options: - variant: default + variant: rotated output: '%f_cpl_jlc.%x' format: CSV units: millimeters @@ -58,7 +58,7 @@ outputs: - field: References name: Designator - Footprint - - field: Field4 + - field: 'LCSC#' name: 'LCSC Part #' csv: hide_pcb_info: true diff --git a/tests/yaml_samples/simple_position_rot_2.kibot.yaml b/tests/yaml_samples/simple_position_rot_2.kibot.yaml index 96a3782a..ab2a9819 100644 --- a/tests/yaml_samples/simple_position_rot_2.kibot.yaml +++ b/tests/yaml_samples/simple_position_rot_2.kibot.yaml @@ -6,14 +6,14 @@ filters: comment: 'Only parts with JLC code' type: generic include_only: - - column: Field4 + - column: 'LCSC#' regex: '^C\d+' variants: - - name: default + - name: rotated comment: 'Just a place holder for the rotation filter' type: kibom - variant: default + variant: rotated pre_transform: _rot_footprint outputs: @@ -21,7 +21,7 @@ outputs: comment: "Pick and place file, JLC style" type: position options: - variant: default + variant: rotated output: '%f_cpl_jlc.%x' format: CSV units: millimeters @@ -54,7 +54,7 @@ outputs: - field: References name: Designator - Footprint - - field: Field4 + - field: 'LCSC#' name: 'LCSC Part #' csv: hide_pcb_info: true