Skip to content

Commit

Permalink
[DOCs][Updated][PCB Print] New options
Browse files Browse the repository at this point in the history
Also avoided collisions between preflight and output helps
  • Loading branch information
set-soft committed Jan 7, 2025
1 parent 54db732 commit 36d6825
Show file tree
Hide file tree
Showing 47 changed files with 360 additions and 95 deletions.
56 changes: 54 additions & 2 deletions docs/samples/generic_plot.kibot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2882,7 +2882,8 @@ outputs:
# [number=360] [36,1200] Resolution (Dots Per Inch) for the output file. Most objects are vectors, but thing
# like the the solder mask are handled as images by the conversion tools
dpi: 360
# [boolean|dict=false] Use a boolean for simple cases or fine-tune its behavior
# [boolean|dict=false] Use a boolean for simple cases or fine-tune its behavior.
# Used to customize the `drill_pairs` option to print drill maps
drill:
# [boolean=true] By default KiCad groups slots and rounded holes if they can be cut from the same tool (same diameter)
group_slots_and_round_holes: true
Expand Down Expand Up @@ -2919,6 +2920,56 @@ outputs:
# [boolean=false] Hide components in the Fab layer that are marked as excluded by a variant.
# Affected by global options
hide_excluded: false
# [boolean|dict=false] Use a boolean for simple cases or fine-tune its behavior.
# When enabled we include tables using the same mechanism used in the `include_table`
# preflight. The result isn't saved to disk
include_table:
# [boolean=true] Enable the check. This is the replacement for the boolean value
enabled: true
# [boolean=true] If True, CSV drill tables will have drill marks displayed on the left and
# an extra bottom rule for the total number of holes
format_drill_table: true
# [string='kibot_table'] Name for the group containing the table. The name of the group
# should be <group_name>_X where X is the output name.
# When the output generates more than one CSV use *kibot_table_out[2]*
# to select the second CSV. Python expressions for slicing are supported,
# for example *kibot_table_out[:10]* would include all elements until the 10th
# element (10th excluded), and *kibot_table_out[2][5:8]* would include the second
# output's elements number 6 to 8 (python indexes start at 0).
group_name: 'kibot_table'
# [list(dict)|list(string)|string=computed for your project] List of CSV-generating outputs.
# When empty we include all possible outputs
outputs:
# [boolean=true] Whether or not the headers should be in bold
- bold_headers: true
# [number=0.4] Width of border around the table. Use 0 to eliminate it
border_width: 0.4
# [number=0.4] Width of bottom rule (bottom of table). Use 0 to eliminate it
bottom_rule_width: 0.4
# [number=3] Blank space (in number of characters) between columns
column_spacing: 3
# [number=0] Force the font width (in mm) in the table. Leave empty to compute the
# width automatically from the group width
force_font_width: 0
# [boolean=true] Plot header on the table
has_header: true
# [number=0.3] Width of rule below header. Use 0 to eliminate it
header_rule_width: 0.3
# [number=0.1] Width of vertical rules between rows (doesn't include header)
# Use 0 to eliminate it
horizontal_rule_width: 0.1
# [boolean=false] Invert column order. Useful when inverting PCB texts in PCB Print
invert_columns_order: false
# [string=''] Name of output
name: ''
# [number=2] Space (in number of characters) between rows
row_spacing: 2
# [string='left'] [left,center,right] Text alignment in the table
text_alignment: 'left'
# [number=0.4] Width of top rule (above header). Use 0 to eliminate it
top_rule_width: 0.4
# [number=0.1] Width of vertical rules between columns. Use 0 to eliminate it
vertical_rule_width: 0.1
# [boolean=true] Tell KiCad to apply the scaling for each page as a separated entity.
# Disabling it the pages are coherent and can be superposed
individual_page_scaling: true
Expand Down Expand Up @@ -3015,7 +3066,8 @@ outputs:
# List of layers to replace `repeat_for_layer`.
# This can be used to generate a page for each copper layer, here you put `copper`.
# You can also use it to generate pages with drill maps, in this case use `drill_pairs` here.
# Note that in this case the `repeat_for_layer` should be some drawing layer
# Note that in this case the `repeat_for_layer` should be some drawing layer, which might contain
# a group used to insert the drill table (like in the `include_table` preflight)
repeat_layers:
# [string=''] Color used for this layer.
# KiCad 6+: don't forget the alpha channel for layers like the solder mask
Expand Down
11 changes: 11 additions & 0 deletions docs/source/configuration/outputs/DrillOptions.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.. _DrillOptions:


