参考手册
|
注
|
本手册正在修订中,以涵盖 KiCad 的最新稳定发布版本。 它包含一些尚未完成的部分。 在我们的志愿技术作者从事这项工作时,请您耐心等待,我们也欢迎愿意帮助 KiCad 的文档比以往更好的新贡献者。 |
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
翻译人员
taotieren <admin@taotieren.com>, 2019-2023.
Telegram 简体中文交流群: https://t.me/KiCad_zh_CN
译者注:英文双引号包含的中文为软件的功能操作。
Feedback
KiCad 项目欢迎与本软件或其文档相关的反馈、错误报告和建议。关于如何提交反馈意见或报告问题的更多信息,请参见 https://www.kicad.org/help/report-an-issue/ 的说明
1. KiCad PCB 编辑器简介
1.1. 初始配置
当 PCB 编辑器第一次运行时,如果在 KiCad 配置文件夹中没有找到全局引脚表文件 fp-lib-table,那么 KiCad 将询问如何创建这个文件:
第一个选项是推荐的(复制默认的全局封装库表(推荐))。默认的封装库表包括所有作为 KiCad 的一部分安装的标准封装库。
如果该选项被禁用,KiCad 无法找到默认的全局封装库表。这可能意味着你没有和 KiCad 一起安装标准封装库,或者它们没有被安装在 KiCad 期望找到的地方。在某些系统中,KiCad 库是作为一个单独的软件包安装的。
-
如果你已经安装了标准的 KiCad 封装库并想使用它们,但第一个选项被禁用,选择第二个选项并浏览到安装 KiCad 库的目录中的 fp-lib-table 文件。
-
如果你已经有了一个你想使用的自定义封装库表,选择第二个选项并浏览到你的 fp-lib-table 文件。
-
如果你想从头开始构建一个新的封装库表,选择第三个选项。
Footprint library management is described in more detail later.
1.2. PCB 编辑器的用户界面
PCB 编辑器的主要用户界面如上图所示,并标明了一些关键元素:
-
顶部工具栏 (文件管理、缩放工具、编辑工具)
-
左侧工具栏 (显示选项)
-
消息面板和状态栏
-
右侧工具栏 (绘图和设计工具)
-
外观面板
-
选择过滤器面板
1.3. 导航编辑画布
编辑画布是正在设计的板上的视图。您可以平移和缩放到电路板的不同区域,也可以翻转视图以从底部显示电路板。
默认情况下,用鼠标中键或右键拖动会平移画布视图,滚动鼠标滚轮会放大或缩小视图。 你可以在偏好设置中的鼠标和触摸板部分改变这一行为(详见《配置和定制,配置和定制》)。
在顶部的工具栏中,还有其他几个缩放工具可用:
-
放大视窗的中心。
-
从视口中心缩小。
-
放大到适合绘图页周围的框架。
-
缩放以适应绘图板内的项目。
-
允许你画一个方框来确定放大的区域。
光标的当前位置显示在窗口的底部(X 和 Y),还有当前的缩放系数(Z)、光标的相对位置(dx、dy 和 dist)、网格设置和显示单位。
按 kbd:[Space] 可以将相对坐标重置为零。这对于测量两点之间的距离或对齐物体很有用。
1.4. 快捷键
这个 kbd:[Ctrl+F1] 快捷键显示当前快捷键列表。默认的快捷键列表包括在本手册的 《pcbnew 动作参考,动作参考》部分。
本手册中描述的快捷键使用了标准 PC 键盘上的按键标签。在苹果键盘布局中,使用 kbd:[Cmd] 键来代替 kbd:[Ctrl],使用 kbd:[Option] 键来代替 kbd:[Alt]。
许多动作默认没有分配快捷键,但可以使用快捷键编辑器(偏好设置 → 偏好设置… → 《偏好控制,快捷键》)分配或重新定义快捷键。
|
注
|
通过快捷键可用的许多操作也可在上下文菜单中使用。要访问上下文菜单,请在编辑画布中单击鼠标右键。根据选择的内容或处于活动状态的工具,将提供不同的操作。 |
快捷键存储在 KiCad 的配置目录下的 user.hotkeys 文件中。这个位置是特定于平台的:
-
Windows: %APPDATA%\kicad\7.0\user.hotkeys
-
Linux: ~/.config/kicad/7.0/user.hotkeys
-
macOS: ~/Library/Preferences/kicad/7.0/user.hotkeys
KiCad 可以使用快捷键编辑器中的 导入快捷键 按钮从 user.hotkeys 文件中导入快捷键设置。
2. 显示和选择控件
2.1. 板层
PCB 编辑器中的层代表电路板上的物理铜层,以及用于定义丝印、阻焊和电路板边框等的图形层。 在编辑器中,总有一个层是活动的。 活动层被画在其他层的上面,并且将是分配给新创建的对象的层。 活动层在顶部工具栏的图层选择器下拉框中显示,在外观面板中也被突出显示。 要改变活动层,你可以左键单击外观面板中的层名,使用顶部工具栏中的下拉层选择器,或使用快捷键。 图层可以被隐藏以简化棋盘视图。 你可以隐藏一个层,即使它是活动层。
2.1.1. 电路板层的显示顺序
|
注
|
TODO:写下这一节。 |
2.2. 外观面板
外观面板提供了管理 PCB 编辑器绘图画布中的对象的可见性、颜色和不透明度的控制。 它有三个标签:层标签包含电路板层的控制,对象标签包含不同类型图形对象的控制,网络标签包含飞线和铜项目的外观控制。
2.2.1. 图层控件
在外观面板的图层选项卡中,每个电路板图层都显示了其颜色和可见性状态。 活动图层在色块的左边有一个箭头指示器。 左键点击一个图层来选择它作为活动图层。 左键单击相应的可见性图标,在可见和隐藏之间切换该图层。 双击或中击色块来改变该图层的颜色。
|
注
|
必须先在首选参数中创建自定义颜色主题, 然后才能在“外观”面板中更改图层颜色。 |
在图层列表下方是一个包含图层显示选项的可展开面板。第一个设置控制非活动图层的显示方式:正常、暗显或隐藏。层显示模式可用于简化视图并聚焦于单个层。当非活动层显示模式为 "暗显" 或 "隐藏" 时,不能选择非活动层上的项目。您可以使用快捷键 kbd:[Ctrl+H] 快速切换这些显示模式。
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.
|
注
|
翻转电路板视图不会更改可视层顺序,活动层将保持在最前面,其他层按正常顺序紧随其后。 |
2.2.2. 对象控件
外观面板的 "对象" 选项卡与 "图层" 选项卡类似。 主要区别在于,有些对象没有颜色设置,而四种类型的对象(布线、过孔、焊盘和敷铜)有不透明度控制滑块。 这里的不透明度设置将与图层颜色中设置的任何不透明度相乘。 默认情况下,所有对象都是完全不透明的,除了敷铜,敷铜被设置为半透明,以使通过填充的敷铜更容易看到对象。
2.2.3. 图层预设
图层预设存储了哪些图层和对象是可见和隐藏的,以便于调用。 有几个内置的图层预设,您可以保存您自己的自定义预设。 自定义预设存储在一个电路板的工程设置中,因为预设可能是特定于某个电路板的叠加。
要加载一个预设,请从外观面板底部的预设下拉菜单中选择它,或者通过按住 kbd:[Ctrl] 并按 kbd:[Tab] 来使用快速切换器。 一旦快速切换器窗口出现,你可以按 kbd:[Tab] 和 kbd:[Shift+Tab] 来循环浏览可用的预设。 当你放开 kbd:[Ctrl] 键时,高亮显示的预设将被加载。
要保存一个自定义的预设,首先使用可见性控制来选择你希望哪些图层是可见的,然后从预设下拉菜单中选择保存预设…。 给您的预设一个名字,它现在可以通过下拉菜单和快速切换器使用。 要修改一个自定义预设,请遵循相同的过程,并以相同的名称保存修改后的版本,以覆盖现有的版本。 要删除一个自定义预设,从下拉菜单中选择删除预设…选项,并从列表中选择要删除的预设。
2.2.4. 网络和网络类控件
外观面板的网络选项卡显示电路板中所有网络和网络类的列表。每个网都有一个可见性控件,用于控制该网在飞线中的可见性。在飞线中隐藏网络不会改变电路板的连接性,也不会影响设计规则检查器;这只是为了使飞线更容易理解。
每个网络和网络类还可以指定一种颜色。默认情况下,此颜色适用于网络 (或网络类中的所有网络) 的飞线。默认情况下,网络没有颜色;这由色样中的棋盘格图案指示。双击或右键单击网络或网络类颜色样本以设置颜色。
|
注
|
默认网络类不能分配颜色, 因为该类中的网络将仅使用颜色主题定义的默认飞线最高颜色。 |
您还可以通过外观面板选择并高亮网络和网络类:右击网络或网络类以在菜单中显示这些选项。
网络类列表下面是一个包含网络显示选项的可扩展面板。第一个选项控制如何应用网络颜色。当选择了“所有”时,属于网络或网络类别的所有铜项 (焊盘、布线、过孔和区域) 都将呈现所选的颜色。当选中“飞线”(默认值)时,只有飞线受网络和网络类别颜色的影响。 当选择“没有”时,网络和网络类颜色被忽略。
第二个选项控制如何绘制飞线。“所有图层”表示将在所有未连接的项目之间绘制飞线。“可见层”意味着不会向隐藏层上的项目绘制任何最新的飞线,即使这些项目是未连接的。
2.3. 选择和选择筛选器
选择编辑画布中的项目是用鼠标左键完成的。 单独点击一个对象将选择该对象,而拖动将执行框选。 从左到右的框选将只选择完全在框内的项目。 从右到左的方框选择将选择任何接触到方框的项目。从左到右的选择框是用黄色画的,光标表示排他性选择,从右到左的选择框是用蓝色画的,光标表示包容性选择。
可以通过在单击或拖动的同时按住快捷键来修改选择操作。单击以选择单个项目时,将应用以下快捷键:
| 修改键 (Windows) | 修改键 (Linux) | 修改键 (macOS) | 选择效果 |
|---|---|---|---|
kbd:[Ctrl] |
kbd:[Ctrl] |
kbd:[Cmd] |
切换选择。注意:kbd:[Ctrl]+点击可以被重新设置为高亮网络。 偏好设置 → PCB 编辑器 → 编辑选项. |
kbd:[Shift] |
kbd:[Shift] |
kbd:[Shift] |
将该项目添加到现有的选择中。 |
kbd:[Ctrl + Shift] |
kbd:[Ctrl + Shift] |
kbd:[Cmd + Shift] |
从现有的选择中删除项目。 |
长点击 |
长点击或 kbd:[Alt] |
长点击或 kbd:[Option] |
从弹出式菜单中清晰选择。 |
拖动以执行选框时,将应用以下快捷键:
| 修改键 (Windows) | 修改键 (Linux) | 修改键 (macOS) | 选择效果 |
|---|---|---|---|
kbd:[Ctrl] |
kbd:[Ctrl] |
kbd:[Cmd] |
切换选择。 |
kbd:[Shift] |
kbd:[Shift] |
kbd:[Shift] - kbd:[Shift] |
将项目添加到现有的选择中。 |
kbd:[Ctrl + Shift] |
kbd:[Ctrl + Shift] |
kbd:[Cmd + Shift] |
从现有选择中删除项目。 |
PCB 编辑器窗口右下角的选择过滤器面板控制哪些类型的对象可以用鼠标选择。 关闭不需要的对象类型的选择,可以使在密集的电路板上选择项目更加容易。 "所有项目" 复选框是打开和关闭其他项目的一个快捷方式。 "锁定的项目" 复选框与其他项目无关,它控制是否可以选择被锁定的项目。 你可以右键单击选择过滤器中的任何对象类型,快速改变过滤器,只允许选择该类型的对象。
当一个连接的铜线项目被选中时,你可以使用右键菜单中的 "扩展选择" 命令或快捷键 kbd:[U] 将选择扩展到同一网络的其他铜线项目。 第一次运行这个命令时,选择将被扩展到最近的焊盘。 第二次,选择将被扩展到所有层上的所有连接项。
选择一个对象会在窗口底部的信息面板上显示该对象的信息。双击一个对象可以打开一个窗口来编辑该对象的属性。
按 kbd:[Esc] 将始终取消当前工具或操作,并返回到选择工具。在选择工具处于活动状态时按 kbd:[Esc] 将清除当前选择。
2.4. 网络高亮
电气网络(或一组网络)可以在 PCB 编辑器中被高亮显示,以显示该网络是如何在 PCB 上布线的。 通过在 PCB 编辑器中选择要高亮的网络,或者在启用交叉探测高亮时在原理图编辑器中选择相应的网络,可以激活网的高亮(见下文)。 当网络高亮激活时,高亮的网或网将以较亮的颜色显示,所有其他项目将以比正常颜色更暗的颜色显示。
There are three ways to select a net or nets to highlight in the PCB editor: by using the hotkey kbd:[`] after selecting a copper object, by using the context menu of any copper object, and 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 kbd:[~]) or by using the Highlight net tool on an empty region in the schematic. By default, kbd:[Esc] also clears net highlighting, but this can be disabled if desired in Preferences → PCB Editor → Editing Options.
选择一个或多个网络进行高亮时,左侧工具栏上的切换网络高亮显示操作变为启用(也可通过快捷键 kbd:[Ctrl+`] 访问)。此操作将打开或关闭高亮,而无需选择要高亮的新网络。
2.5. 从原理图交叉探测
KiCad 允许在原理图和 PCB 之间进行双向交叉探测。 有几种不同类型的交叉探测。
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. This behavior can be disabled in the Display Options section of the Preferences dialog.
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.
2.6. 左侧工具栏显示控件
左边的工具条提供了改变 PCB 编辑器中项目显示的选项。
|
Turns grid display on/off. Note: by default, hiding the grid will 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. |
|
Display/entry of coordinates and dimensions in inches, mils, or millimeters. |
|
Switches between full-screen and small editing cursor (crosshairs). |
|
Turns the ratsnest display on/off. |
|
Switches between straight and curved ratsnest lines. |
|
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 kbd:[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 kbd:[`], 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. |
|
Show zone filled areas. |
|
Show zone outlines only. |
|
Switches display of pads between filled and outline mode. |
|
Switches display of vias between filled and outline mode. |
|
Switches display of tracks between filled and outline mode. |
|
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. |
3. 创建 PCB
3.1. PCB 的基本概念
KiCad 中的印刷电路板通常由代表电子元件及其焊盘的 封装、定义这些焊盘如何彼此连接的 网络、形成每个网络中焊盘之间的铜连接的 布线、过孔 和 填充区 以及定义电路板边缘、丝印标记和任何其他所需信息的各种图形形状组成。
KiCad 通常会将 PCB 上的网络信息与相关的原理图保持同步,但也可以直接在 PCB 编辑器中创建和编辑网络。
3.2. 性能
KiCad 能够创建多达 32 个铜层、14 个技术层 (丝印、阻焊、元件粘合剂、焊膏等) 和 13 个通用绘图层的印刷电路板。
KiCad 中所有对象的内部测量分辨率为 1 纳米,测量值以 32 位整数存储。 这意味着可以创建最大约 4 米乘 4 米的电路板。
KiCad 目前支持每个工程/原理图一个电路板文件。
3.3. 从原理图开始
从原理图创建电路板是 KiCad 的推荐工作流程。 当您创建一个新工程时,KiCad 会生成一个与工程名称相同的空板文件。 要在创建原理图后开始设计电路板,只需打开电路板文件。 您可以通过 KiCad 工程管理器,或者点击原理图编辑器中的 "在电路板编辑器中打开 PCB" 按钮来完成。 要将原理图设计信息导入电路板编辑器,包括封装和网络连接,请使用 工具 → 从 PCB 更新原理图… 操作(kbd:[F8])。你也可以使用顶部工具栏上的
图标。
|
注
|
从原理图更新 PCB 是将设计信息从原理图转移到 PCB 的首选方法。在旧版本的 KiCad 中,相应的过程是将网表从原理图编辑器中导出并导入到电路板编辑器中。现在已经没有必要使用网表文件了。 |
关于从 PCB 更新原理图工具的更多信息,请参见手册的《正向批注,正向批注》部分。
3.4. 从头开始
也可以创建没有匹配原理图的电路板,尽管此工作流程有一些限制,不建议大多数用户使用。为此,您必须独立启动 PCB 编辑器(而不是从 KiCad 工程管理器启动)。在开始设计之前,最好保存电路板文件,该文件还将创建一个工程文件来存储电路板设置。使用 "另存为…" 从文件菜单选择保存电路板文件的位置。将在您选择保存电路板文件的相同位置创建一个同名的工程文件。
3.5. 电路板设置
在开始您的线路板设计之前,使用电路板设置对话框来配置电路板的基本参数。要打开电路板设置,请单击顶部工具栏中的
图标或选择 "电路板设置…" 从文件菜单中选择。
3.5.1. 配置电路板压层和物理参数
在 "电路板设置" 中,有两个部分用于配置电路板的堆叠和层。 "电路板编辑器层" 部分用于启用或禁用技术层(非铜),如果需要的话,还可以给各层自定义名称。 物理压层部分用于配置铜层的数量,以及铜层和电介质层的物理参数,如厚度和材料类型。介质层、阻焊层和丝印层可以被分配颜色,这将影响电路板在 3D 查看器中的外观。
要配置电路板的压层,从物理压层部分开始:
在左上角设置铜层的数量,然后根据需要输入压层的物理参数。 这些参数可以保留其默认值,但请注意,在导出电路板的 3D 模型时,将使用电路板的厚度值,所以如果你打算使用这个功能,最好确保压层厚度是正确的。
|
注
|
KiCad 目前仅支持铜层数为偶数的压层。 要创建具有奇数层的设计 (例如,柔性印刷电路板或金属芯印刷电路板), 只需选择下一个最高的偶数,而忽略多余的层。 |
接下来,如果需要,可以使用电路板编辑器层部分重命名或隐藏您不会在设计中使用的非铜层。例如,如果您不打算在设计中使用背面丝印,请取消选中 B.Silkcreen 层旁边的复选框。
|
注
|
在电路板编辑器层部分,可以将铜层指定为信号层、电源层、混合层或跳线层。 本指南仅供用户参考。 无论在此对话框中将类型配置为什么,都可以在任何铜层上布线和敷铜。 |
在电路板编辑器对话框的电路板完成和阻焊/锡膏部分可以找到一些其他的电路板压层设置。电路板完成部分包含用于定义铜电镀和特殊功能 (如镶边或边缘电镀) 的设置。请注意,这些设置目前只影响作为 Gerber 作业文件一部分的电路板属性输出。
阻焊/锡膏部分允许全局调整电路板上焊盘的铜形和阻焊/锡膏形之间的间隙(正或负)。 这些值将被添加到在个别封装或焊盘上设置的任何间隙覆盖。 正的间隙值将导致阻焊层或锡膏开口的形状比铜的形状 更大。 负的间隙值将导致开口比铜的形状 更小。
|
警告
|
大多数商业 PCB 制造商希望这些值为零,并在 CAM 过程中自行调整阻焊和粘贴开口。 通常最好将这些值保留为默认值零, 除非您自己制作 PCB, 或者您的制造商有具体建议使用不同的值。 |
3.5.2. 配置默认文本和图形设置
电路板设置对话框的文本和图形默认值部分可用于配置将用于放置在电路板上的新文本和图形形状的属性。
可以为对话框中显示的六种不同类别的图层配置线粗细、文字大小和文字外观。此外,可以为所有图层配置标注对象的特性。有关标注属性的更多详细信息,请参阅下面的标注部分。
虚线的外观是在 "格式化" 部分控制的。虚线长度 控制虚线的长度,而 间隔长度 控制虚线和圆点之间的间距。虚线和间隔的长度是相对于行宽而言的:间隔长度为 2 意味着是行宽的两倍。
文本替换变量可以在文本变量部分创建。 这些变量允许你将变量名称替换为任何文本字符串。 这种替换发生在变量名称在 ${VARIABLENAME} 的变量替换语法内的任何地方。
例如,您可以创建一个名为 VERSION 的变量,并将文本替换设置为 1.0。 现在,在 PCB 上的任何文本对象中,你可以输入 ${VERSION},KiCad 将替代 1.0。 如果你把替换改为 2.0,每个包括 ${VERSION} 的文本对象都会自动更新。 你也可以混合使用普通文本和变量。 例如,你可以创建一个文本对象,内容为 版本:${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.
There are also a number of built-in system text variables.
3.5.3. 配置设计规则
设计规则控制交互式布线器的行为、覆铜的填充和设计规则检查器。设计规则可以随时修改,但我们建议您在电路板设计过程开始时建立所有已知的设计规则。
约束
基本设计规则是在电路板设置对话框的约束条件部分中配置。 这一部分的约束条件适用于整个板子,应该设置为板子制造商推荐的值。 这里设置的任何最小值都是一个 绝对(absolute) 的最小值,不能被更具体的设计规则所覆盖。 例如,如果你需要电路板的一部分的铜间隙为 0.2mm,其余部分为 0.3mm,你必须在约束条件部分输入 0.2mm 的最小铜间隙,并使用网络类或自定义规则来设置较大的 0.3mm 间隙。
除了设置最小间隙外,还可以在此处配置许多功能:
| 设置 | 说明 |
|---|---|
弧/圆的近似线段 |
在某些情况下,KiCad 必须使用一系列的直线段来近似圆的形状,如圆弧和圆形的形状。 此设置控制了这种近似允许的最大误差:换句话说,这些线段上的一个点与圆弧或圆形的真实形状之间的最大距离。 将此设置为比默认值 0.005 毫米更低的数字将导致更平滑的形状,但在较大的电路板上可能会非常慢。默认值通常会导致圆弧的近似误差,由于制造公差的原因,在制造出来的电路板上是检测不到的。 |
敷铜可以在敷铜属性对话框中添加圆角(圆角) |
默认情况下,在敷铜边框外不允许有敷铜,包括圆角。 这实际上意味着,即使配置了圆角,敷铜边框的内角也不会被圆角化。通过启用此设置,敷铜边框的内角将被拉丝,即使这导致边框的铜延伸到敷铜边框之外。 |
最小散热辐条数 |
这设置了连接焊盘和敷铜的最小可接受的散热辐条数量。如果违反了这个约束,将会产生 DRC 违规。 |
在布线长度计算中包压层高度 |
默认情况下,压层的高度被用来计算从一层到另一层通过通孔的布线的额外长度。 这种计算依赖于电路板压层高度的正确配置。 在某些情况下,最好是忽略过孔的高度,只计算布线的长度,假设过孔不增加长度。 禁用此设置将从布线长度计算中排除过孔长度。 |
预定义大小
预定义的尺寸部分允许你定义你希望在布线时可用的布线和过孔尺寸。 网络类可以用来定义不同网络中的布线和过孔的默认尺寸(见下文),但是在这个部分定义一个尺寸列表,可以让你在布线的时候逐步了解这些尺寸。 例如,你可能希望电路板上的默认布线宽度是 0.2 mm,但对于一些承载更多电流的部分使用 0.3 mm,而对于一些空间有限的部分使用 0.15 mm。 您可以在电路板设置对话框中定义这些布线的宽度,然后在布线时在它们之间切换。
网络类
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.
网络类部分的上部有一个表格,显示了设计中的网络类和适用于每个网络类的设计规则。 每个类别都有铜的间隙、布线宽度、过孔尺寸和差分对尺寸的值。 这些值将在创建布线和过孔时使用,除非有更具体的规则覆盖它们(见下面的自定义规则)。
|
注
|
任何规则都不能覆盖电路板设置的约束条件部分中设置的最小值。 例如,如果您将网络类间距设置为 0.1 mm,但约束条件部分中的最小间距设置为 0.2 mm, 则该类网络的间距将为 0.2 mm。 |
当 PCB 编辑器中的布线宽度和过孔尺寸控制设置为 "使用网络类值" 时,就会使用为每个网络类定义的布线宽度和过孔尺寸。 这些宽度和尺寸被认为是该网络类的默认或最佳尺寸。 它们不是最小或最大值。 手动将布线宽度或过孔尺寸改为与网络类部分定义的不同的值,不会导致违反 DRC。 要将布线宽度或过孔大小限制在特定的值,请使用自定义规则。
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 xref:../eeschema/eeschema.adoc#netclass-directive [netclass directives or labels] instead of pattern-based assignments.
自定义规则
自定义规则部分包含一个文本编辑器,用于使用自定义规则语言创建设计规则。 自定义规则用于创建基本约束或网络类设置没有涵盖的特定设计规则检查。
只有在自定义规则定义中没有错误时,才会应用自定义规则。 在关闭电路板设置之前,使用检查规则语法器按钮来测试定义并修复任何问题。
请参阅高级主题一章中的自定义设计规则,了解关于自定义规则语言的更多信息以及规则实例。
违规严重程度
违规严重性部分允许你配置每种设计规则检查的严重性。 每条规则可以被设置为创建一个错误标记、一个警告标记或没有标记(忽略)。
|
注
|
在设计规则检查器中可能会忽略个别规则违规。 在违规程度部分中将规则设置为忽略将完全禁用相应的设计规则检查。 请谨慎使用此设置。 |
正在导入设置
您可以从现有电路板导入部分或全部电路板设置。此技术可用于创建具有您想要在多个设计上使用的设置的 "模板" 电路板,然后将这些设置从模板电路板导入到每个新电路板中,而不是手动输入。
要导入设置,请点击电路板设置对话框底部的 从另一个电路板导入设置… 按钮,然后选择您要导入的 kicad_pcb 文件。 选择你想导入的设置,当前的设置将被选定的板子的值覆盖。
4. 编辑电路板
4.1. 放置和绘制操作
放置和绘图工具位于右边的工具栏中。 当一个工具被激活时,它将一直处于激活状态,直到选择了一个不同的工具或用 kbd:[Esc] 键取消该工具。 当任何其他工具被取消时,选择工具总是被激活。
某些工具栏按钮在调色板中有多个可用工具。这些工具由按钮右下角的小箭头表示:
要显示调色板,你可以在工具上点击并按住鼠标按钮,或者点击并拖动鼠标。 调色板关闭时将显示最近使用的工具。
|
Selection tool (the default tool). |
|
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. |
|
Add vias: allows placing vias without routing tracks. 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. |
|
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. |
|
Draw rectangles. Rectangles can be filled or outlines. |
|
Draw circles. Circles can be filled or outlines. |
|
Draw graphical polygons. Polygons can be filled or outlined. 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 bitmap image. |
|
Add text. |
|
Add a textbox. |
|
Add dimensions. Dimension types are described in more detail below. |
|
Deletion tool: click objects to delete them. |
|
Set drill/place origin (used for fabrication outputs) or grid origin. |
|
Interactively measure the distance between two points. |
4.2. 捕捉
移动、拖动和绘制电路板元素时,栅格、焊盘和其他元素可以具有捕捉点,具体取决于用户偏好设置中的设置。在复杂的设计中,捕捉点可能离得太近,这会使当前的工具操作变得困难。使用下表中的快捷键可以在移动鼠标时禁用栅格和对象捕捉。
| 快捷键 | 效果 |
|---|---|
kbd:[Ctrl] |
关闭网格捕捉。 |
kbd:[Shift] |
关闭对象捕捉。 |
4.3. 编辑对象属性
所有对象都有可在对话框中编辑的属性。 使用快捷键 kbd:[E] 或从右键菜单中选择属性来编辑所选项目的属性。 只有当你选择的所有项目都是同一类型时,你才能打开属性对话框。 要想一次编辑不同类型的项目的属性,请参阅下面关于批量编辑工具的章节。
在属性对话框中,任何包含数字值的字段也可以接受一个基本的数学表达式,从而得到一个数字值。 例如,一个尺寸可以被输入为 2 * 2mm,结果是 4mm 的值。 支持基本算术运算符以及用于定义运算顺序的圆括号。
4.4. 使用封装
4.4.1. 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 (kbd:[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.
4.4.2. Placing and moving footprints
Once footprints have been added to the board, you can reposition them in many ways.
The Move command (kbd:[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 (kbd:[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 kbd:[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 kbd:[R] hotkey, or clockwise using kbd:[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.
To reposition a footprint relative to its current position, use the Move Exactly tool (kbd:[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 (kbd:[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 (kbd:[Shift+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 (kbd:[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 (kbd:[O]) selects all footprints that have ratsnest lines to the currently selected footprints. The command can be executed repeatedly to further expand the selection based on the newly selected items. The Grab Nearest Unconnected Footprint command (kbd:[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 (kbd:[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 kbd:[Tab], commit the current move and skip any remaining moves by double-clicking, or cancel all moves (including those already completed) by pressing kbd:[Esc].
If you want to move a collection of footprints at once into one area, the Pack and Move Footprints command (kbd:[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 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.
4.4.3. 封装属性
|
注
|
This section of the KiCad documentation has not yet been written. We appreciate your patience as our small team of volunteer documentation writers work to update and expand the documentation. |
4.4.4. Editing Footprints
|
注
|
This section of the KiCad documentation has not yet been written. We appreciate your patience as our small team of volunteer documentation writers work to update and expand the documentation. |
4.5. 使用焊盘
在将封装放置在电路板上之后,可以检查和编辑封装的每个单独的焊盘的属性。 换句话说,如果库中的封装设计不合适,就可以在电路板上封装的特定实例中覆盖单个封装焊盘的设计。 例如,你可能希望为一个需要在特定设计中保持不焊接的焊盘去除焊膏孔,或者你可能希望移动一个轴向引线电阻的通孔焊盘的位置,以适应特定的设计。
|
注
|
默认情况下,所有封装焊盘的位置都被锁定,因此可以编辑焊盘属性,但不能移动焊盘相对于封装其他部分的位置。 焊盘可以被解锁以允许自由移动,这对某些应用很有用(如具有不同引线位置的通孔封装),但通常不建议用于表面贴装封装。 |
当一个焊盘被选中时,焊盘属性对话框将通过上下文菜单或默认的快捷键kbd:[E]打开。 请注意,KiCad 认为如果你在焊盘附近点击,你可能是想选择整个封装而不是单个焊盘。 要选择单个焊盘,请确保在焊盘区域内点击,或者关闭选择过滤器中的 "封装" 设置(并确保 "焊盘" 设置打开),以防止意外地选择整个封装而不是特定的焊盘。
焊盘属性对话框的常规选项卡显示了焊盘的物理属性,包括它的几何、形状和层设置。
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.
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.
铜层 设置控制哪些铜层将有一个与焊盘相关的形状。
对于 SMD 焊盘,选项是 F.Cu 或 B.Cu,控制焊盘是在电路板的前面还是后面 相对于封装的位置。 换句话说,如果一个焊盘在其属性中被设置为存在于 B.Cu 上,而封装被翻转到电路板的背面,该焊盘现在将存在于 F.Cu 上,因为它也被翻转了。
对于通孔焊盘,有可能从焊盘与其他铜(布线或填充区)没有电气连接的铜层中移除焊盘形状。 将铜层设置为 连接层 将从任何未连接层移除焊盘形状,而设置为 F.Cu、B.Cu 和连接层 将从任何内部未连接层移除焊盘形状。 这在密集的电路板设计中很有用,可以增加内部层的可布线面积。
技术层 复选框控制哪些技术层会有一个与焊盘形状相同的孔径。 默认情况下,焊盘在粘贴层和屏蔽层上的孔径与铜层相匹配。
|
注
|
在当前版本的 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.
出现在任何技术层上的孔径将具有与铜层上的焊盘形状相同的形状和尺寸。 在 PCB 制造过程中,制造商经常会改变掩膜和浆料孔径相对于铜焊盘尺寸的相对尺寸,但由于这种尺寸变化是特定于制造过程的,大多数制造商希望在提供设计数据时将孔径设置为与铜焊盘相同的尺寸。 对于需要在设计数据中加大或缩小技术层孔径的特定情况,你可以使用 "覆盖" 标签中的设置。
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.
"覆盖" 选项卡还可以控制焊盘如何连接到任何与之重叠并共享其网络的铜区。
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.
4.6. 使用区域
铜区,有时也被其他 EDA 工具称为铜岛或填充,是分配给一个特定网络的实心或多边形的铜区,自动保持与其他铜对象的间隙。 铜区通常用于填充板层(或板层的一部分)上的所有自由空间,以创建接地和电源平面,承载大电流,或提供屏蔽。
|
注
|
一些 EDA 工具有单独的工具用于创建 "放置层" 和在信号层上创建铜区。 在 KiCad 中,铜区工具被用于这两种应用。 |
区域是由一个多边形的 边框 来定义的,它定义了填充铜区的最大范围。 这个边框并不代表物理铜,也不会出现在导出的制造数据中。 每次修改边框或边框内的任何对象时,该区的实际铜区必须被 填充。 填充过程可以在单个区上运行,也可以在电路板的所有区上运行(默认快捷键 kbd:[B])。 区域可以 不填充(默认快捷键 kbd:[Ctrl+B]),以提高性能并减少编辑大板时的视觉混乱。
|
注
|
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 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 → Auto-refill zones). |
To draw a zone, click the Add Filled Zone tool (
) on the right toolbar, or use default hotkey kbd:[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 kbd:[E] or select Properties from the context menu.
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.
Constrain outline to H, V and 45 degrees controls the initial behavior of the zone outline drawing tool. When this option is enabled, the zone outline will be restricted to 45-degree angles. Note that after the zone outline has been created, this option has no effect. Outline points may be modified freely after creation.
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 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.
|
注
|
默认情况下,倒角和圆角不会被添加到区域边框的内角,因为这将导致填充的铜延伸到边框之外。 如果需要光滑的内角,请在电路板设置对话框的约束部分启用 允许区域边框外的圆角 选项。 |
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 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 electrically unconnected. In other words, islands are only removed from zones that have at least one electrical connection. |
4.7. 图形对象
图形对象 (直线、圆弧、矩形、圆、多边形和文本)可以存在于任何图层上,但不能分配给网络。矩形、圆和多边形可以在其属性对话框中设置为填充或边框。线宽属性将控制边框的宽度,即使是填充形状也是如此。填充形状的线宽可以设置为 "0" 以禁用边框。
4.7.1. 正在创建图形形状
The right toolbar can be used to create lines (
, default hotkey kbd:[Ctrl+Shift+L]), arcs (
, default hotkey kbd:[Ctrl+Shift+A]), rectangles (
), circles (
, default hotkey kbd:[Ctrl+Shift+C]), and polygons (
, default hotkey kbd:[Ctrl+Shift+P]).
矩形、圆形和多边形可以是填充形状或边框。 线宽 选项控制边框的宽度。 边框宽度在图形对象的 "理想" 形状的两边延伸。 例如,一个被定义为半径为 2 毫米、线宽为 0.2 毫米的图形圆将由一个外半径为 2.2 毫米、内半径为 1.8 毫米的圆环组成。 如果启用了 填充形状 选项,并且线宽被设置为 0,该形状将是一个半径为 2 毫米的填充圆。
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.
4.7.2. 正在创建文本对象
图形文字可以通过使用右侧工具栏的(
)图标或键盘快捷键 kbd:[Ctrl+Shift+T] 来放置。 点击来放置文本原点,然后在出现的对话框中编辑文本及其属性:
文字可以放在任何层上,但要注意,铜层上的文字不能与网络关联,不能与布线或焊盘形成连接。 铜区将填充在文字对象的矩形边界框周围。
Text supports markup for superscripts, subscripts, overbars, evaluating project variables, and accessing symbol field values.
| Feature | Markup Syntax | Result |
|---|---|---|
Superscript |
text^{superscript} |
textsuperscript |
Subscript |
text_{subscript} |
textsubscript |
Overbar |
~{text} |
text |
${variable} |
variable_value |
|
${refdes:field} |
field_value of symbol refdes |
|
注
|
Variables must be defined in Board Setup before they can be used. There are also a number of built-in text variables. |
4.7.3. 电路板边框 (边缘切割)
KiCad 使用 Edge.Cuts 层上的图形对象来定义电路板的边框。 该边框必须是一个连续(封闭)的形状,但可以由不同类型的图形对象组成,如线和弧,或者是一个单一的对象,如矩形或多边形。 如果没有定义电路板的边框,或者电路板的边框无效,那么一些功能,如 3D 查看器和一些设计规则的检查将无法发挥作用。
4.7.4. 批量编辑文本和图形
文本和图形的属性可以通过 编辑文本和图形属性 对话框(工具 → 编辑文本和图形属性…)来进行批量编辑。
范围和筛选器
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 layer filters to items on the specified board layer.
Filter other symbol fields by name filters to the specified symbol field.
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.
Only include selected items filters to the current selection.
操作
被筛选对象的属性可以在对话框的底部设置为新值。通过选择 设置为指定值,可以将属性设置为任意值,或者通过选择*设置为图层默认值*,将属性重置为其图层的默认值。
下拉列表和文本框可以被设置为 --保持不变-- 以保留现有值。复选框可以被选中或不被选中,以启用或禁用一个变化,但也可以切换到第三个 "保持不变" 状态。
所有项目都可以设置其 层。
图形项目可以修改其 线的厚度。
可以修改的文本属性有 字体、文本宽度、文本高度、文本厚度(仅限 KiCad 字体)、强调(粗体 和 重体)和方向(保持直立)。封装文本也可以设置其 可见性。
4.8. 标注
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.
创建一个标注后,可以编辑其属性(快捷键 kbd:[E])以改变显示数字的格式以及文本和图形线的风格。
|
注
|
您可以在电路板设置对话框的文本和图形默认值部分自定义新创建的标注对象的默认样式。 |
4.8.1. 标注格式选项
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.
Layer: Selects which layer the dimension object exists on.
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.
Units format: Select from several built-in styles of unit display.
Precision: Select how many digits of precision to display.
4.8.2. 标注文本选项
大多数标注文本选项与其他图形文本对象的选项相同(见上面的图形对象部分)。 也有一些特殊的选项适用于标注文本:
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.
4.8.3. 标注线选项
Line thickness: Sets the thickness of the graphical lines that make up a dimension’s shape.
Extension line offset: Sets the distance from the measurement point to the start of the extension lines.
Arrow length: Sets the length of the arrow segments of the dimension’s shape.
4.8.4. 引线选项
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).
4.9. 布线
KiCad 具有交互式布线器的功能:
-
Allows manual or guided (semi-automatic) routing of single tracks and differential pairs
-
可通过以下方式修改现有设计:
-
拖动现有布线时重新布线现有布线
-
拖动封装时重新布线连接到封装焊盘的布线
-
-
允许通过插入蛇形线 + 来调整布线长度和差分对的偏移(相位) 为具有严格时序要求的设计调整布线形状
默认情况下,布线器在放置布线时尊重配置的设计规则:新布线的尺寸(宽度)将取自设计规则,在确定新布线和过孔的放置位置时,布线器将尊重设计规则中设置的铜间隙。 如果需要的话,可以通过使用高亮冲突布线器模式和打开布线器设置中的允许 DRC 违规选项来禁用这种行为(见下文)。
布线器有三种模式,可以随时选择。 布线器模式用于布线新布线,但也用于使用拖动(快捷键 kbd:[D])命令拖动现有布线时。 这些模式是:
-
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.
使用哪种模式是一个偏好问题。 对于大多数用户,我们建议使用推挤模式以获得最高效的布线体验,或者,如果您不希望布线器修改未被布线的线段,则建议使用绕走模式。请注意,推挤和绕走模式始终创建水平、垂直和 45 度 (H/V/45) 布线段。如果需要使用 H/V/45 以外的角度布线段,则必须使用高亮碰撞模式,并在交互布线器设置对话框中启用自由角度模式选项。
有五个主要的布线功能。单布线、差分对布线、调整单布线长度、调整差分对的长度和调整差分对的偏移 (相位)。 所有这些都存在于顶部工具栏上的路由菜单下拉菜单(单独)和绘图工具栏上的两个重载图标中,在右侧的绘图工具栏上。 上面介绍了重载图标的使用。 一个用于两个布线功能,一个用于三个调谐功能。 此外,布线菜单允许选择设置层对和交互式布线器设置。
To route tracks, click the Route Tracks
icon (from the drawing toolbar or from the top toolbar under Route) or use the hotkey kbd:[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.
|
注
|
间隙边框显示从布线网络到 PCB 上任何其他铜线的最大间隙。 可以使用自定义设计规则为不同对象指定网络的不同间隙。 布线器将考虑这些间隙,但仅直观地显示最大间距值。 |
当布线器处于活动状态时,将从布线起点到编辑器光标绘制新的线段。这些线段是未固定临时 (unfixed temporary) 对象,它们显示当您使用左击或 kbd:[Enter] 键来固定布线 (fix the route) 时将创建哪些线段。非固定布线段以比固定布线段更亮的颜色显示。当您使用 kbd:[Esc] 键或通过选择另一个工具退出布线器时,将只保存固定布线段。完成布线操作(快捷键 kbd:[End]) 将固定所有布线并退出布线器。
在布线时,可以使用撤消最后一个布线段命令 (快捷键 kbd:[Backspace]) 取消固定最近固定的布线。您可以重复使用此命令以后退已固定的布线。
In previous versions of KiCad, using the left mouse button or kbd:[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.
布线时,可以按住 kbd:[Ctrl] 键禁用网格捕捉,按住 kbd:[Shift] 键禁用对焊盘和过孔等对象的捕捉。
|
注
|
也可以通过更改首选项对话框的编辑选项部分中的磁吸点首选项来禁用对对象的捕捉。 我们建议您在一般情况下保持启用对象捕捉,这样就不会意外地在焊盘或过孔上略微偏离中心结束布线。 |
4.9.1. 布线形态
在垂直(H) / 水平 (V) / 45 度模式下布线时,形态 是指一组两个线段如何连接单个 H/V/45 度线段无法到达的两个点。 在这种情况下,这些点将由一条水平或垂直线段和一条对角线 (45度) 线段连接。形态指的是这些线段的顺序:是水平/垂直线段还是对角线线段在前。
KiCad 的布线器试图根据一系列因素自动选择最佳形态。一般说来,布线器会尝试最大限度地减少路线中的拐角数量,并尽可能避免 "坏" 拐角 (如锐角)。当从焊盘布线或布线到焊盘时,KiCad 将选择将路线与焊盘最长边缘对齐的形态。
在某些情况下,KiCad 无法正确猜测您想要的形态。要在布线时切换布线的形态,请使用切换布线形态命令 (快捷键 kbd:[/])。
在没有明显的“最佳”形态的情况下(例如,从过孔开始布线时),KiCad 将使用鼠标光标的移动来选择形态。如果希望布线从直线 (水平或垂直) 线段开始,请在水平或垂直方向上将鼠标从起始位置移开。如果您希望布线以对角线开始,请沿对角线方向移动。一旦光标与布线起始位置相距足够远,形态就会被锁定,并且除非光标回到起始位置,否则不会再更改。可以在交互式布线器设置对话框中禁用从鼠标光标移动检测形态,如下所述。
|
注
|
如果使用切换布线形态命令覆盖 KiCad 选择的形态,则在当前布线操作的其余部分中,将禁用从鼠标移动自动检测形体。 |
4.9.2. 布线转角模式
当以 H/V/45 模式布线时,KiCad 的布线器可以放置尖角或圆角的布线。要在尖角和圆角之间切换,请使用布线拐角模式命令 (快捷键 kbd:[Ctrl+/])。使用圆角布线时,每个布线步骤将放置直线段、单个圆弧或同时放置直线段和圆弧。布线形态决定首先放置圆弧还是直线段。
选择所需布线后,还可以在布线后使用圆角布线命令对布线拐角进行圆角处理。
|
注
|
尚不支持使用圆弧拖动布线。当拖动布线或在推挤模式下由布线器移动布线时,圆弧将转换回锐角。 |
4.9.3. 布线宽度
被布线的线段的宽度是通过以下三种方式之一来确定的:如果布线的起点是现有线段的终点,并且顶部工具栏上的
按钮被启用,宽度将被设置为现有布线的宽度。 否则,如果顶部工具栏中的布线宽度下拉菜单被设置为 "使用网络类宽度",则宽度将取自被布线的网络类(或任何为网络类指定不同宽度的自定义设计规则,例如在凹陷区域内)。 最后,如果布线宽度下拉菜单被设置为电路板设置对话框中配置的预定义布线尺寸之一,则将使用该宽度。
|
注
|
布线宽度永远不能低于在电路板设置对话框的约束部分中配置的最小布线宽度。如果添加的预定义宽度低于此最小约束,则将使用最小约束值。 |
KiCad 的布线器支持活动路线的单一布线宽度。 换句话说,要在线段中间改变宽度,你必须结束路线,然后从上一条线段的末端重新开始一条新的线段。 要改变活动线段的宽度,可使用快捷键 kbd:[W] 和 kbd:[Shift+W],在电路板设置对话框中配置的布线宽度中逐步进行。
4.9.4. 放置过孔
在布线线段时,切换层会在当前(未固定)线段的末端插入一个过孔。 一旦你放置了过孔,布线将继续在新层上进行。 有几种方法可以选择一个新层并插入过孔:
-
使用快捷键选择特定的图层,如 kbd:[PgUp] 选择 F.Cu 或 kbd:[PgDn] 选择 B.Cu。
-
通过使用 "下一层" 或 "上一层" 快捷键 (kbd:[+] 和 kbd:[-])。
-
通过使用 "放置过孔" 快捷键 (kbd:[V]),它将切换到活动层对中的下一层。
-
通过使用 "选择图层并通过通孔放置" 操作(快捷键 kbd:[<]),将打开一个对话框来选择目标层。
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 kbd:[V]. The via will be removed and routing will continue on the original layer.
You can place a via and end the current trace, without changing layers, by pressing kbd:[V] and then double-clicking or kbd:[Shift]-clicking to place the via.
过孔的尺寸将从激活的过孔尺寸设置中获取,可通过顶部工具栏的下拉列表或增加过孔尺寸 (kbd:[']) 和减小过孔尺寸 (kbd:[\ ]) 快捷键访问。与布线宽度非常相似,当通孔大小设置为"使用网络类尺寸" 时,将使用 "电路板设置" 的 "网络类" 部分中配置的过孔大小 (除非被自定义设计规则覆盖)。
如果在电路板设置对话框的约束条件部分启用了微孔或盲/埋孔,就可以在布线时放置这些过孔。 使用快捷键 kbd:[Ctrl+V] 来放置微孔,kbd:[Alt+Shift+V] 来放置盲/埋孔。 微孔只能被放置在连接一个外铜层和相邻层的位置。 盲孔/埋孔可以放置在任何一层上。
布线器放置的过孔被认为是已布线线段的一部分。 这意味着过孔网络可以自动更新(就像线段网络一样),例如,当从原理图中更新 PCB 时改变了线段的网络名。 在某些情况下,这可能是不需要的,例如在创建邮戳孔时。 对于特定的过孔,可以通过关闭过孔属性对话框中的 "自动更新过孔网络" 复选框来禁用过孔网络的自动更新。 使用 "添加独立过孔" 工具放置的过孔在创建时禁用这一设置。
4.9.5. Routing Convenience Functions
KiCad offers several functions to make certain routing operations more convenient.
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 kbd:[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 kbd:[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 (kbd:[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 kbd:[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.
4.9.6. Automatically completing traces
KiCad’s router can automatically route individual traces, based on the connections defined in the schematic. This can be thought of as a limited form of auto-routing that considers a single trace at a time. The router will only use the current layer; it will not use vias or change layers.
While routing, press the kbd:[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 kbd:[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 kbd:[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.
4.9.7. 差分对布线
KiCad 中的差分对被定义为具有共同的 基数名称 和正负后缀的网路。 KiCad 支持使用 + 和 -,或者 P 和 N 作为后缀。 例如,USB+ 和 USB- 构成一对差分,USB_P 和 USB_N 也是如此。 在第一个例子中,基本名称是 USB,第二个例子中是 USB_。 后缀样式不能混合:网路 USB+ 和 USB_N 不构成差分对。 请确保你在原理图中相应地命名你的差分对网络,以便在 PCB 编辑器中使用差分对布线器。
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 kbd:[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.
|
注
|
目前不可能在现有差分对布线的中间开始对差分对进行布线。 |
差分对布线器将尝试用设计规则中的间隙布线这对布线(差分对间隙可以在电路板设置对话框的网络类部分中配置,也可以通过使用自定义设计规则来配置)。如果布线的起始或结束位置与配置的间隙不同,布线器将创建一个较短的 "扇出" 部分,以最大限度地缩短差分对未耦合的布线长度。
当交换层或使用放置过孔 (kbd:[V]) 操作时,差分对布线器将创建两个相邻的过孔。这些过孔将被放置在尽可能靠近彼此的位置,同时遵守铜和孔到孔间隙的设计规则。
4.9.8. 修改布线
线段被布线后,可以通过移动或拖动来修改它们,或者删除并重新布线。 当选择一个线段时,快捷键 kbd:[U] 可以用来将选择范围扩大到所有连接的线段。 第一次按下 kbd:[U] 将选择与焊盘或过孔最近的连接点之间的线段。 第二次按 kbd:[U] 将再次扩大选择范围,包括所有层上与所选线段相连的所有线段。 用这种技术选择线段可以用来快速删除整个布线网络。
有两种不同的拖动命令可用于修改布线段。拖动 (45 度模式) 命令快捷键 kbd:[D] 用于通过布线器拖动布线。如果布线器模式设置为推挤,则使用此命令拖动将推挤附近的布线。如果布线器模式设置为绕走,则使用此命令拖动将绕过障碍物或停在障碍物处。拖动自由角度命令 快捷键 kbd:[G] 用于将布线段一分为二,并将新角点拖动到任何位置。拖动自由角度的行为类似于高亮碰撞布线器模式:不会避开或推挤障碍物,只会高亮。
|
注
|
目前还不能拖动包含圆弧的布线。在某些情况下,尝试拖动这些布线会导致圆弧被删除。可以通过选中特定圆弧并使用拖动命令 (kbd:[D]) 来调整其大小。使用此命令调整圆弧大小时,不执行 DRC 检查。 |
移动命令(快捷键 kbd:[M])也可以在线段上使用。 该命令将拾取选定的线段,而忽略任何未被选中的附加线段或过孔。 使用移动命令移动线段时,不会进行 DRC 检查。
在移动封装的同时,可以对附着在封装上的线段进行重新布线。 要做到这一点,在选择了一个封装的情况下使用拖动命令(kbd:[D])。 任何以封装的一个焊盘为终点的线段都将与封装一起被拖动。 这个功能有一些限制:它只在高亮冲突模式下运行,所以附着在封装上的线段不会绕过障碍物或将附近的线段推开。 此外,只有以封装的焊盘为终点的线段才会被拖动。 仅仅穿过焊盘或在原点以外的焊盘上结束的线段将不会被拖动。
可以使用编辑布线和过孔对话框修改布线的宽度和过孔的大小,而无需重新布线。有关详细信息,请参阅下面关于批量编辑工具的部分。
4.9.9. 长度调整
The length tuning tools can be used to add serpentine tuning shapes to tracks after routing. To tune the length of a track, first pick the appropriate length tuning tool. The single track tuning tool (icon
or hotkey kbd:[7]) will add serpentine shapes to bring the length of a single track up to the target value. The differential pair tuning tool (icon
or hotkey kbd:[8]) will do the same for a differential pair. The differential pair skew tuning tool (icon
or hotkey kbd:[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.
要选择长度调整工具的目标长度,请在激活长度调整工具后,从上下文菜单或使用快捷键 kbd:[Ctrl+L] 打开 "长度调整设置" 对话框:
此对话框还可用于配置曲折形状的大小、形状和间距。
配置好目标长度后,在你希望开始放置蛇形形状的区域点击一个布线。 沿着线段移动鼠标光标,蛇形形状就会被添加。 光标旁边会出现一个状态窗口,显示布线的当前长度和目标长度。 再次点击,完成放置当前的蛇形布线。 如果需要,可以在同一条布线上放置多条蛇形布线。
|
注
|
长度调整工具仅支持调整两个焊盘之间的点对点网络的长度。尚不支持调整具有不同拓扑的网络长度。 |
4.9.10. 交互式布线设置
交互式布线器设置可通过路径菜单访问,或通过右键单击工具栏中的布线按钮来访问。这些设置控制布线和拖动现有布线时的布线行为。
| 设置 | 说明 |
|---|---|
模式 |
设置用于创建新布线和拖动现有布线的路由器的操作模式。 有关详细信息,请参阅上面的内容。 |
自由角度模式 |
允许以任何角度布线,而不是仅以 45 度增量布线。 仅当布线模式设置为突出显示高亮冲突时, 此选项才可用。 |
绕过障碍物 |
在推挤模式下,允许布线尝试在实心障碍物 (如焊盘) 后面移动碰撞布线。 |
移除多余的布线 |
自动删除在当前布线中创建的回路, 仅保留回路中最近布线的部分。 |
优化焊盘连接 |
启用此设置时,交互式布线器尝试在退出焊盘和过孔时避免锐角 和其他不需要的布线。 |
平滑拖动线段 |
拖动布线时,会尝试将布线段组合在一起, 以最大限度地减少方向更改。 |
允许违反 DRC 规则 |
在高亮碰撞模式下,允许放置违反 DRC 规则的布线和过孔。 在其他模式下不起作用。 |
优化正在拖动的布线 |
启用后,拖动布线段将导致 KiCad 优化屏幕上可见的其余布线。 优化过程去除了不必要的拐角,避免了锐角,通常会尝试找到布线的最短路径。 禁用时,不会对正在拖动的紧邻部分之外的布线执行任何优化。 在拖动布线时尝试优化布线。 |
使用鼠标路径设置布线形态 |
尝试根据鼠标路径从布线起点位置拾取布线形态。 如果鼠标从开始位置开始主要沿对角线移动,则形态将设置为对角线起点; 如果鼠标主要水平或垂直移动,则形态将设置为垂直起点。 当鼠标离开布线起始位置很远时,形态估计就会被锁定, 并且可以通过移回起始位置来解锁。 |
点击时固定所有线段 |
启用时,在布线时单击将固定已布线的所有布线段的位置, 包括在鼠标光标结束的线段。新的线段将从鼠标光标位置开始。 禁用时,最后一个线段 (在鼠标光标处结束的线段) 将不会固定在适当位置, 可以通过进一步的鼠标移动进行调整。 |
4.10. 向前和向后批注
4.10.1. 从原理图更新 PCB(正向批注)
使用 "从原理图更新 PCB" 工具将设计信息从原理图编辑器同步到电路板编辑器。在原理图编辑器和电路板编辑器中都可以用 工具 → 从原理图更新 PCB(kbd:[F8])来访问该工具。你也可以使用电路板编辑器顶部工具栏上的
图标。这个过程通常被称为正向批注。
|
注
|
从原理图更新 PCB 是将设计信息从原理图转移到 PCB 的首选方法。在旧版本的 KiCad 中,相应的过程是将网表从原理图编辑器中导出并导入到电路板编辑器中。现在已经没有必要使用网表文件了。 |
该工具将每个符号的封装添加到电路板上,并将更新的原理图信息传输到电路板上。特别是,电路板的网络连接被更新以符合原理图。
将对 PCB 进行的修改列在 待应用的修改 窗格中。在你点击 更新 PCB 按钮之前,PCB 不会被修改。
你可以使用窗口底部的复选框来显示或隐藏不同类型的信息。可以使用 保存… 按钮将更改的报告保存到文件中。
选项
该工具有几个选项来控制其行为。
选项 |
说明 |
根据位号将封装重新链接到原理图符号上 |
封装通常是通过符号添加到原理图中时创建的唯一标识符与原理图符号相连。符号的唯一标识符不能被改变。 如果选中,PCB 中的每个封装将被重新链接到与该封装具有相同位号的符号上。 如果不勾选,封装和符号将像往常一样通过唯一的标识符来链接,而不是通过位号。每个封装的位号将被更新以匹配其链接符号的位号。 这个选项一般不应该被选中。它对依赖改变原理图符号和封装之间的链接的特定工作流程很有用,例如重构原理图以方便布局,或者在设计的相同通道之间复制布局。 |
删除没有符号的封装 |
如果选中,PCB 中任何在原理图中没有相应符号的封装都将从 PCB 中删除。带有 "不在原理图中" 属性的封装将不受影响。 如果不勾选,没有相应符号的封装将不会被删除。 |
用原理图中指定的封装替换封装 |
如果选中,PCB 中的封装将被替换为相应原理图符号中指定的封装。 如果不勾选,即使原理图符号被更新为指定了不同的封装,PCB 中已有的封装也不会被改变。 |
4.10.2. 从 PCB 上更新原理图(反向批注)。
KiCad 的典型工作流程是在原理图中进行修改,然后使用 "从原理图更新 PCB" 工具将修改内容同步到电路板上。然而,相反的过程也是可行的:可以在电路板上进行设计修改,然后在原理图或电路板编辑器中使用 工具 → 从 PCB 更新原理图 同步到原理图上。这个过程通常被称为反向批注。
该工具将位号、值、封装分配和网络名称的变化从电路板同步到原理图。每种类型的变化都可以单独启用或禁用。
将对原理图进行的修改列在 待应用的修改 窗格中。在您点击 更新原理图 按钮之前,原理图不会被修改。
你可以使用窗口底部的复选框来显示或隐藏不同类型的信息。可以使用 保存… 按钮将更改的报告保存到文件中。
选项
该工具有几个选项来控制其行为。
选项 |
说明 |
根据位号将封装重新链接到原理图符号上 |
如果选中,PCB 中的每个封装将被重新链接到与该封装具有相同位号的符号上。这个选项与更新符号位号不兼容。 如果不勾选,封装和符号将像往常一样通过唯一的标识符连接,而不是通过位号。 |
位号 |
如果选中,符号位号将被更新,以匹配链接封装的位号。 如果不勾选,符号位号将不会被更新。 |
值 |
如果选中,符号值将被更新以匹配链接封装的值。 如果不勾选,符号值不会被更新。 |
封装分配 |
如果选中,符号的封装分配将被更新,这些符号的封装在电路板中被改变或替换。 如果不勾选,符号的封装分配将不会被更新。 |
网络名 |
如果选中,原理图将根据电路板上的任何网络名变化进行更新。如有必要,网络标签将被更新或添加到原理图中,以便与电路板相匹配。 如果不勾选,原理图中的网络名将不会被更新。 |
|
注
|
《全局重新批注,全局重新批注》功能可以与反向批注位号结合使用,根据设计中的位置重新批注所有元件。 |
用 CMP 文件进行反向批注
通过从 PCB 编辑器导出 CMP 文件(文件 → 导出 → 封装关联(.cmp)文件…)并在原理图编辑器中导入(文件 → 导入 → 封装分配…),也可以将选择的变化从 PCB 上同步到原理图。
|
注
|
这种方法只能同步对封装分配和封装字段的修改。建议使用 "从 PCB 更新原理图" 工具来代替。 |
4.10.3. 位置重新批注
|
注
|
This section of the KiCad documentation has not yet been written. We appreciate your patience as our small team of volunteer documentation writers work to update and expand the documentation. |
4.11. 锁定
大多数对象可以通过其属性对话框、右键上下文菜单或使用 "切换锁定" 快捷键(kbd:[L])来锁定。 被锁定的对象不能被选择,除非选择过滤器中的 "被锁定的项目" 复选框被启用。 试图移动锁定的项目将导致一个警告对话框:
在这个对话框中选择 "覆盖锁定" 将允许移动锁定的项目。 选择 "确定" 将允许你在选择中移动任何未上锁的项目;留下锁定的项目。 选择 "不再显示" 将使你在剩下的会话中记住你的选择。
4.12. 批量编辑工具
|
注
|
This section of the KiCad documentation has not yet been written. We appreciate your patience as our small team of volunteer documentation writers work to update and expand the documentation. |
4.13. 清理工具
|
注
|
This section of the KiCad documentation has not yet been written. We appreciate your patience as our small team of volunteer documentation writers work to update and expand the documentation. |
4.14. 正在导入图形
|
注
|
This section of the KiCad documentation has not yet been written. We appreciate your patience as our small team of volunteer documentation writers work to update and expand the documentation. |
4.14.1. 从 DXF 和 SVG 文件导入矢量图
|
注
|
This section of the KiCad documentation has not yet been written. We appreciate your patience as our small team of volunteer documentation writers work to update and expand the documentation. |
4.14.2. 正在导入位图图像
|
注
|
This section of the KiCad documentation has not yet been written. We appreciate your patience as our small team of volunteer documentation writers work to update and expand the documentation. |
5. 检查电路板
5.1. 测量工具
测量工具允许你在 PCB 上的各点之间进行距离和角度测量。 要激活该工具,请点击右侧工具栏的
图标,或使用快捷键 kbd:[Ctrl + Shift + M]。 一旦该工具被激活,点击一次以设置测量起点,然后再点击一次以完成测量。
|
注
|
测量工具用于不需要永久显示的快速测量。 您所做的任何测量都将仅在该工具处于活动状态时显示。 要创建将显示在打印输出和打印中的永久性尺寸标注,请使用尺寸标注工具。 |
5.2. 设计规则检查
设计规则检查器用于验证 PCB 是否符合电路板设置对话框中建立的所有要求,以及所有焊盘是否按照网表或原理图连接。 KiCad 可以在布线线段时自动防止一些违反设计规则的行为,但许多其他的行为是无法自动防止的。 这意味着在为 PCB 创建制造文件之前,必须使用设计规则检查器。
要使用设计规则检查器,请点击顶部工具栏的
图标,或从 检查 菜单中选择 设计规则检查器。
DRC 控制窗口的顶部部分包含一些控制设计规则检查器的选项:
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.
运行 DRC 后,任何违规行为都会显示在 DRC 控制窗口的中间部分。 违反规则、未连接的项目以及原理图和 PCB 之间的差异会显示在三个不同的标签中。 违规列表下面的控件可以用来显示或隐藏违规,这取决于其严重程度。 在运行 DRC 后,可以使用保存按钮创建一个纯文本格式的报告文件。
每个违规行为都涉及 PCB 上的一个或多个对象。 在违规列表中,涉及的对象列在违章下面。 点击列表中的违规行为将移动 PCB 编辑器的视图,使受影响的区域居中。 点击违规所涉及的对象之一将高亮显示该对象。
窗口底部的数字显示错误、警告和排除的数量。每种类型的违规行为都可以用各自的复选框从列表中过滤出来。点击 删除标记 将清除所有违规行为,直到再次运行 DRC。
可以在对话框中右键单击违规行为,以忽略它们或改变其严重程度:
-
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.
在设计规则检查器运行期间,排除的和忽略的违规行为会被记住。
5.2.1. 间隙和约束解析
间隙和约束解决工具允许你检查哪些间隙和设计约束规则适用于选定的项目。 当设计具有复杂设计规则的 PCB 时,这些工具可以提供帮助,因为在这种情况下并不总是清楚哪些规则适用于某个对象。
要检查两个对象之间适用的间隙规则,选择这两个对象并从 检查 菜单中选择 间隙分辨率。 间隙报告对话框将显示每个铜层上的对象之间所需的间隙,以及产生该间隙的设计规则。
要检查适用于一个对象的设计约束,选择它并从 检查 菜单中选择 约束解析。 约束报告对话框将显示适用于该对象的任何约束。
5.3. 查找工具
查找工具在 PCB 中搜索文本,包括位号、封装区域和图形文本。当该工具找到一个匹配的文本时,画布会被放大,并将其置于匹配文本的中心位置,同时文本被高亮显示。使用顶部工具栏中的(
)按钮启动该工具。
查找工具有几个选项:
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.
5.4. 搜索面板
|
注
|
This section of the KiCad documentation has not yet been written. We appreciate your patience as our small team of volunteer documentation writers work to update and expand the documentation. |
5.5. 3D 查看器
3D 查看器显示了电路板和电路板上的元件的 3D 视图。你可以从不同的角度查看电路板,显示或隐藏不同类型的元件,从 PCB 编辑器到 3D 查看器的交叉探测,以及生成电路板的光线跟踪渲染图。
|
注
|
The 3D model for a component will only appear if the 3D model file exists and has been assigned to the footprint. |
|
注
|
KiCad 标准库中的许多封装还没有为它们创建模型文件。然而,这些封装可能包含一个指向尚不存在的 3D 模型的路径,以期待将来创建 3D 模型。 |
5.5.1. 浏览 3D 视图
Dragging with the left mouse button will orbit the 3D view. By default this is the centroid of the board, but the pivot point can be reset to a new point on the board by moving the cursor over the desired point and pressing kbd:[Space]. Scrolling the mouse wheel will zoom the view in or out. Scrolling while holding kbd:[Ctrl] pans the view left and right, and scrolling while holding kbd:[Shift] pans up and down. Dragging with the middle mouse button also pans the view.
不同大小的 3D 网格可以用 偏好设置 → 3D 网格 菜单来设置。每个元件的围框可以通过 偏好设置 → 显示模型围框 来启用。
当 PCB 编辑器和 3D 查看器同时打开时,在 PCB 编辑器中选择一个封装也会在 3D 查看器中突出显示该元件。高亮显示的颜色可以在 偏好设置 → 偏好设置… → 3D 查看器 → 实时渲染器 → 选择颜色 中调整。
5.5.2. 用 3D 查看器生成图像
当前的 3D 视图可以用 文件 → 将当前视图导出为 PNG… 或 将当前视图导出为 JPG…,根据所需的图像格式,将其保存为一个图像。也可以用
按钮,或 编辑 → 复制 3D 图像 将当前视图复制到剪贴板上。
3D 查看器有一个光线跟踪渲染模式,它使用比默认渲染模式更精确的物理渲染模型来显示电路板。 光线追踪比默认渲染模式慢,但当需要最吸引人的视觉效果时,可以使用它。使用
按钮,或者使用 偏好设置→光线追踪 来启用光线追踪模式。在光线追踪模式下,3D 网格和选择高光不会显示。
颜色和其他渲染选项,包括光线跟踪和非光线跟踪模式,都可以在 偏好设置 → 偏好设置… → 3D查看器 中调整。
5.5.3. 3D 查看器控制
许多查看选项是通过顶部的工具栏控制的。
|
Reload the 3D model |
|
Copy 3D image to clipboard |
|
Render current view using raytracing |
|
Redraw |
|
Zoom in |
|
Zoom out |
|
Fit drawing in display area |
|
Rotate X clockwise |
|
Rotate X counterclockwise |
|
Rotate Y clockwise |
|
Rotate Y counterclockwise |
|
Rotate Z clockwise |
|
Rotate Z counterclockwise |
|
Flip board view |
|
Pan board left |
|
Pan board right |
|
Pan board up |
|
Pan board down |
|
Enable/disable orthographic projection |
|
Show/hide 3D models for through-hole components |
|
Show/hide 3D models for surface mount components |
|
Show/hide 3D models for components of type other |
|
Show/hide 3D models for components not in position file |
5.6. 网络检查
网络检查器允许你查看电路板中所有网络的统计数据。 要打开检查器,请点击外观面板中的网络部分顶部的
图标,或者从检查菜单中选择网络检查器。
点击网络列表中的一个网络会在电路板上高亮显示该网络。 单击列标题允许您按该列对网络列表进行排序。
分组依据字段允许您将不同的网络组合在一起,并查看组合的网络的总长度。 例如,如果您有两个名为 DATA0 和 DATA0_EXT 的网络,则使用值为 DATA0* 的分组依据将创建一个包含这两个网络的组。 通过将分组依据模式从通配符更改为 RegEx (正则表达式),可以创建更复杂的分组。 分组依据模式的子字符串 (Substr) 变体将为以不同方式匹配该模式的每组网络创建组。
例如,如果您有 U1D+,U1D-,U2D+ 和 U2D-,分组模式 U*D 将在通配符模式下匹配所有四个网络,创建一个单一的组 U*D。 在通配符子串模式下,它将匹配所有四个网络,但创建两个不同的组:U1D 和 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.
|
注
|
网络检查器中显示的长度不同于长度调整工具中显示的长度, 因为网络检查器显示连接到网络的所有布线的总和, 而长度调整工具显示最近的两个焊盘或分支过孔之间的距离。 有关长度调整工具的更多信息,请参见布线部分。 |
6. 生成输出
KiCad 可以生成和导出多种不同格式的文件,对制造 PCB 和与外部软件的接口很有用。 该功能可在文件菜单的几个不同部分中找到。 制造输出部分包含准备制造 PCB 所需的最常见操作。 输出部分包含生成可由外部软件读取的文件的工具。 绘图功能允许你以各种格式导出 PCB 的 2D 线图。 打印功能允许你将 PCB 的视图发送到 2D 打印机上。
6.1. 制造输出和绘制
KiCad 使用 Gerber 文件作为其 PCB 制造的主要绘图格式。 要创建 Gerber 文件,请从文件菜单中打开绘图对话框,或从文件菜单的制造输出部分选择 Gerbers。 绘图对话框将打开,允许你配置和生成 Gerber 文件。
6.1.1. 绘制选项
Include Layers: Check that every layer used on your board is enabled in the list. Disabled layers will not be plotted.
Output directory: Specify the location to save plotted files. If this is a relative path, it is created relative to the project directory.
Plot border and title block: 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).
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.
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).
|
注
|
KiCad 不支持覆盖或开窗特定过孔。 覆盖只能是全局控制的(一块板上的所有过孔)。 |
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.
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!
6.1.2. Gerber 选项
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.
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.
6.1.3. Postscript 选项
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.
6.1.4. SVG 选项
Units: Controls the units that will be used in the SVG file. Since the SVG format has no specified units system, you must export using the same units setting that you want to use for importing into other software.
Precision: Controls how many significant digits will be used to store coordinates.
6.1.5. DXF 选项
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.
6.1.6. HPGL 选项
Default pen size: Controls the plotter pen size used to create graphics.
6.2. 钻孔文件
KiCad 可以生成大多数 PCB 制造工艺所需的 Excellon 或 Gerber X2 格式的数控钻孔文件。 KiCad 还可以生成钻孔图:一个显示钻孔位置的电路板图形图。 从 "制造输出" 菜单中选择 "生成钻孔文件" 选项来打开该对话框:
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 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.
6.3. 元件放置文件
元件放置文件是一种文本文件,它列出了电路板上的每个元件(封装)以及其中心位置和方向。 这些文件通常用于对取放机进行编程,如果你订购的是完全组装的 PCB,你的制造商可能需要这些文件。
|
注
|
如果为生成的封装启用了“从放置文件中排除”选项,该封装将不会出现在生成的放置文件中。 这可用于排除不代表要组装的物理元件的某些封装。 |
Format: Choose between generating a plain text (ASCII), comma-separated text (CSV), or Gerber 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.
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).
6.4. 额外的制造产出
KiCad 还可以从电路板设计生成封装报告文件、IPC-D-356 网表文件和物料清单 (BOM)。 这些输出格式没有可配置的选项。
6.5. 打印
KiCad 可以使用文件菜单中的打印操作将电路板视图打印到标准打印机上。
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.
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.
6.6. 正在导出文件
KiCad 可以将电路板设计导出为各种第三方格式,以便与外部软件一起使用。 这些功能可以在文件菜单的导出部分找到。
Specctra .DSN: creates a file suitable for importing into certain third-party autorouter software. This exporter has no configurable options.
|
注
|
TODO:文档 GenCAD 导出器 |
|
注
|
TODO: 文档 VRML 导出器 |
6.6.1. IDF 导出器
IDF 导出器导出一个 IDFv3 兼容的板(.emn)和库(.emp)文件,用于向机械 CAD 软件包传递机械尺寸。导出器导出板子的边框和切口,所有的焊盘和安装孔,包括开槽孔,以及元件的边框;这是与机械设计师互动所需的最基本的机械数据集。IDFv3 规范中描述的所有其他实体目前都没有导出。
|
注
|
你必须将 IDF 元件模型附加到你的设计的封装中,然后它们才会被包含在导出的模型中。关于将模型附加到封装的更多信息,请参阅《创建和编辑封装,封装文档》。一些针对 IDF 的指导包括在《使用 idf 元件边框的工作,高级主题文档》中。 |
|
注
|
关于创建 IDF 元件模型的更多信息,包括 KiCad 中包含的 IDF 实用工具的描述,请参阅《使用 idf 元件边框的工作,高级主题文档》。 |
一旦为所有需要的元件指定了模型,就可以导出电路板的模型。在 PCB 编辑器中,选择文件 → 导出 → 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.
输出结果可以直接在机械 CAD 应用程序中查看,或使用《idf2vrml,idf2vrml 工具》转换为 VRML。
|
注
|
TODO: 文档 STEP 导出器 |
|
注
|
TODO: 文档 SVG 导出器 |
|
注
|
TODO: 文档 CMP 文件导出器 |
Hyperlynx: creates a file suitable for importing into Mentor Graphics (Siemens) HyperLynx simulation and analysis software.
7. 封装和封装库
7.1. 管理封装库
KiCad 的封装库管理系统允许直接使用几种类型的封装库:
-
KiCad .pret 封装库(以 .pret 为扩展名的文件夹,包含 .kicad_mod 文件)。
-
KiCad 遗留封装库(.mod 文件)
-
GEDA 库(包含 .fp 文件的文件夹)
-
Eagle 封装库
|
注
|
KiCad 只支持写到 KiCad 的本地 .pretty 格式的封装库(以及其中的 .kicad_mod 封装文件)。所有其他封装库格式都是只读的。 |
KiCad 使用一个封装库表,将任何支持的库类型的封装库映射到库的昵称。KiCad 使用一个全局封装库表,以及一个针对每个工程的表。要编辑任何一个封装库表,请使用 偏好设置→ 管理封装库…。
全局封装库表包含了无论当前加载的工程是什么,都可以使用的库列表。该表保存在 KiCad 配置文件夹中的 fp-lib-table 文件中。该文件夹的位置 取决于正在使用的操作系统。
工程专用的封装库表包含了专门为当前加载的工程提供的库的列表。如果有任何工程专用的封装库,该表将保存在工程文件夹中的 fp-lib-table 文件中。
7.1.1. 初始配置
当 PCB 编辑器(或任何其他使用封装的 KiCad 工具)第一次运行时,如果没有找到全局封装表文件 fp-lib-table,KiCad 将引导用户设置一个新的封装库表。这个过程被描述为《初始配置》。
7.1.2. 管理表的条目
封装库只有在被添加到全局或工程专用的封装库表中时才能被使用。
通过点击
按钮并选择一个库或点击
按钮并输入库文件的路径来添加一个库。选定的库将被添加到当前打开的库表中(全局或工程专用)。可以通过选择所需的库条目并点击
按钮来删除库。
这个
和image:images/icons/small_down_16.png[向下图标] 按钮在库表中上下移动所选库。这并不影响在 "封装库浏览器"、"封装编辑器 "或 "添加封装工具 "中显示库的顺序。
库可以通过取消勾选第一列中的 活动 复选框而变得不活动。不活动的库仍然在库表中,但不会出现在任何库的浏览器中,也不会从磁盘加载,这可以减少加载时间。
通过点击范围内的第一个库,然后 kbd:[Shift] -点击范围内的最后一个库,就可以选择一个库的范围。
每个库必须有一个独特的昵称:在同一个表中不允许有重复的库昵称。然而,昵称可以在全局和工程库表中重复。工程表中的库比全局表中的同名库更有优先权。
库的昵称不一定要与库的文件名或路径有关。冒号字符 (:) 不能用于库昵称或封装名称,因为它被用作昵称和封装之间的分隔符。
每个库条目必须有一个有效的路径。路径可以定义为绝对的、相对的,或者通过《环境变量替换,环境变量替换》来定义。
必须选择适当的库格式,以便正确读取库。KiCad 支持读取 KiCad (.pretty), KiCad 遗留 (.mod), Eagle (.lbr), 和 GEDA (带有 .fp 文件的文件夹)封装库。
有一个可选的描述字段,用于添加库条目的描述。选项字段目前不使用,所以添加选项在加载库时不会有任何影响。
7.1.3. 环境变量替代
封装库表支持环境变量替换,这允许你定义环境变量,其中包含存储库的自定义路径。环境变量替换是通过在封装库路径中使用 ${ENV_VAR_NAME} 的语法来支持的。
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.
在封装库表中使用环境变量,可以在不破坏封装库表的情况下重新定位库,只要在库的位置改变时更新环境变量即可。
${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.
7.1.4. 使用 GitHub 插件
|
注
|
KiCad 在 6.0 版本中取消了对 GitHub 库插件的支持。 |
7.2. 创建和编辑封装
|
注
|
This section of the KiCad documentation has not yet been written. We appreciate your patience as our small team of volunteer documentation writers work to update and expand the documentation. |
7.2.1. 自定义焊盘形状
7.2.2. 封装属性
|
注
|
在这里提到网节点 |
7.2.3. 封装向导
有关创建新的封装向导的更多信息,请参阅高级主题一章的脚本部分。
8. 高级主题
8.1. 配置和自定义
KiCad PCB 编辑器有多种偏好设置,可通过偏好设置对话框进行配置。像 KiCad 的所有部分一样,PCB 编辑器的偏好设置存储在用户配置目录中,并且在 KiCad 的次要版本之间是独立的,以允许多个版本的偏好设置并排运行。
偏好设置对话框的第一部分(通用、鼠标和触摸板以及快捷键)是所有 KiCad 程序共享的。这些部分在 KiCad 手册中的 "常规偏好设置" 部分有详细描述。
8.1.1. 显示选项
Rendering Engine: Controls if Accelerated graphics or Fallback graphics are used.
Grid style: Controls how the alignment grid is drawn.
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.
|
注
|
按住 kbd:[Ctrl] 可以暂时禁用网格捕捉。 |
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.
8.1.2. 编辑选项
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 kbd:[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.
8.1.3. 颜色
KiCad 支持在不同的颜色主题之间切换,以符合你的喜好。Kicad 7.0 内置了两种颜色主题。"KiCad 默认" 是一个新的主题,旨在为大多数情况下提供良好的对比度和平衡,是新安装的默认主题。"KiCad 经典版" 是 KiCad 5.1 和早期版本的默认主题。这两个内置主题都不能被修改,但你可以创建新的主题来定制 KiCad 的外观,也可以安装其他用户制作的主题。
颜色主题存储在位于 KiCad 配置目录的 Colors 子目录中的 JSON 文件中。“打开主题文件夹”按钮将在您的系统文件管理器中打开此位置,使您可以轻松地管理已安装的主题。要安装新主题,请将其放在此文件夹中,然后重新启动 KiCad。如果文件是有效的颜色主题文件,则新主题将从颜色主题下拉列表中提供。
要创建一个新的颜色主题,从颜色主题的下拉列表中选择新主题…。 为你的主题输入一个名称,然后开始编辑颜色。 新主题中的颜色将从你创建新主题之前选择的任何主题中复制。
要更改颜色,请双击或中键单击列表中的色样。“重置为默认值”按钮会将该颜色重置为“KiCad 默认”颜色主题中的相应条目。
颜色主题会自动保存;当您关闭偏好设置对话框时,所有更改都会立即反映出来。对话框右侧的窗口显示所选主题外观的预览。
8.1.4. 操作插件
KiCad PCB 编辑器支持用 Python 编写的插件,可以对正在编辑的电路板进行操作。 这些插件可以使用内置的插件和内容管理器来安装(详见 KiCad 章节),或者将插件文件放在用户的插件目录中。 详见下面的脚本部分。
每个被检测到的插件都会在这个偏好设置上显示一排。 插件可以在 PCB 编辑器的顶部工具栏上显示一个按钮。 如果一个插件的 "显示按钮" 控制没有被选中,它仍然可以从 "工具" > "外部插件" 菜单中访问。
列表底部的箭头控制允许改变插件在工具栏和菜单中的显示顺序。 文件夹按钮将启动一个文件资源管理器到插件文件夹,以使安装新的插件更容易。 刷新按钮将扫描插件文件夹中的任何新的或删除的插件,并更新列表。
8.1.5. 原点和轴
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.
X axis: Controls whether X-coordinates increase to the right or to the left.
Y axis: Controls whether Y-coordinates increase upwards or downwards.
8.2. 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, and footprint fields. There are also a number of variables that can be used in the Schematic Editor.
| Variable name | Description |
|---|---|
ISSUE_DATE |
Contents of drawing sheet’s Issue Date field. |
CURRENT_DATE |
Today’s date, in ISO format. |
REVISION |
Contents of drawing sheet’s Revision field. |
TITLE |
Contents of drawing sheet’s Title field. |
COMPANY |
Contents of drawing sheet’s Company field. |
COMMENT1 - COMMENT9 |
Contents of drawing sheet’s Comment<n> field. |
LAYER |
Layer of the object. In footprint fields, this is the layer of the parent footprint. |
<variablename> |
Contents of project text variable <variablename>. |
<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}. Built-in footprint fields are REFERENCE, VALUE, LAYER, FOOTPRINT_LIBRARY, FOOTPRINT_NAME, NET_NAME(<pad_number>), SHORT_NET_NAME(<pad_number>), NET_CLASS(<pad_number>), PIN_NAME(<pad_number>). |
<refdes>:<fieldname> |
Contents of field <fieldname> in footprint <refdes>. 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 the value of U1, use ${U1:VALUE}. Built-in footprint fields are REFERENCE, VALUE, LAYER, FOOTPRINT_LIBRARY, FOOTPRINT_NAME, NET_NAME(<pad_number>), SHORT_NET_NAME(<pad_number>), NET_CLASS(<pad_number>), PIN_NAME(<pad_number>). |
8.3. 自定义设计规则
KiCad 的自定义设计规则系统允许创建比电路板设置对话框的约束页面中的通用规则更具体的设计规则。 自定义设计规则有很多应用,但一般来说,它们被用来对电路板的一部分应用某些规则,如特定的网络或网络类、特定的区域或特定的封装。
自定义设计规则存储在一个扩展名为 kicad_dra 的单独文件中。当您开始向项目添加自定义规则时,会自动创建此文件。如果您在项目中使用自定义规则,请在备份或提交到版本控制系统时,确保将 kicad_dra 文件与 kicad_pcb 和 kicad_pro 文件一起保存。
|
注
|
kicad_dra 文件由 KiCad 自动管理,不应使用外部文本编辑器进行编辑。 始终使用电路板设置对话框的自定义规则页面编辑自定义设计规则。 |
8.3.1. 自定义规则编辑器
自定义规则编辑器位于电路板设置对话框中,它提供了一个用于输入自定义规则的文本编辑器,一个语法检查器将测试你的自定义规则并指出任何错误,还有一个语法帮助对话框,其中包含了对自定义规则语言的快速参考和一些规则示例。
最好在编辑自定义规则后使用 检查规则语法 按钮,以确保没有语法错误。自定义规则中的任何错误都将阻止设计规则检查器运行。
8.3.2. 自定义规则语法
自定义设计规则语言基于 s 表达式,允许您创建使用内置约束无法实现的设计约束。每条设计规则通常包含一个定义匹配哪些对象的 条件,以及一个定义要应用于匹配对象的规则的 约束。
该语言使用圆括号 (( 和 )) 来定义相关标记和值的子句。括号必须始终匹配:对于每个 ( 必须有匹配的 )。在子句中,标记和值之间用空格分隔。按照惯例,使用单个空格,但是可以在标记之间使用任意数量的空格字符。在文本字符串有效的地方,没有任何空格的字符串可以用 " 或 ' 引起来,也可以不加引号。包含空格的字符串必须始终用引号引起来。在需要嵌套引号的地方,可以使用 " 作为外引号字符,使用 ' 作为内引号字符 (反之亦然),从而实现单层嵌套。换行符不是必需的,但为清楚起见,通常在示例中使用。
在下面的语法描述中,< 尖括号 > 中的项表示必须存在的标记,[ 方括号 ] 中的项表示可选或仅有时需要的标记。
The Custom Rules file must start with a version header defining the version of the rules language. As of KiCad 7.0, the version is 1. The syntax of the version header is (version <number>). So in KiCad 7.0 the header should read:
(version 1)
在版本标题之后,您可以输入任意数量的规则。规则以相反的顺序计算,这意味着首先检查文件中的最后一个规则。一旦找到正在测试的给定集合对象的匹配规则,将不再检查其他规则。实际上,这意味着更具体的规则应该在文件的后面,以便在评估更一般的规则之前对其进行评估。
例如,如果您创建一条规则来限制网络 HV 中的布线与任何其他网络中的布线之间的最小间距,以及第二条规则来限制特定规则区域内所有对象的最小间距,请确保第一条规则在自定义规则文件中的出现时间比第二条规则晚,否则,如果 HV 网络中的布线落在规则区域内,可能会有错误的间距。
Each rule must have a name and one or more constraint clause. 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 kbd:[Ctrl+/] to comment or uncomment lines automatically.
# Clearance for 400V nets to anything else
(rule HV
(condition "A.NetClass == 'HV'")
(constraint clearance (min 1.5mm)))
图层子句
层 (layer) 子句确定规则将对哪些层起作用。虽然对象层可以在下面介绍的 约束 (constraint) 子句中进行测试,但是使用 层 (layer) 子句效率更高。
层 (layer) 子句的值可以是任何线路板层名,也可以是与顶底铜层 ( F.Cu 和 B.Cu ) 匹配的快捷方式 外 (outer),以及与任何内部铜层匹配的快捷键 内 (inner)。
如果省略 层 (layer) 子句,则该规则将适用于所有层。
下面是一些示例:
# 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))
# This rule does the same thing, but is less efficient
(rule "Top side footprints only"
(condition "A.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 are disabled. The rule is still evaluated and can still override previous rules. |
条件子句
规则 条件 是一个包含在文本字符串中的表达式(因此通常用引号包围,以便允许留出空白,使之更清晰)。 该表达式是针对设计规则检查器正在测试的每一对对象进行评估的。 例如,当检查铜对象之间的间隙时,每个网络上的每个铜对象(布线段、焊盘、通孔等)都要与其他网络上的其他铜对象进行检查。 如果存在一个自定义规则,其表达式与两个给定的铜对象相匹配,并且约束条件定义了铜的间隙,那么这个自定义规则可以用来确定这两个对象之间所需的间隙。
被测对象在表达式语言中称为 A 和 B。这两个对象的顺序并不重要,因为设计规则检查器将测试这两种可能的顺序。例如,您可以编写一条规则,假设 A 为布线,B 为过孔。 有一些表达式函数可以同时测试这两个对象;这些表达式函数使用 AB 作为对象名。
条件中的表达式必须解析为布尔值 ( true 或 false )。如果表达式解析为 true,则规则应用于给定的对象。
每个被测对象都有可以比较的 属性,以及可以执行特定测试的 函数。属性和函数的使用语法分别为 <object>.<property> 和 <object>.<function>([arguments])。译者注: <对象>.<属性> 和 <对象>.<函数>([参数])。
|
注
|
当您在文本编辑器 ( A.、B. 或 AB. ) 中键入 <对象 (object)>. 时,会出现一个自动完成列表。将打开包含所有可使用的对象属性的。 |
The object properties and functions are compared using boolean operators to result in a boolean expression. The following operators are supported:
== |
等于 |
!= |
不等于 |
>, >= |
大于、大于或等于 |
<, \<= |
小于、小于或等于 |
&& |
和 |
|| |
或 |
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.
有些属性表示物理测量,比如尺寸、角度、长度、位置等等。 在这些属性上,单位后缀 可以在自定义规则语言中使用,以指定使用什么单位。 如果没有使用单位后缀,属性的内部表示将被使用(距离为纳米,大多数角度为度)。 支持以下后缀:
mm |
毫米 |
mil, th |
千分之一英寸 (mils) |
in, " |
英寸 |
deg |
度 |
rad |
弧度 |
|
注
|
自定义设计规则中使用的单位独立于 PCB 编辑器中的显示单位。 |
Numeric conditions can use simple math expressions, for example (condition "A.Hole_Size_X == 1.0mm + 0.1mm").
约束
规则的 约束 子句定义了规则在条件匹配的对象上的行为。每个约束子句都有一个 约束类型 和一个或多个设置约束行为的参数。单个规则可以有多个约束子句,以便为符合相同规则条件的对象设置多个约束 (如 间隙 (clearance)、布线宽度 (trace_width) )。
许多约束条件的参数指定了一个物理测量或数量。 这些约束条件支持最小值、最优值和最大值说明(缩写为 "min/opt/max")。 最小 和 最大 值用于设计规则检查:如果实际值小于约束条件中的最小值或大于最大值,将产生一个 DRC 错误。 最优 值仅用于某些约束,并通知 KiCad 默认使用的 "最优" 值。 例如,最优的 diff_pair_gap 是由布线器在放置新的差分对时使用的。 如果后来修改了差分对,使得差分对之间的间隙与最佳值不同,只要间隙在最小值和最大值之间(如果这些值被指定),就不会产生错误。 在所有接受最小/最大/最优值的情况下,可以指定任何或全部的最小值、最优值和最大值。
最小/最优/最大值被指定为 (min<value>), (opt<value>), 和 (max<value>)。例如,布线宽度约束可以写成 (constraint track_width (min 0.5mm) (opt 0.5mm) (max 1.0mm)),如果只约束最小宽度,可以简单写成 `(constraint track_width (min 0.5mm))。
Numeric constraint values can use simple math expressions, for example (constraint clearance (min 0.5mm + 0.1mm)).
| Constraint type | Argument type | Description |
|---|---|---|
annular_width |
min/opt/max |
Checks the width of annular rings on vias. |
assertion |
boolean expression |
Checks that the boolean expression is true. If the expression is false, a DRC error will be created. The expression can use any of the properties listed in the Object Properties section. |
clearance |
min |
Checks the clearance between copper objects of different nets. KiCad’s design rule system does not permit constraining clearance between objects on the same net at this time. To allow copper objects to overlap (collide), create a clearance constraint with the min value less than zero (for example, -1). |
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. |
courtyard_clearance |
min |
Checks the clearance between footprint courtyards and generates an error if any two courtyards are closer than the min distance. If a footprint does not have a courtyard shape, no errors will be generated from this constraint. |
diff_pair_gap |
min/opt/max |
Checks the gap between coupled tracks in a differential pair. Coupled tracks are segments that are parallel to each other. Differential pair gap is not tested on uncoupled portions of a differential pair (for example, the fanout from a component). |
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). |
disallow |
track + via + micro_via + buried_via + pad + zone + text + graphic + hole + footprint |
Specify one or more object types to disallow, separated by spaces. For example, (constraint disallow track) or (constraint disallow track via pad). If an object of this type matches the rule condition, a DRC error will be created. This constraint is essentially the same as a keepout rule area, but can be used to create more specific keepout restrictions. |
edge_clearance |
min/opt/max |
Checks the clearance between objects and graphical items on the Edge.Cuts layer (the board outline, as well as any board cutouts or slots defined on that layer). |
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. |
hole_size |
min/max |
Checks the size (diameter) of a drilled hole in a pad or via. For oval holes, the smaller (minor) diameter will be tested against the min value (if specified) and the larger (major) diameter will be tested against the max value (if specified). |
hole_to_hole |
min |
Checks the clearance between mechanically-drilled holes in pads and vias. The clearance is measured between the diameters of the holes, not between their centers. HDI vias (microvias, blind vias, and buried vias) are not tested by this constraint. |
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. |
min_resolved_spokes |
0 + 1 + 2 + 3 + 4 |
Checks the total number of connections (spokes) to a pad. An error will be raised for each pad that has fewer than the specified number of spokes. |
physical_clearance |
min |
Checks the clearance between two objects on a given layer (including non-copper layers). While this can perform more general-purpose checks than clearance, it is much slower. Use clearance where possible. |
physical_hole_clearance |
min |
Checks the clearance between a drilled hole in a pad or via and another object, regardless of net. The clearance is measured from the diameter of the hole, not its center. This can also be thought of as the "drilling tolerance" as it only includes round holes (see edge_clearance for the milling tolerance). |
silk_clearance |
min/opt/max |
Checks the clearance between objects on silkscreen layers and other objects. |
skew |
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 absolute value of the difference between that average and the length of any one net is above the constraint max value, an error will be generated. |
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). |
zone_connection |
solid + thermal_reliefs + none |
Specifies the connection to be made between a zone and a pad. |
8.3.3. 对象属性和函数参考
可以在自定义规则表达式中测试以下属性:
常见属性
这些属性适用于所有 PCB 对象。
| 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). |
Locked |
boolean |
True if the object is locked. |
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. |
Type |
string |
One of "Footprint", "Pad", "Graphic Shape", "Board Text", "Footprint Text", "Zone", "Track", "Via", "Zone", or "Group". |
连接的对象属性
这些属性适用于可以分配网的铜对象(焊盘、过孔、覆铜、布线)。
| Property | Data type | Description |
|---|---|---|
Net |
integer |
The net code of the copper object. Note that net codes should not be relied upon to remain constant: if you need to refer to a specific net in a rule, use NetName instead. Net can be used to compare the nets of two objects with better performance, for example A.Net == B.Net is faster than A.NetName == B.NetName. |
NetClass |
string |
The name of the netclass for the copper object. |
NetName |
string |
The name of the net for the copper object. |
封装属性
这些属性适用于封装。
| Property | Data type | Description |
|---|---|---|
Clearance_Override |
dimension |
The copper clearance override set for the footprint. |
Description |
string |
The "Description" from the library footprint. |
Do_not_Populate |
boolean |
True if the footprint’s "Do not populate" attribute is set. |
Exclude_From_Position_Files |
boolean |
True if the footprint’s "Exclude from position files" attribute is set. |
Exclude_From_Bill_of_Materials |
boolean |
True if the footprint’s "Exclude from bill of materials" attribute is set. |
Exempt_From_Courtyard_Requirement |
boolean |
True if the footprint’s "Exempt from courtyard requirement" attribute is set. |
Keywords |
string |
The "Keywords" from the library footprint. |
Library_Link |
string |
The link to the library footprint in library_name:footprint_name format. |
Not_in_Schematic |
boolean |
True if the footprint’s "Not in schematic" attribute is set. |
Orientation |
double |
The orientation (rotation) of the footprint in degrees. |
Reference |
string |
The reference designator of the footprint. |
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. |
Value |
string |
The contents of the "Value" field of the footprint. |
Zone_Connection_Style |
string |
One of "Inherited", "None", "Thermal reliefs" or "Solid". |
焊盘属性
这些属性适用于封装焊盘。
| Property | Data type | Description |
|---|---|---|
Clearance_Override |
dimension |
The copper clearance override set for the pad. |
Fabrication_Property |
string |
One of "None", "BGA pad", "Fiducial, global to board", "Fiducial, local to footprint", "Test point pad", "Heatsink pad", "Castellated 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. |
Orientation |
double |
The orientation (rotation) of the pad in degrees. |
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. |
Pad_Type |
string |
One of "Through-hole", "SMD", "Edge connector", or "NPTH, mechanical". |
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". |
Round_Radius_Ratio |
double |
For rounded rectangle pads, the ratio of radius to rectangle size. |
Shape |
string |
One of "Circle", "Rectangle", "Oval", "Trapezoid", "Rounded rectangle", "Chamfered rectangle", or "Custom". |
Size_X |
dimension |
The size of the pad in the X-axis. |
Size_Y |
dimension |
The size of the pad in the Y-axis. |
Soldermask_Margin_Override |
dimension |
The solder mask margin override set for the pad. |
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. |
Zone_Connection_Style |
string |
One of "Inherited", "None", "Thermal reliefs" or "Solid". |
布线和圆弧属性
这些属性适用于布线和弧形布线。
| 属性 | 数据类型 | 描述 |
|---|---|---|
Origin_X |
dimension |
起点的 X 坐标。 |
Origin_Y |
dimension |
起点的 Y 坐标。 |
End_X |
dimension |
终点的 X 坐标。 |
End_Y |
dimension |
终点的 Y 坐标。 |
Width |
dimension |
布线或圆弧的宽度。 |
过孔属性
这些属性适用于过孔。
| Property | Data type | Description |
|---|---|---|
Diameter |
dimension |
The diameter of the via’s pad. |
Hole |
dimension |
The diameter of the via’s finished hole. |
Layer_Bottom |
string |
The last layer in the via stackup. |
Layer_Top |
string |
The first layer in the via stackup. |
Via_Type |
string |
One of "Through", "Blind/buried", or "Micro". |
覆铜和规则区域属性
这些属性适用于铜区和非铜区,以及规则区(以前称为禁止布线区)。
| Property | Data type | Description |
|---|---|---|
Clearance_Override |
dimension |
The copper clearance override set for the zone. |
Min_Width |
dimension |
The minimum allowed width of filled areas in the zone. |
Name |
string |
The user-specified name (blank by default). |
Pad_Connections |
string |
One of "Inherited", "None", "Thermal reliefs", "Solid", or "Reliefs for PTH". |
Priority |
integer |
The priority level of 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. |
图形形状属性
这些属性适用于图形线、圆弧、圆、矩形和多边形。
| Property | Data type | Description |
|---|---|---|
Angle |
dimension |
The angle of an arc. |
End_X |
dimension |
The x-coordinate of the end point. |
End_Y |
dimension |
The y-coordinate of the end point. |
Filled |
boolean |
True if the shape is filled. |
Line_Width |
dimension |
Thickness of the strokes of the shape. |
Shape |
string |
One of "Segment", "Rectangle", "Arc", "Circle", "Polygon", or "Bezier". |
Start_X |
dimension |
The x-coordinate of the start point. |
Start_Y |
dimension |
The y-coordinate of the start point. |
文本属性
这些属性适用于文本对象(封装字段、自由文本标签等)。
| Property | Data type | Description |
|---|---|---|
Bold |
boolean |
True if the text is bold. |
Height |
dimension |
Height of a character in the font. |
Horizontal_Justification |
string |
Horizontal text justification (alignment): one of "Left", "Center", or "Right". |
Italic |
boolean |
True if the text is italic. |
Knockout |
boolean |
True if the text has the knockout property set. |
Mirrored |
boolean |
True if the text is mirrored. |
Text |
string |
The contents of the text object. |
Thickness |
dimension |
Thickness of the stroke of the font. |
Width |
dimension |
Width of a character in the font. |
Vertical_Justification |
string |
Vertical text alignment: one of "Top", "Center", or "Bottom". |
Visible |
boolean |
True if the text object is visible (displayed). |
表达式函数
可以对自定义规则表达式中的对象调用以下函数:
| 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. Deprecated; use intersectsArea() instead. |
insideCourtyard('x') insideFrontCourtyard('x') insideBackCourtyard('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 the front or back courtyard and returns true if the object is inside either one; the second and third variants check a specific courtyard. The \* wildcard can be used in the reference: insideCourtyard('R*') would check all footprints with references that start with R. Deprecated; use intersectsCourtyard(), intersectsFrontCourtyard(), and intersectsBackCourtyard() instead. |
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') intersectsFrontCourtyard('x') intersectsBackCourtyard('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 the front or back courtyard and returns true if the object is inside either one; the second 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. |
isBlindBuriedVia() |
A or B |
Returns true if the object is a blind/buried via. |
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-. |
isMicroVia() |
A or B |
Returns true if the object is a microvia. |
isPlated() |
A or B |
Returns true if the object is a plated hole (in a pad or via). |
memberOf('x') |
A or B |
Returns true if the object is a member of the named group x. |
8.3.4. 自定义设计规则示例
(rule RF_width
(layer outer)
(condition "A.NetClass == 'RF'")
(constraint track_width (min 0.35mm) (max 0.35mm)))
(rule "BGA neckdown"
(constraint track_width (min 0.2mm) (opt 0.25mm))
(constraint clearance (min 0.05mm) (opt 0.08mm))
(condition "A.insideCourtyard('U3')"))
(rule "Distance between Vias of Different Nets"
(constraint hole_to_hole (min 0.25mm))
(condition "A.Type =='Via' && B.Type =='Via' && A.Net != B.Net"))
(rule "Distance between test points"
(constraint courtyard_clearance (min 1.5mm))
(condition "A.Reference =='TP*' && B.Reference == 'TP*"))
# This assumes that there is a cutout with 1mm thick lines
(rule "Clearance to cutout"
(constraint clearance (min 0.8mm))
(condition "A.Layer=='Edge.Cuts' && A.Thickness == 1.0mm"))
(rule "Max Drill Hole Size Mechanical"
(constraint hole (max 6.3mm))
(condition "A.Pad_Type == 'NPTH, mechanical'"))
(rule "Max Drill Hole Size PTH"
(constraint hole (max 6.35mm))
(condition "A.Pad_Type == 'Through-hole'"))
# Specify an optimal gap for a particular differential pair
(rule "Clock gap"
(condition "A.inDiffPair('/CLK')")
(constraint diff_pair_gap (opt 0.8mm)))
# Specify a larger clearance between differential pairs and anything else
(rule "Differential pair clearance"
(condition "A.inDiffPair('*') && !AB.isCoupledDiffPair()")
(constraint clearance (min 1.5mm)))
8.4. 脚本
脚本允许您使用 Python 语言自动执行 KiCad 中的任务。可以通过 Python "操作插件" 向 KiCad 添加功能,这些插件可以添加到顶部工具栏。也可以编写与 KiCad 文件交互的独立脚本,例如,从电路板文件自动生成制造输出。
This manual covers general scripting concepts. Users wishing to write or modify scripts should also use the Doxygen documentation located at https://docs.kicad.org/doxygen-python-7.0/namespaces.html.
KiCad 6 或更新版本需要 Python 3 来支持脚本。Python 2 已不再被支持。
8.4.1. Python 脚本位置
PCB 编辑器的插件脚本可以通过插件和内容管理器(PCM)自动安装,也可以通过手动将插件复制到一个文件夹中。 每个插件都应该在 plugins 文件夹内有自己的文件夹。 plugins 文件夹的位置默认为:
| Platform | Path |
|---|---|
Linx |
~/.local/share/kicad/7.0/scripting/plugins |
macOS |
~/Documents/KiCad/7.0/scripting/plugins |
Windows |
%HOME%\Documents\KiCad\7.0\scripting\plugins |
8.4.2. 操作插件
|
注
|
This section of the KiCad documentation has not yet been written. We appreciate your patience as our small team of volunteer documentation writers work to update and expand the documentation. |
8.4.3. 封装向导
封装向导是可以从封装编辑器访问的 Python 脚本的集合。 如果调用封装对话框,则选择一个给定的向导,该向导允许您查看渲染的封装,并且您可以编辑一些参数。
如果插件未正确分发到您的系统软件包,您可以在 KiCad 源代码树中的链接中找到最新版本:gitlab。
8.4.4. 使用脚本控制台
PCB 编辑器带有一个内置的 Python 控制台,可以用来检查和与电路板互动。 要启动控制台,使用顶部工具栏中的
按钮。PCB 编辑器的 Python API 不会自动加载,所以要加载它,在控制台中输入 import pcbnew。然后 pcbnew.GetBoard() 命令将返回当前在 PCB 编辑器中加载的电路板的引用,可以通过控制台进行检查和修改。
|
注
|
TODO:记录其他有用的 PyAlaMode 函数 |
8.4.5. 编写外部脚本
|
注
|
This section of the KiCad documentation has not yet been written. We appreciate your patience as our small team of volunteer documentation writers work to update and expand the documentation. |
8.4.6. 编写操作插件
|
注
|
This section of the KiCad documentation has not yet been written. We appreciate your patience as our small team of volunteer documentation writers work to update and expand the documentation. |
8.5. 使用 IDF 元件边框的工作
KiCad 可以 《IDF 导出器,导出电路板的 IDF 表示》,以便在机械 CAD 软件中使用。下面是一些关于将 IDF 元件边框附在封装上、创建新的 IDF 元件边框的指导,以及 KiCad 中包含的 IDF 工具的描述。
8.5.1. 指定供导出程序使用的元件模型
IDF 元件模型使用《封装属性,封装的 3D 模型属性》附加到封装上。IDF 导出器使用的文件类型与 3D 查看器和其他 3D 模型导出器不同,因此为 IDF 导出器添加 3D 模型不会与为其他目的添加到封装的 3D 模型发生冲突。
要在封装或 PCB 编辑器中把 IDF 模型添加到封装中,编辑封装的属性并点击 3D 模型标签。
点击
按钮,选择 IDF(*.idf;*.IDF) 文件类型筛选器。浏览到所需的边框文件。
一旦选择了所需的元件边框文件,输入任何必要的偏移和旋转值。偏移量必须使用 IDF 板的输出单位(毫米或密耳)并在 IDF 坐标系中指定,这是一个右手坐标系,+Z 指向观察者,+X 指向观察者的右边,+Y 指向屏幕的上边缘。旋转必须以度为单位;正向旋转是逆时针旋转,如 IDF v3 规范中所述。
多个边框可以与适当的偏移量结合起来,以表示简单的装配,如插座中的 DIP 封装。
|
注
|
IDF 导出器只使用偏移值和 Z 旋转值,所有其他数值都被忽略。 |
8.5.2. 创建元件边框文件
元件边框的创建应该与相应的封装 的方向和位置相匹配。这就避免了为IDF 元件边框指定非零旋转的需要。由于 IDF 导出器忽略了(X,Y)偏移值,所以在 IDF 元件边框中使用正确的原点是至关重要的。
元件边框部分包含字符串,整数或浮点数字段。 字符串是可包含空格的字符组合; 如果字符串包含空格,则必须引用它。 引号不得出现在字符串中。 浮点数可以使用十进制或指数表示法表示,但十进制表示法是人类可读性的首选。 小数点必须是点而不是逗号。 IDF 文件必须只包含7 位 ASCII 字符; 使用8位字符将导致未定义的行为。
IDF 文件由 SECTIONS 组成,SECTIONS 由 RECORDS 组成,RECORDS 由 FIELDS 组成。对于 IDF 边框文件,只有一种类型的部分可以存在,并且必须是 .ELECTRICAL 或 .MECHANICAL 中的一种。一个记录是一行文本,可能包含一个或多个字段。字段是由一个或多个空格分隔的字符序列,不在引号之间出现。一条记录的所有字段必须出现在单行上;记录不能跨行。
节的标题(.ELECTRICAL 或 .MECHANICAL)被认为是该节的第一条记录(记录 1)。记录 1后面必须有记录 2,该记录有四个字:
-
几何名称:与零件号组合的字符串必须形成元件边框的唯一标识符。 对于标准化包,包名称是几何名称的良好值,例如 SOT-23 。 对于独特的包装,制造商的部件号是几何名称的不错选择。
-
部件号:虽然显然是用于部件号,例如 BS107,但最好使用此字符串来帮助描述包。 例如,如果几何名称是 TO-92 ,则部件号条目可用于描述焊盘的布局或该特定 TO-92 边框文件的方向。
-
IDF 单位:这必须是 MM 或 THOU 中的一个,它只适用于描述这个单一成分边框的单位。
-
高度:这是一个浮点数,表示使用字段 3 中指定的单位的元件的标称高度。
记录2后面必须跟有许多记录 3 条目,这些条目指定了元件的边框。 记录 3 包含四个字段:
-
循环索引。0(边框点按逆时针顺序指定)或 1(边框点按顺时针顺序指定)。
-
X 坐标:浮点数
-
Y 坐标:浮点数
-
包括角度:一个浮点数。如果该值为 0,则从上一点到这一点绘制一条直线段。 如果数值是 360,那么前一个点指定一个圆的中心,这个点指定圆上的一个点;千万不要用 360 的数值指定一个圆,因为至少有一个主要的机械 CAD 包在这种情况下表现不好。如果该值为负数,则从上一点到这一点将绘制顺时针方向的圆弧;如果该值为正数,则绘制逆时针方向的圆弧。
只允许一个闭环,并且无法指定切口。 指定的最后一个点必须与第一个点相同,除非边框是圆形。
示例 IDF 文件 1:
# 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
示例 IDF 文件 2:
# 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
8.5.3. 创建边框的准则
在创建边框时,特别是在与他人共享工作时,文件的设计和命名的一致性可以帮助人们更快地找到文件并以最小的麻烦放置元件。
包命名
尝试提供有关文件名中可用边框的一些信息,以便用户大致了解边框是什么。 例如,轴向引线圆柱形封装可能代表某些类型的电容器以及某些类型的电阻,因此将边框识别为水平或垂直轴向引线装置并在相关尺寸上添加一些额外信息是有意义的:直径,长度 和音高是最重要的。 如果设备具有唯一的边框,则制造商的部件号和用于指示设备类别的前缀就足够了。
注释
使用 IDF 文件中的注释为用户提供有关边框的更多信息,例如对用于尺寸信息的源的引用。
几何和部件编号条目
仔细考虑要赋予几何和部件编号条目的值。 总之,这些字符串充当 MCAD 系统的唯一标识符。 理想情况下,字符串的值对用户有一定的意义,但这不是必需的:这些值主要用于 MCAD 系统用作唯一 ID。 理想情况下,所选择的值在任何大型边框集中都是唯一的; 选择好的价值将导致更少的冲突,特别是在复杂的板上。
引脚方向和定位
元件边框的创建应该与相应的封装的方向和位置相匹配。这就避免了为 IDF 元件边框指定非零旋转的需要。由于 IDF 导出器忽略了 (X,Y) 偏移值,所以在 IDF 元件边框中使用正确的原点是至关重要的。
上图显示了由程序 idfcyl 和 idfrect 生成并在一个机械 CAD 程序中渲染的样本边框。从左到右分别是 (a) 垂直径向引线圆柱体,(b) 垂直轴向引线圆柱体,左边有金属丝,(c) 垂直轴向引线圆柱体,右边有金属丝,(d) 水平轴向引线圆柱体,(e) 水平径向引线圆柱体,(f) 方形边框,普通,(g) 方形边框有倒角,(h) 方形边框有轴向引线在右边。上面的边框以毫米为单位,下面的边框以英寸为单位。
尺寸提示
推挤边框的目的是让机械设计者了解每个部件占据的位置和物理空间。在典型情况下,机械设计师将使用更详细的机械模型替换一些原始边框,例如在检查时确保直角安装的 LED 适合面板上的孔。在大多数情况下,边框的准确性无关紧要,但优良作法是创建可传达最佳机械信息的边框。在少数情况下,用户可能希望将元件装配到具有非常小的多余空间的壳体中,例如在便携式音乐播放器中。在这种情况下,如果大多数推挤边框是元件的足够好的表示,那么机械设计师可能只需要在设计壳体时替换很少的模型。如果边框不是现实的可靠反映,那么机械设计师将浪费大量时间来更换模型以确保良好的贴合性。毕竟,如果你把垃圾放进去,你可以期待垃圾出来。如果您提供了良好的信息,您可以对良好的结果充满信心。
8.5.4. IDF 元件边框工具
许多命令行工具可用于帮助生成 IDF 元件边框。 工具是:
-
idfcyl: 创建一个垂直或水平方向的圆柱体边框,并具有轴向或径向引线
-
idfrect: 创建一个矩形的边框,这个矩形可以有一个轴向引线或左上角的倒角
-
dxf2idf: 将 DXF 格式的图纸转换为 IDF 元件边框
idfcyl
idfcyl 生成圆柱形元件的边框。
当 idfcyl 被调用时,没有参数,它会打印出一个使用说明和输入的摘要:
idfcyl:该程序生成圆柱形元件的边框。
圆筒可以是水平的或垂直的。
水平圆柱体可以在一端或两端具有线。
垂直圆柱体可以具有至多一根可以是的线
放在左侧或右侧。
输入:
单位:mm, in(毫米或英寸)
方向:V(垂直)
引线类型:X,R(轴向,径向)
体型直径
体型长度
板偏移
* 线径
* 节距
** 线侧:L,R(左,右)
*** 引线长度
文件名(必须以 * .idf 结尾)
注意:
* 仅用于水平方向或
带轴向引线的垂直方向
** 只有轴向引线的垂直方向才需要
*** 仅对于带有径向引线的水平方向需要
可以通过在命令行上输入任意参数来抑制注释。 用户可以在命令行手动输入信息或创建脚本以生成边框。 以下脚本创建一个单个圆柱轴向引线边框,右侧为引线:
#!/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 生成矩形元件的边框。
当 idfrect 被调用而没有参数时,它会打印出使用说明和输入摘要:
idfrect:该程序生成矩形元件的边框。
该部件可以具有单个引线(轴向)或倒角
左上角。
输入:
单位:毫米,英寸(毫米或英寸)
宽度:
长度:
高度:
倒角:长度为 45 度。倒棱
* 倾斜的角度:Y,N(引线始终向右边)
** 线径
** 球场
文件名(必须以 *.idf 结尾)
NOTES:
* only required if chamfer = 0
** 仅对倾斜的角度元件有要求
可以通过在命令行上输入任意参数来抑制注释。 用户可以在命令行手动输入信息或创建脚本以生成边框。 以下脚本创建倒角矩形和轴向引线边框:
#!/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 从 DXF 边框创建一个 IDF 元件文件。
用于指定元件边框的 DXF 文件可以用免费软件 LibreCAD 来准备,以获得最佳的兼容性。
当 dxf2idf 被调用而没有参数时,它会打印出一个使用说明和输入的摘要:
dxf2idf:此程序采用线段,圆弧和圆弧段 从 DXF 文件中创建 IDF 元件边框文件。 输入: DXF 文件名:输入文件,必须以 _.dxf_ 结尾 单位:毫米,英寸(毫米或英寸) 几何名称:字符串,根据 IDF 3.0版规范 部件名称:根据部件号的 IDF 3.0版规范 高度:边框的挤压高度 注释:所有非空行都是要添加的注释 IDF 文件。 空行表示结束 注释块。 文件名:输出文件名,必须以 _.idf_ 结尾
可以通过在命令行上输入任何任意参数来抑制注释的产生。用户可以在命令行上手动输入信息或创建脚本来生成边框。下面的脚本从 DXF 文件 test.dxf 创建了一个 5 毫米高的边框:
#!/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
idf2vrml 工具读取一组 IDF 板(.emn)和一个 IDF 元件文件(.emp)并产生一个 VRML 文件,可以用 VRML 查看器查看。在用户不能使用 MCAD 软件的情况下,这个功能对板件装配的可视化很有用。在没有任何参数的情况下调用 idf2vrml 将导致显示一个使用信息:
>./idf2vrml
用法: idf2vrml -f input_file.emn -s scale_factor {-k} {-d} {-z} {-d} {-z} {-m}
标志:
-k: 产生 KiCad 友好的 VRML 输出;默认为紧凑的 VRML
-d: 抑制对默认边框的替换
-z: 抑制零高度边框的渲染
-m: 打印对象映射到标准输出用于调试目的。
例子产生一个供 KiCad 使用的模型: idf2vrml -f input.emn -s 0.3937008 -k
|
注
|
idf2vrml 工具不能正确渲染 emn 文件中的 OTHER_OUTLINE 实体,如果该实体被指定在 PCB 的底层;然而你不会注意到使用 KiCad 导出的文件,因为没有机制来指定这样的实体。这只是一个问题,如果你渲染一个第三方的 emn 文件,该文件确实在电路板的底层采用了一个实体。 |
9. 操作参考
下面是 PCB 编辑器中每个可用的 操作 的列表:可以分配给快捷键的命令。
9.1. PCB 编辑器
以下动作在 PCB 编辑器中是可用的。快捷键可以分配给偏好设置中的 快捷键 部分的任何操作。
| Action | Default Hotkey | Description |
|---|---|---|
Align to Bottom |
Aligns selected items to the bottom edge |
|
Align to Horizontal Center |
Aligns selected items to the horizontal center |
|
Align to Vertical Center |
Aligns selected items to the vertical center |
|
Align to Left |
Aligns selected items to the left edge |
|
Align to Right |
Aligns selected items to the right edge |
|
Align to Top |
Aligns selected items to the top edge |
|
Distribute Horizontally |
Distributes selected items along the horizontal axis |
|
Distribute Vertically |
Distributes selected items along the vertical axis |
|
Place Off-Board Footprints |
Performs automatic placement of components outside board area |
|
Place Selected Footprints |
Performs automatic placement of selected components |
|
Flip Board View |
View board from the opposite side |
|
Sketch Graphic Items |
Show graphic items in outline mode |
|
Decrease Layer Opacity |
kbd:[{] |
Make the current layer more transparent |
Increase Layer Opacity |
kbd:[}] |
Make the current layer less transparent |
Switch to Copper (B.Cu) layer |
kbd:[PgDn] |
Switch to Copper (B.Cu) layer |
Switch to Inner layer 1 |
Switch to Inner layer 1 |
|
Switch to Inner layer 10 |
Switch to Inner layer 10 |
|
Switch to Inner layer 11 |
Switch to Inner layer 11 |
|
Switch to Inner layer 12 |
Switch to Inner layer 12 |
|
Switch to Inner layer 13 |
Switch to Inner layer 13 |
|
Switch to Inner layer 14 |
Switch to Inner layer 14 |
|
Switch to Inner layer 15 |
Switch to Inner layer 15 |
|
Switch to Inner layer 16 |
Switch to Inner layer 16 |
|
Switch to Inner layer 17 |
Switch to Inner layer 17 |
|
Switch to Inner layer 18 |
Switch to Inner layer 18 |
|
Switch to Inner layer 19 |
Switch to Inner layer 19 |
|
Switch to Inner layer 2 |
Switch to Inner layer 2 |
|
Switch to Inner layer 20 |
Switch to Inner layer 20 |
|
Switch to Inner layer 21 |
Switch to Inner layer 21 |
|
Switch to Inner layer 22 |
Switch to Inner layer 22 |
|
Switch to Inner layer 23 |
Switch to Inner layer 23 |
|
Switch to Inner layer 24 |
Switch to Inner layer 24 |
|
Switch to Inner layer 25 |
Switch to Inner layer 25 |
|
Switch to Inner layer 26 |
Switch to Inner layer 26 |
|
Switch to Inner layer 27 |
Switch to Inner layer 27 |
|
Switch to Inner layer 28 |
Switch to Inner layer 28 |
|
Switch to Inner layer 29 |
Switch to Inner layer 29 |
|
Switch to Inner layer 3 |
Switch to Inner layer 3 |
|
Switch to Inner layer 30 |
Switch to Inner layer 30 |
|
Switch to Inner layer 4 |
Switch to Inner layer 4 |
|
Switch to Inner layer 5 |
Switch to Inner layer 5 |
|
Switch to Inner layer 6 |
Switch to Inner layer 6 |
|
Switch to Inner layer 7 |
Switch to Inner layer 7 |
|
Switch to Inner layer 8 |
Switch to Inner layer 8 |
|
Switch to Inner layer 9 |
Switch to Inner layer 9 |
|
Switch to Next Layer |
kbd:[+] |
Switch to Next Layer |
Switch to Previous Layer |
kbd:[-] |
Switch to Previous Layer |
Toggle Layer |
kbd:[V] |
Switch between layers in active layer pair |
Switch to Component (F.Cu) layer |
kbd:[PgUp] |
Switch to Component (F.Cu) layer |
Net Inspector |
Show the net inspector |
|
Local Ratsnest |
Toggle ratsnest display of selected item(s) |
|
Net Color Mode (3-state) |
Cycle between using net and netclass colors for all nets, just ratsnests, and none |
|
Sketch Pads |
Show pads in outline mode |
|
Curved Ratsnest Lines |
Show ratsnest with curved lines |
|
Ratsnest Mode (3-state) |
Cycle between showing ratsnests for all layers, just visible layers, and none |
|
Repair Board |
Run various diagnostics and attempt to repair board |
|
Show Appearance Manager |
Show/hide the appearance manager |
|
Show pad numbers |
Show pad numbers |
|
Show Properties Manager |
Show/hide the properties manager |
|
Scripting Console |
Show the Python scripting console |
|
Show Ratsnest |
Show board ratsnest |
|
Sketch Text Items |
Show footprint texts in line mode |
|
Sketch Tracks |
kbd:[K] |
Show tracks in outline mode |
Sketch Vias |
Show vias in outline mode |
|
Draw Zone Outlines |
Show only zone boundaries |
|
Draw Zone Fills |
Show filled areas of zones |
|
Toggle Zone Display |
Cycle between showing zone fills and just their outlines |
|
Create Arc from Selection |
Creates an arc from the selected line segment |
|
Create Rule Area from Selection… |
Creates a rule area from the selection |
|
Create Lines from Selection |
Creates graphic lines from the selection |
|
Create Polygon from Selection… |
Creates a graphic polygon from the selection |
|
Create Tracks from Selection |
Creates tracks from the selected graphic lines |
|
Create Zone from Selection… |
Creates a copper zone from the selection |
|
Design Rules Checker |
Show the design rules checker window |
|
Open in Footprint Editor |
kbd:[Ctrl+E] |
Opens the selected footprint in the Footprint Editor |
Edit Library Footprint… |
kbd:[Ctrl+Shift+E] |
Opens the selected footprint in the Footprint Editor |
Append Board… |
Open another board and append its contents to this board |
|
Assign Netclass… |
Assign a netclass to nets matching a pattern |
|
Board Setup… |
Edit board setup including layers, design rules and various defaults |
|
Clear Net Highlighting |
kbd:[~] |
Clear any existing net highlighting |
Drill/Place File Origin |
Place origin point for drill files and component placement files |
|
Export Specctra DSN… |
Export Specctra DSN routing info |
|
BOM… |
Create bill of materials from board |
|
IPC-D-356 Netlist File… |
Generate IPC-D-356 netlist file |
|
Drill Files (.drl)… |
Generate Excellon drill file(s) |
|
Gerbers (.gbr)… |
Generate Gerbers for fabrication |
|
Component Placement (.pos)… |
Generate component placement file(s) for pick and place |
|
Footprint Report (.rpt)… |
Create report of all footprints from current board |
|
Group |
Group the selected items so that they are treated as a single item |
|
Enter Group |
Enter the group to edit items |
|
Leave Group |
Leave the current group |
|
Hide Net in Ratsnest |
Hide the selected net in the ratsnest of unconnected net lines/arcs |
|
Highlight Net |
kbd:[`] |
Highlight net under cursor |
Highlight Net |
Highlight all copper items on the selected net(s) |
|
Import Netlist… |
Read netlist and update board connectivity |
|
Import Specctra Session… |
Import routed Specctra session (*.ses) file |
|
Lock |
Prevent items from being moved and/or resized on the canvas |
|
Add Footprint |
kbd:[A] |
Add a footprint |
Remove Items |
Remove items from group |
|
Switch to Schematic Editor |
Open in schematic editor |
|
Show Net in Ratsnest |
Show the selected net in the ratsnest of unconnected net lines/arcs |
|
Constrain to H, V, 45 |
kbd:[Shift+Space] |
Limit actions to horizontal, vertical, or 45 degrees from the starting point |
Toggle Last Net Highlight |
Toggle between last two highlighted nets |
|
Toggle Lock |
kbd:[L] |
Lock or unlock selected items |
Toggle Net Highlight |
kbd:[Alt+`] |
Toggle net highlighting |
Switch Track Width to Previous |
kbd:[Shift+W] |
Change track width to previous pre-defined size |
Switch Track Width to Next |
kbd:[W] |
Change track width to next pre-defined size |
Ungroup |
Ungroup any selected groups |
|
Unlock |
Allow items to be moved and/or resized on the canvas |
|
Decrease Via Size |
kbd:[\] |
Change via size to previous pre-defined size |
Increase Via Size |
kbd:['] |
Change via size to next pre-defined size |
Duplicate Zone onto Layer… |
Duplicate zone outline onto a different layer |
|
Merge Zones |
Merge zones |
|
Change Footprint… |
Assign a different footprint from the library |
|
Change Footprints… |
Assign different footprints from the library |
|
Cleanup Graphics… |
Cleanup redundant items, etc. |
|
Cleanup Tracks & Vias… |
Cleanup redundant items, shorting items, etc. |
|
Edit Text & Graphics Properties… |
Edit Text and graphics properties globally across board |
|
Edit Track & Via Properties… |
Edit track and via properties globally across board |
|
Global Deletions… |
Delete tracks, footprints and graphic items from board |
|
Remove Unused Pads… |
Remove or restore the unconnected inner layers on through hole pads and vias |
|
Swap Layers… |
Move tracks or drawings from one layer to another |
|
Update Footprint… |
Update footprint to include any changes from the library |
|
Update Footprints from Library… |
Update footprints to include any changes from the library |
|
Clearance Resolution… |
Show clearance resolution for the active layer between two selected objects |
|
Constraints Resolution… |
Show constraints resolution for the selected object |
|
Show Board Statistics |
Shows board statistics |
|
Add Aligned Dimension |
kbd:[Ctrl+Shift+H] |
Add an aligned linear dimension |
Draw Arc |
kbd:[Ctrl+Shift+A] |
Draw an arc |
Switch Arc Posture |
kbd:[/] |
Switch the arc posture |
Add Center Dimension |
Add a center dimension |
|
Draw Circle |
kbd:[Ctrl+Shift+C] |
Draw a circle |
Close Outline |
Close the in progress outline |
|
Decrease Line Width |
kbd:[Ctrl+-] |
Decrease the line width |
Delete Last Point |
kbd:[Back] |
Delete the last point added to the current item |
Draw Graphic Polygon |
kbd:[Ctrl+Shift+P] |
Draw a graphic polygon |
Increase Line Width |
kbd:[Ctrl++] |
Increase the line width |
Add Leader |
Add a leader dimension |
|
Draw Line |
kbd:[Ctrl+Shift+L] |
Draw a line |
Add Orthogonal Dimension |
Add an orthogonal dimension |
|
Add Board Characteristics |
Add a board characteristics table on a graphic layer |
|
Add Image |
Add bitmap image |
|
Import Graphics… |
kbd:[Ctrl+Shift+F] |
Import 2D drawing file |
Add Stackup Table |
Add a board stackup table on a graphic layer |
|
Add Radial Dimension |
Add a radial dimension |
|
Draw Rectangle |
Draw a rectangle |
|
Add Rule Area |
kbd:[Ctrl+Shift+K] |
Add a rule area (keepout) |
Place the Footprint Anchor |
kbd:[Ctrl+Shift+N] |
Set the coordinate origin point (anchor) of the footprint |
Add a Similar Zone |
kbd:[Ctrl+Shift+.] |
Add a zone with the same settings as an existing zone |
Add Text |
kbd:[Ctrl+Shift+T] |
Add a text item |
Add Text Box |
Add a wrapped text item |
|
Add Vias |
kbd:[Ctrl+Shift+V] |
Add free-standing vias |
Add Filled Zone |
kbd:[Ctrl+Shift+Z] |
Add a filled zone |
Add a Zone Cutout |
kbd:[Shift+C] |
Add a cutout area of an existing zone |
Get and Move Footprint |
kbd:[T] |
Selects a footprint by reference designator and places it under the cursor for moving |
Change Track Width |
Updates selected track & via sizes |
|
Create Array… |
kbd:[Ctrl+T] |
Create array |
Delete Full Track |
kbd:[Shift+Del] |
Deletes selected item(s) and copper connections |
Duplicate and Increment |
kbd:[Ctrl+Shift+D] |
Duplicates the selected item(s), incrementing pad numbers |
Fillet Lines |
Adds arcs tangent to the selected lines |
|
Fillet Tracks |
Adds arcs tangent to the selected straight track segments |
|
Change Side / Flip |
kbd:[F] |
Flips selected item(s) to opposite side of board |
Mirror Horizontally |
Mirrors selected item across the Y axis |
|
Mirror Vertically |
Mirrors selected item across the X axis |
|
Move Exactly… |
kbd:[Shift+M] |
Moves the selected item(s) by an exact amount |
Pack and Move Footprints |
kbd:[P] |
Sorts selected footprints by reference, packs based on size and initiates movement |
Properties… |
kbd:[E] |
Displays item properties dialog |
Rotate Counterclockwise |
kbd:[R] |
Rotates selected item(s) counterclockwise |
Rotate Clockwise |
kbd:[Shift+R] |
Rotates selected item(s) clockwise |
Skip |
kbd:[Tab] |
Skip item |
Swap |
kbd:[Shift+S] |
Swaps selected items' positions |
Copy with Reference |
Copy selected item(s) to clipboard with a specified starting point |
|
Move |
kbd:[M] |
Moves the selected item(s) |
Move Individually |
kbd:[Ctrl+M] |
Moves the selected items one-by-one |
Move with Reference |
Moves the selected item(s) with a specified starting point |
|
Attempt Finish |
kbd:[F] |
Attempts to complete current route to nearest ratsnest end. |
Attempt Finish Selected (Autoroute) |
kbd:[Shift+F] |
Sequentially attempt to automatically route all selected pads. |
Break Track |
Splits the track segment into two segments connected at the cursor position. |
|
Route From Other End |
kbd:[E] |
Commits current segments and starts next segment from nearest ratsnest end. |
Custom Track/Via Size… |
kbd:[Q] |
Shows a dialog for changing the track width and via size. |
Cycle Router Mode |
Cycle router to the next mode |
|
Route Differential Pair |
kbd:[6] |
Route differential pairs |
Differential Pair Dimensions… |
Open Differential Pair Dimension settings |
|
Drag (45 degree mode) |
kbd:[D] |
Drags the track segment while keeping connected tracks at 45 degrees. |
Drag (free angle) |
kbd:[G] |
Drags the nearest joint in the track without restricting the track angle. |
Finish Track |
kbd:[End] |
Stops laying the current track. |
Router Highlight Mode |
Switch router to highlight mode |
|
Place Blind/Buried Via |
kbd:[Alt+Shift+V] |
Adds a blind or buried via at the end of currently routed track. |
Place Microvia |
kbd:[Ctrl+V] |
Adds a microvia at the end of currently routed track. |
Place Through Via |
kbd:[V] |
Adds a through-hole via at the end of currently routed track. |
Route Selected |
kbd:[Shift+X] |
Sequentially route selected items from ratsnest anchor. |
Route Selected From Other End |
kbd:[Shift+E] |
Sequentially route selected items from other end of ratsnest anchor. |
Select Layer and Place Blind/Buried Via… |
kbd:[Alt+<] |
Select a layer, then add a blind or buried via at the end of currently routed track. |
Select Layer and Place Micro Via… |
Select a layer, then add a micro via at the end of currently routed track. |
|
Select Layer and Place Through Via… |
kbd:[<] |
Select a layer, then add a through-hole via at the end of currently routed track. |
Set Layer Pair… |
Change active layer pair for routing |
|
Interactive Router Settings… |
kbd:[Ctrl+<] |
Open Interactive Router settings |
Router Shove Mode |
Switch router to shove mode |
|
Route Single Track |
kbd:[X] |
Route tracks |
Switch Track Posture |
kbd:[/] |
Switches posture of the currently routed track. |
Track Corner Mode |
kbd:[Ctrl+/] |
Switches between sharp/rounded and 45°/90° corners when routing tracks. |
Undo Last Segment |
kbd:[Back] |
Walks the current track back one segment. |
Router Walkaround Mode |
Switch router to walkaround mode |
|
Deselect All Tracks in Net |
Deselects all tracks & vias belonging to the same net. |
|
Filter Selected Items… |
Remove items from the selection by type |
|
Grab Nearest Unconnected Footprints |
kbd:[Shift+O] |
Selects and initiates moving the nearest unconnected footprint on each selected net. |
Select/Expand Connection |
kbd:[U] |
Selects a connection or expands an existing selection to junctions, pads, or entire connections |
Select All Tracks in Net |
Selects all tracks & vias belonging to the same net. |
|
Select on Schematic |
Selects corresponding items in Schematic editor |
|
Sheet |
Selects all footprints and tracks in the schematic sheet |
|
Items in Same Hierarchical Sheet |
Selects all footprints and tracks in the same schematic sheet |
|
Select All Unconnected Footprints |
kbd:[O] |
Selects all unconnected footprints belonging to each selected net. |
Unroute Selected |
Unroutes selected items to the nearest pad. |
|
Decrease Amplitude |
kbd:[4] |
Decrease meander amplitude by one step. |
Increase Amplitude |
kbd:[3] |
Increase meander amplitude by one step. |
End Track |
kbd:[End] |
Stops laying the current meander. |
Length Tuning Settings… |
kbd:[Ctrl+L] |
Sets the length tuning parameters for currently routed item. |
Decrease Spacing |
kbd:[2] |
Decrease meander spacing by one step. |
Increase Spacing |
kbd:[1] |
Increase meander spacing by one step. |
New Track |
kbd:[X] |
Starts laying a new track. |
Tune length of a differential pair |
kbd:[8] |
Tune length of a differential pair |
Tune skew of a differential pair |
kbd:[9] |
Tune skew of a differential pair |
Tune length of a single track |
kbd:[7] |
Tune length of a single track |
Add Microwave Polygonal Shape |
Create a microwave polygonal shape from a list of vertices |
|
Add Microwave Gap |
Create gap of specified length for microwave applications |
|
Add Microwave Line |
Create line of specified length for microwave applications |
|
Add Microwave Stub |
Create stub of specified length for microwave applications |
|
Add Microwave Arc Stub |
Create stub (arc) of specified size for microwave applications |
|
Footprint Checker |
Show the footprint checker window |
|
Copy Footprint |
Copy Footprint |
|
Create Footprint… |
Create a new footprint using the Footprint Wizard |
|
Cut Footprint |
Cut Footprint |
|
Delete Footprint from Library |
Delete Footprint from Library |
|
Duplicate Footprint |
Make a copy of the selected footprint |
|
Edit Footprint |
Show selected footprint on editor canvas |
|
Export Footprint… |
Export footprint to file |
|
Footprint Properties… |
Edit footprint properties |
|
Hide Footprint Tree |
Hide Footprint Tree |
|
Import Footprint… |
Import footprint from file |
|
New Footprint… |
kbd:[Ctrl+N] |
Create a new, empty footprint |
Paste Footprint |
Paste Footprint |
|
Rename Footprint… |
Rename the selected footprint |
|
Repair Footprint |
Run various diagnostics and attempt to repair footprint |
|
Show Footprint Tree |
Show Footprint Tree |
|
Paste Default Pad Properties to Selected |
Replace the current pad’s properties with those copied earlier |
|
Copy Pad Properties to Default |
Copy current pad’s properties |
|
Push Pad Properties to Other Pads… |
Copy the current pad’s properties to other pads |
|
Default Pad Properties… |
Edit the pad properties used when creating new pads |
|
Renumber Pads… |
Renumber pads by clicking on them in the desired order |
|
Edit Pad as Graphic Shapes |
kbd:[Ctrl+E] |
Ungroups a custom-shaped pad for editing as individual graphic shapes |
Add Pad |
Add a pad |
|
Finish Pad Edit |
kbd:[Ctrl+E] |
Regroups all touching graphic shapes into the edited pad |
Create Corner |
kbd:[Ins] |
Create a corner |
Keep arc center, adjust radius |
Switch arc editing mode to keep center, adjust radius and endpoints |
|
Keep arc endpoints or direction of starting point |
Switch arc editing mode to keep endpoints, or to keep direction of the other point |
|
Remove Corner |
Remove corner |
|
Position Relative To… |
kbd:[Shift+P] |
Positions the selected item(s) by an exact amount relative to another |
Geographical Reannotate… |
Reannotate PCB in geographical order |
|
Refresh Plugins |
Reload all python plugins and refresh plugin menus |
|
Open Plugin Directory |
Opens the directory in the default system file manager |
|
Draft Fill Selected Zone(s) |
Update copper fill of selected zone(s) without regard to other interacting zones |
|
Fill All Zones |
kbd:[B] |
Update copper fill of all zones |
Unfill Selected Zone(s) |
Remove copper fill from selected zone(s) |
|
Unfill All Zones |
kbd:[Ctrl+B] |
Remove copper fill from all zones |
9.2. 3D 查看器
以下动作可在 3D 浏览器中使用。快捷键可以分配给偏好设置中的 快捷键 部分的任何这些操作。
| Action | Default Hotkey | Description |
|---|---|---|
Toggle 3D models not in pos file |
kbd:[P] |
Toggle 3D models not in pos file |
Toggle unspecified 3D models |
kbd:[V] |
Toggle 3D models for unspecified type components |
Toggle SMD 3D models |
kbd:[S] |
Toggle 3D models for Surface mount type components |
Toggle Through Hole 3D models |
kbd:[T] |
Toggle 3D models for Through hole type components |
Flip Board |
kbd:[F] |
Flip the board view |
Home view |
kbd:[Home] |
Home view |
Render CAD Colors |
Use a CAD color style based on the diffuse color of the material |
|
Render Solid Colors |
Use only the diffuse color property from model 3D model file |
|
Render Realistic Materials |
Use all material properties from each 3D model file |
|
Move board Down |
kbd:[Down] |
Move board Down |
Move board Left |
kbd:[Left] |
Move board Left |
Move board Right |
kbd:[Right] |
Move board Right |
Move board Up |
kbd:[Up] |
Move board Up |
No 3D Grid |
No 3D Grid |
|
Center pivot rotation |
kbd:[Space] |
Center pivot rotation (middle mouse click) |
Reset view |
kbd:[R] |
Reset view |
Rotate X Clockwise |
Rotate X Clockwise |
|
Rotate X Counterclockwise |
Rotate X Counterclockwise |
|
Rotate Y Clockwise |
Rotate Y Clockwise |
|
Rotate Y Counterclockwise |
Rotate Y Counterclockwise |
|
Rotate Z Clockwise |
Rotate Z Clockwise |
|
Rotate Z Counterclockwise |
Rotate Z Counterclockwise |
|
3D Grid 10mm |
3D Grid 10mm |
|
3D Grid 1mm |
3D Grid 1mm |
|
3D Grid 2.5mm |
3D Grid 2.5mm |
|
3D Grid 5mm |
3D Grid 5mm |
|
Show 3D Axis |
Show 3D Axis |
|
Show Model Bounding Boxes |
Show Model Bounding Boxes |
|
Toggle adhesive display |
Toggle display of adhesive layers |
|
Toggle board body display |
Toggle board body display |
|
Toggle comments display |
Toggle display of comments and drawings layers |
|
Toggle ECO display |
Toggle display of ECO layers |
|
Toggle orthographic projection |
Enable/disable orthographic projection |
|
Toggle realistic mode |
Toggle realistic mode |
|
Toggle silkscreen display |
Toggle display of silkscreen layers |
|
Toggle solder mask display |
Toggle display of solder mask layers |
|
Toggle solder paste display |
Toggle display of solder paste layers |
|
Toggle zone display |
Toggle zone display |
|
View Back |
kbd:[Shift+Y] |
View Back |
View Bottom |
kbd:[Shift+Z] |
View Bottom |
View Front |
kbd:[Y] |
View Front |
View Left |
kbd:[Shift+X] |
View Left |
View Right |
kbd:[X] |
View Right |
View Top |
kbd:[Z] |
View Top |
9.3. 通用
以下操作在整个 KiCad 中都可用,包括在 PCB 编辑器中。快捷键可以分配给偏好设置中的 快捷键 部分的任何操作。
| Action | Default Hotkey | Description |
|---|---|---|
Exclude Marker |
Mark current violation in Checker window as an exclusion |
|
Next Marker |
Go to next marker in Checker window |
|
Previous Marker |
Go to previous marker in Checker window |
|
Add Library… |
Add an existing library folder |
|
Click |
kbd:[Return] |
Performs left mouse button click |
Double-click |
kbd:[End] |
Performs left mouse button double-click |
Cursor Down |
kbd:[Down] |
|
Cursor Down Fast |
kbd:[Ctrl+Down] |
|
Cursor Left |
kbd:[Left] |
|
Cursor Left Fast |
kbd:[Ctrl+Left] |
|
Cursor Right |
kbd:[Right] |
|
Cursor Right Fast |
kbd:[Ctrl+Right] |
|
Cursor Up |
kbd:[Up] |
|
Cursor Up Fast |
kbd:[Ctrl+Up] |
|
Switch to Fast Grid 1 |
kbd:[Alt+1] |
|
Switch to Fast Grid 2 |
kbd:[Alt+2] |
|
Switch to Next Grid |
kbd:[N] |
|
Switch to Previous Grid |
kbd:[Shift+N] |
|
Grid Properties… |
Set grid dimensions |
|
Reset Grid Origin |
kbd:[Z] |
|
Grid Origin |
kbd:[S] |
Set the grid origin point |
Inactive Layer View Mode |
Toggle inactive layers between normal and dimmed |
|
Inactive Layer View Mode (3-state) |
kbd:[H] |
Cycle inactive layers between normal, dimmed, and hidden |
Inches |
Use inches |
|
Millimeters |
Use millimeters |
|
Mils |
Use mils |
|
New… |
kbd:[Ctrl+N] |
Create a new document in the editor |
New Library… |
Create a new library folder |
|
Open… |
kbd:[Ctrl+O] |
Open existing document |
Page Settings… |
Settings for paper size and title block info |
|
Pan Down |
kbd:[Shift+Down] |
|
Pan Left |
kbd:[Shift+Left] |
|
Pan Right |
kbd:[Shift+Right] |
|
Pan Up |
kbd:[Shift+Up] |
|
Pin Library |
Keep the library at the top of the list |
|
Plot… |
Plot |
|
Print… |
kbd:[Ctrl+P] |
|
Quit |
Close the current editor |
|
Reset Local Coordinates |
kbd:[Space] |
|
Revert |
Throw away changes |
|
Save |
kbd:[Ctrl+S] |
Save changes |
Save All |
Save all changes |
|
Save As… |
kbd:[Ctrl+Shift+S] |
Save current document to another location |
Save a Copy… |
Save a copy of the current document to another location |
|
Select Columns |
||
3D Viewer |
kbd:[Alt+3] |
Show 3D viewer window |
Show Context Menu |
Perform the right-mouse-button action |
|
Footprint Library Browser |
Browse footprint libraries |
|
Footprint Editor |
Create, delete and edit footprints |
|
Symbol Library Browser |
Browse symbol libraries |
|
Symbol Editor |
Create, delete and edit symbols |
|
Draw Bounding Boxes |
Draw Bounding Boxes |
|
Always Show Cursor |
kbd:[Ctrl+Shift+X] |
Display crosshairs even in selection tool |
Full-Window Crosshairs |
Switch display of full-window crosshairs |
|
Show Grid |
Display background grid in the edit window |
|
Polar Coordinates |
Switch between polar and cartesian coordinate systems |
|
Switch units |
kbd:[Ctrl+U] |
Switch between imperial and metric units |
Unpin Library |
No longer keep the library at the top of the list |
|
Update PCB from Schematic… |
kbd:[F8] |
Update PCB with changes made to schematic |
Update Schematic from PCB… |
Update schematic with changes made to PCB |
|
Center on Cursor |
kbd:[F4] |
Center on Cursor |
Zoom to Objects |
kbd:[Ctrl+Home] |
Zoom to Objects |
Zoom to Fit |
kbd:[Home] |
Zoom to Fit |
Zoom In at Cursor |
kbd:[F1] |
Zoom In at Cursor |
Zoom In |
Zoom In |
|
Zoom Out at Cursor |
kbd:[F2] |
Zoom Out at Cursor |
Zoom Out |
Zoom Out |
|
Refresh |
kbd:[F5] |
Refresh |
Zoom to Selection |
kbd:[Ctrl+F5] |
Zoom to Selection |
Cancel |
Cancel current tool |
|
Copy |
kbd:[Ctrl+C] |
Copy selected item(s) to clipboard |
Cut |
kbd:[Ctrl+X] |
Cut selected item(s) to clipboard |
Cycle arc editing mode |
kbd:[Ctrl+Space] |
Switch to a different method of editing arcs |
Delete |
kbd:[Del] |
Deletes selected item(s) |
Interactive Delete Tool |
Delete clicked items |
|
Duplicate |
kbd:[Ctrl+D] |
Duplicates the selected item(s) |
Find |
kbd:[Ctrl+F] |
Find text |
Find and Replace |
kbd:[Ctrl+Alt+F] |
Find and replace text |
Find Next |
kbd:[F3] |
Find next match |
Find Next Marker |
kbd:[Shift+F3] |
|
Paste |
kbd:[Ctrl+V] |
Paste item(s) from clipboard |
Paste Special… |
Paste item(s) from clipboard with annotation options |
|
Redo |
kbd:[Ctrl+Y] |
Redo last edit |
Replace All |
Replace all matches |
|
Replace and Find Next |
Replace current match and find next |
|
Show Search Panel |
kbd:[Ctrl+G] |
Show/hide the search panel |
Select All |
kbd:[Ctrl+A] |
Select all items on screen |
Undo |
kbd:[Ctrl+Z] |
Undo last edit |
Measure Tool |
kbd:[Ctrl+Shift+M] |
Interactively measure distance between points |
Select item(s) |
Select item(s) |
|
Configure Paths… |
Edit path configuration environment variables |
|
Donate |
Open "Donate to KiCad" in a web browser |
|
Get Involved |
Open "Contribute to KiCad" in a web browser |
|
Getting Started with KiCad |
Open “Getting Started in KiCad” guide for beginners |
|
Help |
Open product documentation in a web browser |
|
List Hotkeys… |
kbd:[Ctrl+F1] |
Displays current hotkeys table and corresponding commands |
Preferences… |
kbd:[Ctrl+,] |
Show preferences for all open tools |
Report Bug |
Report a problem with KiCad |
|
Manage Footprint Libraries… |
Edit the global and project footprint library lists |
|
Manage Symbol Libraries… |
Edit the global and project symbol library lists |