From 1c9f199ca38cf4c9fd3f61cdc8cc548b4bceb201 Mon Sep 17 00:00:00 2001 From: "J.P. Krauss" Date: Tue, 10 Mar 2026 18:33:01 -0700 Subject: [PATCH] Move Notes and Tables to new KiBot Group file --- kibot/yaml/kibot_grp_notes.yaml | 55 ++++++++ kibot/yaml/kibot_grp_renders.yaml | 12 +- kibot/yaml/kibot_grp_tables.yaml | 90 ++++++++++++ kibot/yaml/kibot_main.yaml | 130 ++++++------------ kibot/yaml/kibot_out_csv_drill_table.yaml | 25 ---- kibot/yaml/kibot_out_netlist.yaml | 18 --- .../{ => outputs}/kibot_out_csv_report.yaml | 0 .../kibot_out_csv_testpoints.yaml | 0 .../kibot_out_csv_testpoints_simple.yaml | 0 .../{ => outputs}/kibot_out_txt_report.yaml | 0 10 files changed, 191 insertions(+), 139 deletions(-) create mode 100644 kibot/yaml/kibot_grp_notes.yaml create mode 100644 kibot/yaml/kibot_grp_tables.yaml delete mode 100644 kibot/yaml/kibot_out_csv_drill_table.yaml delete mode 100644 kibot/yaml/kibot_out_netlist.yaml rename kibot/yaml/{ => outputs}/kibot_out_csv_report.yaml (100%) rename kibot/yaml/{ => outputs}/kibot_out_csv_testpoints.yaml (100%) rename kibot/yaml/{ => outputs}/kibot_out_csv_testpoints_simple.yaml (100%) rename kibot/yaml/{ => outputs}/kibot_out_txt_report.yaml (100%) diff --git a/kibot/yaml/kibot_grp_notes.yaml b/kibot/yaml/kibot_grp_notes.yaml new file mode 100644 index 0000000..bdb90a6 --- /dev/null +++ b/kibot/yaml/kibot_grp_notes.yaml @@ -0,0 +1,55 @@ +# KiBot Drawing Notes Output Group + +kibot: + version: 1 + +groups: + - name: notes + outputs: + - @NAME_TXT_SCH_NOTES_OUTPUT@ + - @NAME_TXT_FAB_NOTES_OUTPUT@ + - @NAME_TXT_ASSY_NOTES_OUTPUT@ + +import: + + - file: outputs/kibot_out_txt_report.yaml + definitions: + NAME: @NAME_TXT_SCH_NOTES_OUTPUT@ + COMMENT: Schematic notes in TXT format + DIR: @SCHEMATIC_DIR@ + OUTPUT_ID: schematic_notes + TEMPLATE: @SCHEMATIC_NOTES_TEMPLATE@ + + - file: outputs/kibot_out_txt_report.yaml + definitions: + NAME: @NAME_TXT_FAB_NOTES_OUTPUT@ + COMMENT: Fabrication notes in TXT format + DIR: @FABRICATION_DIR@ + OUTPUT_ID: fabrication_notes + TEMPLATE: @FABRICATION_NOTES_TEMPLATE@ + + - file: outputs/kibot_out_txt_report.yaml + definitions: + NAME: @NAME_TXT_ASSY_NOTES_OUTPUT@ + COMMENT: Assembly notes in TXT format + DIR: @ASSEMBLY_DIR@ + OUTPUT_ID: assembly_notes + TEMPLATE: @ASSEMBLY_NOTES_TEMPLATE@ + +... +definitions: + # Directories + SCHEMATIC_DIR: schematic + FABRICATION_DIR: manufacturing/fabrication + ASSEMBLY_DIR: manufacturing/assembly + + # Output Names + NAME_TXT_SCH_NOTES_OUTPUT: txt_schematic_notes + NAME_TXT_FAB_NOTES_OUTPUT: txt_fabrication_notes + NAME_TXT_ASSY_NOTES_OUTPUT: txt_assembly_notes + + # Drawing Note Configuration + SCHEMATIC_NOTES_TEMPLATE: notes/schematic.txt + FABRICATION_NOTES_TEMPLATE: notes/fabrication.txt + ASSEMBLY_NOTES_TEMPLATE: notes/assembly.txt + diff --git a/kibot/yaml/kibot_grp_renders.yaml b/kibot/yaml/kibot_grp_renders.yaml index d78a440..21981a7 100644 --- a/kibot/yaml/kibot_grp_renders.yaml +++ b/kibot/yaml/kibot_grp_renders.yaml @@ -6,12 +6,12 @@ kibot: groups: - name: renders outputs: - - @PCBDRAW_2D_TOP_PCB_OUTPUT@ - - @PCBDRAW_2D_BOT_PCB_OUTPUT@ - - @BLENDER_3D_TOP_OUTPUT@ - - @BLENDER_3D_BOT_OUTPUT@ - - @BLENDER_3D_ANGLED_TOP_OUTPUT@ - - @BLENDER_3D_ANGLED_BOT_OUTPUT@ + - @NAME_PCBDRAW_2D_TOP_PCB_OUTPUT@ + - @NAME_PCBDRAW_2D_BOT_PCB_OUTPUT@ + - @NAME_BLENDER_3D_TOP_OUTPUT@ + - @NAME_BLENDER_3D_BOT_OUTPUT@ + - @NAME_BLENDER_3D_ANGLED_TOP_OUTPUT@ + - @NAME_BLENDER_3D_ANGLED_BOT_OUTPUT@ import: diff --git a/kibot/yaml/kibot_grp_tables.yaml b/kibot/yaml/kibot_grp_tables.yaml new file mode 100644 index 0000000..a8183b1 --- /dev/null +++ b/kibot/yaml/kibot_grp_tables.yaml @@ -0,0 +1,90 @@ +# KiBot Drawing Tables Output Group + +kibot: + version: 1 + +groups: + - name: tables + outputs: + - @NAME_CSV_IMPEDANCE_TABLE_OUTPUT@ + - @NAME_CSV_COMP_COUNT_OUPUT@ + - @NAME_CSV_DRILL_TABLE_OUTPUT@ + - @NAME_CSV_TP_OUTPUT@ + - @NAME_CSV_TP_TOP_OUTPUT@ + - @NAME_CSV_TP_BOTTOM_OUTPUT@ + +import: + + # Impedance and Component Count Reports + - file: kibot_out_csv_report.yaml + definitions: + NAME: @NAME_CSV_IMPEDANCE_TABLE_OUTPUT@ + COMMENT: Impedance Table in CSV format + DIR: @FABRICATION_DIR@ + OUTPUT_ID: impedance_table + TEMPLATE: @IMPEDANCE_TABLE_TEMPLATE@ + + - file: kibot_out_csv_report.yaml + definitions: + NAME: @NAME_CSV_COMP_COUNT_OUPUT@ + COMMENT: Component Report in CSV format + DIR: @ASSEMBLY_DIR@ + OUTPUT_ID: components_count + TEMPLATE: total_components + + # CSV Test Point Files + - file: kibot_out_csv_testpoints.yaml + definitions: + NAME: @NAME_CSV_TP_OUTPUT@ + COMMENT: Testpoint report in CSV format + DIR: @TESTPOINTS_DIR@ + EXCLUDE_FILTER: @FILT_TP_ONLY@ + + - file: kibot_out_csv_testpoints_simple.yaml + definitions: + NAME: @NAME_CSV_TP_TOP_OUTPUT@ + COMMENT: Top testpoint report in CSV format + DIR: @TESTPOINTS_DIR@ + SUFFIX: -top + EXCLUDE_FILTER: @FILT_TP_TOP_ONLY@ + + - file: kibot_out_csv_testpoints_simple.yaml + definitions: + NAME: @NAME_CSV_TP_BOTTOM_OUTPUT@ + COMMENT: Bottom testpoint report in CSV format + DIR: @TESTPOINTS_DIR@ + SUFFIX: -bottom + EXCLUDE_FILTER: @FILT_TP_BOTTOM_ONLY@ + +outputs: + - name: @NAME_CSV_DRILL_TABLE@ + comment: Drill Table in CSV format + type: excellon + category: '@DRILL_TABLE_DIR@' + dir: '@DRILL_TABLE_DIR@' + options: + generate_drill_files: false + table: + unify_pth_and_npth: '@DRILL_TABLE_UNIFY_PTH_NPTH@' + group_slots_and_round_holes: @DRILL_TABLE_GROUP_ROUND_SLOTS@ + +... +definitions: + # Directories + FABRICATION_DIR: manufacturing/fabrication + DRILL_TABLE_DIR: manufacturing/fabrication/drill-tables + ASSEMBLY_DIR: manufacturing/assembly + TESTPOINTS_DIR: test/testpoints + + # Output Names + NAME_CSV_IMPEDANCE_TABLE_OUTPUT: csv_impedance_table + NAME_CSV_COMP_COUNT_OUPUT: csv_comp_count + NAME_CSV_DRILL_TABLE: csv_drill_table + + # Table Configuration + IMPEDANCE_TABLE_TEMPLATE: notes/impedance-table.txt + DRILL_TABLE_UNIFY_PTH_NPTH: 'yes' + DRILL_TABLE_GROUP_ROUND_SLOTS: True + FILT_TP_ONLY: only_testpoints + FILT_TP_TOP_ONLY: only_testpoints_top + FILT_TP_BOTTOM_ONLY: only_testpoints_bottom diff --git a/kibot/yaml/kibot_main.yaml b/kibot/yaml/kibot_main.yaml index 845107d..ba0dd47 100644 --- a/kibot/yaml/kibot_main.yaml +++ b/kibot/yaml/kibot_main.yaml @@ -16,9 +16,7 @@ groups: # Pre-Process Group (generates Notes and Netlist for set_text_variables) --- - name: preprocess_group outputs: - - @TXT_SCH_NOTES_OUTPUT@ - - @TXT_FAB_NOTES_OUTPUT@ - - @TXT_ASSY_NOTES_OUTPUT@ + - notes - tables # Draft Outputs Group (used in DRAFT state only) --------------------------- @@ -63,19 +61,6 @@ groups: - @PDF_FABRICATION_OUTPUT@ - @ZIP_COMPRESS_FAB_OUTPUT@ - - name: tables - outputs: - - @CSV_COMP_COUNT_OUPUT@ - - @CSV_IMPEDANCE_TABLE_OUTPUT@ - - @CSV_DRILL_TABLE_OUTPUT@ - - testpoints - - - name: testpoints - outputs: - - @CSV_TP_OUTPUT@ - - @CSV_TP_TOP_OUTPUT@ - - @CSV_TP_BOTTOM_OUTPUT@ - # JLCPCB Fabrication and Assembly Outputs ---------------------------------- - name: jlcpcb outputs: @@ -246,15 +231,6 @@ import: PTH_NPTH: @GROUP_PTH_NPTH_DRL@ MAP_FORMAT: pdf - # CSV Drill Table - - file: kibot_out_csv_drill_table.yaml - definitions: - NAME: @CSV_DRILL_TABLE_OUTPUT@ - COMMENT: Drill Table in CSV format - DIR: @FAB_DRILL_TABLES_DIR@ - PTH_NPTH: '@GROUP_PTH_NPTH@' - GROUP_ROUND_SLOTS: @GROUP_ROUND_SLOTS@ - # CSV Component Placement File - file: kibot_out_csv_position.yaml definitions: @@ -262,30 +238,6 @@ import: COMMENT: Position file in CSV format DIR: @ASSEMBLY_DIR@ - # CSV Test Point Files - - file: kibot_out_csv_testpoints.yaml - definitions: - NAME: @CSV_TP_OUTPUT@ - COMMENT: Testpoint report in CSV format - DIR: @TESTPOINTS_DIR@ - EXCLUDE_FILTER: @FILT_TP_ONLY@ - - - file: kibot_out_csv_testpoints_simple.yaml - definitions: - NAME: @CSV_TP_TOP_OUTPUT@ - COMMENT: Top testpoint report in CSV format - DIR: @TESTPOINTS_DIR@ - SUFFIX: -top - EXCLUDE_FILTER: @FILT_TP_TOP_ONLY@ - - - file: kibot_out_csv_testpoints_simple.yaml - definitions: - NAME: @CSV_TP_BOTTOM_OUTPUT@ - COMMENT: Bottom testpoint report in CSV format - DIR: @TESTPOINTS_DIR@ - SUFFIX: -bottom - EXCLUDE_FILTER: @FILT_TP_BOTTOM_ONLY@ - # Fabrication and Assembly Drawings - file: kibot_out_pdf_fabrication.yaml definitions: @@ -365,46 +317,6 @@ import: DIR: @JLCPCB_ASSY_DIR@ EXCLUDE_FILTER: @FILT_LCSC_PARTS@ - # Notes and Reports -------------------------------------------------------- - - file: kibot_out_csv_report.yaml - definitions: - NAME: @CSV_COMP_COUNT_OUPUT@ - COMMENT: Component report (count) in CSV format - DIR: @ASSEMBLY_DIR@ - OUTPUT_ID: components_count - TEMPLATE: total_components - - - file: kibot_out_csv_report.yaml - definitions: - NAME: @CSV_IMPEDANCE_TABLE_OUTPUT@ - COMMENT: Impedance table in CSV format - DIR: @FABRICATION_DIR@ - OUTPUT_ID: impedance_table - TEMPLATE: @NOTES_DIR@/impedance_table.txt - - - file: kibot_out_txt_report.yaml - definitions: - NAME: @TXT_SCH_NOTES_OUTPUT@ - COMMENT: Schematic notes in TXT format - DIR: @SCHEMATIC_DIR@ - OUTPUT_ID: schematic_notes - TEMPLATE: @NOTES_DIR@/schematic_notes.txt - - - file: kibot_out_txt_report.yaml - definitions: - NAME: @TXT_FAB_NOTES_OUTPUT@ - COMMENT: Fabrication notes in TXT format - DIR: @FABRICATION_DIR@ - OUTPUT_ID: fabrication_notes - TEMPLATE: @NOTES_DIR@/fabrication_notes.txt - - - file: kibot_out_txt_report.yaml - definitions: - NAME: @TXT_ASSY_NOTES_OUTPUT@ - COMMENT: Assembly notes in TXT format - DIR: @ASSEMBLY_DIR@ - OUTPUT_ID: assembly_notes - TEMPLATE: @NOTES_DIR@/assembly_notes.txt # Panelization Outputs ----------------------------------------------------- - file: kibot_out_panelize.yaml @@ -420,23 +332,61 @@ import: - file: kibot_grp_bom.yaml definitions: DIR: @ASSEMBLY_DIR@ + NAME_CSV_BOM_OUTPUT: @CSV_BOM_OUTPUT@ NAME_HTML_BOM_OUTPUT: @HTML_BOM_OUTPUT@ NAME_HTML_IBOM_OUTPUT: @HTML_IBOM_OUTPUT@ + IPN_FIELD: @IPN_FIELD@ MPN_FIELD: @MPN_FIELD@ MAN_FIELD: @MAN_FIELD@ + # Drawing Notes ------------------------------------------------------------ + - file: kibot_grp_notes.yaml + definitions: + SCHEMATIC_DIR: @SCHEMATIC_DIR@ + FABRICATION_DIR: @FABRICATION_DIR@ + ASSEMBLY_DIR: @ASSEMBLY_DIR@ + + NAME_TXT_SCH_NOTES_OUTPUT: @TXT_SCH_NOTES_OUTPUT@ + NAME_TXT_FAB_NOTES_OUTPUT: @TXT_FAB_NOTES_OUTPUT@ + NAME_TXT_ASSY_NOTES_OUTPUT: @TXT_ASSY_NOTES_OUTPUT@ + + SCHEMATIC_NOTES_TEMPLATE: notes/schematic_notes.txt + FABRICATION_NOTES_TEMPLATE: notes/fabrication_notes.txt + ASSEMBLY_NOTES_TEMPLATE: notes/assembly_notes.txt + + # Drawing Tables ----------------------------------------------------------- + - file: kibot_grp_tables.yaml + definitions: + FABRICATION_DIR: @FABRICATION_DIR@ + DRILL_TABLE_DIR: @DRILL_TABLE_DIR@ + ASSEMBLY_DIR: @ASSEMBLY_DIR@ + TESTPOINTS_DIR: @TESTPOINTS_DIR@ + + NAME_CSV_IMPEDANCE_TABLE_OUTPUT: @CSV_IMPEDANCE_TABLE_OUTPUT@ + NAME_CSV_COMP_COUNT_OUPUT: @CSV_COMP_COUNT_OUPUT@ + NAME_CSV_DRILL_TABLE: @CSV_DRILL_TABLE_OUTPUT@ + + IMPEDANCE_TABLE_TEMPLATE: notes/impedance_table.txt + DRILL_TABLE_UNIFY_PTH_NPTH: @GROUP_PTH_NPTH@ + DRILL_TABLE_GROUP_ROUND_SLOTS: @GROUP_ROUND_SLOTS@ + FILT_TP_ONLY: @FILT_TP_ONLY@ + FILT_TP_TOP_ONLY: @FILT_TP_TOP_ONLY@ + FILT_TP_BOTTOM_ONLY: @FILT_TP_BOTTOM_ONLY@ + # Renders ------------------------------------------------------------------ - file: kibot_grp_renders.yaml definitions: DIR: @RENDER_DIR@ + NAME_PCBDRAW_2D_TOP_PCB_OUTPUT: @PCBDRAW_2D_TOP_PCB_OUTPUT@ NAME_PCBDRAW_2D_BOT_PCB_OUTPUT: @PCBDRAW_2D_BOT_PCB_OUTPUT@ NAME_BLENDER_3D_TOP: @BLENDER_3D_TOP_OUTPUT@ NAME_BLENDER_3D_BOT: @BLENDER_3D_BOT_OUTPUT@ NAME_BLENDER_3D_ANGLED_TOP: @BLENDER_3D_ANGLED_TOP_OUTPUT@ NAME_BLENDER_3D_ANGLED_BOT: @BLENDER_3D_ANGLED_BOT_OUTPUT@ + BLENDER_DNF_FILTER: @BLENDER_DNF_FILTER@ BLENDER_SAMPLES: @BLENDER_SAMPLES@ BLENDER_TOP_ROT_X: @BLENDER_ROT_X@ @@ -476,7 +426,7 @@ definitions: # Drill Table and Drill Map Parameters ===================================== GROUP_ROUND_SLOTS: true # whether or not to group round holes and slots - GROUP_PTH_NPTH: 'no' # for drill tables (CSV, PCB Print) + GROUP_PTH_NPTH: 'yes' # for drill tables (CSV, PCB Print) GROUP_PTH_NPTH_DRL: false # for .drl files # Gerber Parameters ======================================================== diff --git a/kibot/yaml/kibot_out_csv_drill_table.yaml b/kibot/yaml/kibot_out_csv_drill_table.yaml deleted file mode 100644 index a99bd7d..0000000 --- a/kibot/yaml/kibot_out_csv_drill_table.yaml +++ /dev/null @@ -1,25 +0,0 @@ -# KiBot output for generating Drill Tables -# https://kibot.readthedocs.io/en/latest/configuration/outputs/excellon.html - -kibot: - version: 1 - -outputs: - - name: @NAME@ - comment: '@COMMENT@' - type: excellon - category: '@DIR@' - dir: '@DIR@' - options: - generate_drill_files: false - table: - unify_pth_and_npth: '@PTH_NPTH@' - group_slots_and_round_holes: @GROUP_ROUND_SLOTS@ - -... -definitions: - NAME: csv_drill_table - COMMENT: Drill Table in CSV format - DIR: mfg/fab/tables - PTH_NPTH: 'yes' - GROUP_ROUND_SLOTS: true diff --git a/kibot/yaml/kibot_out_netlist.yaml b/kibot/yaml/kibot_out_netlist.yaml deleted file mode 100644 index 3aadf3d..0000000 --- a/kibot/yaml/kibot_out_netlist.yaml +++ /dev/null @@ -1,18 +0,0 @@ -# KiBot output for generating netlist in KiCad format -# https://kibot.readthedocs.io/en/latest/configuration/outputs/netlist.html - -kibot: - version: 1 - -outputs: -- name: @NAME@ - comment: '@COMMENT@' - type: netlist - options: - format: '@FORMAT@' - -... -definitions: - NAME: netlist - FORMAT: classic - COMMENT: Schematic netlist in KiCad format diff --git a/kibot/yaml/kibot_out_csv_report.yaml b/kibot/yaml/outputs/kibot_out_csv_report.yaml similarity index 100% rename from kibot/yaml/kibot_out_csv_report.yaml rename to kibot/yaml/outputs/kibot_out_csv_report.yaml diff --git a/kibot/yaml/kibot_out_csv_testpoints.yaml b/kibot/yaml/outputs/kibot_out_csv_testpoints.yaml similarity index 100% rename from kibot/yaml/kibot_out_csv_testpoints.yaml rename to kibot/yaml/outputs/kibot_out_csv_testpoints.yaml diff --git a/kibot/yaml/kibot_out_csv_testpoints_simple.yaml b/kibot/yaml/outputs/kibot_out_csv_testpoints_simple.yaml similarity index 100% rename from kibot/yaml/kibot_out_csv_testpoints_simple.yaml rename to kibot/yaml/outputs/kibot_out_csv_testpoints_simple.yaml diff --git a/kibot/yaml/kibot_out_txt_report.yaml b/kibot/yaml/outputs/kibot_out_txt_report.yaml similarity index 100% rename from kibot/yaml/kibot_out_txt_report.yaml rename to kibot/yaml/outputs/kibot_out_txt_report.yaml