DrillOptions parameters
~~~~~~~~~~~~~~~~~~~~~~~

- ``group_slots_and_round_holes`` :index:`: <pair: output - pcb_print - options - drill; group_slots_and_round_holes>` [:ref:`boolean <boolean>`] (default: ``true``) By default KiCad groups slots and rounded holes if they can be cut from the same tool (same diameter).
- ``unify_pth_and_npth`` :index:`: <pair: output - pcb_print - options - drill; unify_pth_and_npth>` [:ref:`string <string>`] (default: ``'auto'``) (choices: "yes", "no", "auto") Choose whether to unify plated and non-plated
holes in the same table. If 'auto' is chosen, the setting is copied
from the `excellon` output's `pth_and_npth_single_file`.

23 changes: 23 additions & 0 deletions docs/source/configuration/outputs/IncTableOutputOptions.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
.. _IncTableOutputOptions:


IncTableOutputOptions parameters
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

- **name** :index:`: <pair: output - pcb_print - options - include_table - outputs; name>` [:ref:`string <string>`] (default: ``''``) Name of output.
- ``bold_headers`` :index:`: <pair: output - pcb_print - options - include_table - outputs; bold_headers>` [:ref:`boolean <boolean>`] (default: ``true``) Whether or not the headers should be in bold.
- ``border_width`` :index:`: <pair: output - pcb_print - options - include_table - outputs; border_width>` [:ref:`number <number>`] (default: ``0.4``) Width of border around the table. Use 0 to eliminate it.
- ``bottom_rule_width`` :index:`: <pair: output - pcb_print - options - include_table - outputs; bottom_rule_width>` [:ref:`number <number>`] (default: ``0.4``) Width of bottom rule (bottom of table). Use 0 to eliminate it.
- ``column_spacing`` :index:`: <pair: output - pcb_print - options - include_table - outputs; column_spacing>` [:ref:`number <number>`] (default: ``3``) Blank space (in number of characters) between columns.
- ``force_font_width`` :index:`: <pair: output - pcb_print - options - include_table - outputs; force_font_width>` [:ref:`number <number>`] (default: ``0``) Force the font width (in mm) in the table. Leave empty to compute the
width automatically from the group width.
- ``has_header`` :index:`: <pair: output - pcb_print - options - include_table - outputs; has_header>` [:ref:`boolean <boolean>`] (default: ``true``) Plot header on the table.
- ``header_rule_width`` :index:`: <pair: output - pcb_print - options - include_table - outputs; header_rule_width>` [:ref:`number <number>`] (default: ``0.3``) Width of rule below header. Use 0 to eliminate it.
- ``horizontal_rule_width`` :index:`: <pair: output - pcb_print - options - include_table - outputs; horizontal_rule_width>` [:ref:`number <number>`] (default: ``0.1``) Width of vertical rules between rows (doesn't include header)
Use 0 to eliminate it.
- ``invert_columns_order`` :index:`: <pair: output - pcb_print - options - include_table - outputs; invert_columns_order>` [:ref:`boolean <boolean>`] (default: ``false``) Invert column order. Useful when inverting PCB texts in PCB Print.
- ``row_spacing`` :index:`: <pair: output - pcb_print - options - include_table - outputs; row_spacing>` [:ref:`number <number>`] (default: ``2``) Space (in number of characters) between rows.
- ``text_alignment`` :index:`: <pair: output - pcb_print - options - include_table - outputs; text_alignment>` [:ref:`string <string>`] (default: ``'left'``) (choices: "left", "center", "right") Text alignment in the table.
- ``top_rule_width`` :index:`: <pair: output - pcb_print - options - include_table - outputs; top_rule_width>` [:ref:`number <number>`] (default: ``0.4``) Width of top rule (above header). Use 0 to eliminate it.
- ``vertical_rule_width`` :index:`: <pair: output - pcb_print - options - include_table - outputs; vertical_rule_width>` [:ref:`number <number>`] (default: ``0.1``) Width of vertical rules between columns. Use 0 to eliminate it.

23 changes: 23 additions & 0 deletions docs/source/configuration/outputs/IncludeTableOptions.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
.. _IncludeTableOptions:


IncludeTableOptions parameters
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

- **outputs** :index:`: <pair: output - pcb_print - options - include_table; outputs>` [:ref:`IncTableOutputOptions parameters <IncTableOutputOptions>`] [:ref:`list(dict) <list(dict)>` | :ref:`list(string) <list(string)>` | :ref:`string <string>`] (default: computed for your project) List of CSV-generating outputs.
When empty we include all possible outputs.
- ``enabled`` :index:`: <pair: output - pcb_print - options - include_table; enabled>` [:ref:`boolean <boolean>`] (default: ``true``) Enable the check. This is the replacement for the boolean value.
- ``format_drill_table`` :index:`: <pair: output - pcb_print - options - include_table; format_drill_table>` [:ref:`boolean <boolean>`] (default: ``true``) If True, CSV drill tables will have drill marks displayed on the left and
an extra bottom rule for the total number of holes.
- ``group_name`` :index:`: <pair: output - pcb_print - options - include_table; group_name>` [:ref:`string <string>`] (default: ``'kibot_table'``) Name for the group containing the table. The name of the group
should be <group_name>_X where X is the output name. |br|
When the output generates more than one CSV use *kibot_table_out[2]*
to select the second CSV. Python expressions for slicing are supported,
for example *kibot_table_out[:10]* would include all elements until the 10th
element (10th excluded), and *kibot_table_out[2][5:8]* would include the second
output's elements number 6 to 8 (python indexes start at 0). |br|.

.. toctree::
:caption: Used dicts

IncTableOutputOptions
5 changes: 5 additions & 0 deletions docs/source/configuration/outputs/PCB_PrintOptions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ PCB_PrintOptions parameters
- ``dpi`` :index:`: <pair: output - pcb_print - options; dpi>` [:ref:`number <number>`] (default: ``360``) (range: 36 to 1200) Resolution (Dots Per Inch) for the output file. Most objects are vectors, but thing
like the the solder mask are handled as images by the conversion tools.
- ``drill`` :index:`: <pair: output - pcb_print - options; drill>` [:ref:`DrillOptions parameters <DrillOptions>`] [:ref:`boolean <boolean>` | :ref:`dict <dict>`] (default: ``false``) Use a boolean for simple cases or fine-tune its behavior.
Used to customize the `drill_pairs` option to print drill maps.
- ``drill_marks`` :index:`: <pair: output - pcb_print - options; drill_marks>` [:ref:`string <string>`] (default: ``'full'``) (choices: "none", "small", "full") What to use to indicate the drill places, can be none, small or full (for real scale).
- ``exclude_filter`` :index:`: <pair: output - pcb_print - options; exclude_filter>` [:ref:`string <string>` | :ref:`list(string) <list(string)>`] (default: ``'_null'``) Name of the filter to exclude components from processing.
Is a short-cut to use for simple cases where a variant is an overkill. |br|
Expand All @@ -52,6 +53,9 @@ PCB_PrintOptions parameters
You get the default frame and some substitutions doesn't work.
- ``hide_excluded`` :index:`: <pair: output - pcb_print - options; hide_excluded>` [:ref:`boolean <boolean>`] (default: ``false``) Hide components in the Fab layer that are marked as excluded by a variant.
Affected by global options.
- ``include_table`` :index:`: <pair: output - pcb_print - options; include_table>` [:ref:`IncludeTableOptions parameters <IncludeTableOptions>`] [:ref:`boolean <boolean>` | :ref:`dict <dict>`] (default: ``false``) Use a boolean for simple cases or fine-tune its behavior.
When enabled we include tables using the same mechanism used in the `include_table`
preflight. The result isn't saved to disk.
- ``individual_page_scaling`` :index:`: <pair: output - pcb_print - options; individual_page_scaling>` [:ref:`boolean <boolean>`] (default: ``true``) Tell KiCad to apply the scaling for each page as a separated entity.
Disabling it the pages are coherent and can be superposed.
- ``invert_use_for_center`` :index:`: <pair: output - pcb_print - options; invert_use_for_center>` [:ref:`boolean <boolean>`] (default: ``false``) Invert the meaning of the `use_for_center` layer option.
Expand Down Expand Up @@ -89,4 +93,5 @@ PCB_PrintOptions parameters
:caption: Used dicts

DrillOptions
IncludeTableOptions
PagesOptions
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.. _Annotate_PCBOptions:
.. _Annotate_PCBOptions_pre:


Annotate_PCBOptions parameters
Expand Down
4 changes: 2 additions & 2 deletions docs/source/configuration/preflights/DRCOptions.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.. _DRCOptions:
.. _DRCOptions_pre:


DRCOptions parameters
Expand All @@ -14,7 +14,7 @@ DRCOptions parameters
- ``dir`` :index:`: <pair: preflight - drc - drc; dir>` [:ref:`string <string>`] (default: ``''``) Sub-directory for the report.
- ``dont_stop`` :index:`: <pair: preflight - drc - drc; dont_stop>` [:ref:`boolean <boolean>`] (default: ``false``) Continue even if we detect errors.
- ``enabled`` :index:`: <pair: preflight - drc - drc; enabled>` [:ref:`boolean <boolean>`] (default: ``true``) Enable the check. This is the replacement for the boolean value.
- ``filters`` :index:`: <pair: preflight - drc - drc; filters>` [:ref:`FilterOptionsXRC parameters <FilterOptionsXRC>`] [:ref:`list(dict) <list(dict)>`] (default: ``[]``) Used to manipulate the violations. Avoid using the *filters* preflight.
- ``filters`` :index:`: <pair: preflight - drc - drc; filters>` [:ref:`FilterOptionsXRC parameters <FilterOptionsXRC_pre>`] [:ref:`list(dict) <list(dict)>`] (default: ``[]``) Used to manipulate the violations. Avoid using the *filters* preflight.
- ``force_english`` :index:`: <pair: preflight - drc - drc; force_english>` [:ref:`boolean <boolean>`] (default: ``true``) Force english messages. KiCad 8.0.4 introduced translation, breaking filters for previous versions.
Disable it if you prefer using the system wide language.
- ``format`` :index:`: <pair: preflight - drc - drc; format>` [:ref:`string <string>` | :ref:`list(string) <list(string)>`] (default: ``'HTML'``) (choices: "RPT", "HTML", "CSV", "JSON") [:ref:`comma separated <comma_sep>`] Format/s used for the report.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
.. _DrawFancyStackupOptions:
.. _DrawFancyStackupOptions_pre:


DrawFancyStackupOptions parameters
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

- **columns** :index:`: <pair: preflight - draw_fancy_stackup - draw_fancy_stackup; columns>` [:ref:`SUColumnsFancy parameters <SUColumnsFancy>`] [:ref:`list(dict) <list(dict)>` | :ref:`list(string) <list(string)>`] (default: computed for your project) List of columns to display.
- **columns** :index:`: <pair: preflight - draw_fancy_stackup - draw_fancy_stackup; columns>` [:ref:`SUColumnsFancy parameters <SUColumnsFancy_pre>`] [:ref:`list(dict) <list(dict)>` | :ref:`list(string) <list(string)>`] (default: computed for your project) List of columns to display.
Can be just the name of the column. |br|
Available columns are *drawing*, *material*, *layer*, *thickness*, *dielectric*, *layer_type*, *gerber*. |br|
When empty KiBot will add them in the above order, skipping the *gerber* if not available.
Expand Down
4 changes: 2 additions & 2 deletions docs/source/configuration/preflights/DrawStackupOptions.rst
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
.. _DrawStackupOptions:
.. _DrawStackupOptions_pre:


DrawStackupOptions parameters
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

- **columns** :index:`: <pair: preflight - draw_stackup - draw_stackup; columns>` [:ref:`SUColumns parameters <SUColumns>`] [:ref:`list(dict) <list(dict)>` | :ref:`list(string) <list(string)>`] (default: computed for your project) List of columns to display.
- **columns** :index:`: <pair: preflight - draw_stackup - draw_stackup; columns>` [:ref:`SUColumns parameters <SUColumns_pre>`] [:ref:`list(dict) <list(dict)>` | :ref:`list(string) <list(string)>`] (default: computed for your project) List of columns to display.
Can be just the name of the column. |br|
Available columns are *gerber*, *drawing*, *thickness* and *description*. |br|
When empty KiBot will add them in the above order, skipping the *gerber* if not available.
Expand Down
4 changes: 2 additions & 2 deletions docs/source/configuration/preflights/ERCOptions.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.. _ERCOptions:
.. _ERCOptions_pre:


ERCOptions parameters
Expand All @@ -13,7 +13,7 @@ ERCOptions parameters
- ``dir`` :index:`: <pair: preflight - erc - erc; dir>` [:ref:`string <string>`] (default: ``''``) Sub-directory for the report.
- ``dont_stop`` :index:`: <pair: preflight - erc - erc; dont_stop>` [:ref:`boolean <boolean>`] (default: ``false``) Continue even if we detect errors.
- ``enabled`` :index:`: <pair: preflight - erc - erc; enabled>` [:ref:`boolean <boolean>`] (default: ``true``) Enable the check. This is the replacement for the boolean value.
- ``filters`` :index:`: <pair: preflight - erc - erc; filters>` [:ref:`FilterOptionsXRC parameters <FilterOptionsXRC>`] [:ref:`list(dict) <list(dict)>`] (default: ``[]``) Used to manipulate the violations. Avoid using the *filters* preflight.
- ``filters`` :index:`: <pair: preflight - erc - erc; filters>` [:ref:`FilterOptionsXRC parameters <FilterOptionsXRC_pre>`] [:ref:`list(dict) <list(dict)>`] (default: ``[]``) Used to manipulate the violations. Avoid using the *filters* preflight.
- ``force_english`` :index:`: <pair: preflight - erc - erc; force_english>` [:ref:`boolean <boolean>`] (default: ``true``) Force english messages. KiCad 8.0.4 introduced translation, breaking filters for previous versions.
Disable it if you prefer using the system wide language.
- ``format`` :index:`: <pair: preflight - erc - erc; format>` [:ref:`string <string>` | :ref:`list(string) <list(string)>`] (default: ``'HTML'``) (choices: "RPT", "HTML", "CSV", "JSON") [:ref:`comma separated <comma_sep>`] Format/s used for the report.
Expand Down
2 changes: 1 addition & 1 deletion docs/source/configuration/preflights/FieldCheck.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.. _FieldCheck:
.. _FieldCheck_pre:


FieldCheck parameters
Expand Down
2 changes: 1 addition & 1 deletion docs/source/configuration/preflights/FilterOptions.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.. _FilterOptions:
.. _FilterOptions_pre:


FilterOptions parameters
Expand Down
2 changes: 1 addition & 1 deletion docs/source/configuration/preflights/FilterOptionsXRC.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.. _FilterOptionsXRC:
.. _FilterOptionsXRC_pre:


FilterOptionsXRC parameters
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.. _IncTableOutputOptions:
.. _IncTableOutputOptions_pre:


IncTableOutputOptions parameters
Expand Down
6 changes: 4 additions & 2 deletions docs/source/configuration/preflights/IncludeTableOptions.rst
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
.. _IncludeTableOptions:
.. _IncludeTableOptions_pre:


IncludeTableOptions parameters
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

- **outputs** :index:`: <pair: preflight - include_table - include_table; outputs>` [:ref:`IncTableOutputOptions parameters <IncTableOutputOptions>`] [:ref:`list(dict) <list(dict)>` | :ref:`list(string) <list(string)>` | :ref:`string <string>`] (default: computed for your project) List of CSV-generating outputs.
- **outputs** :index:`: <pair: preflight - include_table - include_table; outputs>` [:ref:`IncTableOutputOptions parameters <IncTableOutputOptions_pre>`] [:ref:`list(dict) <list(dict)>` | :ref:`list(string) <list(string)>` | :ref:`string <string>`] (default: computed for your project) List of CSV-generating outputs.
When empty we include all possible outputs.
- ``enabled`` :index:`: <pair: preflight - include_table - include_table; enabled>` [:ref:`boolean <boolean>`] (default: ``true``) Enable the check. This is the replacement for the boolean value.
- ``format_drill_table`` :index:`: <pair: preflight - include_table - include_table; format_drill_table>` [:ref:`boolean <boolean>`] (default: ``true``) If True, CSV drill tables will have drill marks displayed on the left and
an extra bottom rule for the total number of holes.
- ``group_name`` :index:`: <pair: preflight - include_table - include_table; group_name>` [:ref:`string <string>`] (default: ``'kibot_table'``) Name for the group containing the table. The name of the group
should be <group_name>_X where X is the output name. |br|
When the output generates more than one CSV use *kibot_table_out[2]*
Expand Down
2 changes: 1 addition & 1 deletion docs/source/configuration/preflights/KiCadVariable.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.. _KiCadVariable:
.. _KiCadVariable_pre:


KiCadVariable parameters
Expand Down
2 changes: 1 addition & 1 deletion docs/source/configuration/preflights/PCB_Reference.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.. _PCB_Reference:
.. _PCB_Reference_pre:


PCB_Reference parameters
Expand Down
Loading

0 comments on commit 36d6825

Please sign in to comment.