Skip to content

Commit

Permalink
[DOCs][Updated] Including new preflight
Browse files Browse the repository at this point in the history
  • Loading branch information
set-soft committed Oct 22, 2024
1 parent c7f6611 commit d94dd54
Show file tree
Hide file tree
Showing 10 changed files with 292 additions and 37 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [1.8.2] - UNRELEASED
### Added
- Experimental GUI
- Preflights:
- Draw Fancy Stackup: which includes the type of vias used (#699)
- SVG: `use_aux_axis_as_origin` option (#681)
- Report: thickness units (#685)
- PCB Print:
Expand Down
12 changes: 12 additions & 0 deletions docs/samples/generic_plot.kibot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,18 @@ preflight:
# creates significant changes to a layer use the CheckZoneFill internal template .
# [boolean=false] Enable this preflight.
check_zone_fills: true
# Draw Fancy Stackup
# Draw the PCB stackup. Needs KiCad 7 or newer.
# To specify the position and size of the drawing you can use two methods.
# You can specify it using the *pos_x*, *pos_y*, *width* and *layer* options.
# But you can also draw a rectangle in your PCB with the size and layer you want.
# Then draw another thing inside the rectangle, select both and create a group
# (right mouse button, then Grouping -> Group). Now edit the group and change its name
# to *kibot_fancy_stackup*. After running this preflight the rectangle will contain the
# stackup. Note that the height is not determined by the group height, but by the number
# of layers and spacing between layers. .
# [boolean|dict=false] Use a boolean for simple cases or fine-tune its behavior.
draw_fancy_stackup: true
# Draw Stackup
# Draw the PCB stackup. Needs KiCad 7 or newer.
# To specify the position and size of the drawing you can use two methods.
Expand Down
4 changes: 4 additions & 0 deletions docs/source/Changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ Added
~~~~~

- Experimental GUI
- Preflights:

- Draw Fancy Stackup: which includes the type of vias used (#699)

- SVG: ``use_aux_axis_as_origin`` option (#681)
- Report: thickness units (#685)
- PCB Print:
Expand Down
39 changes: 39 additions & 0 deletions docs/source/configuration/preflights/DrawFancyStackupOptions.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
.. _DrawFancyStackupOptions:


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.
Can be just the name of the column.
Available columns are *drawing*, *material*, *layer*, *thickness*, *dielectric*, *layer_type*, *gerber*.
When empty KiBot will add them in the above order, skipping the *gerber* if not available.
- **draw_stackup** :index:`: <pair: preflight - draw_fancy_stackup - draw_fancy_stackup; draw_stackup>` [:ref:`boolean <boolean>`] (default: ``true``) Choose whether to display the stackup drawing or not.
- **gerber** :index:`: <pair: preflight - draw_fancy_stackup - draw_fancy_stackup; gerber>` [:ref:`string <string>`] (default: ``''``) Name of the output used to generate the gerbers. This is needed only when you
want to include the *gerber* column, containing the gerber file names.
- **gerber_extension_only** :index:`: <pair: preflight - draw_fancy_stackup - draw_fancy_stackup; gerber_extension_only>` [:ref:`boolean <boolean>`] (default: ``true``) Only display the gerber file extension instead of full gerber name.
- ``column_spacing`` :index:`: <pair: preflight - draw_fancy_stackup - draw_fancy_stackup; column_spacing>` [:ref:`number <number>`] (default: ``2``) Blank space (in number of characters) between columns in the stackup table..
- ``core_extra_spacing_ratio`` :index:`: <pair: preflight - draw_fancy_stackup - draw_fancy_stackup; core_extra_spacing_ratio>` [:ref:`number <number>`] (default: ``2``) Extra vertical space given to the core layers..
- ``draw_vias`` :index:`: <pair: preflight - draw_fancy_stackup - draw_fancy_stackup; draw_vias>` [:ref:`boolean <boolean>`] (default: ``true``) Enable drawing vias (thru, blind, buried) in the stackup table..
- ``drawing_border_spacing`` :index:`: <pair: preflight - draw_fancy_stackup - draw_fancy_stackup; drawing_border_spacing>` [:ref:`number <number>`] (default: ``10``) Space (in number of characters) between stackup drawing borders and via drawings..
- ``enabled`` :index:`: <pair: preflight - draw_fancy_stackup - draw_fancy_stackup; enabled>` [:ref:`boolean <boolean>`] (default: ``true``) Enable the check. This is the replacement for the boolean value.
- ``group_name`` :index:`: <pair: preflight - draw_fancy_stackup - draw_fancy_stackup; group_name>` [:ref:`string <string>`] (default: ``'kibot_fancy_stackup'``) Name for the group containing the drawings. If KiBot can't find it will create
a new group at the specified coordinates for the indicated layer.
- ``layer`` :index:`: <pair: preflight - draw_fancy_stackup - draw_fancy_stackup; layer>` [:ref:`string <string>`] (default: ``'Cmts.User'``) Layer used for the stackup. Only used when the group can't be found.
Otherwise we use the layer for the first object in the group.
- ``layer_spacing`` :index:`: <pair: preflight - draw_fancy_stackup - draw_fancy_stackup; layer_spacing>` [:ref:`number <number>`] (default: ``3``) Space (in number of characters) between layers on the stackup table/drawing..
- ``note`` :index:`: <pair: preflight - draw_fancy_stackup - draw_fancy_stackup; note>` [:ref:`string <string>`] (default: ``''``) Note to write at the bottom of the stackup table. Leave empty if no note is to be written..
- ``pos_x`` :index:`: <pair: preflight - draw_fancy_stackup - draw_fancy_stackup; pos_x>` [:ref:`number <number>`] (default: ``19``) X position in the PCB. The units are defined by the global *units* variable.
Only used when the group can't be found.
- ``pos_y`` :index:`: <pair: preflight - draw_fancy_stackup - draw_fancy_stackup; pos_y>` [:ref:`number <number>`] (default: ``100``) Y position in the PCB. The units are defined by the global *units* variable.
Only used when the group can't be found.
- ``stackup_to_text_lines_spacing`` :index:`: <pair: preflight - draw_fancy_stackup - draw_fancy_stackup; stackup_to_text_lines_spacing>` [:ref:`number <number>`] (default: ``3``) Space (in number of characters) between stackup drawing and stackup table..
- ``via_spacing`` :index:`: <pair: preflight - draw_fancy_stackup - draw_fancy_stackup; via_spacing>` [:ref:`number <number>`] (default: ``8``) Space (in number of characters) between vias in the stackup drawing..
- ``via_width`` :index:`: <pair: preflight - draw_fancy_stackup - draw_fancy_stackup; via_width>` [:ref:`number <number>`] (default: ``4``) Width (in number of characters) of a via in the stackup drawing..
- ``width`` :index:`: <pair: preflight - draw_fancy_stackup - draw_fancy_stackup; width>` [:ref:`number <number>`] (default: ``120``) Width for the drawing. The units are defined by the global *units* variable.
Only used when the group can't be found.

.. toctree::
:caption: Used dicts

SUColumnsFancy
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ DrawStackupOptions parameters
- ``enabled`` :index:`: <pair: preflight - draw_stackup - draw_stackup; enabled>` [:ref:`boolean <boolean>`] (default: ``true``) Enable the check. This is the replacement for the boolean value.
- ``group_name`` :index:`: <pair: preflight - draw_stackup - draw_stackup; group_name>` [:ref:`string <string>`] (default: ``'kibot_stackup'``) Name for the group containing the drawings. If KiBot can't find it will create
a new group at the specified coordinates for the indicated layer.
- ``height`` :index:`: <pair: preflight - draw_stackup - draw_stackup; height>` [:ref:`number <number>`] (default: ``200``) Height for the drawing. The units are defined by the global *units* variable.
- ``height`` :index:`: <pair: preflight - draw_stackup - draw_stackup; height>` [:ref:`number <number>`] (default: ``100``) Height for the drawing. The units are defined by the global *units* variable.
Only used when the group can't be found.
- ``layer`` :index:`: <pair: preflight - draw_stackup - draw_stackup; layer>` [:ref:`string <string>`] (default: ``'Cmts.User'``) Layer used for the stackup. Only used when the group can't be found.
Otherwise we use the layer for the first object in the group.
Expand Down
9 changes: 9 additions & 0 deletions docs/source/configuration/preflights/SUColumnsFancy.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.. _SUColumnsFancy:


SUColumnsFancy parameters
~~~~~~~~~~~~~~~~~~~~~~~~~

- **type** :index:`: <pair: preflight - draw_fancy_stackup - draw_fancy_stackup - columns; type>` ''
- **width** :index:`: <pair: preflight - draw_fancy_stackup - draw_fancy_stackup - columns; width>` [:ref:`number <number>`] (default: ``30``) Relative width. Is computed automatically according to the defined group width.

24 changes: 24 additions & 0 deletions docs/source/configuration/preflights/draw_fancy_stackup.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
.. Automatically generated by KiBot, please don't edit this file
.. index::
pair: Draw Fancy Stackup; draw_fancy_stackup

Draw Fancy Stackup
~~~~~~~~~~~~~~~~~~

Draw the PCB stackup. Needs KiCad 7 or newer.
To specify the position and size of the drawing you can use two methods. |br|
You can specify it using the *pos_x*, *pos_y*, *width* and *layer* options. |br|
But you can also draw a rectangle in your PCB with the size and layer you want. |br|
Then draw another thing inside the rectangle, select both and create a group
(right mouse button, then Grouping -> Group). Now edit the group and change its name
to *kibot_fancy_stackup*. After running this preflight the rectangle will contain the
stackup. Note that the height is not determined by the group height, but by the number
of layers and spacing between layers. |br|

- **draw_fancy_stackup** :index:`: <pair: preflight - draw_fancy_stackup; draw_fancy_stackup>` [:ref:`DrawFancyStackupOptions parameters <DrawFancyStackupOptions>`] [:ref:`boolean <boolean>` | :ref:`dict <dict>`] (default: ``false``) Use a boolean for simple cases or fine-tune its behavior.

.. toctree::
:caption: Used dicts

DrawFancyStackupOptions
1 change: 1 addition & 0 deletions docs/source/configuration/sup_preflights.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Supported preflights
preflights/annotate_power
preflights/check_fields
preflights/check_zone_fills
preflights/draw_fancy_stackup
preflights/draw_stackup
preflights/drc
preflights/erc
Expand Down
159 changes: 159 additions & 0 deletions tests/GUI/preflights
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,165 @@
null
]
],
"draw_fancy_stackup": [
[
"draw_fancy_stackup",
[
"DataTypeDict",
"DataTypeBoolean"
],
[
[
"enabled",
[
"DataTypeBoolean"
],
null
],
[
"pos_x",
[
"DataTypeNumber"
],
null
],
[
"pos_y",
[
"DataTypeNumber"
],
null
],
[
"width",
[
"DataTypeNumber"
],
null
],
[
"layer",
[
"DataTypeString"
],
null
],
[
"group_name",
[
"DataTypeString"
],
null
],
[
"gerber",
[
"DataTypeString"
],
null
],
[
"gerber_extension_only",
[
"DataTypeBoolean"
],
null
],
[
"draw_stackup",
[
"DataTypeBoolean"
],
null
],
[
"columns",
[
"DataTypeListDictOrString"
],
[
[
"type",
[
"DataTypeChoice"
],
null
],
[
"width",
[
"DataTypeNumber"
],
null
]
]
],
[
"draw_vias",
[
"DataTypeBoolean"
],
null
],
[
"drawing_border_spacing",
[
"DataTypeNumber"
],
null
],
[
"stackup_to_text_lines_spacing",
[
"DataTypeNumber"
],
null
],
[
"via_width",
[
"DataTypeNumber"
],
null
],
[
"via_spacing",
[
"DataTypeNumber"
],
null
],
[
"core_extra_spacing_ratio",
[
"DataTypeNumber"
],
null
],
[
"layer_spacing",
[
"DataTypeNumber"
],
null
],
[
"column_spacing",
[
"DataTypeNumber"
],
null
],
[
"note",
[
"DataTypeString"
],
null
]
]
]
],
"draw_stackup": [
[
"draw_stackup",
Expand Down
Loading

0 comments on commit d94dd54

Please sign in to comment.