KiBot/docs/build/html/configuration/global.html

493 lines
44 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Default global options &mdash; KiBot 1.6.4 documentation</title>
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
<script src="../_static/jquery.js"></script>
<script src="../_static/underscore.js"></script>
<script src="../_static/_sphinx_javascript_frameworks_compat.js"></script>
<script src="../_static/doctools.js"></script>
<script src="../_static/sphinx_highlight.js"></script>
<script src="../_static/js/theme.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Filters and variants" href="filters.html" />
<link rel="prev" title="The preflight section" href="preflight.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../index.html" class="icon icon-home">
KiBot
<img src="../_static/kibot_370x200.png" class="logo" alt="Logo"/>
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../introduction.html">Introduction</a></li>
<li class="toctree-l1"><a class="reference internal" href="../installation.html">Installation</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../configuration.html">Configuration</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="quick_start.html">Quick start</a></li>
<li class="toctree-l2"><a class="reference internal" href="section_order.html">Section order</a></li>
<li class="toctree-l2"><a class="reference internal" href="header.html">The header</a></li>
<li class="toctree-l2"><a class="reference internal" href="preflight.html">The <em>preflight</em> section</a></li>
<li class="toctree-l2 current"><a class="current reference internal" href="#">Default global options</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#default-output-option">Default <em>output</em> option</a></li>
<li class="toctree-l3"><a class="reference internal" href="#default-dir-option">Default <em>dir</em> option</a></li>
<li class="toctree-l3"><a class="reference internal" href="#default-variant-option">Default <em>variant</em> option</a></li>
<li class="toctree-l3"><a class="reference internal" href="#default-units-option">Default <em>units</em> option</a></li>
<li class="toctree-l3"><a class="reference internal" href="#output-directory-option">Output directory option</a></li>
<li class="toctree-l3"><a class="reference internal" href="#date-format-option">Date format option</a></li>
<li class="toctree-l3"><a class="reference internal" href="#pcb-details-options">PCB details options</a></li>
<li class="toctree-l3"><a class="reference internal" href="#filtering-kibot-warnings">Filtering KiBot warnings</a></li>
<li class="toctree-l3"><a class="reference internal" href="#all-available-global-options">All available global options</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="filters.html">Filters and variants</a></li>
<li class="toctree-l2"><a class="reference internal" href="outputs.html">The <em>outputs</em> section</a></li>
<li class="toctree-l2"><a class="reference internal" href="substitution.html">Doing YAML substitution or preprocessing</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../usage.html">Usage</a></li>
<li class="toctree-l1"><a class="reference internal" href="../usage_with_ci_cd.html">Usage for CI/CD</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">Notes and extra information:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../notes_gerber.html">Notes about Gerber format</a></li>
<li class="toctree-l1"><a class="reference internal" href="../notes_position.html">Notes about the position file</a></li>
<li class="toctree-l1"><a class="reference internal" href="../notes_3d.html">Notes about 3D models</a></li>
<li class="toctree-l1"><a class="reference internal" href="../propose.html">Proposed advanced KiCad usage</a></li>
<li class="toctree-l1"><a class="reference internal" href="../KiPlotYAML.html">KiPlot YAML</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">Final notes:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../contributing.html">Contributing</a></li>
<li class="toctree-l1"><a class="reference internal" href="../credits.html">Credits</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">Indices and tables:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../genindex.html">Index</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../index.html">KiBot</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="../index.html" class="icon icon-home" aria-label="Home"></a></li>
<li class="breadcrumb-item"><a href="../configuration.html">Configuration</a></li>
<li class="breadcrumb-item active">Default global options</li>
<li class="wy-breadcrumbs-aside">
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<section id="default-global-options">
<span id="index-0"></span><h1>Default global options<a class="headerlink" href="#default-global-options" title="Permalink to this heading"></a></h1>
<p>The section <code class="docutils literal notranslate"><span class="pre">global</span></code> contains default global options that affects all
the outputs. Currently only a few option are supported.</p>
<section id="default-output-option">
<span id="index-1"></span><h2>Default <em>output</em> option<a class="headerlink" href="#default-output-option" title="Permalink to this heading"></a></h2>
<p>This option controls the default file name pattern used by all the
outputs. This makes all the file names coherent. You can always choose
the file name for a particular output.</p>
<p>The pattern uses the following expansions:</p>
<ul class="simple">
<li><p><strong>%c</strong> company from pcb/sch metadata.</p></li>
<li><p><strong>%C``n``</strong> comments line <code class="docutils literal notranslate"><span class="pre">n</span></code> from pcb/sch metadata.</p></li>
<li><p><strong>%d</strong> pcb/sch date from metadata if available, file modification
date otherwise.</p></li>
<li><p><strong>%D</strong> date the script was started.</p></li>
<li><p><strong>%f</strong> original pcb/sch file name without extension.</p></li>
<li><p><strong>%F</strong> original pcb/sch file name without extension. Including the
directory part of the name.</p></li>
<li><p><strong>%g</strong> the <code class="docutils literal notranslate"><span class="pre">file_id</span></code> of the global variant.</p></li>
<li><p><strong>%G</strong> the <code class="docutils literal notranslate"><span class="pre">name</span></code> of the global variant.</p></li>
<li><p><strong>%i</strong> a contextual ID, depends on the output type.</p></li>
<li><p><strong>%I</strong> an ID defined by the user for this output.</p></li>
<li><p><strong>%M</strong> directory where the pcb/sch resides. Only the last component
i.e. /a/b/c/name.kicad_pcb -&gt; c</p></li>
<li><p><strong>%p</strong> title from pcb/sch metadata.</p></li>
<li><p><strong>%r</strong> revision from pcb/sch metadata.</p></li>
<li><p><strong>%S</strong> sub-PCB name (related to multiboards).</p></li>
<li><p><strong>%T</strong> time the script was started.</p></li>
<li><p><strong>%x</strong> a suitable extension for the output type.</p></li>
<li><p><strong>%v</strong> the <code class="docutils literal notranslate"><span class="pre">file_id</span></code> of the current variant, or the global variant
if outside a variant scope.</p></li>
<li><p><strong>%V</strong> the <code class="docutils literal notranslate"><span class="pre">name</span></code> of the current variant, or the global variant if
outside a variant scope.</p></li>
</ul>
<p>They are compatible with the ones used by IBoM. The default value for
<code class="docutils literal notranslate"><span class="pre">global.output</span></code> is <code class="docutils literal notranslate"><span class="pre">%f-%i%I%v.%x</span></code>. If you want to include the
revision you could add the following definition:</p>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="nt">global</span><span class="p">:</span>
<span class="w"> </span><span class="nt">output</span><span class="p">:</span><span class="w"> </span><span class="s">&#39;%f_rev_%r-%i.%x&#39;</span>
</pre></div>
</div>
<p>Note that the following patterns: <strong>%c</strong>, <strong>%C``n``</strong>, <strong>%d</strong>, <strong>%f</strong>,
<strong>%F</strong>, <strong>%p</strong> and <strong>%r</strong> depends on the context. If you use them for an
output related to the PCB these values will be obtained from the PCB. If
you need to force the origin of the data you can use <strong>%bX</strong> for the PCB
and <strong>%sX</strong> for the schematic, where <strong>X</strong> is the pattern to expand.</p>
<p>You can also use text variables (introduced in KiCad 6). To expand a
text variable use <code class="docutils literal notranslate"><span class="pre">${VARIABLE}</span></code>. In addition you can also use
environment variables, defined in your OS shell or defined in the
<code class="docutils literal notranslate"><span class="pre">global</span></code> section.</p>
</section>
<section id="default-dir-option">
<span id="index-2"></span><h2>Default <em>dir</em> option<a class="headerlink" href="#default-dir-option" title="Permalink to this heading"></a></h2>
<p>The default <code class="docutils literal notranslate"><span class="pre">dir</span></code> value for any output is <code class="docutils literal notranslate"><span class="pre">.</span></code>. You can change it
here.</p>
<p>Expansion patterns are allowed.</p>
<p>Note that you can use this value as a base for outputs <code class="docutils literal notranslate"><span class="pre">dir</span></code> options.
In this case the value defined in the <code class="docutils literal notranslate"><span class="pre">output</span></code> must start with <code class="docutils literal notranslate"><span class="pre">+</span></code>.
In this case the <code class="docutils literal notranslate"><span class="pre">+</span></code> is replaced by the default <code class="docutils literal notranslate"><span class="pre">dir</span></code> value defined
here.</p>
</section>
<section id="default-variant-option">
<span id="index-3"></span><h2>Default <em>variant</em> option<a class="headerlink" href="#default-variant-option" title="Permalink to this heading"></a></h2>
<p>This option controls the default variant applied to all the outputs.
Example:</p>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="nt">global</span><span class="p">:</span>
<span class="w"> </span><span class="nt">variant</span><span class="p">:</span><span class="w"> </span><span class="s">&#39;production&#39;</span>
</pre></div>
</div>
</section>
<section id="default-units-option">
<span id="index-4"></span><h2>Default <em>units</em> option<a class="headerlink" href="#default-units-option" title="Permalink to this heading"></a></h2>
<p>This option controls the default value for the <code class="docutils literal notranslate"><span class="pre">position</span></code> and <code class="docutils literal notranslate"><span class="pre">bom</span></code>
outputs. If you dont define it then the internal defaults of each
output are applied. But when you define it the default is the defined
value.</p>
<p>On KiCad 6 the dimensions has units. When you create a new dimension it
uses <em>automatic</em> units. This means that KiCad uses the units currently
selected. This selection isnt stored in the PCB file. The global
<code class="docutils literal notranslate"><span class="pre">units</span></code> value is used by KiBot instead.</p>
</section>
<section id="output-directory-option">
<span id="index-5"></span><h2>Output directory option<a class="headerlink" href="#output-directory-option" title="Permalink to this heading"></a></h2>
<p>The <code class="docutils literal notranslate"><span class="pre">out_dir</span></code> option can define the base output directory. This is the
same as the <code class="docutils literal notranslate"><span class="pre">-d</span></code>/<code class="docutils literal notranslate"><span class="pre">--out-dir</span></code> command line option. Note that the
command line option has precedence over it.</p>
<p>Expansion patterns are applied to this value, but you should avoid using
patterns that expand according to the context, i.e. <strong>%c</strong>, <strong>%d</strong>,
<strong>%f</strong>, <strong>%F</strong>, <strong>%p</strong> and <strong>%r</strong>. The behavior of these patterns isnt
fully defined in this case and the results may change in the future.</p>
<p>You can also use text variables (introduced in KiCad 6). To expand a
text variable use <code class="docutils literal notranslate"><span class="pre">${VARIABLE}</span></code>. In addition you can also use
environment variables, defined in your OS shell or defined in the
<code class="docutils literal notranslate"><span class="pre">global</span></code> section.</p>
</section>
<section id="date-format-option">
<span id="index-6"></span><h2>Date format option<a class="headerlink" href="#date-format-option" title="Permalink to this heading"></a></h2>
<ul class="simple">
<li><p>The <strong>%d</strong>, <strong>%sd</strong> and <strong>%bd</strong> patterns use the date and time from
the PCB and schematic. When abscent they use the file timestamp, and
the <code class="docutils literal notranslate"><span class="pre">date_time_format</span></code> global option controls the format used. When
available, and in ISO format, the <code class="docutils literal notranslate"><span class="pre">date_format</span></code> controls the format
used. You can disable this reformatting assigning <code class="docutils literal notranslate"><span class="pre">false</span></code> to the
<code class="docutils literal notranslate"><span class="pre">date_reformat</span></code> option.</p></li>
<li><p>The <strong>%D</strong> format is controlled by the <code class="docutils literal notranslate"><span class="pre">date_format</span></code> global option.</p></li>
<li><p>The <strong>%T</strong> format is controlled by the <code class="docutils literal notranslate"><span class="pre">time_format</span></code> global option.</p></li>
</ul>
<p>In all cases the format is the one used by the <code class="docutils literal notranslate"><span class="pre">strftime</span></code> POSIX
function, for more information visit this
<a class="reference external" href="https://strftime.org/">site</a>.</p>
</section>
<section id="pcb-details-options">
<span id="index-7"></span><h2>PCB details options<a class="headerlink" href="#pcb-details-options" title="Permalink to this heading"></a></h2>
<p>The following variables control the default colors and they are used for
documentation purposes:</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">pcb_material</span></code> [FR4] PCB core material. Currently known are FR1 to
FR5</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">solder_mask_color</span></code> [green] Color for the solder mask. Currently
known are green, black, white, yellow, purple, blue and red.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">silk_screen_color</span></code> [white] Color for the markings. Currently known
are black and white.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">pcb_finish</span></code> [HAL] Finishing used to protect pads. Currently known
are None, HAL, HASL, ENIG and ImAg.</p></li>
</ul>
</section>
<section id="filtering-kibot-warnings">
<span id="filter-kibot-warnings"></span><span id="index-8"></span><h2>Filtering KiBot warnings<a class="headerlink" href="#filtering-kibot-warnings" title="Permalink to this heading"></a></h2>
<p>KiBot warnings are marked with <code class="docutils literal notranslate"><span class="pre">(Wn)</span></code> where <em>n</em> is the warning id.</p>
<p>Some warnings are just recommendations and you could want to avoid them
to focus on details that are more relevant to your project. In this case
you can define filters in a similar way used to <a class="reference internal" href="preflight.html#filter-drc-and-erc"><span class="std std-ref">filter DRC/ERC errors</span></a>.</p>
<p>As an example, if you have the following warning:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>WARNING:(W43) Missing component `l1:FooBar`
</pre></div>
</div>
<p>You can create the following filter to remove it:</p>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="nt">global</span><span class="p">:</span>
<span class="w"> </span><span class="nt">filters</span><span class="p">:</span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">number</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">43</span>
<span class="w"> </span><span class="nt">regex</span><span class="p">:</span><span class="w"> </span><span class="s">&#39;FooBar&#39;</span>
</pre></div>
</div>
</section>
<section id="all-available-global-options">
<span id="index-9"></span><h2>All available global options<a class="headerlink" href="#all-available-global-options" title="Permalink to this heading"></a></h2>
<ul class="simple">
<li><p>global</p>
<ul>
<li><p>Valid keys:</p>
<ul>
<li><p><code class="docutils literal notranslate"><span class="pre">aliases_for_3d_models</span></code> <span class="target" id="index-10"></span>: [list(dict)] List of aliases for the 3D models (KiCad 6).
KiCad stores 3D aliases with the user settings, not locally.
This makes impossible to create self contained projects.
You can define aliases here to workaround this problem.
The values defined here has precedence over the KiCad configuration.
Related to <a class="reference external" href="https://gitlab.com/kicad/code/kicad/-/issues/3792">https://gitlab.com/kicad/code/kicad/-/issues/3792</a>.</p>
<ul>
<li><p>Valid keys:</p>
<ul>
<li><p><em>alias</em> <span class="target" id="index-11"></span>: Alias for name.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">name</span></code> <span class="target" id="index-12"></span>: [string=] Name of the alias.</p></li>
<li><p><em>text</em> <span class="target" id="index-13"></span>: Alias for value.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">value</span></code> <span class="target" id="index-14"></span>: [string=] Path to the 3D model.</p></li>
<li><p><em>variable</em> <span class="target" id="index-15"></span>: Alias for name.</p></li>
</ul>
</li>
</ul>
</li>
<li><p><code class="docutils literal notranslate"><span class="pre">allow_blind_buried_vias</span></code> <span class="target" id="index-16"></span>: [boolean=true] Allow the use of buried vias. This value is only used for KiCad 7+.
For KiCad 5 and 6 use the design rules settings, stored in the project.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">allow_microvias</span></code> <span class="target" id="index-17"></span>: [boolean=true] Allow the use of micro vias. This value is only used for KiCad 7+.
For KiCad 5 and 6 use the design rules settings, stored in the project.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">cache_3d_resistors</span></code> <span class="target" id="index-18"></span>: [boolean=false] Use a cache for the generated 3D models of colored resistors.
Will save time, but you could need to remove the cache if you need to regenerate them.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">castellated_pads</span></code> <span class="target" id="index-19"></span>: [boolean=false] Has the PCB castellated pads?
KiCad 6: you should set this in the Board Setup -&gt; Board Finish -&gt; Has castellated pads.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">colored_tht_resistors</span></code> <span class="target" id="index-20"></span>: [boolean=true] Try to add color bands to the 3D models of KiCad THT resistors.</p></li>
<li><p><em>copper_finish</em> <span class="target" id="index-21"></span>: Alias for pcb_finish.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">copper_thickness</span></code> <span class="target" id="index-22"></span>: [number|string] Copper thickness in micrometers (1 Oz is 35 micrometers).
KiCad 6: you should set this in the Board Setup -&gt; Physical Stackup.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">cross_footprints_for_dnp</span></code> <span class="target" id="index-23"></span>: [boolean=true] Draw a cross for excluded components in the <cite>Fab</cite> layer.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">cross_no_body</span></code> <span class="target" id="index-24"></span>: [boolean=false] Cross components even when they dont have a body. Only for KiCad 6 and internal cross.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">cross_using_kicad</span></code> <span class="target" id="index-25"></span>: [boolean=true] When using KiCad 7+ let KiCad cross the components.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">csv_accept_no_ref</span></code> <span class="target" id="index-26"></span>: [boolean=false] Accept aggregating CSV files without references (Experimental).</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">date_format</span></code> <span class="target" id="index-27"></span>: [string=%Y-%m-%d] Format used for the day we started the script.
Is also used for the PCB/SCH date formatting when <cite>time_reformat</cite> is enabled (default behavior).
Uses the <cite>strftime</cite> format.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">date_time_format</span></code> <span class="target" id="index-28"></span>: [string=%Y-%m-%d_%H-%M-%S] Format used for the PCB and schematic date when using the file timestamp. Uses the <cite>strftime</cite> format.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">default_resistor_tolerance</span></code> <span class="target" id="index-29"></span>: [number=20] When no tolerance is specified we use this value.
Note that I know 5% is a common default, but technically speaking 20% is the default.
Used while creating colored resistors.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">dir</span></code> <span class="target" id="index-30"></span>: [string=] Default pattern for the output directories. It also applies to the preflights, unless
<cite>use_dir_for_preflights</cite> is disabled.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">disable_3d_alias_as_env</span></code> <span class="target" id="index-31"></span>: [boolean=false] Disable the use of environment and text variables as 3D models aliases.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">drc_exclusions_workaround</span></code> <span class="target" id="index-32"></span>: [boolean=false] KiCad 6 introduced DRC exclusions. They are stored in the project but ignored by the Python API.
This is reported as bug number 11562 (<a class="reference external" href="https://gitlab.com/kicad/code/kicad/-/issues/11562">https://gitlab.com/kicad/code/kicad/-/issues/11562</a>).
If you really need exclusions enable this option, this will use the GUI version of the DRC (slower).
Current KiCad version is 6.0.7 and the bug is still there.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">drill_size_increment</span></code> <span class="target" id="index-33"></span>: [number=0.05] This is the difference between drill tools in millimeters.
A manufacturer with 0.05 of increment has drills for 0.1, 0.15, 0.2, 0.25, etc..</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">edge_connector</span></code> <span class="target" id="index-34"></span>: [string=no] [yes,no,bevelled] Has the PCB edge connectors?
KiCad 6: you should set this in the Board Setup -&gt; Board Finish -&gt; Edge card connectors.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">edge_plating</span></code> <span class="target" id="index-35"></span>: [boolean=false] Has the PCB a plated board edge?
KiCad 6: you should set this in the Board Setup -&gt; Board Finish -&gt; Plated board edge.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">environment</span></code> <span class="target" id="index-36"></span>: [dict] Used to define environment variables used by KiCad.
The values defined here are exported as environment variables and has
more precedence than KiCad paths defined in the GUI.
You can make reference to any OS environment variable using ${VARIABLE}.
The KIPRJMOD is also available for expansion.</p>
<ul>
<li><p>Valid keys:</p>
<ul>
<li><p><code class="docutils literal notranslate"><span class="pre">define_old</span></code> <span class="target" id="index-37"></span>: [boolean=false] Also define legacy versions of the variables.
Useful when using KiCad 6+ and some libs uses old KiCad 5 names.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">extra_os</span></code> <span class="target" id="index-38"></span>: [list(dict)] Extra variables to export as OS environment variables.
Note that you can also define them using <cite>- NAME: VALUE</cite>.</p>
<ul>
<li><p>Valid keys:</p>
<ul>
<li><p><strong>name</strong> <span class="target" id="index-39"></span>: [string=] Name of the variable.</p></li>
<li><p><strong>value</strong> <span class="target" id="index-40"></span>: [string=] Value for the variable.</p></li>
</ul>
</li>
</ul>
</li>
<li><p><code class="docutils literal notranslate"><span class="pre">footprints</span></code> <span class="target" id="index-41"></span>: [string=] System level footprints (aka modules) dir. KiCad 5: KICAD_FOOTPRINT_DIR and KISYSMOD.
KiCad 6: KICAD6_FOOTPRINT_DIR.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">models_3d</span></code> <span class="target" id="index-42"></span>: [string=] System level 3D models dir. KiCad 5: KISYS3DMOD. KiCad 6: KICAD6_3DMODEL_DIR.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">symbols</span></code> <span class="target" id="index-43"></span>: [string=] System level symbols dir. KiCad 5: KICAD_SYMBOL_DIR. KiCad 6: KICAD6_SYMBOL_DIR.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">templates</span></code> <span class="target" id="index-44"></span>: [string=] System level templates dir. KiCad 5: KICAD_TEMPLATE_DIR. KiCad 6: KICAD6_TEMPLATE_DIR.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">third_party</span></code> <span class="target" id="index-45"></span>: [string=] 3rd party dir. KiCad 6: KICAD6_3RD_PARTY.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">user_templates</span></code> <span class="target" id="index-46"></span>: [string=] User level templates dir. KiCad 5/6: KICAD_USER_TEMPLATE_DIR.</p></li>
</ul>
</li>
</ul>
</li>
<li><p><code class="docutils literal notranslate"><span class="pre">erc_grid</span></code> <span class="target" id="index-47"></span>: [number=50] Grid size used for the ERC. This value must be in mils.
This is needed for KiCad 7 in order to run the off grid check.
Shouldnt be needed in KiCad 8.
<a class="reference external" href="https://gitlab.com/kicad/code/kicad/-/issues/14110">https://gitlab.com/kicad/code/kicad/-/issues/14110</a>.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">extra_pth_drill</span></code> <span class="target" id="index-48"></span>: [number=0.1] How many millimeters the manufacturer will add to plated holes.
This is because the plating reduces the hole, so you need to use a bigger drill.
For more information consult: <a class="reference external" href="https://www.eurocircuits.com/pcb-design-guidelines/drilled-holes/">https://www.eurocircuits.com/pcb-design-guidelines/drilled-holes/</a>.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">field_3D_model</span></code> <span class="target" id="index-49"></span>: [string=_3D_model] Name for the field controlling the 3D models used for a component.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">field_lcsc_part</span></code> <span class="target" id="index-50"></span>: [string=] The name of the schematic field that contains the part number for the LCSC/JLCPCB distributor.
When empty KiBot will try to discover it.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">field_package</span></code> <span class="target" id="index-51"></span>: [string|list(string)] Name/s of the field/s used for the package, not footprint.
I.e. 0805, SOT-23, etc. Used for the value split filter.
The default is [package, pkg].</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">field_power</span></code> <span class="target" id="index-52"></span>: [string|list(string)] Name/s of the field/s used for the power raiting.
Used for the value split filter.
The default is [power, pow].</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">field_temp_coef</span></code> <span class="target" id="index-53"></span>: [string|list(string)] Name/s of the field/s used for the temperature coefficient.
I.e. X7R, NP0, etc. Used for the value split filter.
The default is [temp_coef, tmp_coef].</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">field_tolerance</span></code> <span class="target" id="index-54"></span>: [string|list(string)] Name/s of the field/s used for the tolerance.
Used while creating colored resistors and for the value split filter.
The default is [tolerance, tol].</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">field_voltage</span></code> <span class="target" id="index-55"></span>: [string|list(string)] Name/s of the field/s used for the voltage raiting.
Used for the value split filter.
The default is [voltage, v].</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">filters</span></code> <span class="target" id="index-56"></span>: [list(dict)] KiBot warnings to be ignored.</p>
<ul>
<li><p>Valid keys:</p>
<ul>
<li><p><code class="docutils literal notranslate"><span class="pre">error</span></code> <span class="target" id="index-57"></span>: [string=] Error id we want to exclude.</p></li>
<li><p><em>error_number</em> <span class="target" id="index-58"></span>: Alias for number.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">filter</span></code> <span class="target" id="index-59"></span>: [string=] Name for the filter, for documentation purposes.</p></li>
<li><p><em>filter_msg</em> <span class="target" id="index-60"></span>: Alias for filter.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">number</span></code> <span class="target" id="index-61"></span>: [number=0] Error number we want to exclude.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">regex</span></code> <span class="target" id="index-62"></span>: [string=] Regular expression to match the text for the error we want to exclude.</p></li>
<li><p><em>regexp</em> <span class="target" id="index-63"></span>: Alias for regex.</p></li>
</ul>
</li>
</ul>
</li>
<li><p><code class="docutils literal notranslate"><span class="pre">git_diff_strategy</span></code> <span class="target" id="index-64"></span>: [string=worktree] [worktree,stash] When computing a PCB/SCH diff it configures how do we preserve the current
working state. The <em>worktree</em> mechanism creates a separated worktree, that then is just removed.
The <em>stash</em> mechanism uses <em>git stash push/pop</em> to save the current changes. Using <em>worktree</em>
is the preferred mechanism.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">hide_excluded</span></code> <span class="target" id="index-65"></span>: [boolean=false] Default value for the <cite>hide_excluded</cite> option of various PCB outputs.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">impedance_controlled</span></code> <span class="target" id="index-66"></span>: [boolean=false] The PCB needs specific dielectric characteristics.
KiCad 6: you should set this in the Board Setup -&gt; Physical Stackup.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">invalidate_pcb_text_cache</span></code> <span class="target" id="index-67"></span>: [string=auto] [auto,yes,no] Remove any cached text variable in the PCB. This is needed in order to force a text
variables update when using <cite>set_text_variables</cite>. You might want to disable it when applying some
changes to the PCB and create a new copy to send to somebody without changing the cached values.
The <cite>auto</cite> value will remove the cached values only when using <cite>set_text_variables</cite>.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">kiauto_time_out_scale</span></code> <span class="target" id="index-68"></span>: [number=0.0] Time-out multiplier for KiAuto operations.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">kiauto_wait_start</span></code> <span class="target" id="index-69"></span>: [number=0] Time to wait for KiCad in KiAuto operations.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">kicad_dnp_applied</span></code> <span class="target" id="index-70"></span>: [boolean=true] The KiCad v7 PCB flag <em>Do Not Populate</em> is applied to our fitted flag before running any filter.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">kicad_dnp_applies_to_3D</span></code> <span class="target" id="index-71"></span>: [boolean=true] The KiCad v7 PCB flag <em>Do Not Populate</em> is applied to our fitted flag for 3D models,
even when no filter/variant is specified. Disabling <cite>kicad_dnp_applied</cite> also disables
this flag.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">out_dir</span></code> <span class="target" id="index-72"></span>: [string=] Base output dir, same as command line <cite>out-dir</cite>.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">output</span></code> <span class="target" id="index-73"></span>: [string=%f-%i%I%v.%x] Default pattern for output file names. Affected by global options.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">pcb_finish</span></code> <span class="target" id="index-74"></span>: [string=HAL] Finishing used to protect pads. Currently used for documentation and to choose default colors.
KiCad 6: you should set this in the Board Setup -&gt; Board Finish -&gt; Copper Finish option.
Currently known are None, HAL, HASL, HAL SnPb, HAL lead-free, ENIG, ENEPIG, Hard gold, ImAg, Immersion Silver,
Immersion Ag, ImAu, Immersion Gold, Immersion Au, Immersion Tin, Immersion Nickel, OSP and HT_OSP.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">pcb_material</span></code> <span class="target" id="index-75"></span>: [string=FR4] PCB core material. Currently used for documentation and to choose default colors.
Currently known are FR1 to FR5.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">remove_adhesive_for_dnp</span></code> <span class="target" id="index-76"></span>: [boolean=true] When applying filters and variants remove the adhesive (glue) for components that wont be included.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">remove_solder_mask_for_dnp</span></code> <span class="target" id="index-77"></span>: [boolean=false] When applying filters and variants remove the solder mask apertures for components that wont be included.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">remove_solder_paste_for_dnp</span></code> <span class="target" id="index-78"></span>: [boolean=true] When applying filters and variants remove the solder paste for components that wont be included.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">resources_dir</span></code> <span class="target" id="index-79"></span>: [string=kibot_resources] Directory where various resources are stored. Currently we support colors and fonts.
They must be stored in sub-dirs. I.e. kibot_resources/fonts/MyFont.ttf
Note this is mainly useful for CI/CD, so you can store fonts and colors in your repo.
Also note that the fonts are installed using a mechanism known to work on Debian,
which is used by the KiBot docker images, on other OSs <em>your mileage may vary</em>.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">restore_project</span></code> <span class="target" id="index-80"></span>: [boolean=false] Restore the KiCad project after execution.
Note that this option will undo operations like <cite>set_text_variables</cite>.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">set_text_variables_before_output</span></code> <span class="target" id="index-81"></span>: [boolean=false] Run the <cite>set_text_variables</cite> preflight before running each output that involves variants.
This can be used when a text variable uses the variant and you want to create more than
one variant in the same run. Note that this could be slow because it forces a board
reload each time you run an output that uses variants.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">silk_screen_color</span></code> <span class="target" id="index-82"></span>: [string=white] Color for the markings. Currently used for documentation and to choose default colors.
KiCad 6: you should set this in the Board Setup -&gt; Physical Stackup.
Currently known are black and white.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">silk_screen_color_bottom</span></code> <span class="target" id="index-83"></span>: [string=] Color for the bottom silk screen. When not defined <cite>silk_screen_color</cite> is used.
Read <cite>silk_screen_color</cite> help.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">silk_screen_color_top</span></code> <span class="target" id="index-84"></span>: [string=] Color for the top silk screen. When not defined <cite>silk_screen_color</cite> is used.
Read <cite>silk_screen_color</cite> help.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">solder_mask_color</span></code> <span class="target" id="index-85"></span>: [string=green] Color for the solder mask. Currently used for documentation and to choose default colors.
KiCad 6: you should set this in the Board Setup -&gt; Physical Stackup.
Currently known are green, black, white, yellow, purple, blue and red.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">solder_mask_color_bottom</span></code> <span class="target" id="index-86"></span>: [string=] Color for the bottom solder mask. When not defined <cite>solder_mask_color</cite> is used.
Read <cite>solder_mask_color</cite> help.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">solder_mask_color_top</span></code> <span class="target" id="index-87"></span>: [string=] Color for the top solder mask. When not defined <cite>solder_mask_color</cite> is used.
Read <cite>solder_mask_color</cite> help.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">time_format</span></code> <span class="target" id="index-88"></span>: [string=%H-%M-%S] Format used for the time we started the script. Uses the <cite>strftime</cite> format.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">time_reformat</span></code> <span class="target" id="index-89"></span>: [boolean=true] Tries to reformat the PCB/SCH date using the <cite>date_format</cite>.
This assumes you let KiCad fill this value and hence the time is in ISO format (YY-MM-DD).</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">units</span></code> <span class="target" id="index-90"></span>: [string=] [millimeters,inches,mils] Default units. Affects <cite>position</cite>, <cite>bom</cite> and <cite>panelize</cite> outputs.
Also KiCad 6 dimensions.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">use_dir_for_preflights</span></code> <span class="target" id="index-91"></span>: [boolean=true] Use the global <cite>dir</cite> as subdir for the preflights.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">use_os_env_for_expand</span></code> <span class="target" id="index-92"></span>: [boolean=true] In addition to KiCad text variables also use the OS environment variables when expanding ${VARIABLE}.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">variant</span></code> <span class="target" id="index-93"></span>: [string=] Default variant to apply to all outputs.</p></li>
</ul>
</li>
</ul>
</li>
</ul>
</section>
</section>
</div>
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="preflight.html" class="btn btn-neutral float-left" title="The preflight section" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="filters.html" class="btn btn-neutral float-right" title="Filters and variants" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>
<hr/>
<div role="contentinfo">
<p>&#169; Copyright 2018-2023, Salvador E. Tropea/INTI/John Beard.</p>
</div>
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>