From 294edcf797c6b02c9cf2d8da8b579771b71e0449 Mon Sep 17 00:00:00 2001 From: "J.P. Krauss" Date: Tue, 10 Mar 2026 17:42:18 -0700 Subject: [PATCH] Move Render Group into its own KiBot file --- kibot/yaml/kibot_grp_renders.yaml | 134 ++++++++++++++++ kibot/yaml/kibot_main.yaml | 248 ++++-------------------------- 2 files changed, 160 insertions(+), 222 deletions(-) create mode 100644 kibot/yaml/kibot_grp_renders.yaml diff --git a/kibot/yaml/kibot_grp_renders.yaml b/kibot/yaml/kibot_grp_renders.yaml new file mode 100644 index 0000000..602fc2c --- /dev/null +++ b/kibot/yaml/kibot_grp_renders.yaml @@ -0,0 +1,134 @@ +# KiBot Render Output Group + +kibot: + version: 1 + +import: + + # PCB 2D Renders (Bare Board) ------------------------------------------ + - file: kibot_out_pcbdraw.yaml + definitions: + NAME: @NAME_PCBDRAW_2D_TOP_PCB_OUTPUT@ + COMMENT: PCB 2D Render (Top) + DIR: @DIR@ + FORMAT: svg + BOTTOM: false + COMPONENTS: none + + - file: kibot_out_pcbdraw.yaml + definitions: + NAME: @NAME_PCBDRAW_2D_BOT_PCB_OUTPUT@ + COMMENT: PCB 2D Render (Bottom) + DIR: @DIR@ + FORMAT: svg + BOTTOM: true + COMPONENTS: none + + # PCBA 3D Renders (Populated Board; Blender) ------------------------------- + - file: kibot_out_blender.yaml + definitions: + NAME: @NAME_BLENDER_3D_TOP@ + COMMENT: High Quality 3D Render (Top) + DIR: @DIR@ + VIEW: top + ROTATE_X: 0 + ROTATE_Y: 0 + ROTATE_Z: 0 + SAMPLES: @BLENDER_SAMPLES@ + RESOLUTION_X: @BLENDER_RESOLUTION_X@ + RESOLUTION_Y: @BLENDER_RESOLUTION_Y@ + TEXTURE_DPI: @BLENDER_TEXTURE_DPI@ + DNF_FILTER: @RENDER_DNF_FILTER@ + DIFFUSE_RADIUS: @BLENDER_DIFFUSE_RADIUS@ + DIFFUSE_HEIGHT: @BLENDER_DIFFUSE_HEIGHT@ + DIFFUSE_LIGHT: 0.7 + ACCENT_LIGHT: 0.1 + SPOT_LIGHT: 0.1 + + - file: kibot_out_blender.yaml + definitions: + NAME: @NAME_BLENDER_3D_BOT@ + COMMENT: High Quality 3D Render (Bottom) + DIR: @DIR@ + VIEW: bottom + ROTATE_X: 0 + ROTATE_Y: 0 + ROTATE_Z: 0 + SAMPLES: @BLENDER_SAMPLES@ + RESOLUTION_X: @BLENDER_RESOLUTION_X@ + RESOLUTION_Y: @BLENDER_RESOLUTION_Y@ + TEXTURE_DPI: @BLENDER_TEXTURE_DPI@ + DNF_FILTER: @RENDER_DNF_FILTER@ + DIFFUSE_RADIUS: @BLENDER_DIFFUSE_RADIUS@ + DIFFUSE_HEIGHT: @BLENDER_DIFFUSE_HEIGHT@ + DIFFUSE_LIGHT: 0.7 + ACCENT_LIGHT: 0.1 + SPOT_LIGHT: 0.1 + + - file: kibot_out_blender.yaml + definitions: + NAME: @NAME_BLENDER_3D_ANGLED_TOP@ + COMMENT: High Quality 3D Render (Angled Top) + DIR: @DIR@ + VIEW: top + ROTATE_X: @BLENDER_TOP_ROT_X@ + ROTATE_Y: @BLENDER_TOP_ROT_Y@ + ROTATE_Z: @BLENDER_TOP_ROT_Z@ + SAMPLES: @BLENDER_SAMPLES@ + RESOLUTION_X: @BLENDER_RESOLUTION_X@ + RESOLUTION_Y: @BLENDER_RESOLUTION_Y@ + TEXTURE_DPI: @BLENDER_TEXTURE_DPI@ + DNF_FILTER: @BLENDER_DNF_FILTER@ + DIFFUSE_RADIUS: @BLENDER_DIFFUSE_RADIUS@ + DIFFUSE_HEIGHT: @BLENDER_DIFFUSE_HEIGHT@ + DIFFUSE_LIGHT: 0.4 + ACCENT_LIGHT: 0.1 + SPOT_LIGHT: 2.0 + + - file: kibot_out_blender.yaml + definitions: + NAME: @NAME_BLENDER_3D_ANGLED_BOT@ + COMMENT: High Quality 3D Render (Angled Bottom) + DIR: @DIR@ + VIEW: bottom + ROTATE_X: @BLENDER_BOT_ROT_X@ + ROTATE_Y: @BLENDER_BOT_ROT_Y@ + ROTATE_Z: @BLENDER_BOT_ROT_Z@ + SAMPLES: @BLENDER_SAMPLES@ + RESOLUTION_X: @BLENDER_RESOLUTION_X@ + RESOLUTION_Y: @BLENDER_RESOLUTION_Y@ + TEXTURE_DPI: @BLENDER_TEXTURE_DPI@ + DNF_FILTER: @BLENDER_DNF_FILTER@ + DIFFUSE_RADIUS: @BLENDER_DIFFUSE_RADIUS@ + DIFFUSE_HEIGHT: @BLENDER_DIFFUSE_HEIGHT@ + DIFFUSE_LIGHT: 0.4 + ACCENT_LIGHT: 0.1 + SPOT_LIGHT: 2.0 + +... +definitions: + # Directories + DIR: +renders + + # Output Names + NAME_PCBDRAW_2D_TOP_PCB_OUTPUT: pcbdraw_top + NAME_PCBDRAW_2D_BOT_PCB_OUTPUT: pcbdraw_bottom + NAME_BLENDER_3D_TOP: blender_3d_top + NAME_BLENDER_3D_BOT: blender_3d_bottom + NAME_BLENDER_3D_ANGLED_TOP: blender_3d_angled_top + NAME_BLENDER_3D_ANGLED_BOT: blender_3d_angled_bottom + + # Blender Configuration + BLENDER_DNF_FILTER: _kibom_dnf_Config + BLENDER_SAMPLES: 2 + BLENDER_TOP_ROT_X: 30 + BLENDER_TOP_ROT_Y: 10 + BLENDER_TOP_ROT_Z: 10 + BLENDER_BOT_ROT_X: -30 + BLENDER_BOT_ROT_Y: 10 + BLENDER_BOT_ROT_Z: 10 + BLENDER_RESOLUTION_X: 1500 + BLENDER_RESOLUTION_Y: 1500 + BLENDER_TEXTURE_DPI: 1031.0 + BLENDER_DIFFUSE_HEIGHT: 10.0 + BLENDER_DIFFUSE_RADIUS: 6.0 diff --git a/kibot/yaml/kibot_main.yaml b/kibot/yaml/kibot_main.yaml index bf50089..a55edcd 100644 --- a/kibot/yaml/kibot_main.yaml +++ b/kibot/yaml/kibot_main.yaml @@ -42,21 +42,6 @@ groups: - panels - assembly - @PDF_SCHEMATIC_OUTPUT@ - - @HTML_NAV_RES_OUTPUT@ - - # All Outputs Group, including KiRi (not enabled by default) --------------- - - name: all_group_kiri - outputs: - - bom - - renders - - models - - fab - - jlcpcb - - panels - - assembly - - @PDF_SCHEMATIC_OUTPUT@ - - @HTML_KIRI_OUTPUT@ - - @HTML_NAV_RES_OUTPUT@ # Panel Fabrication Outputs Group (not used in DRAFT state) ---------------- - name: panel_fab_jlcpcb_group @@ -81,14 +66,6 @@ groups: - @BLENDER_3D_ANGLED_TOP@ - @BLENDER_3D_ANGLED_BOT@ - # KiCad 3D Viewer Renders (render_3d) are currently disabled as they do - # not look very good in KiCad 9 and they cause a warning in the KiBot - # output. - # - @PNG_3D_VIEWER_TOP@ - # - @PNG_3D_VIEWER_BOT@ - # - @PNG_3D_VIEWER_ANGLED_TOP@ - # - @PNG_3D_VIEWER_ANGLED_BOT@ - # PCB 3d Model Outputs ----------------------------------------------------- - name: models outputs: @@ -189,11 +166,6 @@ import: # Preflights =============================================================== - file: kibot_pre_set_text_variables.yaml definitions: - PROJECT_CODE: @PROJECT_CODE@ - ASSEMBLY_NUMBER: @ASSEMBLY_NUMBER@ - ASSEMBLY_NAME: @ASSEMBLY_NAME@ - COMPANY: @COMPANY@ - DESIGNER: @DESIGNER@ SCRIPTS_DIR: @SCRIPTS_DIR@ FABRICATION_DIR: @FABRICATION_DIR@ ASSEMBLY_DIR: @ASSEMBLY_DIR@ @@ -270,171 +242,29 @@ import: MPN_FIELD: @MPN_FIELD@ MAN_FIELD: @MAN_FIELD@ - # Generate Webpage with Diff's --------------------------------------------- - - file: kibot_out_html_kiri.yaml + # Renders ------------------------------------------------------------------ + - file: kibot_grp_renders.yaml definitions: - NAME: @HTML_KIRI_OUTPUT@ - COMMENT: KiRI webpage - DIR: kiri - - # Generate HTML Navigation of Outputs -------------------------------------- - - file: kibot_out_navigate_results.yaml - definitions: - NAME: @HTML_NAV_RES_OUTPUT@ - COMMENT: Results webpage in HTML format - DIR: html - TITLE: '@ASSEMBLY_NUMBER@ (@ASSEMBLY_NAME@)' - # LOGO: @LOGO@ - # LOGO_URL: @GIT_URL@ - - # PCB 2D Renders (Bare Board) ------------------------------------------ - - file: kibot_out_pcbdraw.yaml - definitions: - NAME: @PCBDRAW_2D_TOP_PCB_OUTPUT@ - COMMENT: PCB 2D Render (Top) DIR: @RENDER_DIR@ - FORMAT: svg - BOTTOM: false - COMPONENTS: none - - - file: kibot_out_pcbdraw.yaml - definitions: - NAME: @PCBDRAW_2D_BOT_PCB_OUTPUT@ - COMMENT: PCB 2D Render (Bottom) - DIR: @RENDER_DIR@ - FORMAT: svg - BOTTOM: true - COMPONENTS: none - - # PCBA 3D Renders (Populated Board; KiCad Viewer) -------------------------- - - file: kibot_out_png_3d_viewer.yaml - definitions: - NAME: @PNG_3D_VIEWER_TOP@ - COMMENT: Top 3D viewer PCB render in PNG format - DIR: @RENDER_DIR@ - SUFFIX: top - VIEW: top - KEY_COLOR: '@KEY_COLOR@' - RAYTRACING: false - - - file: kibot_out_png_3d_viewer.yaml - definitions: - NAME: @PNG_3D_VIEWER_BOT@ - COMMENT: Bottom 3D viewer PCB render in PNG format - DIR: @RENDER_DIR@ - SUFFIX: bottom - VIEW: bottom - KEY_COLOR: '@KEY_COLOR@' - RAYTRACING: false - - - file: kibot_out_png_3d_viewer.yaml - definitions: - NAME: @PNG_3D_VIEWER_ANGLED_TOP@ - COMMENT: Top (angled) 3D viewer PCB render in PNG format - DIR: @RENDER_DIR@ - SUFFIX: angled_top - VIEW: top - ROTATE_X: @3D_VIEWER_ROT_X@ - ROTATE_Y: @3D_VIEWER_ROT_Y@ - ROTATE_Z: @3D_VIEWER_ROT_Z@ - ZOOM: @3D_VIEWER_ZOOM@ - KEY_COLOR: '@KEY_COLOR@' - RAYTRACING: false - - - file: kibot_out_png_3d_viewer.yaml - definitions: - NAME: @PNG_3D_VIEWER_ANGLED_BOT@ - COMMENT: Bottom (angled) 3D viewer PCB render in PNG format - DIR: @RENDER_DIR@ - SUFFIX: angled_bottom - VIEW: bottom - ROTATE_X: @3D_VIEWER_ROT_X@ - ROTATE_Y: @3D_VIEWER_ROT_Y@ - ROTATE_Z: -@3D_VIEWER_ROT_Z@ - ZOOM: @3D_VIEWER_ZOOM@ - KEY_COLOR: '@KEY_COLOR@' - RAYTRACING: false - - # PCBA 3D Renders (Populated Board; Blender) ------------------------------- - - file: kibot_out_blender.yaml - definitions: - NAME: @BLENDER_3D_TOP@ - COMMENT: High Quality 3D Render (Top) - DIR: @RENDER_DIR@ - VIEW: top - ROTATE_X: 0 - ROTATE_Y: 0 - ROTATE_Z: 0 - SAMPLES: @BLENDER_SAMPLES@ - RESOLUTION_X: @BLENDER_RESOLUTION_X@ - RESOLUTION_Y: @BLENDER_RESOLUTION_Y@ - TEXTURE_DPI: @BLENDER_TEXTURE_DPI@ - DNF_FILTER: @RENDER_DNF_FILTER@ - DIFFUSE_RADIUS: @BLENDER_DIFFUSE_RADIUS@ - DIFFUSE_HEIGHT: @BLENDER_DIFFUSE_HEIGHT@ - DIFFUSE_LIGHT: 0.7 - ACCENT_LIGHT: 0.1 - SPOT_LIGHT: 0.1 - - - file: kibot_out_blender.yaml - definitions: - NAME: @BLENDER_3D_BOT@ - COMMENT: High Quality 3D Render (Bottom) - DIR: @RENDER_DIR@ - VIEW: bottom - ROTATE_X: 0 - ROTATE_Y: 0 - ROTATE_Z: 0 - SAMPLES: @BLENDER_SAMPLES@ - RESOLUTION_X: @BLENDER_RESOLUTION_X@ - RESOLUTION_Y: @BLENDER_RESOLUTION_Y@ - TEXTURE_DPI: @BLENDER_TEXTURE_DPI@ - DNF_FILTER: @RENDER_DNF_FILTER@ - DIFFUSE_RADIUS: @BLENDER_DIFFUSE_RADIUS@ - DIFFUSE_HEIGHT: @BLENDER_DIFFUSE_HEIGHT@ - DIFFUSE_LIGHT: 0.7 - ACCENT_LIGHT: 0.1 - SPOT_LIGHT: 0.1 - - - file: kibot_out_blender.yaml - definitions: - NAME: @BLENDER_3D_ANGLED_TOP@ - COMMENT: High Quality 3D Render (Angled Top) - DIR: @RENDER_DIR@ - VIEW: top - ROTATE_X: @BLENDER_ROT_X@ - ROTATE_Y: @BLENDER_ROT_Y@ - ROTATE_Z: @BLENDER_ROT_Z@ - SAMPLES: @BLENDER_SAMPLES@ - RESOLUTION_X: @BLENDER_RESOLUTION_X@ - RESOLUTION_Y: @BLENDER_RESOLUTION_Y@ - TEXTURE_DPI: @BLENDER_TEXTURE_DPI@ - DNF_FILTER: @RENDER_DNF_FILTER@ - DIFFUSE_RADIUS: @BLENDER_DIFFUSE_RADIUS@ - DIFFUSE_HEIGHT: @BLENDER_DIFFUSE_HEIGHT@ - DIFFUSE_LIGHT: 0.4 - ACCENT_LIGHT: 0.1 - SPOT_LIGHT: 2.0 - - - file: kibot_out_blender.yaml - definitions: - NAME: @BLENDER_3D_ANGLED_BOT@ - COMMENT: High Quality 3D Render (Angled Bottom) - DIR: @RENDER_DIR@ - VIEW: bottom - ROTATE_X: -@BLENDER_ROT_X@ - ROTATE_Y: @BLENDER_ROT_Y@ - ROTATE_Z: @BLENDER_ROT_Z@ - SAMPLES: @BLENDER_SAMPLES@ - RESOLUTION_X: @BLENDER_RESOLUTION_X@ - RESOLUTION_Y: @BLENDER_RESOLUTION_Y@ - TEXTURE_DPI: @BLENDER_TEXTURE_DPI@ - DNF_FILTER: @RENDER_DNF_FILTER@ - DIFFUSE_RADIUS: @BLENDER_DIFFUSE_RADIUS@ - DIFFUSE_HEIGHT: @BLENDER_DIFFUSE_HEIGHT@ - DIFFUSE_LIGHT: 0.4 - ACCENT_LIGHT: 0.1 - SPOT_LIGHT: 2.0 + 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: _kibom_dnf_Config + BLENDER_SAMPLES: @BLENDER_SAMPLES@ + BLENDER_TOP_ROT_X: @BLENDER_ROT_X@ + BLENDER_TOP_ROT_Y: @BLENDER_ROT_Y@ + BLENDER_TOP_ROT_Z: @BLENDER_ROT_Z@ + BLENDER_BOT_ROT_X: -@BLENDER_ROT_X@ + BLENDER_BOT_ROT_Y: @BLENDER_ROT_Y@ + BLENDER_BOT_ROT_Z: @BLENDER_ROT_Z@ + BLENDER_RESOLUTION_X: @BLENDER_RESOLUTION_X@ + BLENDER_RESOLUTION_Y: @BLENDER_RESOLUTION_Y@ + BLENDER_TEXTURE_DPI: @BLENDER_TEXTURE_DPI + BLENDER_DIFFUSE_HEIGHT: @BLENDER_DIFFUSE_HEIGHT@ + BLENDER_DIFFUSE_RADIUS: @BLENDER_DIFFUSE_RADIUS@ # STEP File ---------------------------------------------------------------- - file: kibot_out_3d_model.yaml @@ -667,21 +497,6 @@ import: ... definitions: - # Project Metadata ========================================================= - PROJECT_CODE: P99 - ASSEMBLY_NUMBER: A99-9000 - ASSEMBLY_NAME: Assembly Name - GIT_URL: /jkrauss/Test_4 - - COMPANY: Asymworks, LLC - DESIGNER: JPK - - DWG_NUMBER_SCH: S99-9000 - DWG_TITLE_SCH: Schematic, Assembly Name - DWG_NUMBER_PCB: P99-9000 - DWG_TITLE_PCB: PCB, Assembly Name - DWG_TITLE_ASSY: PCB Assembly, Assembly Name - # Panel Configurations ----------------------------------------------------- PANEL_800_OUTPUT: panel_801 PANEL_800_CONFIG: '@PANELS_DIR@/panel-800.json' @@ -726,13 +541,7 @@ definitions: # 3D Render parameters ===================================================== - RENDER_DNF_FILTER: _kibom_dnf_Config - - 3D_VIEWER_ROT_X: 2 - 3D_VIEWER_ROT_Y: -1 - 3D_VIEWER_ROT_Z: 1 - 3D_VIEWER_ZOOM: -1 - KEY_COLOR: '#FF00FF' # Background color to remove. Use a color different from your PCB + BLENDER_DNF_FILTER: _kibom_dnf_Config BLENDER_SAMPLES: 20 # Overridden to 2 samples for WORKING state by CI Script BLENDER_ROT_X: 30 @@ -829,15 +638,10 @@ definitions: PCBDRAW_2D_TOP_PCB_OUTPUT: pcbdraw_top PCBDRAW_2D_BOT_PCB_OUTPUT: pcbdraw_bottom - PNG_3D_VIEWER_TOP: png_3d_viewer_top - PNG_3D_VIEWER_BOT: png_3d_viewer_bottom - PNG_3D_VIEWER_ANGLED_TOP: png_3d_viewer_angled_top - PNG_3D_VIEWER_ANGLED_BOT: png_3d_viewer_angled_bottom - - BLENDER_3D_TOP: blender_3d_top - BLENDER_3D_BOT: blender_3d_bottom - BLENDER_3D_ANGLED_TOP: blender_3d_angled_top - BLENDER_3D_ANGLED_BOT: blender_3d_angled_bottom + BLENDER_3D_TOP_OUTPUT: blender_3d_top + BLENDER_3D_BOT_OUTPUT: blender_3d_bottom + BLENDER_3D_ANGLED_TOP_OUTPUT: blender_3d_angled_top + BLENDER_3D_ANGLED_BOT_OUTPUT: blender_3d_angled_bottom TXT_SCH_NOTES_OUTPUT: txt_schematic_notes TXT_FAB_NOTES_OUTPUT: txt_fabrication_notes