Pcbnew
Pcbnew
Pcbnew
This manual is in the process of being revised to cover the latest stable release version of
KiCad. It contains some sections that have not yet been completed. We ask for your
NOTE
patience while our volunteer technical writers work on this task, and we welcome new
contributors who would like to help make KiCad’s documentation better than ever.
Copyright
This document is Copyright © 2010-2024 by its contributors as listed below. You may distribute it and/or
modify it under the terms of either the GNU General Public License (http://www.gnu.org/licenses/gpl.html),
version 3 or later, or the Creative Commons Attribution License
(http://creativecommons.org/licenses/by/3.0/), version 3.0 or later.
Contributors
Jean-Pierre Charras, Fabrizio Tappero, Wayne Stambaugh, Cirilo Bernardo, Jon Evans, Graham Keeth
Feedback
The KiCad project welcomes feedback, bug reports, and suggestions related to the software or its
documentation. For more information on how to submit feedback or report an issue, please see the
instructions at https://www.kicad.org/help/report-an-issue/
1
Introduction to the KiCad PCB Editor
Initial configuration
When the PCB Editor is run for the first time, if the global footprint table file fp-lib-table is not found in
the KiCad configuration folder then the KiCad will ask how to create this file:
The first option is recommended (Copy default global footprint library table (recommended)). The
default footprint library table includes all of the standard footprint libraries that are installed as part of
KiCad.
If this option is disabled, KiCad was unable to find the default global footprint library table. This probably
means you did not install the standard footprint libraries with KiCad, or they are not installed where KiCad
expects to find them. On some systems the KiCad libraries are installed as a separate package.
If you have installed the standard KiCad footprint libraries and want to use them, but the first option is
disabled, select the second option and browse to the fp-lib-table file in the directory where the KiCad
libraries were installed.
If you already have a custom footprint library table that you would like to use, select the second option
and browse to your fp-lib-table file.
If you want to construct a new footprint library table from scratch, select the third option.
2
The PCB Editor user interface
The main PCB Editor user interface is shown above, with some key elements indicated:
5. Appearance panel
By default, dragging with the middle or right mouse button will pan the canvas view and scrolling the mouse
wheel will zoom the view in or out. You can change this behavior in the Mouse and Touchpad section of the
preferences (see Configuration and Customization for details).
3
allows you to draw a box to determine the zoomed area.
The cursor’s current position is displayed at the bottom of the window (X and Y), along with the current
zoom factor (Z), the cursor’s relative position (dx, dy, and dist), the grid setting, and the display units.
The relative coordinates can be reset to zero by pressing Space . This is useful for measuring distance
between two points or aligning objects.
Hotkeys
The Ctrl + F1 shortcut displays the current hotkey list. The default hotkey list is included in the Actions
Reference section of the manual.
The hotkeys described in this manual use the key labels that appear on a standard PC keyboard. On an Apple
keyboard layout, use the Cmd key in place of Ctrl , and the Option key in place of Alt .
Many actions do not have hotkeys assigned by default, but hotkeys can be assigned or redefined using the
hotkey editor (Preferences → Preferences…→ Hotkeys).
Many of the actions available through hotkeys are also available in context menus. To
NOTE access the context menu, right-click in the editing canvas. Different actions will be
available depending on what is selected or what tool is active.
Hotkeys are stored in the file user.hotkeys in KiCad’s configuration directory. The location is platform-
specific:
Windows: %APPDATA%\kicad\8.0\user.hotkeys
Linux: ~/.config/kicad/8.0/user.hotkeys
macOS: ~/Library/Preferences/kicad/8.0/user.hotkeys
KiCad can import hotkey settings from a user.hotkeys file using the Import Hotkeys button in the hotkey
editor.
4
Display and selection controls
Board layers
Layers in the PCB Editor represent physical copper layers on a board, as well as graphical layers used for
defining things such as silkscreen, solder mask, and the board edge. There is always one layer that is active in
the editor. The active layer is drawn on top of other layers and will be the layer assigned to newly-created
objects. The active layer is indicated in the layer selector drop-down box in the top toolbar and is also
highlighted in the appearance panel. To change the active layer, you can left-click a layer name in the
appearance panel, use the drop-down layer selector in the top toolbar, or use a hotkey. Layers can be hidden
to simplify the board view. You can hide a layer even if it is the active layer.
NOTE Selected objects are always drawn on top, even if they are not on the active layer.
Layer controls
In the Layers tab of the appearance panel, each board layer is shown with its color and visibility state. The
active layer is shown highlighted with an arrow indicator to the left of the color swatch. Left-click on a layer
to choose it as the active layer. Left-click on the corresponding visibility icon to toggle the layer between
visible and hidden. Double-click or middle-click on the color swatch to change the layer’s color.
You must first create a custom color theme in Preferences before you can change layer
NOTE
colors in the appearance panel.
Below the list of layers is an expandable panel that contains layer display options. The first setting controls
how non-active layers are displayed: normal, dimmed, or hidden. The layer display mode can be used to
simplify the view and focus on a single layer. Items on inactive layers cannot be selected when the non-
active layer display mode is "Dim" or "Hide". You can use the hotkey Ctrl + H to cycle through these display
modes quickly.
Flip board view will show the board as if you are looking from the bottom (that is, mirrored around the Y-
axis). This option is also available in the View menu.
5
Flipping the board view does not change the visual layer ordering, the active layer will
NOTE
remain in front followed by the other layers in their normal order.
Object controls
The Objects tab of the appearance panel is similar to the Layers tab. The main differences are that some
objects have no color setting and that four types of objects (tracks, vias, pads, and zones) have opacity
control sliders. The opacity setting here will be multiplied with any opacity set in the layer colors. By default,
all objects are fully opaque except for zones, which are set to translucent in order to make it easier to see
objects through filled zone areas.
Layer presets
Layer presets store which layers and objects are visible and hidden for easy recall. There are several built-in
layer presets and you can save your own custom presets. Custom presets are stored in the project settings
for a board, as presets may be specific to a certain board stackup.
To load a preset, choose it from the Presets drop-down menu at the bottom of the appearance panel or use
the quick switcher by holding down Ctrl and pressing Tab . Once the quick switcher window appears, you
can press Tab and Shift + Tab to cycle through the available presets. When you let go of the Ctrl key, the
highlighted preset will be loaded.
To save a custom preset, first use the visibility controls to choose which layers you want visible, then choose
Save preset…from the Presets drop-down menu. Give your preset a name and it will now be available via
the drop-down menu and the quick switcher. To modify a custom preset, follow the same process and save
the modified version with the same name to overwrite the existing version. To delete a custom preset,
choose the Delete preset… option from the drop-down menu and select the preset to be deleted from the
list.
Viewports
Viewports store the current view location and zoom level so you can quickly switch back to it later, or
switch between several saved views.
To load a viewport, choose it from the Viewports drop-down menu at the bottom of the appearance panel or
use the quick switcher by holding down Shift and pressing Tab . Once the quick switcher window appears,
you can press Tab to cycle through the stored viewports. When you let go of the Shift key, the highlighted
viewport will be loaded.
To save a new viewport, scroll and zoom to show the desired area of the board, then choose Save
viewport… from the Viewports drop-down menu. Give your viewport a name and it will now be available
via the drop-down menu and the quick switcher. To modify an existing viewport, save a new viewport with
the same name to overwrite the existing version. To delete a viewport, choose the Delete viewport… option
from the drop-down menu and select the preset to be deleted from the list.
6
Each net and net class can also have a color assigned. By default, this color applies to the ratsnest lines for
the net (or for all the nets in the net class). Nets have no color by default; this is indicated by a checkerboard
pattern in the color swatch. Double-click or right-click a net or net class color swatch to set the color.
The Default net class cannot have a color assigned, as nets in this class will just use the
NOTE
default ratsnest color defined by the color theme.
You can also select and highlight nets and net classes via the appearance panel: right-click on a net or net
class to show these options in a menu.
Below the list of net classes is an expandable panel that contains net display options. The first option
controls how net colors are applied. When "All" is selected, all copper items (pads, tracks, vias, and zones)
belonging to a net or net class will take on the chosen color. When "Ratsnest" is selected (the default value),
only the ratsnest is affected by net and net class colors. When "None" is selected, net and net class colors are
ignored.
The second option controls how ratsnest lines are drawn. "All layers" means that ratsnest lines will be drawn
between all unconnected items. "Visible layers" means that no ratsnest lines will be drawn to items that are
on hidden layers, even when those items are unconnected.
You can configure the thickness of ratsnest lines in the PCB Editor Editing Options section
NOTE
of the Preferences dialog, to make the ratsnest more or less visible.
The selection action can be modified by holding modifier keys while clicking or dragging. The following
modifier keys apply when clicking to select single items:
Ctrl + Shift Ctrl + Shift Cmd + Shift Remove the item from the existing
selection.
long click long click or Alt long click or Clarify selection from a pop-up menu.
Option
The following modifier keys apply when dragging to perform a box selection:
7
Modifier Keys Modifier Keys Modifier Keys Selection Effect
(Windows) (Linux) (macOS)
Ctrl + Shift Ctrl + Shift Cmd + Shift Remove item(s) from the existing
selection.
The selection filter panel in the lower right corner of the PCB Editor window controls which types of objects
can be selected with the mouse. Turning off selection of unwanted object types makes it easier to select
items in a dense board. The "All items" checkbox is a shortcut to turn the other items on and off. The "Locked
items" checkbox is independent of the rest, and controls whether or not items that have been locked can be
selected. You can right-click any object type in the selection filter to quickly change the filter to only allow
selecting that type of object.
When a connected copper item is selected, you can expand the selection to other copper items of the same
net using the Expand Selection command in the right-click context menu or with the hotkey U . The first
time you run this command, the selection will be expanded to the nearest pad. The second time, the selection
will be expanded to all connected items on all layers.
Selecting an object displays information about the object in the message panel at the bottom of the window.
Double-clicking an object opens a window to edit the object’s properties.
Pressing Esc will always cancel the current tool or operation and return to the selection tool. Pressing Esc
while the selection tool is active will clear the current selection.
Net highlighting
An electrical net (or set of nets) can be highlighted in the PCB editor to visualize how the net is routed across
the PCB. Net highlighting can be activated by selecting the net to highlight in the PCB editor or by selecting
the corresponding net in the schematic editor when cross-probe highlighting is enabled (see below). When
net highlighting is active, the highlighted net or nets will be shown in a brighter color and all other items will
be shown in a dimmer color than normal.
There are three ways to select a net or nets to highlight in the PCB editor: by using the hotkey ` after
selecting a copper object, by using the context menu of any copper object, and by using the context menu of
the Nets tab of the Appearance panel. When you press the Highlight Net hotkey, the nets of any selected
copper items will be highlighted. If no copper items are selected, the net of the copper item under the editor
cursor will be highlighted.
Net highlighting can be cleared by using the Clear Net Highlight action (hotkey ~ ) or by using the Highlight
net tool on an empty region in the schematic. By default, Esc also clears net highlighting, but this can be
disabled if desired in Preferences → PCB Editor → Editing Options.
When a net or nets have been selected for highlighting, the Toggle Net Highlighting action becomes enabled
on the left toolbar (also accessible by hotkey, Ctrl + ` ). This action will turn the highlighting display on or
off without choosing a new net to highlight.
8
Cross-probing from the schematic
KiCad allows bi-directional cross-probing between the schematic and the PCB. There are several different
types of cross-probing.
Selection cross-probing allows you to select a symbol or pin in the schematic to select the corresponding
footprint or pad in the PCB (if one exists) and vice-versa. By default, cross-probing will result in the display
centering on the cross-probed item and zooming to fit. You can disable the centering and zooming behavior,
or disable selection cross-probing entirely, in the Display Options section of the Preferences dialog. Even
when selection cross-probing is disabled, you can manually cross-probe from the schematic to the PCB by
right-clicking an object and selecting Select on PCB, or from the PCB to the schematic by right-clicking an
object and choosing Select → Select on Schematic.
Highlight cross-probing allows you to highlight a net in the schematic and PCB at the same time. If the
option "Highlight cross-probed nets" is enabled in the Display Options section of the Preferences dialog,
highlighting a net or bus in the schematic editor will cause the corresponding net or nets to be highlighted in
the PCB editor.
9
Turns grid display on/off.
Note: by default, hiding the grid does not disable grid snapping. This behavior can be changed in the
Display Options section of Preferences.
Switch between polar and Cartesian coordinate display in the status bar.
Switches between free angle and 45 degree mode for placement of new tracks, zones, graphical
shapes, dimensions, and other objects. You can also toggle between free angle and 45 degree mode
using Shift + Space .
Switches the non-active layer display mode between Normal and Dim.
Note: this button will be highlighted when the non-active layer display mode is either Dim or Hide.
In both cases, pressing the button will change the layer display mode to Normal. The Hide mode can
only be accessed via the controls in the Appearance Panel or via the hotkey Ctrl + H .
When a net has been selected for highlighting, switches the highlighting on or off.
Note: this button will be disabled when no net has been highlighted. To highlight a net, use the
hotkey ` , right-click any copper object in the net and choose Highlight Net from the Net Tools
menu, or right-click the net in the list in the Nets tab of the Appearance panel.
Shows or hides the Appearance and Selection Filter panels on the right side of the editor.
Shows or hides the Properties Manager panel on the left side of the editor.
10
Creating a PCB
Basic PCB concepts
A printed circuit board in KiCad is generally made up of footprints representing electronic components and
their pads, nets defining how those pads connect to each other, tracks, vias, and filled zones that form the
copper connections between pads in each net, and various graphic shapes defining the board edge,
silkscreen markings, and any other desired information.
KiCad normally keeps the information about nets on a PCB synchronized with an associated schematic, but
nets can also be created and edited directly within the PCB editor.
Capabilities
KiCad is capable of creating printed circuit boards with up to 32 copper layers, 14 technical layers (silkscreen,
solder mask, component adhesive, solder paste, etc), and 13 general-purpose drawing layers.
The internal measurement resolution of all objects in KiCad is 1 nanometer, and measurements are stored as
32-bit integers. This means it is possible to create boards up to approximately 4 meters by 4 meters.
Update PCB from Schematic is the preferred way to transfer design information from the
schematic to the PCB. In older versions of KiCad, the equivalent process was to export a
NOTE
netlist from the Schematic Editor and import it into the Board Editor. It is no longer
necessary to use a netlist file.
11
For more information about the Update Schematic from PCB tool, see the forward annotation section of the
manual.
Board setup
Before beginning your board design, use the Board Setup dialog to configure the basic parameters of the
board. To open Board Setup, click the icon in the top toolbar or choose "Board Setup…" from the File
menu.
12
soldermask, and silkscreen layers can have colors assigned to them, which affects the board’s appearance in
the 3D viewer.
Set the number of copper layers in the upper left corner and then enter the physical parameters of the
stackup if desired. These parameters may be left at their default values, but note that the board thickness
value will be used when exporting a 3D model of the board, and layer thicknesses will be included in net
length calculations for any nets that include vias. If you plan to use these features, it is a good idea to ensure
that the stackup thickness is correct.
KiCad currently only supports stackups with an even number of copper layers. To create
NOTE designs with an odd number of layers (for example, flexible printed circuits or metal-core
printed circuits), simply choose the next highest even number and ignore the extra layer.
Next, if desired, use the Board Editor Layers section to rename layers or hide non-copper layers that you will
not be using in the design. For example, if you will not use a back silkscreen on the design, uncheck the box
next to the B.Silkscreen layer.
13
Copper layers can be designated as signal, power plane, mixed, or jumper in the Board
Editor Layers section. This designation is intended as a guide for the user only. Tracks and
NOTE
zones can be routed on any copper layer, no matter what the type is configured to in this
dialog.
Some additional board stackup settings are found on the Board Finish and Solder Mask/Paste sections of the
Board Setup dialog. The Board Finish section has settings for defining the copper finish and special features
such as castellations or edge plating. Note that these settings only impact the board attributes output as part
of Gerber job files at this time.
The Solder Mask/Paste section allow global adjustment of the clearance (positive or negative) between the
copper shapes and solder mask / solder paste shapes of pads on the board. These values will be added to any
clearance overrides set on individual footprints or pads. Positive clearance values will result in the shape of
the solder mask or paste opening being larger than the copper shape. Negative clearance values will result in
the opening being smaller than the copper shape.
Most commercial PCB fabricators expect these values to be zero and make their own
adjustments to solder mask and paste openings as part of their CAM process. It is usually
WARNING
best to leave these values at their default of zero unless you are making the PCB yourself
or have specific advice from your fabricator to use different values.
14
Line thickness, text size, and text appearance can be configured for the six different categories of layers
shown in the dialog. Additionally, the properties for dimension objects can be configured for all layers. For
more details about dimension properties, see the Dimensions section below.
Dashed line appearance is controlled in the Formatting section. Dash length controls the length of dashes,
while Gap length controls the spacing between dashes and dots. The dash and gap lengths are relative to the
line width: a gap length of 2 means twice the width of the line.
Text replacement variables can be created in the Text Variables section. These variables allow you to
substitute the variable name for any text string. This substitution happens anywhere the variable name is
used inside the variable replacement syntax of ${VARIABLENAME} .
For example, you could create a variable named VERSION and set the text substitution to 1.0 . Now, in any
text object on the PCB, you can enter ${VERSION} and KiCad will substitute 1.0 . If you change the
substitution to 2.0 , every text object that includes ${VERSION} will be updated automatically. You can also
mix regular text and variables. For example, you can create a text object with the text Version: ${VERSION}
which will be substituted as Version: 1.0 .
Text variables can also be created in Schematic Setup. Text variables are project-wide; variables created in
the schematic editor are also available in the board editor, and vice versa.
15
Constraints
Basic design rules are configured in the Constraints section of the Board Setup dialog. Constraints in this
section apply to the entire board and should be set to the values recommended by your board manufacturer.
Any minimum value set here is an absolute minimum and cannot be overridden with a more specific design
rule. For example, if you need the copper clearance on part of a board to be 0.2mm and in the rest 0.3mm,
you must enter 0.2mm for the minimum copper clearance in the Constraints section and use a netclass or
custom rule to set the larger 0.3mm clearance.
16
Setting Description
Arc/circle approximated In some situations, KiCad must use a series of straight line segments to
by segments approximate round shapes such as those of arcs and circles. This setting
controls the maximum error allowed by this approximation: in other words,
the maximum distance between a point on one of these line segments and the
true shape of the arc or circle. Setting this to a lower number than the default
value of 0.005mm will result in smoother shapes, but can be very slow on
larger boards. The default value typically results in arc approximation error
that is not detectable in the manufactured board due to manufacturing
tolerances.
Allow fillets outside Zones can have fillets (rounded corners) added in the Zone Properties dialog.
zone outline By default, no zone copper, including fillets, is allowed outside the zone
outline. This effectively means that inside corners of the zone outline will not
be filleted even when a fillet is configured. By enabling this setting, inside
corners of the zone outline will be filleted even though this results in copper
from the zone extending outside the zone outline.
Minimum thermal relief This sets the minimum acceptable number of thermal relief spokes connecting
spoke count a pad to a zone. A DRC violation will be generated if this constraint is violated.
Include stackup height By default, the length tuner uses the height of the stackup to calculate the
in track length additional length of a track that travels through vias from one layer to
calculations another. This calculation relies on the board stackup height being correctly
configured. In some situations, it is preferable to ignore the height of vias and
just calculate the track length assuming that vias add no length. Disabling this
setting will exclude via length from length tuner track length calculations.
Pre-defined Sizes
The pre-defined sizes section allows you to define the track and via dimensions you want to have available
while routing tracks. Net classes can be used to define the default dimensions for tracks and vias in different
nets (see below) but defining a list of sizes in this section will allow you to step through these sizes while
routing. For example, you may want the default track width on a board to be 0.2 mm, but use 0.3 mm for
some sections that carry more current, and 0.15 mm for some sections where space is limited. You can define
each of these track widths in the Board Setup dialog and then switch between them when routing traces.
17
Teardrops
The teardrops section lets you set default parameters for various types of teardrops. There are different
settings for teardrop connections to round objects, rectangular objects, and teardrop connections between
tracks. The default teardrop parameters can be overridden when teardrops are added, and also changed in
the properties for individual connected items. See the teardrops documentation for more information.
18
Length-tuning patterns
The length-tuning patterns section lets you set default parameters for each type of length-tuning pattern
(single-track length, differential-pair length, and differential-pair skew). These defaults can be overridden in
the properties of each tuning pattern added to the board. See the length tuning documentation for more
ifnormation.
Net Classes
The Net Classes section allows you to configure routing and clearance rules for different classes of nets. In
KiCad, each net is part of exactly one net class. If you do not add a net to a specific class, it will be part of the
Default class, which always exists. Net classes may be created and edited in either the Schematic or Board
Setup dialogs.
19
The upper portion of the Net Classes section contains a table showing the net classes in the design and the
design rules that apply to each net class. Every class has values for copper clearance, track width, via sizes,
and differential pair sizes. These values will be used when creating tracks and vias unless a more specific
rule overrides them (see Custom Rules below).
No rule may override the minimum values set in the Constraints section of Board Setup.
NOTE For example, if you set a net class clearance to 0.1 mm , but the Minimum Clearance in the
Constraints section is set to 0.2 mm , nets in that class will have a clearance of 0.2 mm .
The track widths and via sizes defined for each net class are used when the track width and via size controls
are set to "use netclass values" in the PCB editor. These widths and sizes are considered the default, or
optimal, sizes for that netclass. They are not minimum or maximum values. Manually changing the track
width or via size to a different value from that defined in the Net Classes section will not result in a DRC
violation. To restrict track width or via size to specific values, use Custom Rules.
The lower portion of the Net Classes section lists pattern-based netclass assignments. Working with pattern-
based netclass assignments is explained in the Schematic Editor documentation; pattern-based assignments
can be edited in either the Board or Schematic Setup windows.
Note that pattern-based assignments can be created directly from the PCB editing canvas by right clicking a
copper track or zone and clicking Assign netclass…. Netclasses can also be assigned in the schematic using
netclass directives or labels instead of pattern-based assignments.
Custom Rules
The Custom Rules section contains a text editor for creating design rules using the custom rules language.
Custom rules are used to create specific design rule checks that are not covered by the basic constraints or
net class settings.
Custom rules will only be applied if there are no errors in the custom rules definitions. Use the Check Rule
Syntax button to test the definitions and fix any problems before closing Board Setup.
See Custom Design Rules in the Advanced Topics chapter for more information on the custom rules language
as well as example rules.
20
Violation Severity
The Violation Severity section allows you to configure the severity of each type of design rule check. Each
rule may be set to create an error marker, a warning marker, or no marker (ignored).
Individual rule violations may be ignored in the Design Rule Checker. Setting a rule to
NOTE Ignore in the Violation Severity section will completely disable the corresponding design
rule check. Use this setting with caution.
Importing settings
You can import part or all of the board setup from an existing board. This technique can be used to create a
"template" board that has the settings you want to use on multiple designs, and then importing these
settings from the template board into each new board rather than entering them manually.
21
To import settings, click the Import Settings from Another Board…button at the bottom of the Board Setup
dialog and then choose the kicad_pcb file you want to import from. Select which settings you want to
import and the current settings will be overwritten with the values from the chosen board.
22
Editing a board
Placement and drawing operations
Placement and drawing tools are located in the right toolbar. When a tool is activated, it stays active until a
different tool is selected or the tool is canceled with the Esc key. The selection tool is always activated
when any other tool is canceled.
Some toolbar buttons have more than one tool available in a palette. These tools are indicated with a small
To show the palette, you can click and hold the mouse button on the tool or click and drag the mouse. The
palette will show the most recently used tool when it is closed.
Local ratsnest tool: when the board ratsnest is hidden, selecting footprints with this tool will show
the ratsnest for the selected footprint only. Selecting the same footprint again will hide its ratsnest.
The local ratsnest setting for each footprint will remain in effect even after the local ratsnest tool is
no longer active.
Footprint placement tool: click on the board to open the footprint chooser, then click again after
choosing a footprint to confirm its location.
Route tracks / route differential pairs: These tools activate the interactive router and allow placing
tracks and vias. The interactive router is described in more detail in the Routing Tracks section
below.
Tune length: These tools allow you to tune the length of single tracks or the length or skew of
differential pairs, after they have been routed. See the Routing Tracks section for details.
Vias placed on top of tracks using this tool will take on the net of the closest track segment and will
become part of that track (the via net will be updated if the pads connected to the tracks are
updated).
Vias placed anywhere else will take on the net of a copper zone at that location, if one exists. These
vias will not automatically take on a new net if the net of the copper zone is changed.
Add filled zone: Click to set the start point of a zone, then configure its properties before drawing
the rest of the zone outline. Zone properties are described in more detail below.
Add rule area: Rule areas, formerly known as keepouts, can restrict the placement of items and the
filling of zones and can also define named areas to apply specific custom design rules to.
Draw lines.
Note: Lines are graphical objects and are not the same as tracks placed with the Route Tracks tool.
Graphical objects cannot be assigned to a net.
23
Draw arcs: pick the center point of the arc, then the start and end points. By right clicking this
button, you can change the arc editing mode between a mode that maintains the existing arc center
and a mode that maintains the arc radius.
Note: Filled graphical polygons are not the same as filled zones: graphical polygons cannot be
assigned to a net and will not keep clearance from other items.
Add text.
Add a textbox.
24
Tools only snap to objects on visible layers. You can reduce unwanted snapping points by hiding unneeded
layers or using the single-layer view mode. Additionally, you can toggle between snapping to objects on all
layers or only snapping to objects on the current layer by pressing Shift + S .
Snapping to different types of objects (pads, tracks, and graphics) can be configured in the Editing Options
section of the PCB Editor preferences.
You can adjust the grid size using the grid dropdown in the top toolbar or by right-clicking and selecting a
new grid from the list in the Grid submenu. Pressing the n or N hotkeys will cycle to the next and
previous grid in the list, respectively.
You can also select a new grid or edit the available grids in the Grids pane of the preferences dialog. As a
shortcut to reach this dialog, right click the button on the left toolbar and select Edit Grids….
In this dialog you can select an active grid from the list of grids, reorder the list of grids, and add or remove
grids. Grids defined in this dialog can have unequal X and Y spacing as well as an optional name.
This dialog also lets you designate two grids from the list as "Fast Grids", which can be quickly selected using
Alt + 1 and Alt + 2 .
Finally, you can configure grid overrides for different types of objects. Grid overrides let you set particular
grid sizes for different types of objects which will be used instead of the default grid when working with
those objects. For example, you can set a 100 mil grid for footprints and pads while using smaller grids to
finely position tracks, vias, and text. Grid overrides can be individually enabled and disabled in this dialog,
or globally enabled and disabled using the button on the left toolbar ( Ctrl + Shift + G ).
To change the origin (zero point) of the grid, use Place → Grid Origin and click to place the origin in the
canvas. This function is also available with the button in the right toolbar. Alternatively, you can enter
explicit coordinates for the grid origin with Edit → Grid Origin….
25
The visual appearance of the grid can also be customized in several ways. You can change the thickness of
the grid markings, switch their shape (dots, lines, or crosses), and set the minimum displayed spacing in the
Display Options page of the preferences dialog, and you can change the grid color in the Colors page of the
preferences dialog.
The grid can be shown or hidden using the button on the left-hand toolbar. By default the grid is still
active even if it is hidden, but this is configurable in the Display Options preferences page. There you can set
the grid to be disabled when it is hidden or even disable the grid entirely.
You can also view and edit item properties using the properties manager. The properties manager is a
docked panel that displays the properties of the selected item or items for editing. If multiple types of items
are selected at once, the properties panel displays only the properties shared by all of the selected item
types.
26
Editing a property in the properties manager immediately applies the change. When multiple items are
selected, property modifications are applied to each selected item individually, not to the whole selection as
a group. For example, when changing the orientation of multiple items, each item is individually rotated
around its own origin, not the group’s origin.
Show the properties manager with View → Show Properties Manager or the button on the left toolbar.
Several tools are available for editing properties of specific types of objects in bulk. For text and graphical
items, you can use the Edit Text and Graphics Properties tool. Tracks and vias can be bulk-edited using the
Edit Track and Via Properties tool. Teardrop properties can be edited with the Edit Teardrops tool.
In properties dialogs and many other dialogs, any field that contains a numeric value can also accept a basic
math expression that results in a numeric value.
For example, a dimension may be entered as 2 * 2mm , resulting in a value of 4mm . Basic arithmetic
operators as well as parentheses for defining order of operations are supported.
27
Working with footprints
Adding footprints to the board
Footprints are automatically added to the board when the PCB is updated from the schematic. The footprint
associated with each schematic symbol is added to the board if it is not already present, and each footprint
pad is associated with the corresponding symbol pin’s net. Symbol pins are matched to footprint pads by
pin/pad number.
When footprints are added to the board after an update from the schematic, they are grouped by schematic
sheet and by geographical location in the schematic. They are initially attached to the cursor; you can place
them by clicking in the desired location.
You can also add footprints to the board manually using the Add Footprint tool ( A or the button). Note
that footprints added in this way will not be automatically associated with a symbol or have nets assigned to
their pads, and subsequent updates from the schematic will remove these unassociated footprints unless the
footprint is locked or the Delete footprints with no symbols option is unchecked in the Update PCB From
Schematic dialog. For these reasons, it is usually recommended to avoid manually adding footprints to the
board. Manually adding footprints is necessary for PCB-only workflows, and can also be useful for adding
logos or other footprints that do not need a corresponding schematic symbol.
The Move command ( M ) moves a footprint or a selection of footprints, ignoring any connected track
segments that are not selected. No DRC checking is done when moving footprints with the Move command.
There is a reference point for the move operation, which is the point in the footprint which attaches to the
cursor and therefore the point in the footprint that snaps to the grid and to other objects. The reference
point during a move is determined by the location of the cursor when the Move command is initiated. If the
cursor is over a pad, the pad’s center will be used as the reference point. If the cursor is not over a pad, the
footprint’s anchor (coordinate origin point) will be used. To select an arbitrary snapping point, you can use
the Move With Reference command instead of the regular Move command (right click → Positioning Tools
→ Move with Reference). After initiating the command, click on the desired reference point; KiCad will then
begin the move with that point as the reference.
You can also use the Drag command ( D ) to move the selected footprint using the interactive router,
maintaining all track connections to the footprint. Dragging footprints behaves like the Highlight Collisions
router mode: obstacles will not be avoided or shoved, only highlighted. Only one footprint at a time can be
dragged.
Flip a footprint to the opposite side of the board with the F hotkey. Any parts of the footprint on a front
layer will be swapped to the corresponding back layer, and vice versa.
Rotate a footprint counter-clockwise using the R hotkey, or clockwise using Shift + R . By default,
footprints are rotated by 90 degrees every time the rotate command is used, but you can configure the
rotation angle step in Preferences → PCB Editor → Editing Options.
You can directly set a footprint’s exact absolute position, rotation angle, and PCB side using either the
Footprint Properties dialog or the Properties panel.
28
To reposition a footprint relative to its current position, use the Move Exactly tool ( Shift + M ). The dialog
lets you specify an X and Y translation, as well as a rotation, that will be applied to the footprint. The
rotation can be performed relative to either the footprint’s anchor, the local coordinate origin, or the
drill/place origin. You can also use polar coordinates instead of Cartesian coordinates.
To position a footprint relative to another object, you can use the Position Relative tool ( Shift + P ). With
this tool, you select a reference point for the move, which can be the local origin, the grid origin, or another
arbitrary point, such as a pad in another footprint. The selected footprint is moved to the specified offset
from the reference point.
You can swap the position of two selected footprints using the Swap command ( S ). The first footprint is
assigned the location, rotation, and board side of the second footprint, and vice versa. If there are more than
two footprints selected, the locations are cycled: the last footprint gets the position of the first footprint, the
first footprint gets the location of the second, and so on.
There are several convenience features that make it easier to find, select, and move specific footprints or
footprints related to another footprint.
The Get and Move Footprint command ( T ) prompts you to choose a footprint from a list or by typing a
reference designator. KiCad then attaches the chosen footprint to your cursor for a move operation.
There are two commands to select other footprints that need to be connected to the selected footprint but
don’t yet have routed connections. The Select All Unconnected Footprints command ( O ) selects all
footprints that have ratsnest lines to the currently selected footprints. The command can be executed
29
repeatedly to further expand the selection based on the newly selected items. The Grab Nearest
Unconnected Footprint command ( Shift + O ) selects the closest footprint with ratsnest lines to the
currently selected footprint, and additionally begins to move it. If there are multiple footprints initially
selected, the command will act like the Move Individually command described below, individually moving
the closest unconnected footprint for each of the initially selected footprints.
You can select footprints based on their schematic sheet using the right click → Select → Items in Same
Hierarchical Sheet command, which selects all other footprints that are in the same schematic sheet as the
originally selected footprint.
If you want to move multiple selected footprints in sequence, use the Move Individually command ( Ctrl +
M ). After triggering the command, KiCad will begin moving the first selected footprint. After you click to
place the footprint, KiCad will immediately start moving the next footprint, in the same order that you
selected the footprints. You can skip moving a footprint by pressing Tab , commit the current move and skip
any remaining moves by double-clicking, or cancel all moves (including those already completed) by
pressing Esc .
If you want to move a collection of footprints at once into one area, the Pack and Move Footprints command
( P ) closely packs the selected footprints together and moves them as a block.
Move Individually and Pack and Move Footprints are useful in combination with other
selection convenience features, such as cross-selection from the schematic or the
advanced footprint selection features described above. For example, you could select a
group of bypass capacitors in the Schematic Editor, switch to the PCB Editor where the
TIP corresponding footprints are now selected, and then use Move Individually to quickly
place all of the bypass capacitor footprints close to their respective ICs. Alternatively, you
could use one of the other selection tools, such as Select All Unconnected Footprints, to
select many footprints from all over the board, then use Pack and Move Footprints to
quickly put them all into a small area.
Finally, KiCad can automatically place footprints onto the board. The auto-place function attempts to
optimally place footprints to simplify ratsnest connections to other footprints. You can auto-place the
selected footprints with Place → Auto-Place Footprints → Place Selected Footprints, or auto-place all
footprints outside of the board outline with Place → Auto-Place Footprints → Place Off-Board Footprints.
Footprint Properties
This section of the KiCad documentation has not yet been written. We appreciate your
NOTE patience as our small team of volunteer documentation writers work to update and
expand the documentation.
Editing Footprints
This section of the KiCad documentation has not yet been written. We appreciate your
NOTE patience as our small team of volunteer documentation writers work to update and
expand the documentation.
30
instance of the footprint on the board, if the footprint design in the library is not appropriate. For example,
you may wish to remove the solder paste aperture for a pad that needs to remain unsoldered in a specific
design, or you may wish to move the location of a through-hole pad for an axial-lead resistor in order to fit a
specific design.
By default, the position of all footprint pads are locked, so it is possible to edit the pad
properties but not move the pad’s location relative to the rest of the footprint. Pads may
NOTE be unlocked to allow free movement, which can be useful for certain applications (such as
through-hole footprints with varying lead positions) but is generally never recommended
for surface-mount footprints.
The pad properties dialog is opened through the context menu or default hotkey E when a pad is selected.
Note that KiCad assumes that if you click near a pad, you are probably trying to select the entire footprint
rather than a single pad. To select a single pad, make sure to click inside the pad area, or turn off the
Footprints setting in the selection filter (and make sure the Pads setting is turned on) to prevent accidental
selection of the entire footprint rather than a specific pad.
The General tab of the pad properties dialog shows the physical properties of the pad, including its
geometry, shape, and layer settings.
Pad type: this setting controls which features are enabled for the pad:
SMD pads are electrically-connected and have no hole. In other words, they exist on a single copper layer.
Through-hole pads are electrically-connected and have a plated hole. The hole exists on every layer, and the
copper pad exists on multiple layers (see Copper layers setting below).
Edge Connector pads are SMD pads that are allowed to overlap the board outline on the Edge.Cuts layer.
31
NPTH, Mechanical pads are non-plated through holes that do not have an electrical connection.
SMD Aperture pads are pads that have no hole and no electrical connection. These can be used to add
specific designs to a technical layer, for example a paste or solder mask aperture.
The Copper layers setting controls which copper layers will have a shape associated with the pad.
For SMD pads, the options are F.Cu or B.Cu, controlling whether the pad sits on the front or the back of the
board relative to the footprint’s location. In other words, if a pad is set to exist on B.Cu in its properties, and
the footprint is flipped to the back of the board, that pad will now exist on F.Cu, because it also has been
flipped.
For through-hole pads, it is possible to remove the pad shape from copper layers where the pad is not
electrically connected to other copper (tracks or filled zones). Setting the copper layers to connected layers
only will remove the pad shape from any unconnected layers, and setting to F.Cu, B.Cu, and connected
layers will remove the pad shape from any internal unconnected layers. This can be useful in dense board
designs to increase the routable area on internal layers.
The Technical layers checkboxes control which technical layers will have an aperture added with the pad’s
shape. By default, pads have apertures on the paste and mask layers matching their copper layer.
It is not possible to define a different pad shape or size on different copper layers in the
NOTE
current version of KiCad.
Specify pad to die length: This setting allows a length to be associated with this pad that will be added to
the routed track length by the track length tuning tools and the Net Inspector. This can be used to specify
internal bondwire lengths for more accurate length matching, or in other situations where the electrical
length of a net is longer than the length of the routed tracks on the board.
32
The aperture appearing on any technical layer will have the same shape and size as the pad shape on the
copper layer(s). In the PCB manufacturing process, the manufacturer will often change the relative size of
mask and paste apertures relative to the copper pad size, but since this size change is specific to a
manufacturing process, most manufacturers expect the design data to be provided with the apertures set to
the same size as the copper pads. For specific situations where you need to oversize or undersize a technical
layer aperture in the design data, you can use the settings in the Overrides tab.
Pad clearance controls the minimum clearance between the pad and any copper shape (tracks, vias, pads,
zones) on a different net. This value is normally set to 0 which will cause the pad clearance to be inherited
from any clearance override set on the footprint, or the board’s design rules and netclass rules if the
footprint clearance is also set to 0 .
Solder mask clearance controls the size difference between the pad shape and the aperture shape on the
F.Mask and B.Mask layers. A positive number means the solder mask aperture will be larger than the copper
shape. This number is an inflation applied to all directions. For example, a value of 0.1mm here will cause
the solder mask aperture to be inflated by 0.1mm , meaning that there will be an 0.1mm border on all sides
of the pad and the solder mask opening will be 0.2mm wider than the pad when measured along a given
axis.
Solder paste absolute clearance controls the size difference between the pad shape and the aperture shape
on the F.Paste and B.Paste layers. Its behavior is otherwise identical to the behavior of the solder mask
clearance setting.
Solder paste relative clearance allows setting a solder paste clearance value as a percentage of the pad size
rather than an absolute distance value. If both relative and absolute clearances are specified, they are added
together to determine the solder paste aperture size.
33
The Overrides tab also has controls for how the pad connects to any copper zone that overlaps it and shares
its net.
Pad connection controls whether the pad will have a solid, thermal relief, or no connection to the zone.
Like the other overrides, this one may be set for an individual pad or for an entire footprint. The default
setting for this control is From parent footprint, and the default footprint setting is to use the connection
mode specified in the zone properties.
Thermal relief spoke width controls the width of the spokes generated when the zone connection mode is
Thermal Relief.
Thermal relief gap controls the length of the thermal spokes, or the gap between the pad’s shape and the
filled copper area of the zone.
Custom pad shape in zone controls the behavior of the zone filler when the pad uses a custom shape rather
than one of the default shapes. This can be used to achieve different results when using thermal reliefs and
custom pad shapes.
Some EDA tools have separate tools for creating "plane layers" and for creating copper
NOTE
zones on signal layers. In KiCad, the Copper Zone tool is used for both these applications.
Zones are defined by a polygonal outline that defines the maximum extent of the filled copper area. This
outline does not represent physical copper and will not appear in exported manufacturing data. The actual
copper areas of the zone must be filled each time the outline, or any objects inside the outline, are modified.
The filling process may be run on a single zone, or on all zones in a board (default hotkey B ). Zones may be
unfilled (default hotkey Ctrl + B ) to improve performance and reduce visual clutter while editing large
boards.
By default, zone filling is a manual process rather than occurring every time an object
changes that would result in a change to the zone copper. This is because zone filling can
be a slow process on older computers or very large designs. It is important to make sure
NOTE zone fills are up-to-date before generating outputs. KiCad will check that zones have been
updated and warn you before generating outputs or running DRC when zones have not
yet been refilled. You can optionally enable automatic zone-filling in the Preferences
dialog (PCB Editor → Editing Options → Miscellaneous → Automatically refill zones).
To draw a zone, click the Add Filled Zone tool ( ) on the right toolbar, or use default hotkey Ctrl + Shift +
Z . Click to choose the first point of the zone outline. The Zone Properties dialog will appear, allowing you
to choose the zone net and other properties. These properties may be edited at any time, so it is not critical
to choose them all correctly at first. Accept the dialog and continue placing points to define the zone outline.
To finish the zone, double-click to set the last point. Zone outline points may be modified like graphic
polygons, by dragging the square handles to move a corner or dragging the circular handles to move an
edge. To edit the zone’s properties, use hotkey E or select Properties from the context menu.
34
Layer: A single zone object can create filled copper on one or more copper layers. Check the box next to
each copper layer that this zone outline should fill on. The copper on each layer will be filled independently,
but all layers will share the same net.
Net: Select the electrical net that the zone copper should be connected to. It is possible to create zones with
no net assignment. Zones with no net will keep clearance from any copper objects on any net.
Zone name can be used to assign a specific name to a zone. This name can be used to refer to the zone in
custom DRC rules.
Zone priority level determines the order in which multiple zones on a single layer are filled. The highest
priority level zone on a given layer will be filled first. Lower-priority zones will keep clearance to the filled
areas of higher-priority zones. Two zones on the same layer with the same priority level will overlap (short-
circuit) with each other, unless they are assigned different nets. When two zone outlines with the same
priority and different nets touch, one zone will maintain clearance to the other so that they don’t short.
Locked controls whether or not the zone outline object is locked. Locked objects may not be manipulated or
moved, and cannot be selected unless the Locked Items option is enabled in the Selection Filter panel.
Outline display controls how the zone outline is drawn on screen. In Line mode, only the border lines of
the outline are drawn. In Hatched mode, hatch lines are drawn on the inside of the outline border for a
35
short distance, to make the zone outline more apparent. In Fully Hatched mode, hatch lines are drawn
across the entire inside of the zone outline.
Corner smoothing controls the behavior of the filled copper areas at corners of the outline. Corners can be
smoothed by a chamfer or fillet, or can extend all the way to the outline corner if smoothing is disabled. The
chamfer or fillet size is configurable when those modes are selected.
By default, chamfers and fillets are not added to inside corners of the zone outline,
because this would result in filled copper extending outside the outline. If smooth inside
NOTE
corners are desired, enable the Allow fillets outside zone outline option in the
Constraints section of the Board Setup dialog.
Clearance controls the minimum clearance the filled areas of this zone will keep from other copper objects.
Note that if two clearance values are in conflict, the larger clearance value will be used. For example, if a
zone is set to use 0.2mm clearance but its netclass is set to use 0.3mm clearance, the result will be an 0.3mm
clearance.
Minimum width controls the minimum size of narrow necks of copper created inside the zone. Any copper
areas that would be below this minimum width are removed during the filling process.
Pad connection controls the way that the filled zone areas will connect to footprint pads on the same net.
Solid connections will result in the copper completely overlapping the pads. Thermal reliefs will result in
small copper spokes connecting the pad to the rest of the copper zone, increasing the thermal resistance
between the pad and the rest of the zone. This can be useful for hand soldering. Reliefs for PTH will apply
thermal reliefs to plated through-hole pads and use solid connections for surface mount pads. None will
result in the zone not connecting to any pads on the same net.
Thermal relief gap controls the distance maintained between any pad and the copper zone when the pad
connection mode is set to generate thermal reliefs.
Thermal spoke width controls the width of the "spokes", or short copper segments connecting the pad to
the rest of the copper zone.
Fill type controls how the copper zone is filled: the default is solid fill, which will result in copper filling in
all available space within the zone outline. The zone can also be set to fill a hatch pattern, which will fill the
area with a pattern that contains less copper. This can be useful for flexible printed circuits and other
specialty applications.
Orientation controls the angle of the hatch pattern lines. An orientation of 0 degrees will result in the hatch
pattern using horizontal and vertical lines.
Hatch width controls the width of each line in the hatch pattern.
Hatch gap controls the distance between each line in the hatch pattern.
Smoothing effort controls the style of smoothing applied to the hatch pattern. A value of 0 will result in no
smoothing, and a value of 3 will result in the finest smoothing. Higher values will result in longer processing
time and larger Gerber files.
Smoothing amount is a ratio that controls the size of the smoothing chamfers or fillets that are generated
when smoothing effort is set to a value other than 0. An amount of 0.0 results in no smoothing, and a value
36
of 1.0 results in maximum smoothing (in other words, a chamfer or fillet equal to half of the hatch gap).
Remove islands controls the behavior of isolated copper areas, also called islands, after the initial zone fill.
When this is set to always, isolated areas inside the zone are removed. When set to never, isolated areas
are left alone, and will result in copper areas that are not connected to the rest of the net. When set to below
area limit, a minimum island size can be specified, and islands below this threshold will be removed.
Regardless of the remove islands setting, islands are never removed from zones that are
NOTE electrically unconnected. In other words, islands are only removed from zones that have
at least one electrical connection.
Graphical objects
Graphical objects (lines, arcs, rectangles, circles, polygons, and text) can exist on any layer. Unlike zones, the
shape of a graphical object is exactly defined by its own properties, and is not affected by other objects.
Shape properties include dimensions, line width, and fill.
Graphical objects on copper layers can be assigned nets and make connections to other copper objects, just
like tracks and zones.
Arcs have two editing modes, which are selectable in Preferences → PCB Editor → Editing Options or by
right clicking the button on the right toolbar. The first mode (keep arc center, adjust radius) maintains
the position of the arc center as as the arc endpoints or midpoint are dragged, changing the radius as
necessary. The second mode (keep arc endpoints or direction of starting point) maintains the position of
the arc endpoints and the arc’s direction of curvature as the midpoint or center are dragged.
The properties of a graphic shape can be adjusted in the shape’s properties dialog or with the properties
manager. Rectangles, circles, and polygons can be filled shapes or outlines. The line width option controls
the width of the outline, even for filled objects. The outline width extends on both sides of the "ideal" shape
of the graphic object. For example, a graphic circle that is defined to have 2mm radius and 0.2mm line width
will consist of a torus with an outer radius of 2.2mm and inner radius of 1.8mm. If the filled shape option is
enabled and the line width is set to 0, the shape will be a filled circle with 2mm radius. Several line styles are
available: solid, dashed, dotted, dash-dot, and dash-dot-dot.
37
Graphical shapes on copper layers can have a net assigned in their properties dialog. Copper shapes with a
net make connections like tracks or zones. Unlike zones, copper graphical objects always maintain their
shape and do not keep clearance to other copper objects.
You can also add text boxes, which are similar to regular text except that they have an optional border and
they automatically reflow text within that border. Text boxes are placed with the button, and require
clicking twice to specify the top left and bottom right corners of the box.
38
Locked controls whether or not the text object is locked. Locked objects may not be manipulated or moved,
and cannot be selected unless the Locked Items option is enabled in the Selection Filter panel.
Layer controls the text’s layer. Text may be placed on any layer, but note that text on copper layers cannot
be associated with a net and cannot form connections to tracks or pads. Copper zones will fill around the
rectangular bounding box of text objects.
There are several formatting options: text can be bolded, italicized, left/right/center aligned, and reversed.
Regular text objects (not text boxes) can also have their vertical alignment adjusted. The knockout option,
which is also limited to regular text objects, adds a solid rectangle surrounding the text and makes the text
itself a negative cutout.
The text itself can use any TTF font available on your system, or the built-in KiCad stroke font.
User fonts are not embedded in the project. If the project is opened on another computer
that does not have the selected font installed, a different font will be substituted. For
maximum compatibility, use the KiCad font. Also consider converting text objects to
NOTE
polygons before sharing a project (right click a text object → Create from Selection →
Create Polygon from Selection…). Text converted to polygons is not editable as text, but
will render identically on any computer.
You can adjust the text size with the text width and text height controls. When you are using the KiCad font,
you can also adjust the stroke width with the thickness control.
Position X and position Y control the text object’s location. These properties are not available for text
boxes.
39
Orientation is the rotation angle of the text object. You can select an angle in 90 degree increments from the
dropdown, or type in an arbitrary angle.
Text boxes additionally have options controlling their border. The border checkbox makes the border
visible or invisible. For visible borders, you can adjust the border’s thickness with the border width control
and the line style with the border style control (solid, dashed, dotted, dash-dot, or dash-dot-dot).
Finally, text supports markup for superscripts, subscripts, overbars, evaluating project variables, and
accessing symbol field values.
Variables must be defined in Board Setup before they can be used. There are also a
NOTE
number of built-in text variables.
40
Scope and Filters
Scope settings restrict the tool to editing only certain types of objects. If no scopes are selected, nothing will
be edited.
Filters restrict the tool to editing particular objects in the selected scope. Objects will only be modified if
they match all enabled and relevant filters (some filters do not apply to certain types of objects. For
example, parent footprint filters do not apply to graphic items and are ignored for the purpose of changing
graphic properties). If no filters are enabled, all objects in the selected scope will be modified. For filters
with a text box, wildcards are supported: * matches any characters, and ? matches any single character.
Filter items by parent reference designator filters to fields in the footprint with the specified reference
designator. Filter items by parent footprint library id filters to fields in footprint with the specified
library identifier.
41
Action
Properties for filtered objects can be set to new values in the bottom part of the dialog. Properties can be set
to arbitrary values by selecting set to specified values or reset to their layer’s default value by selecting set
to layer default values.
Drop-down lists and text boxes can be set to -- leave unchanged -- to preserve existing values.
Checkboxes can be checked or unchecked to enable or disable a change, but can also be toggled to a third
"leave unchanged" state.
Text properties that can be modified are font, text width, text height, text thickness (KiCad font only),
emphasis (bold and italic), orientation (keep upright), and alignment (center on footprint). Footprint text
can also have its visibility set.
Dimensions
Dimensions are graphical objects used to show a measurement or other marking on a board design. They
may be added on any drawing layer, but are normally added to one of the User layers. KiCad currently
supports five different types of dimension: aligned, orthogonal, center, radial, and leader.
Aligned dimensions ( ) show a measurement of distance between two points. The measurement axis is
the line that connects those two points, and the dimension graphics are kept parallel to that axis.
Orthogonal dimensions ( ) also measure the distance between two points, but the measurement axis is
either the X or Y axis. In other words, these dimensions show the horizontal or vertical component of the
distance between two points. When creating orthogonal dimensions, you can select which axis to use as the
measurement axis based on where you place the dimension after selecting the two points to measure.
Center dimensions ( ) create a cross mark to indicate a point or the center of a circle or arc.
Radial dimensions ( ) show a measurement between a center point and the outside of a circle or arc. The
center point is indicated by a cross.
Leader dimensions ( ) create an arrow with a leader line connected to a text field. This text field can
contain any text, and an optional circular or rectangular frame around the text. This type of dimension is
often used to call attention to parts of the design for reference in fabrication notes.
42
After creating a dimension, its properties may be edited (hotkey E ) to change the format of the displayed
number and the style of the text and graphic lines.
You may customize the default style of newly-created dimension objects in the Text &
NOTE
Graphics Defaults section of the Board Setup dialog.
43
Dimension format options
Override value: When enabled, you may enter a measurement value directly into the Value field that will
be used instead of the actual measured value.
Prefix: Any text entered here will be shown before the measurement value.
Suffix: Any text entered here will be shown after the measurement value.
Units: Selects which units to display the measured value in. Automatic units will result in the dimension
units changing when the display units of the board editor are changed.
44
Dimension text options
Most of the dimension text options are identical to those options available for other graphical text objects
(see the Graphical Objects section above). Some specific options for dimension text are also available:
Position mode: Choose whether to position the dimension text manually, or to automatically keep it aligned
with the dimension measurement lines.
Keep aligned with dimension: When enabled, the orientation of the dimension text will be adjusted
automatically to keep the text parallel with the measurement axis.
Arrow length: Sets the length of the arrow segments of the dimension’s shape. A negative arrow length
reverses the arrow direction.
Extension line offset: Sets the distance from the measurement point to the start of the extension lines.
Extension line overshoot: Sets the distance from the dimension’s line to the end of the extension lines.
Leader options
Value: Enter the text to show at the end of the leader line.
Text frame: Select the desired border around the text (circle, rectangle, or none).
Routing tracks
KiCad features an interactive router that:
Allows manual or guided (semi-automatic) routing of single tracks and differential pairs
Allows tuning of track lengths and differential pair skew (phase) by inserting serpentine
tuning shapes for designs with tight timing requirements
By default, the router respects the configured design rules when placing tracks: the size (width) of new
tracks will be taken from the design rules and the router will respect the copper clearance set in the design
rules when determining where new tracks and vias can be placed. It is possible to disable this behavior if
desired by using the Highlight Collisions router mode and turning on the Allow DRC Violations option in the
router settings (see below).
45
The router has three modes that can be selected at any time. The router mode is used for routing new tracks,
but also when dragging existing tracks using the Drag (hotkey D ) command. These modes are:
Highlight Collisions: in this mode, most of the router features are disabled and routing is fully manual.
When routing, collisions (clearance violations) will be highlighted in green and the newly-routed tracks
cannot be fixed in place if there is a collision unless the Allow DRC Violations option is turned on. In this
mode, up to two track segments may be placed at a time (for example, one horizontal and one diagonal
segment).
Shove: in this mode, the track being routed will walk around obstacles that cannot be moved (for
example, pads and locked tracks/vias) and shove obstacles that can be moved out of the way. The router
prevents DRC violations in this mode: if there is no way to route to the cursor position that does not
violate DRC, no new tracks will be created.
Walk Around: in this mode, the router behaves the same as in Shove mode, except no obstacles will be
moved out of the way.
Which mode to use is a matter of preference. For most users, we recommend using Shove mode for the most
efficient routing experience or Walk Around mode if you do not want the router to modify tracks that are
not being routed. Note that Shove and Walk Around modes always create horizontal, vertical, and 45-degree
(H/V/45) track segments. If you need to route tracks with angles other than H/V/45, you must use Highlight
Collisions mode and enable the Free Angle Mode option in the Interactive Router Settings dialog.
There are four main routing functions: Route Single Track, Route Differential Pair, Tune length of a single
track, and Tune skew of a differential pair. All of these are present in both the Route menu dropdown
(individually) on the top toolbar and the drawing toolbar in two overloaded icons on the drawing toolbar
on the right. The use of the overloaded icons is described above. One is for the two Route functions and one
is for the two Tune functions. In addition, the Route menu allows the selection of Set Layer Pair and
Interactive Router Settings.
To route tracks, click the Route Tracks icon (from the drawing toolbar or from the top toolbar under
Route) or use the hotkey X . Click on a starting location to select which net to route and begin routing. The
net being routed will automatically be highlighted and the allowable clearance for the net will be indicated
with a gray outline around the tracks being routed. The clearance outline can be disabled by changing the
Clearance Outlines setting in the Display Options section of the Preferences dialog.
The clearance outline shows the maximum clearance from the routed net to any other
copper on the PCB. It is possible to use custom design rules to specify different clearances
NOTE
for a net to different objects. These clearances will be respected by the router, but only
the largest clearance value will be shown visually.
When the router is active, new track segments will be drawn from the routing start point to the editor
cursor. These tracks are unfixed temporary objects that show what tracks will be created when you use a
left-click or the Enter key to fix the route. The unfixed track segments are shown in a brighter color than the
fixed track segments. When you exit the router using the Esc key or by selecting another tool, only the
fixed track segments will be saved. The Finish Route action (hotkey End ) will fix all tracks and exit the
router.
While you are routing, you can use the Undo Last Segment command (hotkey Backspace ) to unfix the tracks
you most recently fixed. You can use this command repeatedly to step back through the route that you have
46
already fixed.
In previous versions of KiCad, using the left mouse button or Enter to fix the routed segments would fix all
segments up to but not including the segment ending at the mouse cursor location. In KiCad 6 and later, this
behavior is optional, and by default, all segments including the one ending at the mouse cursor location will
be fixed. The old behavior can be restored by disabling the "Fix all segments on click" option in the
Interactive Router Settings dialog.
While routing, you can hold the Ctrl key to disable grid snapping, and hold the Shift key to disable
snapping to objects such as pads and vias.
Snapping to objects can also be disabled by changing the Magnetic Points preferences in
the Editing Options section of the Preferences dialog. We recommend that you leave
NOTE
object snapping enabled in general, so that you do not accidentally end tracks slightly off-
center on a pad or via.
Track posture
When routing in H/V/45 mode, the posture refers to how a set of two track segments connect two points that
cannot be reached by a single H/V/45-degree segment. In such a case, the points will be connected by one
horizontal or vertical segment and one diagonal (45-degree) segment. The posture refers to the order of
these segments: whether the horizontal/vertical segment or the diagonal segment comes first.
KiCad’s router attempts to pick the best posture automatically based on a number of factors. In general, the
router will attempt to minimize the number of corners in a route, and will avoid "bad" corners such as acute
angles whenever possible. When routing from or to a pad, KiCad will choose the posture that lines up the
route with the longest edge of the pad.
In some cases, KiCad cannot guess the posture you intend correctly. To switch the posture of the track while
routing, use the Switch Track Posture command (hotkey / ).
In situations where there is no obvious "best" posture (for example, when starting a route from a via), KiCad
will use the movement of your mouse cursor to select the posture. If you would like the route to begin with
a straight (horizontal or vertical) segment, move the mouse away from the starting location in a mostly
horizontal or vertical direction. If you would like the route to begin diagonally, move in a diagonal direction.
Once the cursor is a sufficient distance away from the routing start location, the posture is "locked" and will
no longer change unless the cursor is brought back to the starting location. Detection of posture from the
movement of the mouse cursor can be disabled in the Interactive Router Settings dialog as described below.
If you use the Switch Track Posture command to override the posture chosen by KiCad,
NOTE the automatic detection of posture from mouse movement will be disabled for the
remainder of the current routing operation.
47
Track corner mode
KiCad’s router can place tracks with either sharp or rounded (arc) corners when routing in H/V/45 mode. To
switch between sharp and rounded corners, use the Track Corner Mode command (hotkey Ctrl + / ). When
routing with rounded corners, each routing step will place either a straight segment, a single arc, or both a
straight segment and an arc. The track posture determines whether the arc or the straight segment will be
placed first.
Track corners can also be rounded after routing by using the Fillet Tracks command after selecting the
tracks on either side of the corner to be filleted. If a contiguous track selection contains multiple corners,
they will all be filleted.
Dragging of tracks with arcs is not supported. Arcs are treated as immovable by the shove
NOTE
router.
Track width
The width of the track being routed is determined in one of three ways: if the routing start point is the end
of an existing track and the button on the top toolbar is enabled, the width will be set to the width of
the existing track. Otherwise, if the track width dropdown in the top toolbar is set to "use netclass width",
the width will be taken from the netclass of the net being routed (or from any custom design rules that
specify a different width for the net, such as inside a neckdown area). Finally, if the track width dropdown is
set to one of the pre-defined track sizes configured in the Board Setup dialog, this width will be used.
The track width can never be lower than the minimum track width configured in the
NOTE Constraints section of the Board Setup dialog. If a pre-defined width is added that is lower
than this minimum constraint, the minimum constraint value will be used instead.
KiCad’s router supports a single track width for the active route. In other words, to change widths in the
middle of a track, you must end the route and then restart a new route from the end of the previous route.
To change the width of the active route, use the hotkeys W and Shift + W to step through the track widths
configured in the Board Setup dialog.
Placing vias
While routing tracks, switching layers will insert a through via at the end of the current (unfixed) track.
Once you place the via, routing will continue on the new layer. There are several ways to select a new layer
and insert a via:
By using the hotkey to select a specific layer, such as PgUp to select F.Cu or PgDn to select B.Cu .
By using the "Place Via" hotkey ( V ), which will switch to the next layer in the active layer pair.
By using the Select Layer and Place Through Via action (hotkey < ), which will open a dialog to select the
target layer.
After using any of the above methods to add a via and change layer, but before clicking to fix the via and
commit the current trace segment, you can cancel placing the via by pressing V . The via will be removed
and routing will continue on the original layer.
48
You can place a via and end the current trace, without changing layers, by pressing V and then double-
clicking or Shift -clicking to place the via.
The size of the via will be taken from the active Via Size setting, accessible from the drop-down in the top
toolbar or the Increase Via Size ( ' ) and Decrease Via Size ( \ ) hotkeys. Much like track width, when the
via size is set to "use netclass sizes", the via sizes configured in the Net Classes section of the Board Setup
will be used (unless overridden by a custom design rule).
You can also place microvias and blind/buried vias while routing. Use the hotkey Ctrl + V to place a
microvia and Alt + Shift + V to place a blind/buried via. Microvias may only be placed such that they
connect one of the outer copper layers to an adjacent layer. Blind/buried vias may be placed on any layer.
Vias placed by the router are considered to be part of a routed track. This means that the via net can be
updated automatically (just like track nets can), for example when updating the PCB from the schematic
changes the net name of the track. In some cases this may not be desired, such as when creating stitching
vias. The automatic update of via nets can be disabled for specific vias by turning off the "automatically
update via nets" checkbox in the via properties dialog. Vias placed with the Add Free-standing Vias tool are
created with this setting disabled.
If you need to route a number of traces from a set of pads, you can use the Route Selected tool to quickly
route from each pad in sequence. Select the pads you want to use as starting points, then press Shift + X to
route from each pad in sequence. The router will begin a trace from the first selected pad, which you can
route as you would any other trace. When you complete the trace, the router will automatically begin a new
trace from the next pad in the selection, in the same order that you selected the pads. Pads that already have
traces attached are skipped. You can also skip routing the current trace and move on to the next pad by
pressing Esc . You can also select footprints instead of pads; all unrouted pads in the selected footprints will
be used as starting points.
If you want to route a number of traces to a set of pads, instead of from the pads, you can use the Route
Selected From Other End tool ( Shift + E ). This tool works the same way as the Route Selected tool, except it
uses each selected pad as an end point rather than a starting point. The starting point for each trace is the
other end of the ratsnest line for each selected pad.
Routing from the other end is also possible while routing individual traces: press Ctrl + E while routing a
trace to commit the current segment and begin routing from the other end of the in-progress trace’s ratsnest
line.
Finally, you can quickly unroute traces connected to an object (footprint, pad, or trace) by selecting the
object, right-clicking, and selecting Unroute Selected. Any traces connected to the selected object will be
removed, starting at the selected object and continuing until another pad is encountered.
49
While routing, press the F key to have the router attempt to automatically finish the current trace. The
trace will be automatically routed from the end of the last fixed trace segment to the closest ratsnest anchor.
If the router can’t automatically finish the trace, it will allow you to complete the trace manually. This action
can also be performed by clicking Attempt Finish in the context menu while routing.
When the router is not the active tool, you can automatically route multiple traces by selecting footprints,
pads, and traces to route from and pressing Shift + F . You do not need to select both ends of a desired
connection; the router will route from the selected item to its nearest ratsnest anchor. If multiple items
were selected, each item will be routed in sequence, in the order that they were selected. If a connection
cannot be automatically completed, the tool will pause with the router active so that you can complete the
trace manually. With the automatic completion paused for a manual connection, you can press Esc to skip
routing the current trace. After manually completing the trace or skipping the connection, the tool will
continue attempting to route the remaining connections.
To route a differential pair, click the Route Differential Pairs icon (from the drawing toolbar or from the
top toolbar under Route) or use the hotkey 6 . Click on a pad, via, or the end of an existing differential pair
track to start routing. You can start routing from either the positive or negative net of a differential pair.
The differential pair router will attempt to route the pair of tracks with a gap taken from the design rules
(differential pair gap can be configured in the Net Classes section of the Board Setup dialog, or by using
custom design rules). If the starting or ending location of the route is a different distance apart from the
configured gap, the router will create a short "fan out" section to minimize the length of track where the
differential pair is not coupled.
When switching layers or using the Place Via ( V ) action, the differential pair router will create two vias
next to each other. These vias will be placed as close as possible to each other while respecting the design
rules for copper and hole-to-hole clearance.
Modifying tracks
After tracks have been routed, they can be modified by moving or dragging, or deleted and re-routed. When
a single track segment is selected, the hotkey U can be used to expand the selection to all connected track
segments. The first press of U will select track segments between the nearest junctions with pads or vias.
The second press of U will expand the selection again to include all track segments connected to the
selected track on all layers. Selecting tracks with this technique can be used to quickly delete an entire
routed net.
There are two different drag commands that can be used to modify a track segment. The Drag (45-degree
mode) command, hotkey D , is used to drag tracks using the router. If the router mode is set to Shove,
dragging with this command will shove nearby tracks. If the router mode is set to Walk Around, dragging
with this command will walk around or stop at obstacles. The Drag Free Angle command, hotkey G , is used
50
to split a track segment into two and drag the new corner to any location. Drag Free Angle behaves like the
Highlight Collisions router mode: obstacles will not be avoided or shoved, only highlighted.
Dragging of tracks containing arcs is not yet possible. Attempting to drag these tracks will
result in the arcs being removed in some cases. It is possible to resize a particular arc by
NOTE
selecting it and using the drag command ( D ). When resizing an arc using this command,
no DRC checking is performed.
The Move command (hotkey M ) can also be used on track segments. This command will pick up the
selected track segments, ignoring any attached track segments or vias that are not selected. No DRC checking
is done when moving tracks using the Move command.
It is possible to re-route tracks attached to footprints while moving the footprints. To do so, use the drag
command ( D ) with a footprint selected. Any tracks that end at one of the footprint’s pads will be dragged
along with the footprint. This feature has some limitations: it only operates in Highlight Collisions mode, so
the tracks attached to footprints will not walk around obstacles or shove nearby tracks out of the way.
Additionally, only tracks that end at the origin of the footprint’s pads will be dragged. Tracks that simply
pass through the pad or that end on the pad at a location other than the origin will not be dragged.
You can modify the width of tracks and the size of vias, without re-routing them, in the properties of the
track or via. You can choose a predefined size or set the size to an arbitrary value. You can also change the
position of tracks and vias or change a via’s start and end layers.
To modify tracks and vias in bulk you can use the Edit Track and Via Properties dialog (Edit → Edit Track
& Via Properties…)..
51
Scope settings restrict the tool to editing only tracks, vias, or both. If no scopes are selected, nothing will be
edited.
Filter Items restricts the tool to editing particular objects in the selected scope. Objects will only be
modified if they match all enabled and relevant filters (some filters do not apply to certain types of objects.
For example, via size filters do not apply to tracks). If no filters are enabled, all objects in the selected scope
will be modified. For filters with a text box, wildcards are supported: * matches any characters, and ?
matches any single character.
Filter items by net filters to items assigned the specified net. Filter items by netclass filters to items
assigned to the specified netclass.
Filter tracks by width filters to tracks with the specified track width. Filter vias by size filters to vias with
the specified track width.
Properties for filtered objects can be set to new values in the bottom part of the dialog. Properties can be set
to arbitrary values by selecting set to specified values or set to the default value from the net class (or
custom rule) by selecting set to net class / custom rule values.
Drop-down lists can be set to -- leave unchanged -- to preserve existing values, or set to a pre-defined
track or via size to change the filtered objects' size. You can also change the filtered objects' layer.
52
Length tuning
The length tuning tools can be used to add serpentine tuning shapes to tracks after routing. Length tuning
shapes are persistent objects that can be modified after they are created. To tune the length of a track, first
pick the appropriate tool.
The single-track length tuning tool (icon or hotkey 7 ) will add serpentine shapes to bring the
length of a single track up to the target value.
The differential pair length tuning tool (icon or hotkey 8 ) will do the same for a differential pair.
The differential pair skew tuning tool (icon or hotkey 9 ) will add length to the shorter member of a
differential pair in order to eliminate skew (phase difference) between the positive and negative sides of
the pair.
As with the Routing icons, the Tuning icons are found in both the Route menu dropdown from the top
toolbar and the drawing toolbar on the right.
When a tuning tool is active, you can hover over traces in the board to show a status window that displays
their current length or skew as well as the target values. Click on the desired trace to start tuning it. As you
move the mouse cursor along the track, meander shapes will be added interactively. If a target length has
been set, meanders will stop being added when the target length is reached. You can set a target length with
custom DRC rules or in the tuning shape properties; both methods are explained below. The popup window
next to the cursor shows a live measure of the length or skew compared to the design targets. You can adjust
the spacing ( 1 to increase and 2 to decrease) and amplitude ( 3 to increase and 4 to decrease) while
you tune. When you are done, click again to commit the tuned shape. The tuned trace doesn’t need to be
perfect because you can adjust the shape after committing it. You can also place multiple tuning shapes on
the same track.
The length tuning tools only support tuning the length of point-to-point nets between two
NOTE
pads. Tuning the length of nets with different topologies is not supported.
Differential pair length tuning can only be applied to the coupled portions of differential
NOTE pairs. To apply length tuning to the uncoupled portions of differential pairs, you must use
single-track length tuner.
53
When a pattern is selected, editing handles appear, which let you adjust the pattern geometry.
Dragging the handles at the ends of the pattern will expand or contract the pattern along the trace.
Dragging the corner handle towards or away from the trace will respectively decrease or increase the
maximum meander amplitude.
The final handle controls the meander spacing; dragging it towards the corner handle will increase the
spacing, while dragging it away from the corner handle will increase the spacing.
The selection box and editing handles represent the maximum allowable extents of the tuning pattern.
Making the box smaller will reduce the size of the tuning pattern, even if this results in the tuned trace being
shorter than the target length. When the box is enlarged, the tuning pattern will expand to fill the box until
the target length is reached.
You can move a tuning pattern along its track by selecting it and dragging with the mouse, or using the Move
tool ( M ). Deleting a tuning pattern ( Del ) removes the tuning pattern and restores the original untuned
tracks. You can also ungroup the tuning pattern, which will decompose it into its component tracks. The
basic tracks have the same shape as the tuning pattern but can be edited individually. Once ungrouped into
tracks, a tuning pattern cannot be regrouped.
Another way to edit a tuning pattern is through its properties dialog. The properties dialog exposes several
additional parameters that can’t be modified using the on-canvas interactive editor. These properties can
also be edited in the properties manager.
54
As with the interactive editor, you can set a maximum amplitude for the tuning pattern and a spacing
between meanders, but here you can set a minimum amplitude and configure the corner style. Corners can
be filleted (rounded) or chamfered. In each case you can set the radius as a percentage of the maximum
possible radius for the spacing and amplitude. You can also configure the tuning pattern to be single-sided,
which restricts it to one side of the baseline, as opposed to the default style which positions meanders on
both sides of the baseline.
You can set default values for these properties in the Design Rules → Length-tuning Patterns page of the
Board Setup dialog. Each type of tuning pattern (single track length, differential pair length, and differential
pair skew) can have its own defaults.
Finally, the tuning pattern properties dialog is one of two ways to set the target length or skew for a tuning
pattern. Setting length targets is explained below.
In the properties dialog for a tuning pattern that has already been added.
Using a custom DRC rule with the length and/or skew constraints.
The first method is to in the target length or target skew field of the tuning pattern’s properties dialog. This
target will only apply to the selected tuning pattern. Therefore, length targets set in this way must be set
separately for each tuning pattern in the design. The properties dialog for a tuning pattern is only accessible
after the pattern is initially created, so changing a target length or skew in this way may require the pattern
to be adjusted to meet the new target value, if the pattern’s geometric constraints do not allow sufficient
space to meet the new target.
You can also set a target length and/or skew using custom design rules. If custom rules are used, they will
override any targets set in tuning pattern properties, unless the override custom rules checkbox is enabled
in the tuning pattern properties.
Using a custom rule allows you to set a net’s target length and/or skew up front, before a pattern is created.
With custom rules you can set different length and skew targets based on specific criteria, such as netclass or
net name. You will also result in a DRC violation if the net’s length or skew is out of bounds.
When target length or skew is adjusted in a custom DRC rule after a pattern is created, the pattern geometry
will not be automatically updated to achieve the new target. You can use Edit → Update All Tuning Patterns
to recalculate all tuning patterns to meet the new targets.
The following example custom rule sets a target length and skew for nets in the high_speed netclass. The
target length is 100mm, and a DRC error will be raised if it is below 95mm or above 105mm. The target skew
is at most 0.1mm.
See the custom rule documentation for more details of how to create rules that only apply to certain nets.
55
Length tuning pitfalls and tips
The length tuner only tunes nets with a point-to-point topology; branching nets are not supported. When the
length tuner encounters a branch, it stops at the branch and only considers the length of the net up to that
branch.
Sometimes you may end up with leftover stub tracks somewhere in your design. These can turn what
appears to be a point-to-point net into a branched topology, which will prevent length tuning from working
as expected. It may be easier to find such stub tracks when you switch footprints, vias, and tracks to outline
mode ( , , and buttons, respectively). You can also use the track cleanup tool (Tools → Cleanup
Tracks and Vias…) to remove many of these stubs automatically.
By default, the length tuner includes vias in its length calculations. Only the layer-to-layer length of the via is
used, which may be shorter than the full top-to-bottom via height if the tuned path is not exclusively on the
board top and bottom. The accuracy of this calculation depends on the board stackup being accurately
configured. Via length can be ignored in length tuner calculations by deselecting include stackup height in
track length calculations in the Constraints page of the Board Setup dialog.
The length tuner is optimized for adjusting the effective electrical distance between two points, and
therefore it calculates net length in a slightly different way than other tools, such as the Net Inspector. In
addition to discounting net branches and unused portions of vias, the length tuner also optimizes paths
through pads to use the shortest possible path in its calculations. In comparison, the Net Inspector reports a
simple summation of copper segment lengths. Both calculations are accurate, but they are optimized for
different purposes. These differences are discussed in more detail in the Net Inspector documentation.
Teardrops
Teardrops are areas of extra copper that smooth the transition between track and pads, vias, or other
tracks. Teardrops are added to increase the mechanical robustness of a trace connection. They also reduce
the risk of a misaligned drill hole disconnecting a trace from a drilled pad or via.
You can add teardrops to your design in bulk using the Edit → Edit Teardrops… dialog. This dialog has
controls for filtering which objects are affected and settings for configuring the shape of the new teardrops.
It also lets you edit or remove existing teardrops.
56
The Scope section controls which types of objects will be affected: PTH pads, SMD pads, vias, and/or track-
to-track connections. The Filter Items section lets you filter objects by other criteria; you can filter items by
net, net class, and layer, or choose to act only on round pads, pre-existing teardrops, or the objects in your
selection.
The Action section controls whether to add or remove teardrops, as well as the size and shape of the new
teardrops. Adding a teardrop to an object that already has a teardrop will update the existing teardrop with
the new settings. When adding teardrops, you can choose to use the default teardrop settings from the
Board Setup dialog, or choose specific values for the new teardrops.
Prefer zone connection: if selected, a teardrop will not be created if the object is also connected to a zone.
Allow teardrops to span 2 track segments: if selected, the teardrop will be able to spread over a second
track segment if the first segment is too short to support a full teardrop. Maximum track width: a teardrop
will not be created for a track connection that is wider than this percentage of the pad width (minimum pad
dimension). Best length: the ideal length of the teardrop, as a percentage of the width (smallest dimension)
of the attached object. Maximum length: the maximum length of the teardrop, as an absolute length. Best
width: the ideal width of the teardrop, as a percentage of the width (smallest dimension) of the attached
object. Maximum width: the maximum width of the teardrop, as an absolute width. Curved edges: if
selected, the teardrop edges will be curved instead of a straight line. If curved, points controls the number
of points in the curve; more points will result in a smoother curve.
57
Default properties for teardrops can be configured in the Board Setup dialog. These defaults will be used in
the Edit Teardrops dialog when add teardrops with default values for shape is selected in that dialog. The
defaults are configured separately for teardrops connecting to round shapes, rectangular shapes, or
between tracks. The available options for each type of teardrop are the same as in the Edit Teardrops dialog.
58
Rather than in bulk, you can add or edit teardrops for individual vias in the properties dialog for that via, or
for individual pads in the Connections tab of the pad’s properties dialog. The settings in the properties
dialogs are the same as in the Edit Teardrops dialog. You can also edit teardrops for individual pads and vias
with the Properties Manager.
59
Teardrops in KiCad are small zones, meaning that when they refill they avoid shorting to copper objects on
other nets. They are initally filled when they are added, but they are unfilled and refilled with other zones on
the board: when using the Unfill All Zones and Refill All Zones commands, running DRC, generating
fabrication outputs, etc. Teardrops can be shown in filled or outline mode using the zone display controls in
the left toolbar.
60
Setting Description
Mode Sets the operating mode of the router for creating new tracks and dragging
existing tracks. [See above] for more information.
Free angle mode Allows routing tracks at any angle, instead of just at 45-degree increments.
This option is only available if the router mode is set to Highlight collisions.
Allow DRC violations Allow placing tracks and vias that violate DRC rules. This option is only
available if the router mode is set to Highlight collisions.
Shove vias Allow the router to shove vias along with tracks. When this is disabled, vias
cannot be shoved. This option is only available if the router mode is set to
Shove.
Jump over obstacles Allow the router to attempt to move colliding tracks behind solid obstacles
(such as pads). This option is only available if the router mode is set to Shove.
Remove redundant Automatically removes loops created in the currently-routed track, keeping
tracks only the most recently routed section of the loop.
Optimize pad When this setting is enabled, the router attempts to avoid acute angles and
connections other undesirable routing when exiting pads and vias.
Smooth dragged When dragging tracks, attempts to combine track segments together to
segments minimize direction changes.
Optimize entire track When enabled, dragging a track segment will result in KiCad optimizing the
being dragged rest of the track that is visible on the screen. The optimization process
removes unnecessary corners, avoids acute angles, and generally tries to find
the shortest path for the track. When disabled, no optimizations are
performed to the track outside of the immediate section being dragged.
Use mouse path to set Attempts to pick the track posture based on the mouse path from the routing
track posture start location.
Fix all segments on click When enabled, clicking while routing will fix the position of all the track
segments that have been routed, including the segment that ends at the mouse
cursor. A new segment will be started from the mouse cursor location. When
disabled, the last segment (the one that ends at the mouse cursor) will not be
fixed in place and can be adjusted by further mouse movement.
61
Update PCB from Schematic is the preferred way to transfer design information from the
schematic to the PCB. In older versions of KiCad, the equivalent process was to export a
NOTE
netlist from the Schematic Editor and import it into the Board Editor. It is no longer
necessary to use a netlist file.
The tool adds the footprint for each symbol to the board and transfers updated schematic information to
the board. In particular, the board’s net connections are updated to match the schematic.
The changes that will be made to the PCB are listed in the Changes To Be Applied pane. The PCB is not
modified until you click the Update PCB button.
You can show or hide different types of messages using the checkboxes at the bottom of the window. A
report of the changes can be saved to a file using the Save…button.
Options
The tool has several options to control its behavior.
62
Option Description
Re-link footprints to schematic Footprints are normally linked to schematic symbols via a unique
symbols based on their reference identifier created when the symbol is added to the schematic. A
designators symbol’s unique identifier cannot be changed.
Delete footprints with no If checked, any footprint in the PCB without a corresponding symbol
symbols in the schematic will be deleted from the PCB. Footprints with the
"Not in schematic" attribute will be unaffected.
Replace footprints with those If checked, footprints in the PCB will be replaced with the footprint
specified in the schematic that is specified in the corresponding schematic symbol.
63
The tool syncs changes in reference designators, values, footprint assignments, and net names from the
board to the schematic. Each type of change can be individually enabled or disabled.
The changes that will be made to the schematic are listed in the Changes To Be Applied pane. The schematic is
not modified until you click the Update Schematic button.
You can show or hide different types of messages using the checkboxes at the bottom of the window. A
report of the changes can be saved to a file using the Save…button.
Options
The tool has several options to control its behavior.
64
Option Description
Re-link footprints to schematic If checked, each footprint in the PCB will be re-linked to the symbol
symbols based on their reference that has the same reference designator as the footprint. This option
designators is incompatible with updating symbol reference designators.
Values If checked, symbol values will be updated to match the values of the
linked footprints.
Footprint assignments If checked, footprint assignments will be updated for symbols which
have had their footprints changed or replaced in the board.
Net names If checked, the schematic will be updated with any net name changes
that have been made in the board. Net labels will be updated or
added to the schematic as necessary to match the board.
This method can only sync changes made to footprint assignments and footprint fields. It
NOTE
is recommended to use the Update Schematic from PCB tool instead.
Geographical re-annotation
This section of the KiCad documentation has not yet been written. We appreciate your
NOTE patience as our small team of volunteer documentation writers work to update and
expand the documentation.
Locking
Most objects can be locked through their properties dialogs, by using the right-click context menu, or by
using the Toggle Lock hotkey ( L ). Locked objects cannot be selected unless the "Locked items" checkbox is
65
enabled in the selection filter. Attempting to move locked items will result in a warning dialog:
Selecting "Override Locks" in this dialog will allow moving the locked items. Selecting "OK" will allow you to
move any unlocked items in the selection; leaving the locked items behind. Selecting "Do not show again"
will remember your choice for the rest of your session.
Locked items are displayed with a colored shadow around them. This can be customized in your color
scheme.
Cleanup tools
This section of the KiCad documentation has not yet been written. We appreciate your
NOTE patience as our small team of volunteer documentation writers work to update and
expand the documentation.
Importing graphics
This section of the KiCad documentation has not yet been written. We appreciate your
NOTE patience as our small team of volunteer documentation writers work to update and
expand the documentation.
66
Inspecting a board
Measurement tool
The measurement tool allows you to make distance and angle measurements between points on the PCB. To
activate the tool, click the icon in the right toolbar, or use the hotkey Ctrl + Shift + M . Once the tool is
active, click once to set the measurement start point, then click again to finish a measurement.
The measurement tool is used for quick measurements that do not need to be displayed
permanently. Any measurement you make will only be shown while the tool is active. To
NOTE
create permanent dimensions that will appear in printouts and plots, use the Dimension
tools.
To use the design rule checker, click the icon in the top toolbar, or select Design Rules Checker from
the Inspect menu.
67
The top section of the DRC Control window contains some options that control the design rule checker:
Refill all zones before performing DRC: when enabled, zones will be refilled every time the design rule
checker is run. Disabling this option may result in incorrect DRC results if zones have not been refilled
manually.
Report all errors for each track: when enabled, all clearance errors will be reported for each track
segment. When disabled, only the first error will be reported. Enabling this option will result in the design
rule checker running more slowly.
Test for parity between PCB and schematic: when enabled, the design rule checker will test for differences
between the schematic and PCB in addition to testing the PCB design rules. This option has no effect when
running the PCB editor in standalone mode.
After running DRC, any violations will be shown in the center part of the DRC Control window. Rule
violations, unconnected items, and differences between the schematic and the PCB are shown in three
different tabs. The controls below the list of violations can be used to show or hide violations depending on
their severity. A report file in plain text format can be created after running DRC using the Save button.
68
Each violation involves one or more objects on the PCB. In the list of violations, the objects involved are
listed below the violation. Clicking on the violation in the list view will move the PCB Editor view so that the
affected area is centered. Clicking on one of the objects involved in a violation will highlight the object.
The numbers at the bottom of the window show the number of errors, warnings, and exclusions. Each type
of violation can be filtered from the list using the respective checkboxes. Clicking Delete Markers will clear
all violations until DRC is run again.
Violations can be right-clicked in the dialog to ignore them or change their severity:
Exclude this violation: ignores this particular violation, but does not affect any other violations.
Change severity: changes a type of violation from warning to error, or error to warning. This affects all
violations of a given type.
Ignore all: ignores all violations of a given type. This test will now appear in the Ignored Tests tab rather
than the Violations tab.
Excluded and ignored violations are remembered between runs of the design rule checker.
69
is not always clear which rules apply to an object.
To inspect the clearance rules that apply between two objects, select both objects and choose Clearance
Resolution from the Inspect menu. The Clearance Report dialog will show the clearance required between
the objects on each copper layer, as well as the design rules that resulted in that clearance.
To inspect the design constraints that apply to an object, select it and choose Constraints Resolution from
the Inspect menu. The Constraints Report dialog will show any constraints that apply to the object.
70
Board Statistics
The Board Statistics dialog shows a summary of the board’s contents, including the number of components,
pads and vias; each by their own types as well as the overall board size.
71
Find tool
The Find tool searches for text in the PCB, including reference designators, footprint fields, and graphic text.
When the tool finds a match, the canvas is zoomed and centered on the match and the text is highlighted.
Launch the tool using the ( ) button in the top toolbar.
72
Match case: Selects whether the search is case-sensitive.
Words: When selected, the search will only match the search term with complete words in the PCB. When
unselected, the search will match if the search term is part of a larger word in the PCB.
Wildcards: When selected, wildcards can be used in the search terms. ? matches any single character, and
* matches any number of characters. Note that when this option is selected, partial matches are not
returned: searching for abc* will match the string abcd , but searching for abc will not.
Wrap: When selected, search results will return to the first hit after reaching the last hit.
Search footprint reference designators: Selects whether the search should apply to footprint reference
designators.
Search footprint values: Selects whether the search should apply to footprint value fields.
Search other text items: Selects whether the search should apply to other text items, including graphical
text and footprint fields other than value and reference.
Search DRC markers: Selects whether the search should apply to the violation descriptions of DRC markers
shown on the board.
Search net names: Selects whether the search should apply to the names of nets in the board.
Search panel
The search panel is a docked panel that lists information about footprints, zones, nets, ratsnest lines
(unrouted segments), and text from the PCB. You can optionally filter the list based on a search string. When
no filter is used, all items in the design are listed in the corresponding tab.
Items are filtered based on their properties: footprints are filtered by their reference designator and value,
zones by the zone name, net and ratsnest items by the net name, and text (text, textboxes, and dimensions)
by the text content. You can sort the filtered results in ascending or descending order of the value in a
particular column by clicking on that column header.
Filters support wildcards: * matches any characters, and ? matches any single character. You can also use
regular expressions, such as /footprint value/ .
The displayed information depends on the item type. In addition to the item’s name and/or value, physical
items (footprints, zones, and text) list their layer and X/Y location. Text also displays the type of text object
73
(text, textbox, or dimension.) Net and ratsnest items list their net name and net class.
When you click an item in the search panel, the item is selected in the editing canvas. Double-clicking an item
in the search panel opens its properties dialog (for net and ratsnest items, the net classes dialog is opened
instead).
Show or hide the search panel with View → Show Search Panel or use the Ctrl + G shortcut.
3D Viewer
The 3D Viewer shows a 3-dimensional view of the board and the components on the board. You can view the
board from different perspectives, show or hide different types of components, cross-probe from the PCB
Editor to the 3D viewer, and generate raytraced renders of the board. Show the 3D Viewer with View → 3D
Viewer or use the Alt + 3 shortcut.
The 3D model for a component will only appear if the 3D model file exists and has been
NOTE
assigned to the footprint.
Many footprints in KiCad’s standard library do not yet have model files created for them.
NOTE However, these footprints may contain a path to a 3D model that does not yet exist, in
anticipation of the 3D model being created in the future.
74
pressing Space . Scrolling the mouse wheel will zoom the view in or out. Scrolling while holding Ctrl pans
the view left and right, and scrolling while holding Shift pans up and down. Dragging with the middle
mouse button also pans the view.
Different sized 3D grids can be set using the View → 3D Grid menu. Bounding boxes for each component can
be enabled with Preferences → Show Model Bounding Boxes.
When the PCB Editor and the 3D Viewer are both open, selecting a footprint in the PCB Editor will also
highlight the component in the 3D Viewer. The highlight color is adjustable in Preferences → Preferences…
→ 3D Viewer → Realtime Renderer → Selection Color.
Appearance manager
The appearance manager is a panel at the right of the viewer which provides controls to manage the
visibility, color, and opacity of different types of objects and board layers in the 3D view.
Each layer or type of object in the list can be individually shown or hidden by clicking its corresponding
visibility icon. PCB layers can have their colors customized; double-click on the color swatch next to the item
type to edit the item’s color and opacity. To use the colors selected in the Board Setup dialog’s Physical
Stackup editor, enable the use board stackup colors option.
You can save an appearance configuration as a preset, or load a configuration from a preset, using the Preset
selector at the bottom. The Ctrl + Tab hotkey cycles through presets; press Tab repeatedly while holding
Ctrl to cycle through multiple presets. Several built-in presets are available: "Follow PCB Editor" matches
the visibility settings in the PCB editor, "Follow PCB Plot Settings" matches the visibility settings selected in
the Plot dialog, and "legacy colors" matches the default 3D Viewer color settings from older versions of
KiCad.
Finally, you can save a viewport for later retrieval using the Viewports selector at the bottom. You can
quickly cycle between saved viewports using Shift + Tab ; pressing Tab repeatedly while holding Shift will
cycle through multiple viewports.
The 3D Viewer has a raytracing rendering mode which displays the board using a more physically accurate
rendering model than the default rendering mode. Raytracing is slower than the default rendering mode,
but it can be used when the most visually attractive results are desired. Raytracing mode is enabled with the
button, or with Preferences → Raytracing. The 3D grid and selection highlights are not shown in
raytracing mode.
Colors and other rendering options, for both raytraced and non-raytraced modes, can be adjusted in
Preferences → Preferences…→ 3D Viewer.
3D viewer controls
Many viewing options are controlled with the top toolbar.
75
Reload the 3D model
Redraw
Zoom in
Zoom out
Rotate X clockwise
Rotate X counterclockwise
Rotate Y clockwise
Rotate Y counterclockwise
Rotate Z clockwise
Rotate Z counterclockwise
Pan board up
Net inspector
The Net Inspector allows you to view statistics about all the nets in a board. To open the inspector, click the
icon at the top of the Nets section of the Appearance panel, or select Net Inspector from the Inspect
menu.
76
Clicking a net in the list will highlight that net on the board. Clicking a column title allows you to sort the list
of nets by that column.
The Group By field allows you to combine different nets together and view the total length of the combined
nets. For example, if you have two nets named DATA0 and DATA0_EXT , using a Group By value of DATA0*
will create a group containing both nets. More complicated groupings can be created by changing the Group
By mode from Wildcard to RegEx (regular expressions). The substring (Substr) variants of the Group By
mode will create groups for each set of nets that matches the pattern differently.
For example, if you have the nets U1D+ , U1D- , U2D+ , and U2D- , the grouping pattern U*D will match all
four nets in Wildcard mode, creating a single group U*D . In Wildcard Substr mode, it will match all four
nets, but create two different groups: U1D and U2D .
Pad Count and Via Count show the number of pads (surface mount and through hole) and vias on a net. Via
Length shows the total height of each via (not accounting for which copper layers the via connects to). In
other words, Via Length is equal to Via Count multiplied by the stackup height of the board. Track Length
shows the total length of all track segments in a net, not accounting for topology. Die length shows the total
of all Pad to Die Length values set for pads on the net.
The Net Inspector reports track length as a simple sum of the length of each track segment on a net. The
length tuner calculates an effective electrical length of a net, which includes optimizing paths through
pads to calculate the shortest possible path.
If a routed net has a branching topology, the Net Inspector total includes the length of each branch in the
total. The length tuner calculates a point-to-point length; if there are any branches, the length tuner will
77
stop at the closest branch and report the length up to the branch.
The Net Inspector always uses the full via height, from the front layer to the back layer, for its via length
and total length calculations. The length tuner does not necessarily use the full via height, depending on
which layers the tuned net occupies. If use stackup height is enabled in the board constraint settings, the
length tuner will use the stackup information to include only the length of the portion of the via between
the two relevant signal layers. If use stackup height is not enabled, the length tuner will not include vias
in its calculations at all.
78
Generating outputs
KiCad can generate and export files in a number of different formats useful for manufacturing PCBs and
interfacing with external software. This functionality is available in the File menu in a few different sections.
The Fabrication Outputs section contains the most common operations needed to prepare a PCB for
fabrication. The Export section contains tools for generating files that can be read by external software. The
Plot function allows you to export 2D line drawings of the PCB in various formats. The Print function allows
you to send a view of the PCB to a 2D printer.
Plotting options
Include Layers: Check that every layer used on your board is enabled in the list. Disabled layers will not be
plotted.
Plot on All Layers: Selected layers will be included in the plot for each layer selected in the include layers
list. The additional layers are plotted on top of the base layer. You can reorder these layers using the arrow
79
buttons at the bottom; items that are lower in the list are plotted after (on top of) items that are higher in
the list.
Output directory: Specify the location to save plotted files. If this is a relative path, it is created relative to
the project directory.
Plot drawing sheet: If enabled, the drawing sheet border and title block will be plotted on each layer. This
should usually be disabled when plotting Gerber files.
Plot footprint values: If enabled, the Value field of each footprint will be plotted on whatever layer it exists
on (unless the field visibility is disabled for a specific footprint).
Plot reference designators: If enabled, the Reference Designator field of each footprint will be plotted on
whatever layer it exists on (unless the field visibility is disabled for a specific footprint).
Plot footprint text: If enabled, text fields in footprints will be plotted on whatever layers they exist on
(unless the field visibility is disabled for a specific footprint). Disabling this option also disables the plot
footprint values and plot reference designators options.
Force plotting of invisible values / refs: If enabled, all footprint values and reference designators will be
plotted, even if the field visibility is disabled for some of these fields.
Plot Edge.Cuts on all layers: If enabled, the Edge.Cuts (board outline) layer will be added to all other layers.
Check with your manufacturer to see what the correct value of this setting is for their manufacturing
process.
Sketch pads on fabrication layers: If enabled, footprint pads on fabrication (F.Fab, B.Fab) layers will be
drawn as unfilled outlines rather than filled shapes.
Check zone fills before plotting: When enabled, zone fills will be checked (and refilled if outdated) before
generating outputs. Plot outputs may be incorrect if this option is disabled!
Drill marks: For plot formats other than Gerber, marks may be plotted at the location of all drilled holes.
Drill marks may be created at the actual size (diameter) of the finished hole, or at a smaller size.
Scaling: For plot formats that support scaling other than 1:1, the plot scale may be set. The Auto scaling
setting will scale the plot to fit the specified page size.
Plot mode: For some plot formats, filled shapes may be plotted as outlines only (sketch mode).
Use drill/place file origin: When enabled, the coordinate origin for plotted files will be the drill/place file
origin set in the board editor. When disabled, the coordinate origin will be the absolute origin (top left
corner of the worksheet).
Mirrored plot: For some plot formats, the output may be mirrored horizontally when this option is set.
Negative plot: For some plot formats, the output may be set to negative mode. In this mode, shapes will be
drawn for the empty space inside the board outline, and empty space will be left where objects are present
in the PCB.
Do not tent vias: If enabled, vias will be left uncovered on the solder mask layers (F.Mask, B.Mask). If
disabled, vias will be covered by solder mask (tented).
80
KiCad does not support tenting or uncovering specific vias. Tenting may only be
NOTE
controlled globally (for all vias on a board).
Gerber options
Use Protel filename extensions: When enabled, the plotted Gerber files will be named with file extensions
based on Protel ( .GBL , .GTL , etc). When disabled, the files will have the .gbr extension.
Generate Gerber job file: When enabled, a Gerber job file ( .gbrjob ) will be generated along with any
Gerber files. The Gerber job file is an extension to the Gerber format that includes information about the
PCB stackup, materials, and finish. More information about Gerber job files is available at the Ucamco
website.
Subtract soldermask from silkscreen: When enabled, silkscreen will be automatically removed from
board areas that aren’t covered by soldermask.
Coordinate format: Configure how coordinates will be stored in the plotted Gerber files. Check with your
manufacturer for their recommended setting for this option.
Use extended X2 format: When enabled, the plotted Gerber files will use the X2 format, which includes
information about the netlist and other extended attributes. This format may not be compatible with older
CAM software used by some manufacturers.
Include netlist attributes: When enabled, the plotted Gerber files will include netlist information that can
be used for checking the design in CAM software. When X2 format mode is disabled, this information is
included as comments in the Gerber files.
Disable aperture macros: When enabled, all shapes will be plotted as primitives rather than by using
aperture macros. This setting should only be used for compatibility with old or buggy CAM software when
requested by your manufacturer.
PostScript options
Scale factor: Controls how coordinates in the board file will be scaled to coordinates in the PostScript file.
Using a different value for X and Y scale factors will result in a stretched / distorted output. These factors
may be used to correct for scaling in the PostScript output device to achieve an exact-scale output.
Track width correction: A global factor that is added (or subtracted, if negative) from the size of tracks,
vias, and pads when plotting a PostScript file. This factor may be used to correct for errors in the PostScript
output device to achieve an exact-scale output.
Force A4 output: When enabled, the generated PostScript file will be A4 size even if the KiCad board file is a
different size.
SVG options
Precision: Controls how many significant digits will be used to store coordinates.
Output mode: Controls whether the generated SVG file is in color or black and white.
81
DXF options
Plot graphic items using their contours: Graphic shapes in DXF files have no width. This option controls
how graphic shapes with a width (thickness) in a KiCad board are plotted to a DXF file. When this option is
enabled, the outer contour of the shape will be plotted. When this option is disabled, the centerline of the
shape will be plotted (and the shape’s thickness will not be visible in the resulting DXF file).
Use KiCad font to plot text: When enabled, text in the KiCad design will be plotted as graphic shapes using
the KiCad font. When disabled, text will be plotted as DXF text objects, which will use a different font and
will not appear in exactly the same position and size as shown in the KiCad board editor.
Export units: Controls the units that will be used in the DXF file. Since the DXF format has no specified units
system, you must export using the same units setting that you want to use for importing into other software.
HPGL options
Default pen size: Controls the plotter pen size used to create graphics.
PDF options
Output mode: Controls whether the generated PDF file is in color or black and white.
Generate property popups for front footprints: When enabled, interactive popups will be added to the
generated PDF containing part information for each footprint on the front of the board.
Generate property popups for back footprints: When enabled, interactive popups will be added to the
generated PDF containing part information for each footprint on the back of the board.
Drill files
KiCad can generate CNC drilling files required by most PCB manufacturing processes in either Excellon or
Gerber X2 format. KiCad can also generate a drill map: a graphical plot of the board showing drill locations.
Select the Drill Files (.drl)… option from the Fabrication Outputs section of the File menu to open the
dialog:
82
Output folder: Choose the folder to save generated drill and map files to. If a relative path is entered, it will
be relative to the project directory.
Drill file format: Choose whether to generate Excellon drill files (required by most PCB manufacturers) or
Gerber X2 files.
Mirror Y axis: For Excellon files, choose whether or not to mirror the Y-axis coordinate. This option should
in general not be used when having PCBs manufactured by a third party, and is provided for convenience for
users who are making PCBs themselves.
Minimal header: For Excellon files, choose whether to output a minimal header rather than a full file
header. This option should not be enabled unless requested by your manufacturer.
PTH and NPTH in single file: By default, plated holes and non-plated holes will be generated in two
different Excellon files. With this option enabled, both will be merged into a single file. This option should
not be enabled unless requested by your manufacturer.
Oval holes drill mode: Controls how oval holes are represented in an Excellon drill file. The default setting,
Use route command, is correct for most manufacturers. Only choose the Use alternate drill mode setting if
83
requested by your manufacturer.
Map file format: Choose the output format for plotting a drill map.
Drill origin: Choose the coordinate origin for drill files. Absolute will use the page origin at the top left
corner. Drill/place file origin will use the origin specified in the board design.
Drill units: Choose the units for drill coordinates and sizes.
Zeros format: Controls how numbers are formatted in an Excellon drill file. Select an option here based on
your manufacturer’s recommendations.
IPC-2581 files
IPC-2581 files are XML files that contain complete fabrication and assembly data for a board design. If your
manufacturer accepts IPC-2581 files, these can replace Gerber files, drill files, and component placement
files. To create an IPC-2581 file, select IPC-2581 File (.xml)… from the Fabrication Outputs section of the
File menu.
Precision: Choose the number of digits after the decimal point for numbers in the generated file.
Compress output: If enabled, the generated file will be compressed as a ZIP file.
Internal ID: Choose the footprint field to use for the BOM’s internal ID column. This can be a generated
unique ID or set to any footprint field in the design.
Manufacturer PN: Choose the footprint field to use for the BOM’s manufacturer part number column. This
can be omitted or set to any footprint field in the design.
84
Manufacturer: Choose the footprint field to use for the BOM’s manufacturer column. This can be omitted
or set to any footprint field in the design.
Distributor PN: Choose the footprint field to use for the BOM’s distributor part number column. This can be
omitted or set to any footprint field in the design.
Distributor: Choose the footprint field to use for the BOM’s distributor column. This can be omitted or set
to any footprint field in the design.
A footprint will not appear in generated placement files if the "Exclude from position
files" option is enabled for that footprint. This may be used for excluding certain
NOTE
footprints that do not represent physical components to be assembled. You can also
optionally exclude DNP components, depending on your manufacturer’s requirements.
85
Format: Choose between generating a plain text (ASCII), comma-separated text (CSV), or Gerber X3
placement file format.
Units: Choose the units for component locations in the placement file.
Files: Choose whether to generate separate files for footprints on the front and back of the board or a single
file combining both sides.
Include only SMD footprints: When enabled, only footprints with the SMD fabrication attribute will be
included. Check with your manufacturer to determine if non-SMD footprints should be included or excluded
from the position file.
Exclude all footprints with through hole pads: When enabled, footprints will be excluded from the
placement file if they contain any through-hole pads, even if their fabrication type is set to SMD.
Exclude all footprints with the Do Not Populate flag set: When enabled, footprints will be excluded from
the placement file if they have the Do Not Populate attribute set. Check with your manufacturer to
determine if DNP components should be included or excluded from the position file.
Include board edge layer: For Gerber placement files, controls whether or not the board outline is included
with the footprint placement data.
Use drill/place file origin: When enabled, component positions will be relative to the drill/place file origin
set in the board design. When disabled, the positions will be relative to the page origin (upper left corner).
Use negative X coordinates for footprints on bottom layer: When enabled, the X coordinates will be
flipped (negated) for footprints on the bottom layer.
Printing
KiCad can print the board view to a standard printer using the Print action in the File menu.
86
Include layers: Select the layers to include in the printout. Unselected layers will be invisible. Right-click the
list for layer selection commands.
Output mode: Choose whether to print in black and white or full color.
Print drawing sheet: When enabled, the page border and title block will be printed.
Print according to objects tab of appearance manager: When enabled, any objects that have been hidden
in the Objects tab of the Appearance panel will be hidden in the printout. When disabled, these objects will
be printed if the layer they appear on is selected in the Included Layers area.
Print background color: When printing in full color, this option controls whether or not the view
background color will be printed.
Use a different color theme for printing: When printing in full color, this option allows a different color
theme to be used for printing. When disabled, the color theme used by the board editor will be used for
printing.
Drill marks: Controls whether to show drilled holes at their actual size, at a small size, or hide them from
the printout.
87
Print mirrored: When enabled, the printout will be mirrored horizontally.
Print one page per layer: When enabled, each layer selected in the Included Layers area will be printed to
an individual page. If this option is enabled, the Print board edges on all pages option controls whether to
add the Edge.Cuts layer to each printed page.
Scale: controls the scale of the printout relative to the page size configured in Page Setup.
Exporting files
KiCad can export a board design to various third-party formats for use with external software. These
functions are found in the Export section of the File menu.
GenCAD exporter
The GenCAD exporter creates a GenCAD file for fabrication, testing, or importing into other software.
Flip bottom footprint padstacks: If enabled, separate flipped padstack definitions will be added for
bottom-side footprints. This may be necessary for importing into some third-party software.
Generate unique pin names: If enabled, a suffix will be added to each pin name so that no footprint in the
generated file will have two pins with the same name.
Generate a new shape for each footprint instance: If enabled, a unique footprint will be output for every
footprint instance, even if two footprints are identical.
Use drill/place file origin as origin: If enabled, coordinates in the generated file will be relative to the
drill/place file origin.
Save the origin coordinates in the file: If enabled, the selected origin coordinates will be included in the
generated file. If not enabled, the origin in the generated file will be set to (0,0).
88
VRML exporter
The VRML exporter creates a VRML ( .wrl ) 3D model file containing the PCB and any VRML files specified in
footprints. VRML models are suitable for use in applications where visual appearance is important and
dimensional accuracy is not critical.
Coordinate origin options: Selects the origin for the generated model. If user defined origin is selected,
you can manually specify the origin point.
VRML units for output files: Selects the unit system for the generated model. Dimensions in the generated
model will be scaled appropriately.
Copy 3D model files to 3D model path: If enabled, VRML files referenced in footprints will be copied into a
subdirectory of the directory containing the generated board VRML model, and the generated model will
reference the copied files. The subdirectory name is set by the footprint 3D model path field. If disabled,
VRML files referenced in footprints will be embedded in the generated VRML files.
Use relative paths to model files in board VRML file: If enabled, references to external models will use
paths relative to the generated board VRML file. If disabled, the references will use absolute paths. This
option is only available when the copy 3D model files to 3D model path option is enabled.
IDF exporter
The IDF exporter exports an IDFv3 compliant board ( .emn ) and library ( .emp ) file for communicating
mechanical dimensions to a mechanical CAD package. The exporter exports the board outline and cutouts,
all pad and mounting through holes including slotted holes, and component outlines; this is the most basic
89
set of mechanical data required for interaction with mechanical designers. All other entities described in the
IDFv3 specification are currently not exported.
You must attach IDF component models to your design’s footprints before they will be
included in the exported model. For more information on attaching models to footprints,
NOTE
see the footprint documentation. Some IDF-specific guidance is included in the Advanced
Topics documentation.
For more information on creating IDF component models, including descriptions of the
NOTE
IDF utility tools included with KiCad, see the Advanced Topics documentation.
Once models have been specified for all desired components, the model of the board can be exported. In the
PCB Editor, select File → Export → IDFv3….
Grid reference point: Choose where the exported model’s reference point should be. If the Adjust
automatically option is selected, KiCad will set the reference point to the centroid of the PCB. Otherwise,
the reference point is set relative to the display origin.
Output units: Choose whether the exported model’s units are millimeters or mils.
The outputs can be viewed directly in a mechanical CAD application or converted to VRML using the
idf2vrml tool.
STEP exporter
The STEP exporter creates a STEP ( .step ) 3D model file containing the PCB and any STEP files specified in
footprints. STEP models are suitable for use in mechanical CAD applications.
The STEP exporter can also export a binary GLTF ( .glb ) model file by changing the output file’s format to
Binary GLTF.
90
KiCad’s footprint library includes both STEP and VRML ( .wrl ) versions of each model.
However, footprints in KiCad’s library only reference the VRML versions of the models.
NOTE VRML models are not included in STEP exports, but the STEP exporter will instead
include the corresponding STEP version of the model if the subsitute similarly named
models option is enabled.
Coordinates: Selects the origin for the generated model. If user defined origin is selected, you can manually
specify the origin point.
Ignore 'Do not populate' components: If enabled, components with the DNP attribute set will not be
included in the exported STEP model.
Ignore 'Unspecified' components: If enabled, components with the Unspecified footprint type will not be
included in the exported STEP model.
Substitute similarly named models: VRML models cannot be used for STEP exports, but if this option is
enabled the exporter will look for an identically named STEP model to include in the export instead of a
footprint’s specified VRML model. Note that footprints in KiCad’s footprint library specify VRML models, but
suitably named STEP models are included for each VRML model. Therefore this option must be enabled in
order to export STEP models for footprints from KiCad’s library.
Overwrite old file: If enabled, the exported STEP model will overwrite an existing file with the same name.
Optimize STEP file: If enabled, parametric curves will be disabled in the exported STEP model. This reduces
the file size, but may reduce compatibility with some software.
Export tracks, pads and vias: If enabled, tracks, pads, and vias on outer layers will be modeled in the
exported STEP model. This option may increase the export time.
91
Export zones: If enabled, zones on outer layers will be modeled in the exported STEP model. This option
may increase the export time.
Board outline chaining tolerance: Controls the minimum distance between two points for the points to be
considered coincident. If the board outline in the exported STEP model is not contiguous, try increasing this
tolerance.
SVG exporter
The SVG exporter creates a vector graphics image of the board.
Print mode: Controls whether the generated SVG file is in color or black and white.
Color theme: Controls the color theme used for the generated SVG file. If the use current board theme
option is selected, the theme that is selected in the board editor will be used.
92
SVG page size: Controls the size of the generated SVG drawing. If page with frame and title block is
selected, the drawing will match the board’s sheet size and will include the drawing sheet and title block. If
current page size is selected, the drawing will match the board’s sheet size but will not include the drawing
sheet. If board area only is selected, the drawing will be just big enough to fit the board itself.
Print one page per layer: When selected, a separate SVG file will be generated for each selected layer. If the
print board edges on all pages option is selected, the Edge.Cuts layer will be included in all generated
SVGs, even if it is not selected as a layer.
Hyperlynx exporter
The Hyperlynx exporter creates a file suitable for importing into Mentor Graphics (Siemens) HyperLynx
simulation and analysis software. This exporter has no configurable options.
93
Footprints and footprint libraries
KiCad organizes footprints into footprint libraries, which hold collections of footprints. Each footprint in a
board is uniquely identified by a full name that is composed of a library nickname and a footprint name. For
example, the identifier Capacitor_SMD:C_0603_1608Metric refers to the C_0603_1608Metric footprint in
the Capacitor_SMD library.
The global footprint library table contains the list of libraries that are always available regardless of the
currently loaded project. The table is saved in the file fp-lib-table in the KiCad configuration folder. The
location of this folder depends on the operating system being used.
The project specific footprint library table contains the list of libraries that are available specifically for the
currently loaded project. If there are any project-specific footprint libraries, the table is saved in the file fp-
lib-table in the project folder.
KiCad’s footprint library management system allows directly using many types of footprint libraries,
including formats that are native to other non-KiCad EDA tools:
KiCad .pretty footprint libraries (folders with .pretty extension, containing .kicad_mod files)
94
EasyEDA / JLCEDA Standard Edition ( .json or .zip files)
Non-KiCad footprint libraries, including KiCad Legacy footprint libraries, can be migrated to KiCad .pretty
format using the Migrate Libraries button (see the migrating libraries section).
KiCad only supports writing to KiCad’s native .pretty format footprint libraries (and the
.kicad_mod footprint files within them). All other footprint library formats are read-
NOTE
only. To modify a non-KiCad format footprint library, you must first convert it to KiCad
format.
Initial Configuration
The first time the PCB Editor (or any other KiCad tool that uses footprints) runs and the global footprint
table file fp-lib-table is not found, KiCad will guide the user through setting up a new footprint library
table. This process is described above.
Add a library either by clicking the button and selecting a library or clicking the button and typing the
path to a library file. The selected library will be added to the currently opened library table (Global or
Project Specific). Libraries can be removed by selecting desired library entries and clicking the button.
The and buttons move the selected library up and down in the library table. This does not affect the
display order of libraries in the Footprint Library Browser, Footprint Editor, or Add Footprint tool.
Libraries can be made inactive by unchecking the Active checkbox in the first column. Inactive libraries are
still in the library table but do not appear in any library browsers and are not loaded from disk, which can
reduce loading times.
A range of libraries can be selected by clicking the first library in the range and then Shift -clicking the last
library in the range.
Each library must have a unique nickname: duplicate library nicknames are not allowed in the same table.
However, nicknames can be duplicated between the global and project library tables. Libraries in the project
table take precedence over libraries with the same name in the global table.
Library nicknames do not have to be related to the library filename or path. The colon character ( : ) cannot
be used in library nicknames or footprint names because it is used as a separator between nicknames and
footprints.
Each library entry must have a valid path. Paths can be defined as absolute, relative, or by environment
variable substitution.
The appropriate library format must be selected in order for the library to be properly read. The supported
formats are listed above. Only KiCad format libraries ( .pretty folders containing .kicad_mod files) can be
95
saved. Other footprint library formats are read-only and must be converted to KiCad format before you can
modify them.
There is an optional description field to add a description of the library entry. The option field is not used at
this time so adding options will have no effect when loading libraries.
By default, KiCad defines several environment variables which are described in the project manager
documentation. Environment variables can be configured in the Preferences → Configure Paths…dialog.
Using environment variables in the footprint library tables allows libraries to be relocated without breaking
the footprint library tables, so long as the environment variables are updated when the library location
changes.
${KIPRJMOD} is a special environment variable that always expands to the absolute path of the current
project directory. ${KIPRJMOD} allows libraries to be stored in the project folder without having to use an
absolute path in the project library table. This makes it possible to relocate projects without breaking their
project library tables.
As with most KiCad files, newer versions of KiCad can open older-format library files, but
NOTE older versions of KiCad cannot read files once they have been saved by a newer version of
KiCad.
Libraries in other formats can be converted to KiCad libraries by selecting them in the footprint library table
and clicking the Migrate Libraries button. Multiple libraries can be selected and migrated at once by Ctrl -
clicking or shift -clicking.
Libraries can also be converted one at a time by opening them in the Footprint Editor and saving them as a
new library.
96
Custom pad shapes
Footprint attributes
NOTE Mention net ties here
Footprint wizards
For more information about creating new footprint wizards, see the Scripting section of the Advanced
Topics chapter.
97
Advanced topics
Configuration and Customization
The KiCad PCB Editor has a variety of preferences that can be configured through the Preferences dialog.
Like all parts of KiCad, the preferences for the PCB Editor are stored in the user configuration directory and
are independent between KiCad minor versions to allow multiple versions to run side-by-side with
independent preferences.
The first sections of the Preferences dialog (Common, Mouse and Touchpad, and Hotkeys) are shared
between all KiCad programs. These sections are described in detail in the KiCad manual under the "Common
preferences" section.
Display options
Grid thickness: Controls how thick grid lines or dots are drawn.
Min grid spacing: Controls the minimum distance, in pixels, between two grid lines. Grid lines that violate
this minimum spacing will not be drawn, regardless of the current grid setting.
Snap to grid: Controls when drawing and editing operations will be snapped to coordinates on the active
grid. "Always" will enable snapping even when the grid is hidden; "When grid shown" will enable snapping
only when the grid is visible.
98
Cursor shape: Controls whether the editing cursor is drawn as a small crosshair or a full-screen crosshair (a
set of lines covering the entire drawing canvas). The editing cursor shows where the next drawing or editing
action will occur and will be snapped to a grid location if snapping is enabled.
Always show crosshairs: Controls whether the editing cursor is shown all the time or only when an editing
or drawing tool is active.
Net names: Controls whether or not net name labels are drawn on copper objects. These labels are guides
for editing only and do not appear in fabrication outputs.
Show pad numbers: Controls whether or not pad number labels are drawn on footprint pads.
Show pad <no net> indicator: Controls whether or not pads with no net are indicated with a special
marker.
Track clearance: Controls whether or not clearance outlines around tracks and vias are shown. Clearance
outlines are shown as thin shapes around objects that indicate the minimum clearance to other objects, as
defined by constraints and design rules.
Show pad clearance: Controls whether or not clearance outlines around pads are shown.
Center view on cross-probed items: When the Schematic and PCB Editors are both running, controls
whether clicking a component or pin in Eeschema will center the PCB Editor view on the corresponding
footprint or pad.
Zoom to fit cross-probed items: Controls whether the view will be zoomed to show a cross-probed
footprint or pad.
Highlight cross-probed nets: Controls whether or not nets highlighted in Eeschema will be highlighted in
the PCB Editor when the highlight tool is activated in both tools.
Editing options
99
Flip board items L/R: Controls the direction board items will be flipped when moving them between the
top and bottom layers. When checked, items are flipped Left-to-Right (about the Vertical axis); when
unchecked, items are flipped Top-to-Bottom (about the Horizontal axis).
Step for rotate commands: Controls how far the selected object(s) will be rotated each time the Rotate
command is used.
Allow free pads: Controls whether or not the pads of footprints can be unlocked and edited or moved
separately from the footprint.
Magnetic points: This section controls object snapping, also called magnetic points. Object snapping takes
precedence over grid snapping when it is enabled. Object snapping only works to objects on the active layer.
Hold Shift to temporarily disable object snapping.
Snap to pads: Controls when the editing cursor will snap to pad origins.
Snap to tracks: Controls when the editing cursor will snap to track segment endpoints.
Snap to graphics: Controls when the editing cursor will snap to graphic shape points.
Always show selected ratsnest: When enabled, the ratsnest for a selected footprint will always be shown
even if the global ratsnest is hidden.
Show ratsnest with curved lines: Controls whether ratsnest lines are drawn straight or curved.
Mouse drag track behavior: Controls the action that will occur when you drag a track segment with the
mouse: "Move" will move the track segment independent of any others. "Drag (45 degree mode)" will invoke
the push-and-shove router to drag the track, respecting design rules and keeping other track segments
attached. "Drag (free angle)" will move the nearest corner of the track segment, highlighting collisions with
other objects but not moving them out of the way.
Limit actions to 45 degrees from start Controls whether lines drawn with the graphic drawing tools can
take on any angle. Note that this only affects drawing new lines: lines can be edited to take on any angle.
Show page limits: Controls whether or not the page boundary is drawn as a rectangle.
Refill zones after Zone Properties dialog: Controls whether or not zones are automatically refilled after
editing the properties of any zone. This may be disabled on complicated designs or slower computers to
improve responsiveness.
100
Colors
KiCad supports switching between different color themes to match your preferences. Kicad 8.0 comes with
two built-in color themes: "KiCad Default" is a new theme designed to have good contrast and balance for
most cases and is the default for new installations. "KiCad Classic" is the default theme from KiCad 5.1 and
earlier versions. Neither of these built-in themes can be modified, but you can create new themes to
customize the look of KiCad as well as install themes made by other users.
Color themes are stored in JSON files located in the colors subdirectory of the KiCad configuration
directory. The "Open Theme Folder" button will open this location in your system file manager, making it
easy to manage your installed themes. To install a new theme, place it in this folder and restart KiCad. The
new theme will be available from the drop-down list of color themes if the file is a valid color theme file.
To create a new color theme, choose New Theme… from the drop-down list of color themes. Enter a name
for your theme and then begin editing colors. The colors in the new theme will be copied from whatever
theme was selected before you created the new theme.
To change a color, double-click or middle-click the color swatch in the list. The "Reset to Default" button will
reset that color to its corresponding entry in the "KiCad Default" color theme.
Color themes are saved automatically; all changes are reflected immediately when you close the Preferences
dialog. The window on the right side of the dialog shows a preview of how the selected theme will look.
101
Action plugins
The KiCad PCB editor supports plugins written in Python that can perform actions on the board being
edited. These plugins can be installed using the built-in Plugin and Content Manager (see the KiCad chapter
for details) or by placing the plugin files inside the user plugins directory. See the Scripting section below for
details.
Each plugin that is detected will be shown in a row on this preferences page. Plugins may show a button on
the top toolbar of the PCB editor. If the "Show button" control is unchecked for a plugin, it may still be
accessed from the Tools > External Plugins menu.
The arrow controls at the bottom of the list allow changing the order that the plugins appear in the toolbar
and menu. The folder button will launch a file explorer to the plugin folder, to make installing new plugins
easier. The refresh button will scan the plugin folder for any new or removed plugins and update the list.
102
Origin & axes
Display origin: Determines which coordinate origin is used for coordinate display in the editing canvas. The
page origin is fixed at the corner of the page. The drill/place file origin and the grid origin can be moved by
the user.
Text variables
KiCad supports text variables, which allow you to substitute the variable name with a defined text string.
This substitution happens anywhere the variable name is used inside the variable replacement syntax of
${VARIABLENAME} .
You can define your own text variables in the schematic or board setup dialogs, but there are also a number
of built-in system text variables. System text variables may be available in some contexts and not others.
The following variables can be used in PCB text, footprint text, footprint fields, and drawing sheet fields.
There are also a number of variables that can be used in the Schematic Editor.
103
Variable name Description
KICAD_VERSION Current version of KiCad. This variable is only available in drawing sheet fields.
LAYER Layer of the object. In footprint fields, this is the layer of the parent footprint. In
drawing sheet fields, this resolves to the plotted layer.
PAPER Current sheet’s paper size. This variable is only available in drawing sheet fields.
<fieldname> Contents of footprint field <fieldname>. Fields can only be accessed from within
their parent object, so footprint fields can be accessed from other fields or text
within the footprint.
Both built-in footprint fields and user-defined fields from the corresponding
symbol are available. Built-in footprint fields use all uppercase letters: for example,
to access a footprint’s value, use ${VALUE}.
104
Custom design rules
KiCad’s custom design rule system allows creating design rules that are more specific than the generic rules
available in the Constraints page of the Board Setup dialog. Custom design rules have many applications, but
in general they are used to apply certain rules to a portion of the board, such as a specific net or netclass, a
specific area, or a specific footprint.
Custom design rules are stored in a separate file with the extension kicad_dru . This file is created
automatically when you start adding custom rules to a project. If you are using custom rules in your project,
make sure to save the kicad_dru file along with the kicad_pcb and kicad_pro files when making backups
or committing to a version control system.
The kicad_dru file is managed automatically by KiCad and should not be edited with an
NOTE external text editor. Always use the Custom Rules page of the Board Setup dialog to edit
custom design rules.
The custom rules editor also provides context-sensitive autocomplete to suggest valid keywords and
properties. The autocomplete suggestion menu appears automatically, but it can also be opened manually by
pressing Ctrl + Space .
It is a good idea to use the Check rule syntax button after editing custom rules to make sure there are no
syntax errors. Any errors in the custom rules will prevent the design rule checker from running.
The language uses parentheses ( ( and ) ) to define clauses of related tokens and values. Parentheses must
always be matched: for every ( there must be a matching ) . Inside a clause, tokens and values are
separated by whitespace. By convention, a single space is used, but any number of whitespace characters
between tokens is acceptable. In places where text strings are valid, strings without any whitespace may be
quoted with " or ' , or unquoted. Strings that contain whitespace must always be quoted. Where nested
quotes are required, a single level of nesting is possible by using " for the outer quote character and ' for
the inner (or vice versa). Newlines are not required, but are typically used in examples for clarity.
In the syntax descriptions below, items in <angle brackets> represent tokens that must be present and
items in [square brackets] represent tokens that are optional or only sometimes required.
The Custom Rules file must start with a version header defining the version of the rules language. As of
KiCad 8.0, the version is 1 . The syntax of the version header is (version <number>) . So in KiCad 8.0 the
header should read:
105
(version 1)
After the version header, you can enter any number of rules. Rules are evaluated in reverse order, meaning
the last rule in the file is checked first. Once a matching rule is found for a given set objects being tested, no
further rules will be checked. In practice, this means that more specific rules should be later in the file, so
that they are evaluated before more general rules.
For example, if you create one rule that limits the minimum clearance between tracks in the net HV and
tracks in any other net and a second rule that limits the minimum clearance for all objects inside a certain
rule area, make sure the first rule appears later in the custom rules file than the second rule. Otherwise
tracks in the HV net could have the wrong clearance if they fall inside the rule area.
Each rule must have a name and one or more constraint clauses. The name can be any string and is used to
refer to the rule in DRC reports. The constraint defines the behavior of the rule. Rules may also have a
condition clause that determines which objects should have the rule applied, an optional layer clause
which specifies which board layers the rule applies to, and an optional severity clause which specifies the
severity of the resulting DRC violation.
(rule <name>
[(severity <severity>)]
[(layer <layer_name>)]
[(condition <expression>)]
(constraint <constraint_type> [constraint_arguments]))
The custom rules file may also include comments to describe rules. Comments are denoted by any line that
begins with the # character (not including whitespace). You can press Ctrl + / to comment or uncomment
lines automatically.
Layer Clause
The layer clause determines which layers the rule will work on. While the layer of objects can be tested in
the condition clause as described below, using the layer clause is more efficient.
The value of the layer clause can be any board layer name, or the shortcuts outer to match the front and
back copper layers ( F.Cu and B.Cu ) and inner to match any internal copper layers.
If the layer clause is omitted, the rule will apply to all layers.
Some examples:
106
# Do not allow footprints on back layer (no condition clause means this rule always
applies)
(rule "Top side footprints only"
(layer B.Cu)
(constraint disallow footprint))
# Larger clearance on outer layers (inner layer clearance set by board minimum clearance)
(rule "clearance_outer"
(layer outer)
(constraint clearance (min 0.25mm)))
Severity Clause
The severity clause sets the DRC violation severity whenever the rule is violated.
Possible values are error , warning , ignore , and exclusion . Ignored rules are not observed by the
interactive router and violations are not shown in the DRC dialog. However, ignored rules are evaluated for
matching and therefore can still override earlier rules. Errors, warnings, and excluded rules are all observed
by the interactive router, and violations are displayed in the DRC dialog when the appropriate filters are
selected.
Setting a rule’s severity to ignore does not disable the rule; only the effects of the rule
WARNING
are disabled. The rule is still evaluated and can still override previous rules.
Condition Clauses
The condition clause determines which objects which objects the rule applies to. If a rule has a condition
clause, the rule will apply to any objects that match the condition. If a rule does not have any condition
clauses, it will apply unconditionally.
The rule condition is an expression contained inside a text string (and therefore usually surrounded by
quotes in order to allow whitespace for clarity). The expression is evaluated against each pair of objects that
is being tested by the design rule checker. For example, when checking for clearance between copper
objects, each copper object (track segment, pad, via, etc.) on each net is checked against other copper objects
on other nets. If a custom rule exists where the expression matches the two given copper objects and the
constraint defines a copper clearance, this custom rule could be used to determine the required clearance
between the two objects.
The objects being tested are referred to as A and B in the expression language. The order of the two objects
is not important because the design rule checker will test both possible orderings. For example, you can
write a rule that assumes that A is a track and B is a via. There are some expression functions that test both
objects together; these use AB as the object name.
The expression in a condition must resolve to a boolean value ( true or false ). If the expression resolves
to true , the rule is applied to the given objects.
107
Each object being tested has properties that can be compared, as well as functions that can be used to
perform certain tests. The syntax for using properties and functions is <object>.<property> and
<object>.<function>([arguments]) respectively.
When you type <object>. in the text editor ( A. , B. , or AB. ), an autocomplete list will
NOTE
open that contains all the object properties that can be used.
The object properties and functions are compared using boolean operators to result in a boolean
expression. The following operators are supported:
== Equal to
!= Not equal to
&& And
|| Or
For example, A.NetClass == 'HV' will apply to any objects that are part of the "HV" netclass and
A.NetClass != B.NetClass will apply to any objects that are in different netclasses. Parentheses can be
used to clarify the order of operations in complex expressions but they are not required. All the boolean
operators have the same precedence and are evaluated in order from left to right.
Some properties represent a physical measurement, such as a size, angle, length, position, etc. On these
properties, unit suffixes can be used in the custom rules language to specify what units are being used. If no
unit suffix is used, the internal representation of the property will be used instead (nanometers for
distances and degrees for most angles). The following suffixes are supported:
mm Millimeters
in , " Inches
deg Degrees
rad Radians
The units used in custom design rules are independent of the display units in the PCB
NOTE
editor.
Numeric conditions can use simple math expressions, for example (condition "A.Hole_Size_X == 1.0mm +
0.1mm") .
108
Constraint Clauses
The constraint clause of the rule defines the behavior of the rule on the objects that are matched by the
condition. Each constraint clause has a constraint type and one or more arguments that set the behavior of
the constraint. A single rule may have multiple constraint clauses, in order to set multiple constraints (for
example, clearance and track_width ) for objects that match the same rule conditions.
Many constraints take arguments that specify a physical measurement or quantity. These constraints
support minimum, optimal, and maximum value specification (abbreviated "min/opt/max"). The minimum
and maximum values are used for design rule checking: if the actual value is less than the minimum or is
greater than the maximum value in the constraint, a DRC error is created. The optimal value is only used for
some constraints, and informs KiCad of a "best" value to use by default. For example, the optimal
diff_pair_gap is used by the router when placing new differential pairs. No errors will be created if the
differential pair is later modified such that the gap between the pair is different from the optimal value, as
long as the gap is between the minimum and maximum values (if these are specified). In all cases where a
min/opt/max value is accepted, any or all of the minimum, optimal, and maximum value can be specified.
Min/opt/max values are specified as (min <value>) , (opt <value>) , and (max <value>) . For example, a
track width constraint may be written as (constraint track_width (min 0.5mm) (opt 0.5mm) (max
1.0mm)) or simply (constraint track_width (min 0.5mm)) if only the minimum width is to be constrained.
Numeric constraint values can use simple math expressions, for example (constraint clearance (min
0.5mm + 0.1mm)) .
assertion boolean Checks that the boolean expression is true. If the expression
expression is false, a DRC error will be created. The expression can use
any of the properties listed in the Object Properties section.
connection_width min Checks the width of connections between pads and zones. An
error will be generated for each pad connection that is
narrower than the min value.
109
Constraint type Argument type Description
diff_pair_uncoupled max Checks the distance that a differential pair track is routed
uncoupled from the other polarity track in the pair (for
example, where the pair fans out from a component, or
becomes uncoupled to pass around another object such as a
via).
edge_clearance min/opt/max Checks the clearance between objects and the board edge.
hole_clearance min Checks the clearance between a drilled hole in a pad or via
and copper objects on a different net. The clearance is
measured from the diameter of the hole, not its center.
110
Constraint type Argument type Description
length min/max Checks the total routed length for the nets that match
the rule condition and generates an error for each net
that is below the min value (if specified) or above the
max value (if specified) of the constraint. This
constraint also sets a target length that is used by the
length tuning tool for any nets that match the rule
condition.
111
Constraint type Argument type Description
skew min/opt/max Checks the total skew for the nets that match the rule
condition, that is, the difference between the length of each
net and the average of all the lengths of each net that is
matched by the rule. If the difference between that average
and the length of any one net is above the constraint max
value, an error will be generated. This constraint also sets a
target skew that is used by the skew tuning tool for any
nets that match the rule condition. The target skew is the
opt value, if specified, or the min value if not. If neither
min nor opt is specified, the target skew is 0 .
text_height min/max Checks the height of text, including text boxes. An error
will be generated for each text item that has a height below
the min value (if specified) or above the max value (if
specified).
text_thickness min/max Checks the thickness of text, including text boxes. An error
will be generated for each text item that has a thickness
below the min value (if specified) or above the max value
(if specified).
thermal_relief_gap min Specifies the width of the gap between a pad and a zone
with a thermal-relief connection.
thermal_spoke_width opt Specifies the width of the spokes connecting a pad to a zone
with a thermal-relief connection.
track_width min/opt/max Checks the width of track and arc segments. An error will
be generated for each segment that has a width below the
min value (if specified) or above the max value (if
specified).
via_count max Counts the number of vias on every net matched by the
rule condition. If that number exceeds the constraint max
value on any matched net, an error will be generated for
that net.
via_diameter min/max Checks the diameter of vias. An error will be generated for
each via that has a diameter below the min value (if
specified) or above the max value (if specified).
Common Properties
112
Property Data type Description
Layer string The board layer on which the object exists. For objects that exist on
more than one layer, this property will return the first layer (for
example, F.Cu for most through-hole pads/vias).
Parent string Returns the unique identifier of the parent object of this object.
Position_X dimension The position of the object’s origin in the X-axis. Note that the origin of an
object is not always the same as the center of the object’s bounding box.
For example, the origin of a footprint is the location of the (0, 0)
coordinate of that footprint in the footprint editor, but the footprint
may have been designed such that this location is not in the center of the
courtyard shape.
Position_Y dimension The position of the object’s origin in the Y-axis. Note that KiCad always
uses Y-coordinates that increase from the top to bottom of the screen
internally, even if you have configured your settings to show the Y-
coordinates increasing from bottom to top.
113
Property Data type Description
NetClass string The name of the netclass for the copper object.
NetName string The name of the net for the copper object.
Footprint Properties
These properties apply to footprints.
114
Property Data type Description
Solderpaste_Margin_Override dimension The solder paste margin override set for the
footprint.
Solderpaste_Margin_Ratio_Override dimension The solder paste margin ratio override set for the
footprint.
Thermal_Relief_Gap dimension The thermal relief gap set for the footprint.
Thermal_Relief_Width dimension The thermal relief connection width set for the
footprint.
Pad Properties
These properties apply to footprint pads.
115
Property Data type Description
Clearance_Override dimension The copper clearance override set for the pad.
Hole_Size_X dimension The size of the pad’s drilled hole/slot in the X axis.
Hole_Size_Y dimension The size of the pad’s drilled hole/slot in the Y axis.
Pad_Number string The "number" of a pad, which can be a string (for example
"A1" in a BGA).
Pad_To_Die_Length dimension The value of the "pad to die length" property of a pad,
which is additional length added to the pad’s net when
calculating net length.
Pin_Name string The name of the pad (usually the name of the
corresponding pin in the schematic).
Pin_Type string The electrical type of the pad (usually taken from the
corresponding pin in the schematic). One of "Input",
"Output", "Bidirectional", "Tri-state", "Passive", "Free",
"Unspecified", "Power input", "Power output", "Open
collector", "Open emitter", or "Unconnected".
Soldermask_Margin_Override dimension The solder mask margin override set for the pad.
116
Property Data type Description
Solderpaste_Margin_Override dimension The solder paste margin override set for the pad.
Solderpaste_Margin_Ratio_Override dimension The solder paste margin ratio override set for the
pad.
Thermal_Relief_Gap dimension The thermal relief gap set for the pad.
Thermal_Relief_Spoke_Angle dimension The thermal relief connection angle set for the
pad.
Thermal_Relief_Spoke_Width dimension The thermal relief connection width set for the
pad.
Via Properties
These properties apply to vias.
117
Property Data type Description
Tuning_Mode string One of "Single track", "Differential pair", or "Diff pair skew".
Override_Custom_Rules boolean True if the tuning pattern overrides custom DRC rules.
Clearance_Override dimension The copper clearance override set for the zone.
Min_Width dimension The minimum allowed width of filled areas in the zone.
Thermal_Relief_Gap dimension The thermal relief gap set for the zone.
Thermal_Relief_Width dimension The thermal relief connection width set for the zone.
118
Property Data type Description
Text Properties
These properties apply to text objects (footprint fields, free text labels, etc).
Knockout boolean True if the text has the knockout property set.
Expression functions
The following functions can be called on objects in custom rule expressions:
119
Function Objects Description
enclosedByArea('x') A or B Returns true if all of the object is inside the named rule area or
zone. Note that enclosedByArea() is slower than
intersectsArea(). Use `intersectsArea() where possible.
existsOnLayer('layer_id') A or B Returns true if the object exists on the given board layer.
layer_id is a string containing the name of a board layer.
fromTo('x', 'y') A or B Returns true if the object exists on the copper path between
the given pads. x and y are the full names of pads in the
design, such as 'R1-Pad1' .
getField('x') A or B Returns the value of field x in the object. Note that only
footprints have fields, so no field will be returned unless the
object is is a footprint.
inDiffPair('x') A or B Returns true if the object is part of a differential pair and the
base name of the pair matches the given argument x . For
example, inDiffPair('/USB_') or inDiffPair('/USB')
returns true for objects in the nets /USB_P and /USB_N . *
can be used as a wildcard, so inDiffPair('/USB*') matches
/USB1_P and /USB1_N . Note this will always return false if the
given net is not a diff pair, meaning that there isn’t a matching
net of the opposite polarity. So, on a board with a net named
/USB_P but no net named /USB_N , this function returns false.
insideArea('x') A or B Returns true if any part of the object is inside the named rule
area or zone. Rule area and zone names can be set in their
respective properties dialogs. If the given area is a filled copper
zone, the function tests if the given object is inside any of the
filled copper regions of the zone, not if the object is inside the
zone’s outline.
insideCourtyard('x') A or B Returns true if the any part of the object is inside the courtyard
of the given footprint reference. The first variant checks both
insideFrontCourtyard('x')
the front or back courtyard and returns true if the object is
inside either one; the second and third variants check a specific
insideBackCourtyard('x')
courtyard. The * wildcard can be used in the reference:
insideCourtyard('R*') would check all footprints with
references that start with R .
120
Function Objects Description
intersectsArea('x') A or B Returns true if any part of the object is inside the named
rule area or zone. Rule area and zone names can be set in
their respective properties dialogs. If the given area is a
filled copper zone, the function tests if the given object is
inside any of the filled copper regions of the zone, not if
the object is inside the zone’s outline.
intersectsCourtyard('x') A or B Returns true if the any part of the object is inside the
courtyard of the given footprint reference. The first
intersectsFrontCourtyard('x')
variant checks both the front or back courtyard and
returns true if the object is inside either one; the second
intersectsBackCourtyard('x')
and third variants check a specific courtyard. The *
wildcard can be used in the reference:
intersectsCourtyard('R*') would check all footprints
with references that start with R .
isCoupledDiffPair() AB Returns true if the two objects being tested are part of the
same differential pair but are opposite polarities. For
example, returns true if A is in net /USB+ and B is in net
/USB- .
isPlated() A or B Returns true if the object is a plated hole (in a pad or via).
121
Basic examples
(rule RF_width
(layer outer)
(condition "A.NetClass == 'RF'")
(constraint track_width (min 0.35mm) (max 0.35mm)))
122
Various clearances
123
High-current design rules
# Set thermal relief gap & spoke width for all zones
(rule defined_relief
(constraint thermal_relief_gap (min 10mil))
(constraint thermal_spoke_width (min 12mil)))
# Override thermal relief gap & spoke width for GND and PWR zones
(rule defined_relief_pwr
(constraint thermal_relief_gap (min 10mil))
(constraint thermal_spoke_width (min 12mil))
(condition "A.Name == 'zone_GND' || A.Name == 'zone_PWR'"))
124
Hole sizes
Scripting
Scripting allows you to automate tasks within KiCad using the Python language. KiCad provides an API for
editing PCBs that can be used interactively or in standalone scripts. Board Editor scripts can be organized as
"action plugins", which are displayed as icons in the top toolbar of the Board Editor. There is also a separate
Footprint Wizard API that can be used to create footprint creation plugins for the Footprint Editor.
This manual covers general scripting concepts for the Board Editor’s pcbnew API as well as for the footprint
wizard API. Users wishing to write or modify scripts should also use the Doxygen documentation for these
APIs located at https://docs.kicad.org/doxygen-python-8.0/namespaces.html.
KiCad 6 or newer requires Python 3 for scripting support. Python 2 is no longer supported.
125
Platform Path
Linx ~/.local/share/kicad/8.0/scripting/plugins
macOS ~/Documents/KiCad/8.0/scripting/plugins
Windows %HOME%\Documents\KiCad\8.0\scripting\plugins
The type of plugin is determined by the Python class it inherits from. Inheriting from
FootprintWizardBase.FootprintWizard will create a footprint wizard plugin, and
NOTE
inheriting from pcbnew.ActionPlugin will create an action plugin. Creating action
plugins and footprint wizards is described in more detail below.
Because the API is tightly coupled to KiCad’s internals, the API will change over time and is
NOTE not considered stable. Consult the doxygen documentation for the most up-to-date API
reference, and be sure to use the documentation for the appropriate version of KiCad.
Scripts, action plugins, and interactive scripting sessions often start with a call to GetBoard() , which returns
a BOARD object representing the currently open board and its contents.
BOARD has a set of properties and a set for each type of object in the board: footprints, zones, tracks, vias,
text, etc. Each type of object has its own properties and holds its own objects: a footprint will likely have at
least one pad, for example.
The objects in the BOARD can be accessed using methods that each return an iterable list of the
corresponding object type. A selection of these methods are listed below. Other methods are listed in the
doxygen documentation.
board.GetTracks() : returns a list of all of the tracks and vias in the board.
board.GetNetClasses(): returns a list of all net classes in the board’s design rules.
Boards can be loaded and saved from disk using the following functions:
LoadBoard(filename) : loads a board from file, returning a BOARD object, using the file format that
matches the filename extension.
SaveBoard(filename, board) : saves a BOARD object to file, using the file format that matches the
filename extension.
126
Examples
Load a board, hide all values, and show all references.
#!/usr/bin/env python3
import sys
from pcbnew import LoadBoard
filename = sys.argv[1]
pcb = LoadBoard(filename)
for fp in pcb.GetFootprints():
print(f"* Footprint: {fp.GetReference()}")
fp.Value().SetVisible(False) # set Value as Hidden
fp.Reference().SetVisible(True) # set Reference as Visible
pcb.Save("mod_" + filename)
#!/usr/bin/env python3
import sys
from pcbnew import *
filename=sys.argv[1]
pcb = LoadBoard(filename)
pcb.Save("mod_"+filename)
127
Load a footprint library, list footprints in the library, and list pads in each footprint.
#!/usr/bin/env python3
from pcbnew import *
libpath = "/usr/share/kicad/footprints/Connector_PinSocket_2.54mm.pretty"
print(f">> enumerate footprints, pads of {libpath}")
list_of_footprints = plugin.FootprintEnumerate(libpath)
128
Load a board and print information about each item in the board.
#!/usr/bin/env python
import sys
from pcbnew import *
filename=sys.argv[1]
pcb = LoadBoard(filename)
print()
print("Listing Text and Shapes:")
for item in pcb.GetDrawings():
if type(item) is PCB_TEXT:
print(f"* Text: '{item.GetText()}' at {ToMM(item.GetPosition())}")
elif type(item) is PCB_SHAPE:
print(f"* Drawing: {item.GetShapeStr()}")
else:
print(f"Unknown type {type(item)}")
print()
print("Listing Footprints")
for fp in pcb.GetFootprints():
print(f"* Footprint: {fp.GetReference()} at {ToMM(fp.GetPosition())}")
print()
print(f"Ratsnest count: {pcb.GetNetCount()}")
print(f"Track width count: {len(pcb.GetTrackWidthList())}")
print(f"Via size count: {len(pcb.GetViasDimensionsList())}")
print()
print(f"Listing Zones: {pcb.GetAreaCount()}")
for idx in range(0, pcb.GetAreaCount()):
zone = pcb.GetArea(idx)
print(f"zone: {idx} priority: {zone.GetAssignedPriority()} netname:
{zone.GetNetname()}")
print()
print(f"Netclasses: {len(pcb.GetAllNetClasses())}")
129
Action plugins
Action plugin associate a script with a button in the PCB Editor GUI. Clicking the button runs the script.
Action plugins are shown in the Tools → External plugins menu, and can also be shown in the toolbar if
enabled in the Action Plugins page of the Preferences dialog.
The example below is an action plugin that uses KiCad’s pcbnew API to replace the string $date$ with the
current date in any text item.
import pcbnew
import re
import datetime
class text_by_date(pcbnew.ActionPlugin):
"""
test_by_date: A sample plugin as an example of ActionPlugin
Add the date to any text field of the board containing '$date$'
How to use:
- Add a text on your board with the content '$date$'
- Call the plugin
- The text will automatically be updated with the date (format YYYY-MM-DD)
"""
def defaults(self):
"""
Method defaults must be redefined
self.name should be the menu label to use
self.category should be the category (not yet used)
self.description should be a comprehensive description
of the plugin
"""
self.name = "Add date on PCB"
self.category = "Modify PCB"
self.description = "Automatically add date on an existing PCB"
def Run(self):
pcb = pcbnew.GetBoard()
for item in pcb.GetDrawings():
if item.GetClass() == "PCB_TEXT":
txt = re.sub("\$date\$ [0-9]{4}-[0-9]{2}-[0-9]{2}",
"$date$", item.GetText())
if txt == "$date$":
item.SetText("$date$ %s" % datetime.date.today())
text_by_date().register()
Footprint wizards
Footprint wizards are Python scripts that can be accessed from the Footprint Editor. Each footprint wizard
presents a selection of parameters defined in the Python script, and creates a footprint based on the
parameter values.
130
There are 3 minimum steps required to create a footprint wizard, which are described below. For examples
of how to create footprint wizards, see the footprint wizards included with KiCad.
The GetName() , GetDescription() , and GetValue() functions are there to provide strings to the UI. The
only functionality needed is to return an appropriate string.
The GenerateParameterList() function defines the parameters needed for the footprint. Parameters are
grouped into a page + name format. For example, calling self.AddParam("demo", "radius", self.uMM, 5)
would add a parameter named radius into the page named demo. Retrieving that parameter data would be
done with a call such as self.footprint_radius = self.parameters["demo"]["radius"] .
The CheckParameters() function is available to perform any data validation on the parameters defined in
GenerateParameterList() . This function is also where the self.footprint_radius =
self.parameters["demo"]["radius"] calls reside.
The BuildThisFootprint() function is where the footprint building steps are called. This function is where
one creates the footprint.
The required {your_class_name}().register() call can either be at the end of the Python file, or in an
__init__.py file. Both styles are supported by KiCad.
KiCad will not reload a plugin after it has raised an error (for example, the
NOTE NotImplementedError ). One will need completely close out KiCad and restart it. However,
this doesn’t apply to changes which do not raise an error.
To add an IDF model to a footprint in the footprint or PCB editors, edit the footprint’s properties and click
on the 3D Models tab.
131
Click the button and select the IDF (*.idf;*.IDF) filetype filter. Browse to the desired outline file.
132
Once the desired component outline file is selected, enter any necessary values for the offset and rotation.
The offsets must be specified using the IDF board output units (mm or mils) and in the IDF coordinate
system, which is a right-hand coordinate system with +Z pointing towards the viewer, +X to the viewer’s
right, and +Y towards the upper edge of the screen. The rotation must be in degrees; positive rotation is a
counter-clockwise rotation as described in the IDFv3 specification.
Multiple outlines may be combined with appropriate offsets to represent simple assemblies such as a DIP
package in a socket.
Only the offset values and the Z rotation value are used by the IDF exporter; all other
NOTE
values are ignored.
The component outline section contains fields which are strings, integers, or floating point numbers. A string
is a combination of characters which may include spaces; if a string contains spaces then it must be quoted.
Quotation marks must not appear within a string. Floating point numbers may be represented using decimal
or exponential notations but decimal notation is preferred for human readability. The decimal point must be
a dot and not a comma. The IDF file must consist only of 7-bit ASCII characters; use of 8-bit characters will
result in undefined behavior.
133
An IDF file consists of SECTIONS which consist of RECORDS which consist of FIELDS. For the IDF outline files
only one type of section may exist and must be one of .ELECTRICAL or .MECHANICAL . A record is a single
line of text and may contain one or more fields. Fields are sequences of characters separated by one or more
spaces which do not appear between quotation marks. All fields of a record must appear on a single line;
records may not span lines.
The section heading ( .ELECTRICAL or .MECHANICAL ) is considered the first record (Record 1) of the section.
Record 1 must be followed by Record 2 which has four fields:
1. Geometry Name: a string which in combination with the Part Number must form a unique identifier for
the component outline. For standardized packages, the package name is a good value for the geometry
name, for example "SOT-23". For unique packages the manufacturer’s part number is a good choice for
the geometry name.
2. Part Number: although obviously intended for the part number, for example BS107, it is better to use
this string to help describe the package. For example if the geometry name is "TO-92", the part number
entry may be used to describe the layout of the pads or the orientation of this particular TO-92 outline
file.
3. IDF Unit: this must be one of MM or THOU and it applies only to the units describing this single
component outline.
4. Height: this is a floating point number representing the nominal height of the component using units
specified in Field 3.
Record 2 must be followed by a number of Record 3 entries which specify the outline of the component.
Record 3 consists of four fields:
1. Loop Index: 0 (outline points are specified in counter-clockwise order) or 1 (outline points are
specified in clockwise order)
4. Included Angle: a floating point number. If the value is 0 then a straight line segment is drawn from the
previous point to this point. If the value is 360 then the previous point specifies the center of a circle
and this point specifies a point on the circle; never specify a circle using a value of -360 as at least one
major mechanical CAD package does not behave well in that situation. If the value is negative then a
clockwise arc is drawn from the previous point to this point and if the value is positive then a counter-
clockwise arc is drawn.
Only one closed loop is permitted and it is not possible to specify a cutout. The last point specified must be
the same as the first point unless the outline is a circle.
134
# a simple cylinder - this could represent an electrolytic capacitor
.ELECTRICAL
"cylinder" "5mm OD, 5mm height" MM 5
0 0 0 0
0 2.5 0 360
.END_ELECTRICAL
# an upside-down T
# a comment added for the sake of adding comments
.ELECTRICAL
"Capital T" "5x8x10mm, upside down" MM 10
0 -0.5 8 0
0 -0.5 0.5 0
0 -2.5 0.5 0
0 -2.5 -0.5 180
0 2.5 -0.5 0
0 2.5 0.5 180
0 0.5 0.5 0
0 0.5 8 0
0 -0.5 8 180
.END_ELECTRICAL
Package naming
Try to make some information about the outline available in the filename to give the user a general idea of
what the outline is. For example axial leaded cylindrical packages may represent some types of capacitors as
well as some types of resistors, so it makes sense to identify an outline as a horizontal or vertical axial
leaded device and to add some extra information on the relevant dimensions: diameter, length, and pitch
are the most important. If a device has a unique outline, the manufacturer’s part number and a prefix to
indicate the class of device are adequate.
Comments
Use comments in the IDF file to give users more information about the outline, for example a reference to
the source used for dimensional information.
135
Pin orientation and positioning
Component outlines should be created to match the orientation and position of the corresponding
footprints. This avoids the need to specify a non-zero rotation for the IDF component outline. Since the IDF
exporter ignores the (X, Y) offset values, it is vital that you use the correct origin in the IDF component
outline.
The image above shows sample outlines generated by the programs idfcyl and idfrect and rendered in a
mechanical CAD program. From left to right are (a) vertical radial leaded cylinder, (b) vertical axial leaded
cylinder with wire on left, (c) vertical axial leaded cylinder with wire on right, (d) horizontal axial leaded
cylinder, (e) horizontal radial leaded cylinder, (f) square outline, plain, (g) square outline with chamfer, (h)
square outline with axial lead on right. The top outlines were specified in units of millimeters while the
bottom outlines were specified in units of inches.
Tips on dimensions
The purpose served by the extruded outlines is to give the mechanical designer some idea of the location
and physical space occupied by each component. In a typical scenario the mechanical designer will replace
some of the crude outlines with more detailed mechanical models, for example when checking to ensure
that a right-angle mounted LED will fit into a hole on a panel. In most situations the accuracy of an outline
doesn’t matter, but it is good practice to create outlines which convey the best mechanical information
possible. In a few instances a user may wish to fit the component into a case with very little excess space, for
example in a portable music player. In such a situation, if most extruded outlines are a good enough
representation of components then the mechanical designer may only have to replace very few models
while designing the case. If the outlines are not a reliable reflection of reality then the mechanical designer
will waste a lot of time replacing models to ensure a good fit. After all, if you put garbage in you can expect
garbage to come out. If you put in good information, you can be confident of good results.
1. idfcyl: creates an outline of a cylinder in vertical or horizontal orientation and with axial or radial
leads
2. idfrect: creates an outline of a rectangle which may have either an axial lead or a chamfer in the top
left corner
136
3. dxf2idf: converts a drawing in DXF format into an IDF component outline
idfcyl
idfcyl generates outlines for cylindrical components.
When idfcyl is invoked with no arguments it prints out a usage note and a summary of its inputs:
Input:
Unit: mm, in (millimeters or inches)
Orientation: V (vertical)
Lead type: X, R (axial, radial)
Diameter of body
Length of body
Board offset
* Wire diameter
* Pitch
** Wire side: L, R (left, right)
*** Lead length
File name (must end in *.idf)
NOTES:
* only required for horizontal orientation or
vertical orientation with axial leads
The notes can be suppressed by entering any arbitrary argument on the command line. A user can manually
enter information at the command line or create scripts to generate outlines. The following script creates a
single cylinder axial leaded outline with the lead on the right hand side:
137
#!/bin/bash
# Generate a cylindrical IDF outline for test purposes
# vertical 5mm cylinder, nominal length 8mm + 3mm board offset,
# axial wire on right, 0.8mm wire dia., 3.5mm pitch
idfcyl - 1 > /dev/null << _EOF
mm
v
x
5
8
3
0.8
3.5
r
cylvmm_1R_D5_L8_Z3_WD0.8_P3.5.idf
_EOF
idfrect
idfrect generates outlines for rectangular components.
When idfrect is invoked with no arguments it prints out a usage note and a summary of its inputs:
NOTES:
* only required if chamfer = 0
The notes can be suppressed by entering any arbitrary argument on the command line. A user can manually
enter information at the command line or create scripts to generate outlines. The following script creates a
chamfered rectangle and an axial leaded outline:
138
#!/bin/bash
# Generate various rectangular IDF outlines for test purposes
# 10x10, 1mm chamfer, 2mm height
idfrect - 1 > /dev/null << _EOF
mm
10
10
2
1
rectMM_10x10x2_C0.5.idf
_EOF
# 10x10x12, 0.8mm lead on 6mm pitch
idfrect - 1 > /dev/null << _EOF
mm
10
10
12
0
Y
0.8
6
rectLMM_10x10x12_D0.8_P6.0.idf
_EOF
dxf2idf
dxf2idf creates an IDF component file from a DXF outline.
The DXF file used to specify the component outline can be prepared with the free software LibreCAD for
best compatibility.
When dxf2idf is invoked with no arguments it prints out a usage note and a summary of its inputs:
Input:
DXF filename: the input file, must end in '.dxf'
Units: mm, in (millimeters or inches)
Geometry Name: string, as per IDF version 3.0 specification
Part Name: as per IDF version 3.0 specification of Part Number
Height: extruded height of the outline
Comments: all non-empty lines are comments to be added to
the IDF file. An empty line signifies the end of
the comment block.
File name: output filename, must end in '.idf'
The notes can be suppressed by entering any arbitrary argument on the command line. A user can manually
enter information at the command line or create scripts to generate outlines. The following script creates a
5mm high outline from a DXF file test.dxf :
139
#!/bin/bash
# Generate an IDF outlines from a DXF file
dxf2idf - 1 > /dev/null << _EOF
test.dxf
mm
DXF TEST GEOMETRY
DXF TEST PART
5
This is an IDF test file produced from the outline 'test.dxf'
This is a second IDF comment to demonstrate multiple comments
test_dxf2idf.idf
_EOF
idf2vrml
The idf2vrml tool reads a set of one IDF Board ( .emn ) and one IDF Component file ( .emp ) and produces a
VRML file which can be viewed with a VRML viewer. This feature is useful for visualization of the board
assembly in cases where the user does not have access to MCAD software. Invoking idf2vrml without any
arguments will result in the display of a usage message:
>./idf2vrml
Usage: idf2vrml -f input_file.emn -s scale_factor {-k} {-d} {-z} {-m}
flags:
-k: produce KiCad-friendly VRML output; default is compact VRML
-d: suppress substitution of default outlines
-z: suppress rendering of zero-height outlines
-m: print object mapping to stdout for debugging purposes
example to produce a model for use by KiCad: idf2vrml -f input.emn -s 0.3937008 -k
The idf2vrml tool does not correctly render OTHER_OUTLINE entities in an emn file if that
entity is specified on the back layer of the PCB; however you will not noticeable using files
NOTE exported by KiCad because there is no mechanism to specify such an entity. This is only an
issue if you render a third party emn file which does employ an entity on the back side of
a board.
140
Actions reference
Below is a list of every available action in the PCB Editor: a command that can be assigned to a hotkey.
PCB Editor
The actions below are available in the PCB Editor. Hotkeys can be assigned to any of these actions in the
Hotkeys section of the preferences.
141
Action Default Description
Hotkey
142
Action Default Description
Hotkey
Net Color Mode (3- Cycle between using net and netclass colors for all nets, just
state) ratsnests, and none
Ratsnest Mode (3- Cycle between showing ratsnests for all layers, just visible layers,
state) and none
143
Action Default Description
Hotkey
Open in Footprint Ctrl + E Opens the selected footprint in the Footprint Editor
Editor
Edit Library Ctrl + Shift + Opens the selected footprint in the Footprint Editor
Footprint… E
Append Board… Open another board and append its contents to this board
Board Setup… Edit board setup including layers, design rules and various defaults
Drill/Place File Place origin point for drill files and component placement files
Origin
144
Action Default Description
Hotkey
Lock Prevent items from being moved and/or resized on the canvas
Show Net in Show the selected net in the ratsnest of unconnected net lines/arcs
Ratsnest
Constrain to H, V, Shift + Space Limit actions to horizontal, vertical, or 45 degrees from the starting
45 point
Decrease Via Size kbd:[\] Change via size to previous pre-defined size
Increase Via Size ' Change via size to next pre-defined size
145
Action Default Description
Hotkey
Edit Text & Edit Text and graphics properties globally across board
Graphics
Properties…
Edit Track & Via Edit track and via properties globally across board
Properties…
Global Deletions… Delete tracks, footprints and graphic items from board
Remove Unused Remove or restore the unconnected inner layers on through hole
Pads… pads and vias
Update Footprints Update footprints to include any changes from the library
from Library…
Clearance Show clearance resolution for the active layer between two
Resolution selected objects
146
Action Default Description
Hotkey
Delete Last Point Back Delete the last point added to the current item
Add Reference Add a bitmap image to be used as a reference (image will not be
Image included in any output)
Place the Ctrl + Shift + Set the coordinate origin point (anchor) of the footprint
Footprint Anchor N
Add a Similar Zone Ctrl + Shift + Add a zone with the same settings as an existing zone
.
147
Action Default Description
Hotkey
Get and Move T Selects a footprint by reference designator and places it under the
Footprint cursor for moving
Delete Full Track Shift + Del Deletes selected item(s) and copper connections
Duplicate and Ctrl + Shift + Duplicates the selected item(s), incrementing pad numbers
Increment D
Fillet Tracks Adds arcs tangent to the selected straight track segments
Pack and Move P Sorts selected footprints by reference, packs based on size and
Footprints initiates movement
148
Action Default Description
Hotkey
Subtract Polygons Subtract selected polygons from the last one selected
Copy with Copy selected item(s) to clipboard with a specified starting point
Reference
Move with Moves the selected item(s) with a specified starting point
Reference
Attempt Finish Shift + F Sequentially attempt to automatically route all selected pads.
Selected
(Autoroute)
Break Track Splits the track segment into two segments connected at the cursor
position.
Route From Other Ctrl + E Commits current segments and starts next segment from nearest
End ratsnest end.
Custom Track/Via Q Shows a dialog for changing the track width and via size.
Size…
Drag 45 Degree D Drags the track segment while keeping connected tracks at 45
Mode degrees.
Drag Free Angle G Drags the nearest joint in the track without restricting the track
angle.
Place Blind/Buried Alt + Shift + Adds a blind or buried via at the end of currently routed track.
Via V
Place Microvia Ctrl + V Adds a microvia at the end of currently routed track.
149
Action Default Description
Hotkey
Route Selected Shift + E Sequentially route selected items from other end of ratsnest
From Other End anchor.
Select Layer and Alt + < Select a layer, then add a blind or buried via at the end of currently
Place Blind/Buried routed track.
Via…
Select Layer and Select a layer, then add a micro via at the end of currently routed
Place Micro Via… track.
Select Layer and < Select a layer, then add a through-hole via at the end of currently
Place Through routed track.
Via…
Track Corner Ctrl + / Switches between sharp/rounded and 45°/90° corners when routing
Mode tracks.
Undo Last Back Walks the current track back one segment.
Segment
Deselect All Tracks Deselects all tracks & vias belonging to the same net.
in Net
Grab Nearest Shift + O Selects and initiates moving the nearest unconnected footprint on
Unconnected each selected net.
Footprints
Select All Tracks in Selects all tracks & vias belonging to the same net.
Net
150
Action Default Description
Hotkey
Add Microwave Create stub (arc) of specified size for microwave applications
Arc Stub
151
Action Default Description
Hotkey
Default Pad Edit the pad properties used when creating new pads
Properties…
Edit Pad as Ctrl + E Ungroups a custom-shaped pad for editing as individual graphic
Graphic Shapes shapes
Finish Pad Edit Ctrl + E Regroups all touching graphic shapes into the edited pad
Keep Arc Center, Switch arc editing mode to keep center, adjust radius and
Adjust Radius endpoints
Keep Arc Switch arc editing mode to keep endpoints, or to keep direction of
Endpoints or the other point
Direction of
Starting Point
Position Relative Shift + P Positions the selected item(s) by an exact amount relative to
To… another
Refresh Plugins Reload all python plugins and refresh plugin menus
Open Plugin Opens the directory in the default system file manager
Directory
Draft Fill Selected Update copper fill of selected zone(s) without regard to other
Zone(s) interacting zones
152
3D Viewer
The actions below are available in the 3D Viewer. Hotkeys can be assigned to any of these actions in the
Hotkeys section of the preferences.
Render CAD Use a CAD color style based on the diffuse color of the material
Colors
Render Solid Use only the diffuse color property from 3D model file
Colors
Render Realistic Use all material properties from each 3D model file
Materials
No 3D Grid No 3D Grid
Set Pivot Space Place point around which the board will be rotated (middle mouse
click)
153
Action Default Description
Hotkey
Common
The actions below are available across KiCad, including in the PCB Editor. Hotkeys can be assigned to any of
these actions in the Hotkeys section of the preferences.
154
Action Default Description
Hotkey
Cursor Up Up
Switch to Next N
Grid
Grid
Inactive Layer H Cycle inactive layers between normal, dimmed, and hidden
View Mode (3-
state)
155
Action Default Description
Hotkey
Page Settings… Settings for paper size and title block info
Pan Up Shift + Up
Plot… Plot
Redo Last Zoom Return zoom to level prior to last zoom undo
Coordinates
Select Columns…
156
Action Default Description
Hotkey
Grid Overrides Ctrl + Shift + Enables item-specific grids that override the current grid
G
Undo Last Zoom Return zoom to level prior to last zoom action
Unpin Library No longer keep the library at the top of the list
Zoom In Zoom In
Refresh F5 Refresh
157
Action Default Description
Hotkey
158
Action Default Description
Hotkey
Manage Footprint Edit the global and project footprint library lists
Libraries…
Manage Symbol Edit the global and project symbol library lists
Libraries…
159