KiBot/docs/source/configuration/sup_variants.rst

205 lines
17 KiB
ReStructuredText

.. Automatically generated by KiBot, please don't edit this file
Supported variants
^^^^^^^^^^^^^^^^^^
- **ibom**: (**IBoM variant style**) :index:`. <pair: variant; ibom>`
The Config field (configurable) contains a value. |br|
If this value matches with a value in the whitelist is included. |br|
If this value matches with a value in the blacklist is excluded.
- Valid keys:
- ``comment`` :index:`: <pair: variant - ibom; comment>` [string=''] A comment for documentation purposes.
- ``dnc_filter`` :index:`: <pair: variant - ibom; dnc_filter>` [string|list(string)=''] Name of the filter to mark components as 'Do Not Change'.
Use '_kibom_dnc' for the default KiBoM behavior.
- ``dnf_filter`` :index:`: <pair: variant - ibom; dnf_filter>` [string|list(string)=''] Name of the filter to mark components as 'Do Not Fit'.
Use '_kibom_dnf' for the default KiBoM behavior.
Use '_kicost_dnp'' for the default KiCost behavior.
- ``exclude_filter`` :index:`: <pair: variant - ibom; exclude_filter>` [string|list(string)=''] Name of the filter to exclude components from BoM processing.
Use '_mechanical' for the default KiBoM behavior.
- ``file_id`` :index:`: <pair: variant - ibom; file_id>` [string=''] Text to use as the replacement for %v expansion.
- ``name`` :index:`: <pair: variant - ibom; name>` [string=''] Used to identify this particular variant definition.
- ``pre_transform`` :index:`: <pair: variant - ibom; pre_transform>` [string|list(string)=''] Name of the filter to transform fields before applying other filters.
Use '_var_rename' to transform VARIANT:FIELD fields.
Use '_var_rename_kicost' to transform kicost.VARIANT:FIELD fields.
Use '_kicost_rename' to apply KiCost field rename rules.
- ``sub_pcbs`` :index:`: <pair: variant - ibom; sub_pcbs>` [list(dict)] Used for multi-board workflows as defined by KiKit.
I don't recommend using it, for detail read
`this <https://github.com/INTI-CMNB/KiBot/tree/master/docs/1_SCH_2_part_PCBs>`__.
But if you really need it you can define the sub-PCBs here.
Then you just use *VARIANT[SUB_PCB_NAME]* instead of just *VARIANT*.
- Valid keys:
- **name** :index:`: <pair: variant - ibom - sub_pcbs; name>` [string=''] Name for this sub-pcb.
- *ref* :index:`: <pair: variant - ibom - sub_pcbs; ref>` Alias for reference.
- **reference** :index:`: <pair: variant - ibom - sub_pcbs; reference>` [string=''] Use it for the annotations method.
This is the reference for the `kikit:Board` footprint used to identify the sub-PCB.
Note that you can use any footprint as long as its position is inside the PCB outline.
When empty the sub-PCB is specified using a rectangle.
- *bottom_right_x* :index:`: <pair: variant - ibom - sub_pcbs; bottom_right_x>` Alias for brx.
- *bottom_right_y* :index:`: <pair: variant - ibom - sub_pcbs; bottom_right_y>` Alias for bry.
- ``brx`` :index:`: <pair: variant - ibom - sub_pcbs; brx>` [number|string] The X position of the bottom right corner for the rectangle that contains the sub-PCB.
- ``bry`` :index:`: <pair: variant - ibom - sub_pcbs; bry>` [number|string] The Y position of the bottom right corner for the rectangle that contains the sub-PCB.
- ``center_result`` :index:`: <pair: variant - ibom - sub_pcbs; center_result>` [boolean=true] Move the resulting PCB to the center of the page.
You can disable it only for the internal tool, KiKit should always do it.
- ``file_id`` :index:`: <pair: variant - ibom - sub_pcbs; file_id>` [string=''] Text to use as the replacement for %v expansion.
When empty we use the parent `file_id` plus the `name` of the sub-PCB.
- ``strip_annotation`` :index:`: <pair: variant - ibom - sub_pcbs; strip_annotation>` [boolean=false] Remove the annotation footprint. Note that KiKit will remove all annotations,
but the internal implementation just the one indicated by `ref`.
If you need to remove other annotations use an exclude filter.
- ``tlx`` :index:`: <pair: variant - ibom - sub_pcbs; tlx>` [number|string] The X position of the top left corner for the rectangle that contains the sub-PCB.
- ``tly`` :index:`: <pair: variant - ibom - sub_pcbs; tly>` [number|string] The Y position of the top left corner for the rectangle that contains the sub-PCB.
- ``tolerance`` :index:`: <pair: variant - ibom - sub_pcbs; tolerance>` [number|string] Used to enlarge the selected rectangle to include elements outside the board.
KiCad 5: To avoid rounding issues this value is set to 0.000002 mm when 0 is specified.
- ``tool`` :index:`: <pair: variant - ibom - sub_pcbs; tool>` [string='internal'] [internal,kikit] Tool used to extract the sub-PCB..
- *top_left_x* :index:`: <pair: variant - ibom - sub_pcbs; top_left_x>` Alias for tlx.
- *top_left_y* :index:`: <pair: variant - ibom - sub_pcbs; top_left_y>` Alias for tly.
- ``units`` :index:`: <pair: variant - ibom - sub_pcbs; units>` [string='mm'] [millimeters,inches,mils,mm,cm,dm,m,mil,inch,in] Units used when omitted.
- ``variant_field`` :index:`: <pair: variant - ibom; variant_field>` [string='Config'] Name of the field that stores board variant for component.
- ``variants_blacklist`` :index:`: <pair: variant - ibom; variants_blacklist>` [string|list(string)=''] List of board variants to exclude from the BOM.
- ``variants_whitelist`` :index:`: <pair: variant - ibom; variants_whitelist>` [string|list(string)=''] List of board variants to include in the BOM.
- **kibom**: (**KiBoM variant style**) :index:`. <pair: variant; kibom>`
The Config field (configurable) contains a comma separated list of variant directives. |br|
-VARIANT excludes a component from VARIANT. |br|
+VARIANT includes the component only if we are using this variant.
- Valid keys:
- ``comment`` :index:`: <pair: variant - kibom; comment>` [string=''] A comment for documentation purposes.
- ``config_field`` :index:`: <pair: variant - kibom; config_field>` [string='Config'] Name of the field used to classify components.
- ``dnc_filter`` :index:`: <pair: variant - kibom; dnc_filter>` [string|list(string)='_kibom_dnc_CONFIG_FIELD'] Name of the filter to mark components as 'Do Not Change'.
Use '_kibom_dnc' for the default KiBoM behavior.
- ``dnf_filter`` :index:`: <pair: variant - kibom; dnf_filter>` [string|list(string)='_kibom_dnf_CONFIG_FIELD'] Name of the filter to mark components as 'Do Not Fit'.
Use '_kibom_dnf' for the default KiBoM behavior.
Use '_kicost_dnp'_kibom_dnf_CONFIG_FIELD' for the default KiCost behavior.
- ``exclude_filter`` :index:`: <pair: variant - kibom; exclude_filter>` [string|list(string)='_mechanical'] Name of the filter to exclude components from BoM processing.
Use '_mechanical' for the default KiBoM behavior.
- ``file_id`` :index:`: <pair: variant - kibom; file_id>` [string=''] Text to use as the replacement for %v expansion.
- ``name`` :index:`: <pair: variant - kibom; name>` [string=''] Used to identify this particular variant definition.
- ``pre_transform`` :index:`: <pair: variant - kibom; pre_transform>` [string|list(string)=''] Name of the filter to transform fields before applying other filters.
Use '_var_rename' to transform VARIANT:FIELD fields.
Use '_var_rename_kicost' to transform kicost.VARIANT:FIELD fields.
Use '_kicost_rename' to apply KiCost field rename rules.
- ``sub_pcbs`` :index:`: <pair: variant - kibom; sub_pcbs>` [list(dict)] Used for multi-board workflows as defined by KiKit.
I don't recommend using it, for detail read
`this <https://github.com/INTI-CMNB/KiBot/tree/master/docs/1_SCH_2_part_PCBs>`__.
But if you really need it you can define the sub-PCBs here.
Then you just use *VARIANT[SUB_PCB_NAME]* instead of just *VARIANT*.
- Valid keys:
- **name** :index:`: <pair: variant - kibom - sub_pcbs; name>` [string=''] Name for this sub-pcb.
- *ref* :index:`: <pair: variant - kibom - sub_pcbs; ref>` Alias for reference.
- **reference** :index:`: <pair: variant - kibom - sub_pcbs; reference>` [string=''] Use it for the annotations method.
This is the reference for the `kikit:Board` footprint used to identify the sub-PCB.
Note that you can use any footprint as long as its position is inside the PCB outline.
When empty the sub-PCB is specified using a rectangle.
- *bottom_right_x* :index:`: <pair: variant - kibom - sub_pcbs; bottom_right_x>` Alias for brx.
- *bottom_right_y* :index:`: <pair: variant - kibom - sub_pcbs; bottom_right_y>` Alias for bry.
- ``brx`` :index:`: <pair: variant - kibom - sub_pcbs; brx>` [number|string] The X position of the bottom right corner for the rectangle that contains the sub-PCB.
- ``bry`` :index:`: <pair: variant - kibom - sub_pcbs; bry>` [number|string] The Y position of the bottom right corner for the rectangle that contains the sub-PCB.
- ``center_result`` :index:`: <pair: variant - kibom - sub_pcbs; center_result>` [boolean=true] Move the resulting PCB to the center of the page.
You can disable it only for the internal tool, KiKit should always do it.
- ``file_id`` :index:`: <pair: variant - kibom - sub_pcbs; file_id>` [string=''] Text to use as the replacement for %v expansion.
When empty we use the parent `file_id` plus the `name` of the sub-PCB.
- ``strip_annotation`` :index:`: <pair: variant - kibom - sub_pcbs; strip_annotation>` [boolean=false] Remove the annotation footprint. Note that KiKit will remove all annotations,
but the internal implementation just the one indicated by `ref`.
If you need to remove other annotations use an exclude filter.
- ``tlx`` :index:`: <pair: variant - kibom - sub_pcbs; tlx>` [number|string] The X position of the top left corner for the rectangle that contains the sub-PCB.
- ``tly`` :index:`: <pair: variant - kibom - sub_pcbs; tly>` [number|string] The Y position of the top left corner for the rectangle that contains the sub-PCB.
- ``tolerance`` :index:`: <pair: variant - kibom - sub_pcbs; tolerance>` [number|string] Used to enlarge the selected rectangle to include elements outside the board.
KiCad 5: To avoid rounding issues this value is set to 0.000002 mm when 0 is specified.
- ``tool`` :index:`: <pair: variant - kibom - sub_pcbs; tool>` [string='internal'] [internal,kikit] Tool used to extract the sub-PCB..
- *top_left_x* :index:`: <pair: variant - kibom - sub_pcbs; top_left_x>` Alias for tlx.
- *top_left_y* :index:`: <pair: variant - kibom - sub_pcbs; top_left_y>` Alias for tly.
- ``units`` :index:`: <pair: variant - kibom - sub_pcbs; units>` [string='mm'] [millimeters,inches,mils,mm,cm,dm,m,mil,inch,in] Units used when omitted.
- ``variant`` :index:`: <pair: variant - kibom; variant>` [string|list(string)=''] Board variant(s).
- **kicost**: (**KiCost variant style**) :index:`. <pair: variant; kicost>`
The `variant` field (configurable) contains one or more values. |br|
If any of these values matches the variant regex the component is included. |br|
By default a pre-transform filter is applied to support kicost.VARIANT:FIELD and
field name aliases used by KiCost. |br|
Also a default `dnf_filter` implements the KiCost DNP mechanism.
- Valid keys:
- ``comment`` :index:`: <pair: variant - kicost; comment>` [string=''] A comment for documentation purposes.
- ``dnc_filter`` :index:`: <pair: variant - kicost; dnc_filter>` [string|list(string)=''] Name of the filter to mark components as 'Do Not Change'.
Use '_kibom_dnc' for the default KiBoM behavior.
- ``dnf_filter`` :index:`: <pair: variant - kicost; dnf_filter>` [string|list(string)=''] Name of the filter to mark components as 'Do Not Fit'.
Use '_kibom_dnf' for the default KiBoM behavior.
Use '_kicost_dnp'' for the default KiCost behavior.
- ``exclude_filter`` :index:`: <pair: variant - kicost; exclude_filter>` [string|list(string)=''] Name of the filter to exclude components from BoM processing.
Use '_mechanical' for the default KiBoM behavior.
- ``file_id`` :index:`: <pair: variant - kicost; file_id>` [string=''] Text to use as the replacement for %v expansion.
- ``name`` :index:`: <pair: variant - kicost; name>` [string=''] Used to identify this particular variant definition.
- ``pre_transform`` :index:`: <pair: variant - kicost; pre_transform>` [string|list(string)=''] Name of the filter to transform fields before applying other filters.
Use '_var_rename' to transform VARIANT:FIELD fields.
Use '_var_rename_kicost' to transform kicost.VARIANT:FIELD fields.
Use '_kicost_rename' to apply KiCost field rename rules.
- ``separators`` :index:`: <pair: variant - kicost; separators>` [string=',;/ '] Valid separators for variants in the variant field.
Each character is a valid separator.
Only supported internally, don't use it if you plan to use KiCost.
- ``sub_pcbs`` :index:`: <pair: variant - kicost; sub_pcbs>` [list(dict)] Used for multi-board workflows as defined by KiKit.
I don't recommend using it, for detail read
`this <https://github.com/INTI-CMNB/KiBot/tree/master/docs/1_SCH_2_part_PCBs>`__.
But if you really need it you can define the sub-PCBs here.
Then you just use *VARIANT[SUB_PCB_NAME]* instead of just *VARIANT*.
- Valid keys:
- **name** :index:`: <pair: variant - kicost - sub_pcbs; name>` [string=''] Name for this sub-pcb.
- *ref* :index:`: <pair: variant - kicost - sub_pcbs; ref>` Alias for reference.
- **reference** :index:`: <pair: variant - kicost - sub_pcbs; reference>` [string=''] Use it for the annotations method.
This is the reference for the `kikit:Board` footprint used to identify the sub-PCB.
Note that you can use any footprint as long as its position is inside the PCB outline.
When empty the sub-PCB is specified using a rectangle.
- *bottom_right_x* :index:`: <pair: variant - kicost - sub_pcbs; bottom_right_x>` Alias for brx.
- *bottom_right_y* :index:`: <pair: variant - kicost - sub_pcbs; bottom_right_y>` Alias for bry.
- ``brx`` :index:`: <pair: variant - kicost - sub_pcbs; brx>` [number|string] The X position of the bottom right corner for the rectangle that contains the sub-PCB.
- ``bry`` :index:`: <pair: variant - kicost - sub_pcbs; bry>` [number|string] The Y position of the bottom right corner for the rectangle that contains the sub-PCB.
- ``center_result`` :index:`: <pair: variant - kicost - sub_pcbs; center_result>` [boolean=true] Move the resulting PCB to the center of the page.
You can disable it only for the internal tool, KiKit should always do it.
- ``file_id`` :index:`: <pair: variant - kicost - sub_pcbs; file_id>` [string=''] Text to use as the replacement for %v expansion.
When empty we use the parent `file_id` plus the `name` of the sub-PCB.
- ``strip_annotation`` :index:`: <pair: variant - kicost - sub_pcbs; strip_annotation>` [boolean=false] Remove the annotation footprint. Note that KiKit will remove all annotations,
but the internal implementation just the one indicated by `ref`.
If you need to remove other annotations use an exclude filter.
- ``tlx`` :index:`: <pair: variant - kicost - sub_pcbs; tlx>` [number|string] The X position of the top left corner for the rectangle that contains the sub-PCB.
- ``tly`` :index:`: <pair: variant - kicost - sub_pcbs; tly>` [number|string] The Y position of the top left corner for the rectangle that contains the sub-PCB.
- ``tolerance`` :index:`: <pair: variant - kicost - sub_pcbs; tolerance>` [number|string] Used to enlarge the selected rectangle to include elements outside the board.
KiCad 5: To avoid rounding issues this value is set to 0.000002 mm when 0 is specified.
- ``tool`` :index:`: <pair: variant - kicost - sub_pcbs; tool>` [string='internal'] [internal,kikit] Tool used to extract the sub-PCB..
- *top_left_x* :index:`: <pair: variant - kicost - sub_pcbs; top_left_x>` Alias for tlx.
- *top_left_y* :index:`: <pair: variant - kicost - sub_pcbs; top_left_y>` Alias for tly.
- ``units`` :index:`: <pair: variant - kicost - sub_pcbs; units>` [string='mm'] [millimeters,inches,mils,mm,cm,dm,m,mil,inch,in] Units used when omitted.
- ``variant`` :index:`: <pair: variant - kicost; variant>` [string=''] Variants to match (regex).
- ``variant_field`` :index:`: <pair: variant - kicost; variant_field>` [string='variant'] Name of the field that stores board variant/s for component.
Only supported internally, don't use it if you plan to use KiCost.