KiCad Nightly 参考手册
Copyright
本文档的版权归 (C) 2023-2024 所有,由下列贡献者提供。您可以根据 GNU 通用公共许可证 (http://www.gnu.org/licenses/gpl.html) 版本 3 或更高版本或知识共享署名许可证 (http://creativecommons.org/licenses/by/3.0/) 版本 3.0 或更高版本的条款分发和/或修改它。
本指南中的所有商标均属于其合法所有者。
Contributors
Graham Keeth
Feedback
KiCad 项目欢迎与软件或其文档相关的反馈、错误报告和建议。有关如何提交反馈或报告问题的更多信息,请参阅 https://www.kicad.org/help/report-an-issue/ 上的说明
Software and Documentation Version
本用户手册基于 KiCad 9.99 版本。其他版本的 KiCad 在功能和界面外观上可能存在差异。
文档修订版:f0f53076。
KiCad 命令行界面简介
KiCad 提供了一个命令行界面,可以通过运行 kicad-cli 二进制文件来使用。使用命令行界面,您可以以自动化方式对原理图、PCB、符号和封装执行许多操作,例如绘制 PCB 设计中的 Gerber 文件或将符号库从传统文件格式升级到现代格式。
在 macOS 上,kicad-cli 可执行文件位于 /Applications/KiCad/KiCad.app/Contents/MacOS/kicad-cli。
|
kicad-cli 命令包含 6 个子命令: fp、jobset、pcb、sch、sym 和 version。每个子命令都可以有自己的子命令和参数。例如,要从 PCB 导出 Gerber 文件,您可以运行 kicad-cli pcb export gerbers example.kicad_pcb 。
您可以添加 --help 或 -h 标志来查看有关每个子命令的信息。例如,运行 kicad-cli pcb -h 打印有关 pcb 子命令的使用信息,而 kicad-cli pcb export gerbers -h 专门打印 pcb export gerbers 子命令的使用信息。
封装命令
fp 子命令将封装导出为另一种格式,或将封装库升级到 KiCad 封装文件格式的当前版本。
封装导出
fp export svg 命令将指定库中的一个或多个封装导出到 SVG 文件中。
Usage: kicad-cli fp export svg [--help] [--output OUTPUT_DIR] [--layers LAYER_LIST] [--define-var KEY=VALUE] [--theme VAR] [--footprint FOOTPRINT_NAME] [--sketch-pads-on-fab-layers] [--hide-DNP-footprints-on-fab-layers] [--sketch-DNP-footprints-on-fab-layers] [--crossout-DNP-footprints-on-fab-layers] [--black-and-white] INPUT_DIR
位置参数:
|
Footprint library directory to export ( |
可选参数:
|
Show help for the footprint SVG export command. |
|
The output folder for the exported files. One file is output for each
layer of each footprint in the library. When |
|
A comma-separated list of layer names to export from the footprint, such
as |
|
Add or override project variable definitions. Can be used multiple times to define multiple variables. |
|
The name of the theme to use for export. If no theme is given, the footprint editor’s currently selected theme is used. |
|
The name of the specific footprint to export from the library. When this argument is not used, all footprints in the library are exported. |
|
Draw pad outlines and their numbers on front and back fab layers. |
|
Don’t plot text and graphics of DNP footprints on fab layers. |
|
Plot graphics of DNP footprints in sketch mode on fab layers. |
|
Plot an "X" over the courtyard of DNP footprints on fab layers, and strikeout their reference designators. |
|
Export footprints in black and white. |
封装升级
The fp upgrade command converts the specified footprint library from a legacy KiCad footprint format or a non-KiCad footprint format to the native format for the current version of KiCad. If the input library is already in the current file format, no action is taken.
支持的输入封装格式为:
-
KiCad 封装库(包含
.kicad_mod文件的.pretty文件夹) -
KiCad(5.0 之前版本)封装库(
.mod、.emp) -
Altium 封装库 (
.PcbLib) -
Altium 集成库 (
.IntLib) -
CADSTAR PCB 存档文件 (
.cpa) -
EAGLE XML 库 (
.lbr) -
EasyEDA (JLCEDA) 标准版文件 (
.json) -
EasyEDA (JLCEDA) 专业版文件 (
.elibz,.epro,.zip) -
GEDA/PCB 库(包含
.fp文件的文件夹)
Usage: kicad-cli fp upgrade [--help] [--output OUTPUT_DIR] [--force] INPUT_DIR
位置参数:
|
Footprint library directory to upgrade. For KiCad format footprint
libraries, this is the |
可选参数:
|
Show help for the upgrade command. |
|
The output directory for the upgraded footprints. When |
|
Re-save the input library even if it is already in the current file format. |
jobset 命令
jobset run 命令用于运行预先定义的 jobset。
Usage: kicad-cli jobset run [--help] [--stop-on-error] [--file JOB_FILE] [--output OUTPUT] INPUT_FILE
位置参数:
|
Project file to use with the jobset. |
可选参数:
|
Show help for the jobset command. |
|
As jobs are executed in sequence, stop running after a job fails. If not given, jobs will continue executing after any job fails. |
|
The jobset file ( |
|
The jobset destination to generate. If no destination is specified, all destinations will be generated. The destination is specified by its description or by its unique ID. The specified description must be unique; if the jobset contains more than one destination with the given description, none of them will be run. IDs are inherently unique and can be used to refer to a destination even
if the destination’s description is not unique. The ID for each
destination is printed by the |
PCB 命令
pcb 命令用于执行设计规则检查或将电路板导出为多种其他文件格式,包括制造文件和 3D 文件。
PCB DRC
pcb drc 命令对电路板执行设计规则检查并生成报告。
Usage: kicad-cli pcb drc [--help] [--output OUTPUT_FILE] [--define-var KEY=VALUE] [--format FORMAT] [--all-track-errors] [--schematic-parity] [--units UNITS] [--severity-all] [--severity-error] [--severity-warning] [--severity-exclusions] [--exit-code-violations] [--refill-zones] [--save-board] INPUT_FILE
位置参数:
|
Board file to run DRC on. |
|
Show help for the DRC command. |
|
Output filename for the generated DRC report. When |
|
Add or override project variable definitions. Can be used multiple times to define multiple variables. |
|
Report file format. Options are |
|
Report all errors for each track. |
|
Test for parity between PCB and schematic. |
|
Units to use in the report. Options are |
|
Report all DRC violations. This is equivalent to using all of the other DRC severity options. |
|
Report all error-level DRC violations. This can be combined with the other DRC severity options. |
|
Report all warning-level DRC violations. This can be combined with the other DRC severity options. |
|
Report all excluded DRC violations. This can be combined with the other DRC severity options. |
|
Return an exit code depending on whether or not DRC violations exist. The exit code is 0 if no violations are found, and 5 if any violations are found. |
|
Refill all zones before running DRC.
The board will not be saved after refilling zones unless |
|
Save the board after running DRC.
The board will not be saved unless |
PCB 3D PDF export
The pcb export 3dpdf command exports a board design to a PDF file containing an embedded 3D model of the board.
Usage: kicad-cli pcb export 3dpdf [--help] [--output OUTPUT_FILE] [--define-var KEY=VALUE]… [--force] [--no-unspecified] [--no-dnp] [--grid-origin] [--drill-origin] [--subst-models] [--board-only] [--cut-vias-in-body] [--no-board-body] [--no-components] [--component-filter VAR] [--include-tracks] [--include-pads] [--include-zones] [--include-inner-copper] [--include-silkscreen] [--include-soldermask] [--fuse-shapes] [--fill-all-vias] [--no-extra-pad-thickness] [--min-distance MIN_DIST] [--net-filter VAR] [--user-origin VAR] INPUT_FILE
位置参数:
|
Board file to export. |
可选参数:
|
Show help for the 3D PDF export command. |
|
The output filename. When |
|
Add or override project variable definitions. Can be used multiple times to define multiple variables. |
|
Overwrite output file. |
|
Exclude 3D models of components with "unspecified" footprint type. |
|
Exclude 3D models of components with "Do not populate" attribute. |
|
Use grid origin as origin of output file. |
|
Use drill origin as origin of output file. |
|
Replace VRML models in footprints with STEP or IGS models of the same name, if they exist. |
|
Only include the board itself in the generated model; exclude all component models. |
|
Cut via holes in board body even if conductor layers are not exported. |
|
Exclude board body. |
|
Exclude 3D models for components. |
|
Only include component 3D models matching this list of reference designators (comma-separated, wildcards supported) |
|
Include tracks and vias on outer conductor layers in export (time consuming). |
|
Include pads in export (time consuming). |
|
Include zones in export (time consuming). |
|
Include elements on inner conductor layers in export. |
|
Include silkscreen graphics in export as a set of flat faces. |
|
Include solder mask layers in export as a set of flat faces. |
|
Fuse overlapping geometry together in export (time consuming). |
|
Don’t cut via holes in conductor layers. |
|
Disable adding additional metal thickness to pads. When not used, pads have 0.005mm added to their metal thickness, which causes pads to be separate faces in the exported model, distinct from the surrounding metal. |
|
Tolerance for considering two points to be in the same location. Default:
|
|
Only include copper items belonging to nets matching this wildcard. |
|
Specify a custom origin for the output file, with X and Y coordinates. For
example, |
PCB BREP (OCCT) 导出
pcb export brep 命令将电路板设计导出为 BREP(OCCT 原生边界表示)3D 模型文件。
Usage: kicad-cli pcb export brep [--help] [--output OUTPUT_FILE] [--define-var KEY=VALUE] [--force] [--no-unspecified] [--no-dnp] [--grid-origin] [--drill-origin] [--subst-models] [--board-only] [--cut-vias-in-body] [--no-board-body] [--no-components] [--component-filter VAR] [--include-tracks] [--include-pads] [--include-zones] [--include-inner-copper] [--include-silkscreen] [--include-soldermask] [--fuse-shapes] [--fill-all-vias] [--no-extra-pad-thickness] [--min-distance MIN_DIST] [--net-filter VAR] [--user-origin VAR] INPUT_FILE
位置参数:
|
Board file to export. |
可选参数:
|
Show help for the BREP export command. |
|
The output filename. When |
|
Add or override project variable definitions. Can be used multiple times to define multiple variables. |
|
Overwrite output file. |
|
Exclude 3D models of components with "unspecified" footprint type. |
|
Exclude 3D models of components with "Do not populate" attribute. |
|
Use grid origin as origin of output file. |
|
Use drill origin as origin of output file. |
|
Replace VRML models in footprints with STEP or IGS models of the same name, if they exist. |
|
Only include the board itself in the generated model; exclude all component models. |
|
Cut via holes in board body even if conductor layers are not exported. |
|
Exclude board body. |
|
Exclude 3D models for components. |
|
Only include component 3D models matching this list of reference designators (comma-separated, wildcards supported) |
|
Include tracks and vias on outer conductor layers in export (time consuming). |
|
Include pads in export (time consuming). |
|
Include zones in export (time consuming). |
|
Include elements on inner conductor layers in export. |
|
Include silkscreen graphics in export as a set of flat faces. |
|
Include solder mask layers in export as a set of flat faces. |
|
Fuse overlapping geometry together in export (time consuming). |
|
Don’t cut via holes in conductor layers. |
|
Disable adding additional metal thickness to pads. When not used, pads have 0.005mm added to their metal thickness, which causes pads to be separate faces in the exported model, distinct from the surrounding metal. |
|
Tolerance for considering two points to be in the same location. Default:
|
|
Only include copper items belonging to nets matching this wildcard. |
|
Specify a custom origin for the output file, with X and Y coordinates. For
example, |
PCB 钻孔文件导出
pcb export drill 命令从电路板导出钻孔文件。
Usage: kicad-cli pcb export drill [--help] [--output OUTPUT_DIR] [--format FORMAT] [--drill-origin DRILL_ORIGIN] [--excellon-zeros-format ZEROS_FORMAT] [--excellon-oval-format OVAL_FORMAT] [--excellon-units UNITS] [--excellon-mirror-y] [--excellon-min-header] [--excellon-separate-th] [--generate-map] [--generate-report] [--report-path REPORT_PATH] [--generate-tenting] [--map-format MAP_FORMAT] [--gerber-precision VAR] INPUT_FILE
位置参数:
|
Board file to export. |
可选参数:
|
Show help for the drill file export command. |
|
The output directory for the drill file(s). When |
|
The drill file format. Options are |
|
The coordinate origin for the drill file. Options are |
|
The zeros format for the drill file. Options are |
|
Control the oval holes drill mode. Options are |
|
The units for the drill file. Options are |
|
Mirror the drill file in the Y direction. Only applies to Excellon format drill files. |
|
Use a minimal header in the drill file. Only applies to Excellon format drill files. |
|
Generate separate drill files for plated and non-plated through holes. Only applies to Excellon format drill files. |
|
Generate a map file in addition to the drill file. |
|
Generate a report file listing all drill hits. |
|
The output filename for the drill report file.
When |
|
Generate separate drill files for tented drill hits. Only applies to Gerber X2 format drill files. |
|
The map file format. Options are |
|
The precision (number of digits) for the drill file. Valid options are |
PCB DXF 导出
pcb export dxf 命令将电路板设计导出为 DXF 文件。
Usage: kicad-cli pcb export dxf [--help] [--output OUTPUT_DIR] [--layers LAYER_LIST] [--drawing-sheet SHEET_PATH] [--define-var KEY=VALUE] [--exclude-refdes] [--exclude-value] [--sketch-pads-on-fab-layers] [--hide-DNP-footprints-on-fab-layers] [--sketch-DNP-footprints-on-fab-layers] [--crossout-DNP-footprints-on-fab-layers] [--subtract-soldermask] [--use-contours] [--use-drill-origin] [--include-border-title] [--output-units UNITS] [--drill-shape-opt VAR] [--common-layers COMMON_LAYER_LIST] [--mode-single] [--mode-multi] [--plot-invisible-text] [--scale SCALE] [--check-zones] INPUT_FILE
位置参数:
|
Board file to export. |
可选参数:
|
Show help for the DXF export command. |
|
The output folder or filename for the exported files. When |
|
A comma-separated list of layer names to export from the footprint, such
as |
|
Path to drawing sheet to use in plot, overriding the drawing sheet specified in the board file. |
|
Add or override project variable definitions. Can be used multiple times to define multiple variables. |
|
Exclude footprint reference designators from plot. |
|
Exclude footprint values from plot. |
|
Draw pad outlines and their numbers on front and back fab layers. |
|
Don’t plot text and graphics of DNP footprints on fab layers. |
|
Plot graphics of DNP footprints in sketch mode on fab layers. |
|
Plot an "X" over the courtyard of DNP footprints on fab layers, and strikeout their reference designators. |
|
Remove silkscreen from areas without soldermask. |
|
Plot graphic items using their contours. |
|
Plot using the drill/place file origin. |
|
Include sheet border and title block in plot. |
|
Output units. Options are |
|
The shape of drill marks in the plot. Options are |
|
A comma-separated list of layer names to plot on all layers, such as
|
|
Generates a single file with the output arg path acting as the complete directory and filename path. |
|
Plot the layers to one or more DXF files, with each file representing a
single layer from |
|
Force plotting of values and references, even if they are invisible. This argument is deprecated as of KiCad 9.0.1 and has no effect. It will be removed in a future version of KiCad. To plot invisible text, edit the board so that the text is no longer invisible. |
|
A scaling factor to use for plotting the PCB. The border and title block are not scaled. A scale factor of 0 autoscales the plot. |
|
Check zone fills and refill zones, if required, prior to export. Any zone fill updates are not saved in the board file. |
PCB GenCAD 导出
pcb export gencad 命令将电路板设计导出为 GenCAD 文件。
Usage: kicad-cli pcb export gencad [--help] [--output OUTPUT_FILE] [--define-var KEY=VALUE] [--flip-bottom-pads] [--unique-pins] [--unique-footprints] [--use-drill-origin] [--store-origin-coord] INPUT_FILE
位置参数:
|
Board file to export. |
可选参数:
|
Show help for the DXF export command. |
|
The output filename. When |
|
Add or override project variable definitions. Can be used multiple times to define multiple variables. |
|
Flip bottom footprint padstacks. |
|
Generate unique pin names. |
|
Generate a new shape for each footprint instance (do not reuse shapes). |
|
Use drill/place file origin as origin. |
|
Save the origin coordinates in the file. |
PCB Gerber 文件导出:每个文件包含多个层
pcb export gerbers 命令将电路板设计导出为 Gerber 文件,每个文件对应一层。
请注意,Gerber 导出命令有两个不同的版本,即 gerber 和 gerbers。gerber 命令将多个 PCB 层绘制到一个 Gerber 文件中,而 gerbers 命令则将多个 Gerber 文件绘制出来,每个文件对应一个 PCB 层。通常情况下,gerbers 命令是用于 PCB 制造的正确命令。
|
Usage: kicad-cli pcb export gerbers [--help] [--output OUTPUT_DIR] [--layers LAYER_LIST] [--drawing-sheet SHEET_PATH] [--define-var KEY=VALUE] [--exclude-refdes] [--exclude-value] [--include-border-title] [--sketch-pads-on-fab-layers] [--hide-DNP-footprints-on-fab-layers] [--sketch-DNP-footprints-on-fab-layers] [--crossout-DNP-footprints-on-fab-layers] [--no-x2] [--no-netlist] [--subtract-soldermask] [--disable-aperture-macros] [--use-drill-file-origin] [--precision PRECISION] [--no-protel-ext] [--plot-invisible-text] [--common-layers COMMON_LAYER_LIST] [--check-zones] [--board-plot-params] INPUT_FILE
位置参数:
|
Board file to export. |
可选参数:
|
Show help for the Gerber export command. |
|
The output folder for the exported files. One file is output for each
layer. When |
|
A comma-separated list of layer names to plot from the board, such as
|
|
Path to drawing sheet to use in plot, overriding the drawing sheet specified in the board file. |
|
Add or override project variable definitions. Can be used multiple times to define multiple variables. |
|
Exclude footprint reference designators from plot. |
|
Exclude footprint values from plot. |
|
Include the sheet border and title block. |
|
Draw pad outlines and their numbers on front and back fab layers. |
|
Don’t plot text and graphics of DNP footprints on fab layers. |
|
Plot graphics of DNP footprints in sketch mode on fab layers. |
|
Plot an "X" over the courtyard of DNP footprints on fab layers, and strikeout their reference designators. |
|
Do not use the extended X2 format. |
|
Do not include netlist attributes. |
|
Remove silkscreen from areas without soldermask. |
|
Disable aperture macros. |
|
Use drill/place file origin instead of absolute origin. |
|
The precision (number of digits) for the Gerber files. Valid options are
|
|
Use |
|
Force plotting of values and references, even if they are invisible. This argument is deprecated as of KiCad 9.0.1 and has no effect. It will be removed in a future version of KiCad. To plot invisible text, edit the board so that the text is no longer invisible. |
|
A comma-separated list of layer names to plot on all layers, such as
|
|
Check zone fills and refill zones, if required, prior to export. Any zone fill updates are not saved in the board file. |
|
Use the Gerber plot settings already configured in the board file. |
PCB Gerber 文件导出:每个文件包含多个层
pcb export gerber 命令将一个或多个电路板层导出到单个 Gerber 文件中。
请注意,Gerber 导出命令有两个不同的版本,即 gerber 和 gerbers。gerber 命令将多个 PCB 层绘制到一个 Gerber 文件中,而 gerbers 命令则将多个 Gerber 文件绘制出来,每个文件对应一个 PCB 层。通常情况下,gerbers 命令是用于 PCB 制造的正确命令。
|
pcb export gerber 命令在 KiCad 9.0 中已废弃,并在 KiCad 10.0 中将被移除。请改用 pcb export gerbers 命令。
|
Usage: kicad-cli pcb export gerber [--help] [--output OUTPUT_FILE] [--layers LAYER_LIST] [--drawing-sheet SHEET_PATH] [--define-var KEY=VALUE] [--exclude-refdes] [--exclude-value] [--include-border-title] [--sketch-pads-on-fab-layers] [--hide-DNP-footprints-on-fab-layers] [--sketch-DNP-footprints-on-fab-layers] [--crossout-DNP-footprints-on-fab-layers] [--no-x2] [--no-netlist] [--subtract-soldermask] [--disable-aperture-macros] [--use-drill-file-origin] [--precision PRECISION] [--no-protel-ext] [--plot-invisible-text] [--check-zones] INPUT_FILE
位置参数:
|
Board file to export. |
可选参数:
|
Show help for the Gerber export command. |
|
The output filename. When |
|
A comma-separated list of layer names to plot from the board, such as
|
|
Path to drawing sheet to use in plot, overriding the drawing sheet specified in the board file. |
|
Add or override project variable definitions. Can be used multiple times to define multiple variables. |
|
Exclude footprint reference designators from plot. |
|
Exclude footprint values from plot. |
|
Include the sheet border and title block. |
|
Draw pad outlines and their numbers on front and back fab layers. |
|
Don’t plot text and graphics of DNP footprints on fab layers. |
|
Plot graphics of DNP footprints in sketch mode on fab layers. |
|
Plot an "X" over the courtyard of DNP footprints on fab layers, and strikeout their reference designators. |
|
Do not use the extended X2 format. |
|
Do not include netlist attributes. |
|
Remove silkscreen from areas without soldermask. |
|
Disable aperture macros. |
|
Use drill/place file origin instead of absolute origin. |
|
The precision (number of digits) for the Gerber files. Valid options are
|
|
Use |
|
Force plotting of values and references, even if they are invisible. This argument is deprecated as of KiCad 9.0.1 and has no effect. It will be removed in a future version of KiCad. To plot invisible text, edit the board so that the text is no longer invisible. |
|
Check zone fills and refill zones, if required, prior to export. Any zone fill updates are not saved in the board file. |
PCB GLB 导出
pcb export glb 命令将电路板设计导出为 GLB(二进制 glTF)3D 模型文件。
Usage: kicad-cli pcb export glb [--help] [--output OUTPUT_FILE] [--define-var KEY=VALUE] [--force] [--no-unspecified] [--no-dnp] [--grid-origin] [--drill-origin] [--subst-models] [--board-only] [--cut-vias-in-body] [--no-board-body] [--no-components] [--component-filter VAR] [--include-tracks] [--include-pads] [--include-zones] [--include-inner-copper] [--include-silkscreen] [--include-soldermask] [--fuse-shapes] [--fill-all-vias] [--no-extra-pad-thickness] [--min-distance MIN_DIST] [--net-filter VAR] [--user-origin VAR] INPUT_FILE
位置参数:
|
Board file to export. |
可选参数:
|
Show help for the GLB export command. |
|
The output filename. When |
|
Add or override project variable definitions. Can be used multiple times to define multiple variables. |
|
Overwrite output file. |
|
Exclude 3D models of components with "unspecified" footprint type. |
|
Exclude 3D models of components with "Do not populate" attribute. |
|
Use grid origin as origin of output file. |
|
Use drill origin as origin of output file. |
|
Replace VRML models in footprints with STEP or IGS models of the same name, if they exist. |
|
Only include the board itself in the generated model; exclude all component models. |
|
Cut via holes in board body even if conductor layers are not exported. |
|
Exclude board body. |
|
Exclude 3D models for components. |
|
Only include component 3D models matching this list of reference designators (comma-separated, wildcards supported) |
|
Include tracks and vias on outer conductor layers in export (time consuming). |
|
Include pads in export (time consuming). |
|
Include zones in export (time consuming). |
|
Include elements on inner conductor layers in export. |
|
Include silkscreen graphics in export as a set of flat faces. |
|
Include solder mask layers in export as a set of flat faces. |
|
Fuse overlapping geometry together in export (time consuming). |
|
Don’t cut via holes in conductor layers. |
|
Disable adding additional metal thickness to pads. When not used, pads have 0.005mm added to their metal thickness, which causes pads to be separate faces in the exported model, distinct from the surrounding metal. |
|
Tolerance for considering two points to be in the same location. Default:
|
|
Only include copper items belonging to nets matching this wildcard. |
|
Specify a custom origin for the output file, with X and Y coordinates. For
example, |
PCB IPC-2581 导出
pcb export ipc2581 命令将电路板设计导出为 IPC-2581 格式。
Usage: kicad-cli pcb export ipc2581 [--help] [--output OUTPUT_FILE] [--drawing-sheet SHEET_PATH] [--define-var KEY=VALUE] [--precision PRECISION] [--compress] [--version VAR] [--units VAR] [--bom-col-int-id FIELD_NAME] [--bom-col-mfg-pn FIELD_NAME] [--bom-col-mfg FIELD_NAME] [--bom-col-dist-pn FIELD_NAME] [--bom-col-dist FIELD_NAME] INPUT_FILE
|
Board file to export. |
可选参数:
|
Show help for the IPC-2581 export command. |
|
The output filename. When |
|
Path to drawing sheet to use in plot, overriding the drawing sheet specified in the board file. |
|
Add or override project variable definitions. Can be used multiple times to define multiple variables. |
|
The precision (number of digits after the decimal separator) for the
exported file. The default is |
|
Compress output file as a ZIP file. |
|
IPC-2581 standard version to use. Options are |
|
Units to use in export. Options are |
|
Name of the part field to use for the Bill of Materials Internal ID column. This can be any footprint field, or blank to omit this column. |
|
Name of the part field to use for the Bill of Materials Manufacturer Part Number column. This can be any footprint field, or blank to omit this column. |
|
Name of the part field to use for the Bill of Materials Manufacturer column. This can be any footprint field, or blank to omit this column. |
|
Name of the part field to use for the Bill of Materials Distributor Part Number column. This can be any footprint field, or blank to omit this column. |
|
Name of the part field to use for the Bill of Materials Distributor column. This can be any footprint field, or blank to omit this column. |
PCB IPC-D-356 导出
pcb export ipcd356 命令从电路板设计中生成 IPC-D-356 网表。
Usage: kicad-cli pcb export ipcd356 [--help] [--output OUTPUT_FILE] INPUT_FILE
位置参数:
|
Board file to export. |
可选参数:
|
Show help for the IPC-D-356 export command. |
|
The output filename. When |
PCB ODB++ 导出
pcb export odb 命令将电路板设计导出为 ODB++ 格式。
Usage: kicad-cli pcb export odb [--help] [--output OUTPUT_FILE] [--drawing-sheet SHEET_PATH] [--define-var KEY=VALUE] [--precision PRECISION] [--compression VAR] [--units VAR] INPUT_FILE
位置参数:
|
Board file to export. |
可选参数:
|
Show help for the ODB++ export command. |
|
The output filename, or folder name if no compression is used. |
|
Path to drawing sheet to use in plot, overriding the drawing sheet specified in the board file. |
|
Add or override project variable definitions. Can be used multiple times to define multiple variables. |
|
The precision (number of digits after the decimal separator) for the
exported file. The default is |
|
Compression mode. Options are |
|
Units to use in the output file. Options are |
PCB PDF 导出
pcb export pdf 命令将电路板设计导出为 PDF 文件。每个层可以单独导出为独立的文件,也可以作为单个文件中的一个页面进行导出。
Usage: kicad-cli pcb export pdf [--help] [--output OUTPUT_DIR] [--layers LAYER_LIST] [--drawing-sheet SHEET_PATH] [--define-var KEY=VALUE] [--mirror] [--exclude-refdes] [--exclude-value] [--include-border-title] [--subtract-soldermask] [--sketch-pads-on-fab-layers] [--hide-DNP-footprints-on-fab-layers] [--sketch-DNP-footprints-on-fab-layers] [--crossout-DNP-footprints-on-fab-layers] [--negative] [--black-and-white] [--theme THEME_NAME] [--drill-shape-opt VAR] [--common-layers COMMON_LAYER_LIST] [--plot-invisible-text] [--mode-single] [--mode-separate] [--mode-multipage] [--scale SCALE] [--bg-color COLOR] [--check-zones] INPUT_FILE
位置参数:
|
Board file to export. |
可选参数:
|
Show help for the PDF export command. |
|
The output folder or filename for the exported files. When |
|
A comma-separated list of layer names to export from the board, such as
|
|
Path to drawing sheet to use in plot, overriding the drawing sheet specified in the board file. |
|
Add or override project variable definitions. Can be used multiple times to define multiple variables. |
|
Mirror the board. This can be useful for showing bottom layers. |
|
Exclude footprint reference designators from plot. |
|
Exclude footprint values from plot. |
|
Include the sheet border and title block. |
|
Remove silkscreen from areas without soldermask. |
|
Draw pad outlines and their numbers on front and back fab layers. |
|
Don’t plot text and graphics of DNP footprints on fab layers. |
|
Plot graphics of DNP footprints in sketch mode on fab layers. |
|
Plot an "X" over the courtyard of DNP footprints on fab layers, and strikeout their reference designators. |
|
Plot in negative. |
|
Plot in black and white. |
|
The name of the theme to use for export. If no theme is given, the board editor’s currently selected theme is used. |
|
The shape of drill marks in the plot. Options are |
|
A comma-separated list of layer names to plot on all layers, such as
|
|
Force plotting of values and references, even if they are invisible. This argument is deprecated as of KiCad 9.0.1 and has no effect. It will be removed in a future version of KiCad. To plot invisible text, edit the board so that the text is no longer invisible. |
|
Generates a single file with the output arg path acting as the complete directory and filename path. |
|
Plot the layers to one or more PDF files, with each file representing a
single layer from |
|
Plot the layers to a single PDF file with multiple pages, with each page
representing a single layer from |
|
A scaling factor to use for plotting the PCB. The border and title block are not scaled. A scale factor of 0 autoscales the plot. |
|
A background color for the plot. The format can be hex ( |
|
Check zone fills and refill zones, if required, prior to export. Any zone fill updates are not saved in the board file. |
PCB PLY 文件导出
pcb export ply 命令将电路板设计导出为 PLY 3D 模型文件。
Usage: kicad-cli pcb export ply [--help] [--output OUTPUT_FILE] [--define-var KEY=VALUE] [--force] [--no-unspecified] [--no-dnp] [--grid-origin] [--drill-origin] [--subst-models] [--board-only] [--cut-vias-in-body] [--no-board-body] [--no-components] [--component-filter VAR] [--include-tracks] [--include-pads] [--include-zones] [--include-inner-copper] [--include-silkscreen] [--include-soldermask] [--fuse-shapes] [--fill-all-vias] [--no-extra-pad-thickness] [--min-distance MIN_DIST] [--net-filter VAR] [--user-origin VAR] INPUT_FILE
位置参数:
|
Board file to export. |
可选参数:
|
Show help for the PLY export command. |
|
The output filename. When |
|
Add or override project variable definitions. Can be used multiple times to define multiple variables. |
|
Overwrite output file. |
|
Exclude 3D models of components with "unspecified" footprint type. |
|
Exclude 3D models of components with "Do not populate" attribute. |
|
Use grid origin as origin of output file. |
|
Use drill origin as origin of output file. |
|
Replace VRML models in footprints with STEP or IGS models of the same name, if they exist. |
|
Only include the board itself in the generated model; exclude all component models. |
|
Cut via holes in board body even if conductor layers are not exported. |
|
Exclude board body. |
|
Exclude 3D models for components. |
|
Only include component 3D models matching this list of reference designators (comma-separated, wildcards supported) |
|
Include tracks and vias on outer conductor layers in export (time consuming). |
|
Include pads in export (time consuming). |
|
Include zones in export (time consuming). |
|
Include elements on inner conductor layers in export. |
|
Include silkscreen graphics in export as a set of flat faces. |
|
Include solder mask layers in export as a set of flat faces. |
|
Fuse overlapping geometry together in export (time consuming). |
|
Don’t cut via holes in conductor layers. |
|
Disable adding additional metal thickness to pads. When not used, pads have 0.005mm added to their metal thickness, which causes pads to be separate faces in the exported model, distinct from the surrounding metal. |
|
Tolerance for considering two points to be in the same location. Default:
|
|
Only include copper items belonging to nets matching this wildcard. |
|
Specify a custom origin for the output file, with X and Y coordinates. For
example, |
PCB 位置文件导出
pcb export pos 命令从电路板设计中导出位置文件。
Usage: kicad-cli pcb export pos [--help] [--output OUTPUT_FILE] [--side VAR] [--format FORMAT] [--units UNITS] [--bottom-negate-x] [--use-drill-file-origin] [--smd-only] [--exclude-fp-th] [--exclude-dnp] [--gerber-board-edge] INPUT_FILE
位置参数:
|
Board file to export. |
可选参数:
|
Show help for the position file export command. |
|
The output filename. When |
|
The side of the board to export. Options are |
|
The position file format. Options are |
|
Units for position file. Options are |
|
Use negative X coordinates for footprints on the bottom layer. This option has no effect for Gerber format. |
|
Use drill/place file origin instead of absolute origin. This option has no effect for Gerber format. |
|
Include only surface-mount components. This option has no effect for Gerber format. |
|
Exclude all footprints with through-hole pads. This option has no effect for Gerber format. |
|
Exclude all footprints with "Do not populate" attribute. |
|
Include board edge layer in export (Gerber format only). |
PCB PostScript 导出
pcb export ps 命令将电路板设计导出为 PostScript 文件。
Usage: kicad-cli pcb export ps [--help] [--output OUTPUT_DIR] [--layers LAYER_LIST] [--common-layers COMMON_LAYER_LIST] [--drawing-sheet SHEET_PATH] [--define-var KEY=VALUE]… [--mirror] [--exclude-refdes] [--exclude-value] [--include-border-title] [--subtract-soldermask] [--sketch-pads-on-fab-layers] [--hide-DNP-footprints-on-fab-layers] [--sketch-DNP-footprints-on-fab-layers] [--crossout-DNP-footprints-on-fab-layers] [--negative] [--black-and-white] [--theme THEME_NAME] [--drill-shape-opt VAR] [--mode-single] [--mode-multi] [--track-width-correction TRACK_COR] [--x-scale-factor X_SCALE] [--y-scale-factor Y_SCALE] [--force-a4] [--scale SCALE] [--check-zones] INPUT_FILE
位置参数:
|
Board file to export. |
可选参数:
|
Show help for the PS export command. |
|
The output folder or filename for the exported files. When |
|
A comma-separated list of layer names to export from the board, such as
|
|
A comma-separated list of layer names to plot on all layers, such as
|
|
Path to drawing sheet to use in plot, overriding the drawing sheet specified in the board file. |
|
Add or override project variable definitions. Can be used multiple times to define multiple variables. |
|
Mirror the board. This can be useful for showing bottom layers. |
|
Exclude footprint reference designators from plot. |
|
Exclude footprint values from plot. |
|
Include the sheet border and title block. |
|
Remove silkscreen from areas without soldermask. |
|
Draw pad outlines and their numbers on front and back fab layers. |
|
Don’t plot text and graphics of DNP footprints on fab layers. |
|
Plot graphics of DNP footprints in sketch mode on fab layers. |
|
Plot an "X" over the courtyard of DNP footprints on fab layers, and strikeout their reference designators. |
|
Plot in negative. |
|
Plot in black and white. |
|
The name of the theme to use for export. If no theme is given, the board editor’s currently selected theme is used. |
|
The shape of drill marks in the plot. Options are |
|
Generates a single file with the output arg path acting as the complete directory and filename path. |
|
Plot the layers to one or more PDF files, with each file representing a
single layer from |
|
A global correction, in millimeters, that is added to the size of tracks, vias, and pads when plotted. This correction can be used to correct for errors in the PostScript output device to achieve an exact-scale output. |
|
X scale adjust for exact scale. |
|
Y scale adjust for exact scale. |
|
Force A4 paper size. |
|
A scaling factor to use for plotting the pcb. The border and title block are not scaled. A scale factor of 0 autoscales the plot. |
|
Check zone fills and refill zones, if required, prior to export. Any zone fill updates are not saved in the board file. |
PCB statistics export
The pcb stats command exports a report of statistics about the board design.
Usage: kicad-cli pcb export stats [--help] [--output OUTPUT_FILE] [--format FORMAT] [--units UNITS] [--exclude-footprints-without-pads] [--subtract-holes-from-board] [--subtract-holes-from-copper] INPUT_FILE
位置参数:
|
Board file to export statistics from. |
|
Show help for the statistics command. |
|
Output filename for the generated statistics report. When |
|
Report file format. Options are |
|
Units to use in the report. Options are |
|
Exclude footprints that do not contain any pads from component counts. |
|
Subtract the area of holes from the total board area. |
|
Subtract the area of holes from the total copper area. |
PCB STEP 导出
pcb export step 命令将电路板设计导出为 STEP 文件。
Usage: kicad-cli pcb export step [--help] [--output OUTPUT_FILE] [--define-var KEY=VALUE] [--force] [--no-unspecified] [--no-dnp] [--grid-origin] [--drill-origin] [--subst-models] [--board-only] [--cut-vias-in-body] [--no-board-body] [--no-components] [--component-filter VAR] [--include-tracks] [--include-pads] [--include-zones] [--include-inner-copper] [--include-silkscreen] [--include-soldermask] [--fuse-shapes] [--fill-all-vias] [--no-extra-pad-thickness] [--min-distance MIN_DIST] [--net-filter VAR] [--no-optimize-step] [--user-origin VAR] INPUT_FILE
位置参数:
|
Board file to export. |
可选参数:
|
Show help for the STEP file export command. |
|
The output filename. When |
|
Add or override project variable definitions. Can be used multiple times to define multiple variables. |
|
Overwrite output file. |
|
Exclude 3D models of components with "unspecified" footprint type. |
|
Exclude 3D models of components with "Do not populate" attribute. |
|
Use grid origin as origin of output file. |
|
Use drill origin as origin of output file. |
|
Replace VRML models in footprints with STEP or IGS models of the same name, if they exist. |
|
Only include the board itself in the generated model; exclude all component models. |
|
Cut via holes in board body even if conductor layers are not exported. |
|
Exclude board body. |
|
Exclude 3D models for components. |
|
Only include component 3D models matching this list of reference designators (comma-separated, wildcards supported) |
|
Include tracks and vias on outer conductor layers in export (time consuming). |
|
Include pads in export (time consuming). |
|
Include zones in export (time consuming). |
|
Include elements on inner conductor layers in export. |
|
Include silkscreen graphics in export as a set of flat faces. |
|
Include solder mask layers in export as a set of flat faces. |
|
Fuse overlapping geometry together in export (time consuming). |
|
Don’t cut via holes in conductor layers. |
|
Disable adding additional metal thickness to pads. When not used, pads have 0.005mm added to their metal thickness, which causes pads to be separate faces in the exported model, distinct from the surrounding metal. |
|
Tolerance for considering two points to be in the same location. Default:
|
|
Only include copper items belonging to nets matching this wildcard. |
|
Do not optimize STEP file. This enables writing parametric curves, which reduces file sizes and write/read times, but may reduce compatibility with other software. |
|
Specify a custom origin for the output file, with X and Y coordinates. For
example, |
PCB STL 导出
pcb export stl 命令将电路板设计导出为 STL 3D 模型文件。
Usage: kicad-cli pcb export stl [--help] [--output OUTPUT_FILE] [--define-var KEY=VALUE] [--force] [--no-unspecified] [--no-dnp] [--grid-origin] [--drill-origin] [--subst-models] [--board-only] [--cut-vias-in-body] [--no-board-body] [--no-components] [--component-filter VAR] [--include-tracks] [--include-pads] [--include-zones] [--include-inner-copper] [--include-silkscreen] [--include-soldermask] [--fuse-shapes] [--fill-all-vias] [--no-extra-pad-thickness] [--min-distance MIN_DIST] [--net-filter VAR] [--user-origin VAR] INPUT_FILE
位置参数:
|
Board file to export. |
可选参数:
|
Show help for the STL export command. |
|
The output filename. When |
|
Add or override project variable definitions. Can be used multiple times to define multiple variables. |
|
Overwrite output file. |
|
Exclude 3D models of components with "unspecified" footprint type. |
|
Exclude 3D models of components with "Do not populate" attribute. |
|
Use grid origin as origin of output file. |
|
Use drill origin as origin of output file. |
|
Replace VRML models in footprints with STEP or IGS models of the same name, if they exist. |
|
Only include the board itself in the generated model; exclude all component models. |
|
Cut via holes in board body even if conductor layers are not exported. |
|
Exclude board body. |
|
Exclude 3D models for components. |
|
Only include component 3D models matching this list of reference designators (comma-separated, wildcards supported) |
|
Include tracks and vias on outer conductor layers in export (time consuming). |
|
Include pads in export (time consuming). |
|
Include zones in export (time consuming). |
|
Include elements on inner conductor layers in export. |
|
Include silkscreen graphics in export as a set of flat faces. |
|
Include solder mask layers in export as a set of flat faces. |
|
Fuse overlapping geometry together in export (time consuming). |
|
Don’t cut via holes in conductor layers. |
|
Disable adding additional metal thickness to pads. When not used, pads have 0.005mm added to their metal thickness, which causes pads to be separate faces in the exported model, distinct from the surrounding metal. |
|
Tolerance for considering two points to be in the same location. Default:
|
|
Only include copper items belonging to nets matching this wildcard. |
|
Specify a custom origin for the output file, with X and Y coordinates. For
example, |
PCB STEPZ export
The pcb export stpz command exports a board design to a STEPZ (GZIP-compressed STEP) file.
Usage: kicad-cli pcb export stpz [--help] [--output OUTPUT_FILE] [--define-var KEY=VALUE] [--force] [--no-unspecified] [--no-dnp] [--grid-origin] [--drill-origin] [--subst-models] [--board-only] [--cut-vias-in-body] [--no-board-body] [--no-components] [--component-filter VAR] [--include-tracks] [--include-pads] [--include-zones] [--include-inner-copper] [--include-silkscreen] [--include-soldermask] [--fuse-shapes] [--fill-all-vias] [--no-extra-pad-thickness] [--min-distance MIN_DIST] [--net-filter VAR] [--no-optimize-step] [--user-origin VAR] INPUT_FILE
位置参数:
|
Board file to export. |
可选参数:
|
Show help for the STEPZ file export command. |
|
The output filename. When |
|
Add or override project variable definitions. Can be used multiple times to define multiple variables. |
|
Overwrite output file. |
|
Exclude 3D models of components with "unspecified" footprint type. |
|
Exclude 3D models of components with "Do not populate" attribute. |
|
Use grid origin as origin of output file. |
|
Use drill origin as origin of output file. |
|
Replace VRML models in footprints with STEP or IGS models of the same name, if they exist. |
|
Only include the board itself in the generated model; exclude all component models. |
|
Cut via holes in board body even if conductor layers are not exported. |
|
Exclude board body. |
|
Exclude 3D models for components. |
|
Only include component 3D models matching this list of reference designators (comma-separated, wildcards supported) |
|
Include tracks and vias on outer conductor layers in export (time consuming). |
|
Include pads in export (time consuming). |
|
Include zones in export (time consuming). |
|
Include elements on inner conductor layers in export. |
|
Include silkscreen graphics in export as a set of flat faces. |
|
Include solder mask layers in export as a set of flat faces. |
|
Fuse overlapping geometry together in export (time consuming). |
|
Don’t cut via holes in conductor layers. |
|
Disable adding additional metal thickness to pads. When not used, pads have 0.005mm added to their metal thickness, which causes pads to be separate faces in the exported model, distinct from the surrounding metal. |
|
Tolerance for considering two points to be in the same location. Default:
|
|
Only include copper items belonging to nets matching this wildcard. |
|
Do not optimize STEP file. This enables writing parametric curves, which reduces file sizes and write/read times, but may reduce compatibility with other software. |
|
Specify a custom origin for the output file, with X and Y coordinates. For
example, |
PCB U3D export
The pcb export u3d command exports a board design to a PDF file containing an embedded 3D model of the board.
Usage: kicad-cli pcb export u3d [--help] [--output OUTPUT_FILE] [--define-var KEY=VALUE]… [--force] [--no-unspecified] [--no-dnp] [--grid-origin] [--drill-origin] [--subst-models] [--board-only] [--cut-vias-in-body] [--no-board-body] [--no-components] [--component-filter VAR] [--include-tracks] [--include-pads] [--include-zones] [--include-inner-copper] [--include-silkscreen] [--include-soldermask] [--fuse-shapes] [--fill-all-vias] [--no-extra-pad-thickness] [--min-distance MIN_DIST] [--net-filter VAR] [--user-origin VAR] INPUT_FILE
位置参数:
|
Board file to export. |
可选参数:
|
Show help for the 3D PDF export command. |
|
The output filename. When |
|
Add or override project variable definitions. Can be used multiple times to define multiple variables. |
|
Overwrite output file. |
|
Exclude 3D models of components with "unspecified" footprint type. |
|
Exclude 3D models of components with "Do not populate" attribute. |
|
Use grid origin as origin of output file. |
|
Use drill origin as origin of output file. |
|
Replace VRML models in footprints with STEP or IGS models of the same name, if they exist. |
|
Only include the board itself in the generated model; exclude all component models. |
|
Cut via holes in board body even if conductor layers are not exported. |
|
Exclude board body. |
|
Exclude 3D models for components. |
|
Only include component 3D models matching this list of reference designators (comma-separated, wildcards supported) |
|
Include tracks and vias on outer conductor layers in export (time consuming). |
|
Include pads in export (time consuming). |
|
Include zones in export (time consuming). |
|
Include elements on inner conductor layers in export. |
|
Include silkscreen graphics in export as a set of flat faces. |
|
Include solder mask layers in export as a set of flat faces. |
|
Fuse overlapping geometry together in export (time consuming). |
|
Don’t cut via holes in conductor layers. |
|
Disable adding additional metal thickness to pads. When not used, pads have 0.005mm added to their metal thickness, which causes pads to be separate faces in the exported model, distinct from the surrounding metal. |
|
Tolerance for considering two points to be in the same location. Default:
|
|
Only include copper items belonging to nets matching this wildcard. |
|
Specify a custom origin for the output file, with X and Y coordinates. For
example, |
PCB SVG 导出
pcb export svg 命令将电路板设计导出为 SVG 文件。
Usage: kicad-cli pcb export svg [--help] [--output OUTPUT_DIR] [--layers LAYER_LIST] [--drawing-sheet SHEET_PATH] [--define-var KEY=VALUE] [--subtract-soldermask] [--mirror] [--theme THEME_NAME] [--negative] [--black-and-white] [--sketch-pads-on-fab-layers] [--hide-DNP-footprints-on-fab-layers] [--sketch-DNP-footprints-on-fab-layers] [--crossout-DNP-footprints-on-fab-layers] [--page-size-mode MODE] [--fit-page-to-board] [--exclude-drawing-sheet] [--drill-shape-opt SHAPE_OPTION] [--common-layers COMMON_LAYER_LIST] [--mode-single] [--mode-multi] [--plot-invisible-text] [--scale SCALE] [--check-zones] INPUT_FILE
位置参数:
|
Board file to export. |
可选参数:
|
Show help for the SVG file export command. |
|
The output folder or filename for the exported files. When |
|
A comma-separated list of layer names to export from the board, such as
|
|
Path to drawing sheet to use in plot, overriding the drawing sheet specified in the board file. |
|
Add or override project variable definitions. Can be used multiple times to define multiple variables. |
|
Remove silkscreen from areas without soldermask. |
|
Mirror the board. This can be useful for showing bottom layers. |
|
The name of the theme to use for export. If no theme is given, the board editor’s currently selected theme is used. |
|
Plot in negative. |
|
Plot in black and white. |
|
Draw pad outlines and their numbers on front and back fab layers. |
|
Don’t plot text and graphics of DNP footprints on fab layers. |
|
Plot graphics of DNP footprints in sketch mode on fab layers. |
|
Plot an "X" over the courtyard of DNP footprints on fab layers, and strikeout their reference designators. |
|
Set page sizing mode. Options are |
|
Set the SVG size to match the board outline. This is equivalent to |
|
Plot SVG without a drawing sheet. |
|
The shape of drill marks in the plot. Options are |
|
A comma-separated list of layer names to plot on all layers, such as
|
|
Generates a single file with the output arg path acting as the complete directory and filename path. |
|
Plot the layers to one or more SVG files, with each file representing a
single layer from |
|
Force plotting of values and references, even if they are invisible. This argument is deprecated as of KiCad 9.0.1 and has no effect. It will be removed in a future version of KiCad. To plot invisible text, edit the board so that the text is no longer invisible. |
|
A scaling factor to use for plotting the PCB. The border and title block are not scaled. A scale factor of 0 autoscales the plot. |
|
Check zone fills and refill zones, if required, prior to export. Any zone fill updates are not saved in the board file. |
PCB VRML 导出
pcb export vrml 命令将电路板设计导出为 VRML 3D 文件。
Usage: kicad-cli pcb export vrml [--help] [--output OUTPUT_FILE] [--define-var KEY=VALUE] [--force] [--no-unspecified] [--no-dnp] [--user-origin VAR] [--units VAR] [--models-dir VAR] [--models-relative] INPUT_FILE
位置参数:
|
Board file to export. |
可选参数:
|
Show help for the VRML export command. |
|
The output filename. When |
|
Add or override project variable definitions. Can be used multiple times to define multiple variables. |
|
Overwrite output file. |
|
Exclude 3D models of components with "unspecified" footprint type. |
|
Exclude 3D models of components with "Do not populate" attribute. |
|
Specify a custom origin for the output file, with X and Y coordinates. For
example, |
|
Units to use in the output file. Options are |
|
Name of output directory to copy component models into. If not used, component models are embedded into the output file. |
|
With |
PCB XAO 导出
pcb export xao 命令将电路板设计导出为 XAO(SALOME/Gmsh)3D 模型文件。
Usage: kicad-cli pcb export xao [--help] [--output OUTPUT_FILE] [--define-var KEY=VALUE] [--force] [--no-unspecified] [--no-dnp] [--grid-origin] [--drill-origin] [--subst-models] [--board-only] [--cut-vias-in-body] [--no-board-body] [--no-components] [--component-filter VAR] [--include-tracks] [--include-pads] [--include-zones] [--include-inner-copper] [--include-silkscreen] [--include-soldermask] [--fuse-shapes] [--fill-all-vias] [--no-extra-pad-thickness] [--min-distance MIN_DIST] [--net-filter VAR] [--user-origin VAR] INPUT_FILE
位置参数:
|
Board file to export. |
可选参数:
|
Show help for the XAO export command. |
|
The output filename. When |
|
Add or override project variable definitions. Can be used multiple times to define multiple variables. |
|
Overwrite output file. |
|
Exclude 3D models of components with "unspecified" footprint type. |
|
Exclude 3D models of components with "Do not populate" attribute. |
|
Use grid origin as origin of output file. |
|
Use drill origin as origin of output file. |
|
Replace VRML models in footprints with STEP or IGS models of the same name, if they exist. |
|
Only include the board itself in the generated model; exclude all component models. |
|
Cut via holes in board body even if conductor layers are not exported. |
|
Exclude board body. |
|
Exclude 3D models for components. |
|
Only include component 3D models matching this list of reference designators (comma-separated, wildcards supported) |
|
Include tracks and vias on outer conductor layers in export (time consuming). |
|
Include pads in export (time consuming). |
|
Include zones in export (time consuming). |
|
Include elements on inner conductor layers in export. |
|
Include silkscreen graphics in export as a set of flat faces. |
|
Include solder mask layers in export as a set of flat faces. |
|
Fuse overlapping geometry together in export (time consuming). |
|
Don’t cut via holes in conductor layers. |
|
Disable adding additional metal thickness to pads. When not used, pads have 0.005mm added to their metal thickness, which causes pads to be separate faces in the exported model, distinct from the surrounding metal. |
|
Tolerance for considering two points to be in the same location. Default:
|
|
Only include copper items belonging to nets matching this wildcard. |
|
Specify a custom origin for the output file, with X and Y coordinates. For
example, |
PCB 渲染
pcb render 命令会生成电路板 3D 模型的光线追踪渲染图,并将其保存为 PNG 或 JPEG 文件。
Usage: kicad-cli pcb render [--help] [--output OUTPUT_FILE] [--define-var KEY=VALUE] [--width WIDTH] [--height HEIGHT] [--side SIDE] [--background BG] [--quality QUALITY] [--preset PRESET] [--floor] [--perspective] [--zoom ZOOM] [--pan VECTOR] [--pivot PIVOT] [--rotate ANGLES] [--light-top COLOR] [--light-bottom COLOR] [--light-side COLOR] [--light-camera COLOR] [--light-side-elevation ANGLE] INPUT_FILE
位置参数:
|
Board file to render. |
可选参数:
|
Show help for the render command. |
|
The output filename. This argument must be given. The file extension given
in this argument determines the output image file format. The filename
must end with either |
|
Add or override project variable definitions. Can be used multiple times to define multiple variables. |
|
Image width in pixels. Default: |
|
Image height in pixels. Default: |
|
The side of the board to render. Options are |
|
Image background. Options are |
|
Render quality. Options are |
|
Color preset. Options are |
|
Enables floor, shadows and post-processing, even if disabled in quality preset. |
|
Use perspective projection instead of orthogonal. |
|
Camera zoom factor as an integer. Default: |
|
Set camera pan location, in millimeters, with the format |
|
Set pivot point relative to the board center in centimeters, with the
format |
|
Set board rotation around pivot point, in degrees, with the format
|
|
Top light intensity, format |
|
Bottom light intensity, format |
|
Side lights intensity, format |
|
Camera light intensity, format |
|
Side lights elevation angle in degrees, range: 0-90. |
PCB upgrade
The pcb upgrade command converts a KiCad board file from a previous KiCad board file format to the native format for the current version of KiCad. If the input board file is already in the current file format, no action is taken.
Usage: kicad-cli pcb upgrade [--help] [--force] INPUT_FILE
位置参数:
|
Board file to upgrade. |
可选参数:
|
Show help for the upgrade command. |
|
Re-save the input board file even if it is already in the current file format. |
原理图命令
sch 命令可运行电气规则检查、将原理图导出为各种其他文件格式,或导出 BOM 或网表。每个子命令都有自己的选项。
原理图 ERC
sch erc 命令对原理图进行电气规则检查并生成报告。
Usage: kicad-cli sch erc [--help] [--output OUTPUT_FILE] [--define-var KEY=VALUE] [--format VAR] [--units VAR] [--severity-all] [--severity-error] [--severity-warning] [--severity-exclusions] [--exit-code-violations] INPUT_FILE
位置参数:
|
Schematic file to run ERC on. |
可选参数:
|
Show help for the ERC command. |
|
Output filename for the generated ERC report. When |
|
Add or override project variable definitions. Can be used multiple times to define multiple variables. |
|
Report file format. Options are |
|
Units to use in the report. Options are |
|
Report all ERC violations. This is equivalent to using all of the other ERC severity options. |
|
Report all error-level ERC violations. This can be combined with the other ERC severity options. |
|
Report all warning-level ERC violations. This can be combined with the other ERC severity options. |
|
Report all excluded ERC violations. This can be combined with the other ERC severity options. |
|
Return an exit code depending on whether or not ERC violations exist. The exit code is 0 if no violations are found, and 5 if any violations are found. |
原理图 BOM 导出
sch export bom 命令从原理图导出 BOM。BOM 导出有多个选项可用于控制格式和包含的字段。此导出方法相当于从符号字段表导出 BOM (导出 BOM)。
要使用旧版 XML 和 Python BOM 脚本工作流导出 BOM,请使用 sch export python-bom 命令。
|
Usage: kicad-cli sch export bom [--help] [--output OUTPUT_FILE] [--preset PRESET] [--format-preset FMT_PRESET] [--fields FIELDS] [--labels LABELS] [--group-by GROUP_BY] [--sort-field SORT_BY] [--sort-asc] [--filter FILTER] [--exclude-dnp] [--include-excluded-from-bom] [--field-delimiter FIELD_DELIM] [--string-delimiter STR_DELIM] [--ref-delimiter REF_DELIM] [--ref-range-delimiter REF_RANGE_DELIM] [--keep-tabs] [--keep-line-breaks] INPUT_FILE
位置参数:
|
Schematic file to export. |
可选参数:
|
Shows help message and exits |
|
The output filename. When |
|
Use a named BOM preset setting from the schematic, e.g. |
|
Use a named BOM format preset setting from the schematic, e.g. |
|
An ordered list of fields to export. |
|
An ordered list of labels to apply the exported fields (default:
|
|
Fields to group references by when field values match. |
|
Field name to sort by (default: |
|
If given, sort in ascending order. If not given, sort in descending order. |
|
Filter string to remove output lines. |
|
Exclude symbols with the "Do not populate" attribute. |
|
Include symbols marked "Exclude from BOM". This argument is deprecated as of KiCad 10.0 and has no effect. |
|
Separator between output fields/columns (default: |
|
Character to surround fields with (none by default). |
|
Character to place between individual references (default: |
|
Character to place in ranges of references (default: |
|
Keep tab characters from input fields. Stripped by default. |
|
Keep line break characters from input fields. Stripped by default. |
原理图 DXF 导出
命令 sch export dxf 将原理图导出到 DXF 文件。设计中的每张图纸都会导出到各自的文件中。
Usage: kicad-cli sch export dxf [--help] [--output OUTPUT_DIR] [--drawing-sheet SHEET_PATH] [--define-var KEY=VALUE] [--theme THEME_NAME] [--black-and-white] [--exclude-drawing-sheet] [--default-font VAR] [--pages PAGE_LIST] INPUT_FILE
位置参数:
|
Schematic file to export. |
可选参数:
|
Show help for the DXF file export command. |
|
The output folder for the exported files. One file is output for each
sheet. When |
|
Path to drawing sheet to use in plot, overriding the drawing sheet specified in the schematic file. |
|
Add or override project variable definitions. Can be used multiple times to define multiple variables. |
|
The name of the theme to use for export. If no theme is given, the schematic editor’s currently selected theme is used. |
|
Export schematic in black and white. |
|
Plot DXF without a drawing sheet. |
|
Default font name. Default: |
|
Comma-separated list of pages to export. Blank or unspecified means all
pages. To plot specific pages, give the root sheet as |
原理图网表导出
命令 sch export netlist 将原理图中的网表以 各种格式 导出。
Usage: kicad-cli sch export netlist [--help] [--output OUTPUT_FILE] [--format FORMAT] INPUT_FILE
位置参数:
|
Schematic file to export. |
可选参数:
|
Show help for the netlist export command. |
|
The output filename. When |
|
The netlist output format. Options are |
原理图 PDF 导出
sch export pdf 命令将原理图导出到 PDF 文件。设计中的每个图纸都会导出到 PDF 文件中的单独页面。
Usage: kicad-cli sch export pdf [--help] [--output OUTPUT_FILE] [--drawing-sheet SHEET_PATH] [--define-var KEY=VALUE] [--theme THEME_NAME] [--black-and-white] [--exclude-drawing-sheet] [--default-font VAR] [--exclude-pdf-property-popups] [--exclude-pdf-hierarchical-links] [--exclude-pdf-metadata] [--no-background-color] [--pages PAGE_LIST] INPUT_FILE
位置参数:
|
Schematic file to export. |
可选参数:
|
Show help for the PDF file export command. |
|
The output filename. When |
|
Path to drawing sheet to use in plot, overriding the drawing sheet specified in the schematic file. |
|
Add or override project variable definitions. Can be used multiple times to define multiple variables. |
|
The name of the theme to use for export. If no theme is given, the schematic editor’s currently selected theme is used. |
|
Export schematic in black and white. |
|
Plot PDF without a drawing sheet. |
|
Default font name. Default: |
|
Do not generate property popups in PDF. |
|
Do not generate clickable links for hierarchical elements in PDF. |
|
Do not generate PDF metadata from AUTHOR and SUBJECT variables. |
|
Export schematic without a background color, regardless of theme. |
|
Comma-separated list of pages to export. Blank or unspecified means all
pages. To plot specific pages, give the root sheet as |
原理图 PostScript 导出
命令 sch export ps 将原理图导出到 PostScript 文件。设计中的每个图纸都会导出到各自的文件中。
Usage: kicad-cli sch export ps [--help] [--output OUTPUT_DIR] [--drawing-sheet SHEET_PATH] [--define-var KEY=VALUE] [--theme THEME_NAME] [--black-and-white] [--exclude-drawing-sheet] [--default-font VAR] [--no-background-color] [--pages PAGE_LIST] INPUT_FILE
位置参数:
|
Schematic file to export. |
可选参数:
|
Show help for the PS file export command. |
|
The output folder for the exported files. One file is output for each
sheet. When |
|
Path to drawing sheet to use in plot, overriding the drawing sheet specified in the schematic file. |
|
Add or override project variable definitions. Can be used multiple times to define multiple variables. |
|
The name of the theme to use for export. If no theme is given, the schematic editor’s currently selected theme is used. |
|
Export schematic in black and white. |
|
Plot PS without a drawing sheet. |
|
Default font name. Default: |
|
Export schematic without a background color, regardless of theme. |
|
Comma-separated list of pages to export. Blank or unspecified means all
pages. To plot specific pages, give the root sheet as |
原理图 BOM 导出(旧版 BOM 脚本)
命令 sch export python-bom 可从原理图导出 XML BOM 文件。然后,可使用自定义脚本或 原理图 BOM 导出文档 中描述的脚本之一,将 XML BOM 文件处理成所需的 BOM 格式。
Usage: kicad-cli sch export python-bom [--help] [--output OUTPUT_FILE] INPUT_FILE
位置参数:
|
Schematic file to export. |
可选参数:
|
Show help for the BOM export command. |
|
The output filename. When |
原理图 SVG 导出
命令 sch export svg 将原理图导出到 SVG 文件。设计中的每个图纸都会导出到各自的文件中。
Usage: kicad-cli sch export svg [--help] [--output OUTPUT_DIR] [--drawing-sheet SHEET_PATH] [--define-var KEY=VALUE] [--theme THEME_NAME] [--black-and-white] [--exclude-drawing-sheet] [--default-font VAR] [--no-background-color] [--pages PAGE_LIST] INPUT_FILE
位置参数:
|
Schematic file to export. |
可选参数:
|
Show help for the SVG file export command. |
|
The output folder for the exported files. When |
|
Path to drawing sheet to use in plot, overriding the drawing sheet specified in the schematic file. |
|
Add or override project variable definitions. Can be used multiple times to define multiple variables. |
|
The name of the theme to use for export. If no theme is given, the schematic editor’s currently selected theme is used. |
|
Export schematic in black and white. |
|
Plot SVG without a drawing sheet. |
|
Default font name. Default: |
|
Export schematic without a background color, regardless of theme. |
|
Comma-separated list of pages to export. Blank or unspecified means all
pages. To plot specific pages, give the root sheet as |
Schematic upgrade
The sch upgrade command converts a KiCad schematic file from a previous KiCad schematic file format to the native format for the current version of KiCad. If the input schematic file is already in the current file format, no action is taken.
| Only the specified schematic file is upgraded. If the schematic file contains any child sheets, the child sheets are not upgraded. |
Usage: kicad-cli sch upgrade [--help] [--force] INPUT_FILE
位置参数:
|
Schematic file to upgrade. |
可选参数:
|
Show help for the upgrade command. |
|
Re-save the input schematic file even if it is already in the current file format. |
符号命令
sym 子命令用于将符号导出到另一种格式,或将符号库升级到 KiCad 符号文件格式的当前版本。
符合导出
sym export svg 命令将指定库中的一个或多个符号导出为 SVG 文件。
Usage: kicad-cli sym export svg [--help] [--output OUTPUT_DIR] [--theme THEME_NAME] [--symbol SYMBOL] [--black-and-white] [--include-hidden-pins] [--include-hidden-fields] INPUT_FILE
位置参数:
|
Symbol library file to use for export. |
可选参数:
|
Show help for the symbol SVG export command. |
|
The output folder for the exported files. Each symbol in the input library
is output to a separate file. When |
|
The name of the theme to use for export. If no theme is given, the symbol editor’s currently selected theme is used. |
|
The specific symbol to export from the library. When this argument is not used, all symbols in the library are exported. |
|
Export symbols in black and white. |
|
Export hidden pins in the exported SVG. |
|
Export hidden symbol fields in the exported SVG. |
符号升级
The sym upgrade command converts the specified symbol library from a legacy KiCad symbol format or a non-KiCad symbol format to the native format for the current version of KiCad. If the input library is already in the current file format, no action is taken.
支持的输入符号格式包括:
-
KiCad 符号库(
.kicad_sym) -
KiCad(6.0之前版本)符号库(
.lib) -
Altium 原理图库(
.SchLib) -
Altium 集成库 (
.IntLib) -
CADSTAR 元件库(
.lib) -
EAGLE XML 库 (
.lbr) -
EasyEDA (JLCEDA) 标准版文件 (
.json) -
EasyEDA (JLCEDA) 专业版文件 (
.elibz,.epro,.zip)
Usage: kicad-cli sym upgrade [--help] [--output OUTPUT_FILE] [--force] INPUT_FILE
位置参数:
|
Symbol library to upgrade. |
可选参数:
|
Show help for the upgrade command. |
|
The output filename for the upgraded symbol library. When |
|
Re-save the input library even if it is already in the current file format. |
版本命令
version 命令用于显示 KiCad 的版本信息。若不带任何参数,它将直接显示版本号,例如 7.0.7。您还可以通过使用 --format 参数以其他格式显示版本信息。
使用 kicad-cli version --format about 命令获取版本信息,并在提交 GitLab 上的 bug 报告或功能请求时包含此信息。
|
Usage: kicad-cli version [--help] [--format VAR]
可选参数:
|
Format of the version number. Options are |