kicad-panelize

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Skill for PCB panelization

PCB拼板技能

Setup

安装配置

Ensure KiKit is installed with kikit --version
Check this installations resources/panelizePresets/default.json and panelize_ui_sections.py before adding parameters, these are the way, the truth, and the light.
确保已安装KiKit,可通过
kikit --version
验证。 在添加参数前,请查看安装目录下的
resources/panelizePresets/default.json
panelize_ui_sections.py
文件,这些是配置的参考标准。

Usage

使用方法

  • Find the source .kicad_pcb requsted by the user
  • Inspect its actual board files, Edge.Cuts, copper layers, pads and components that may interesect board edges to identify items like castellations, edge connectors, antennas, plated edges, etc.
  • Resolve grid dimensions, spacing, rotation, tabs, separation, frame, and fabricator limits.
  • Position tooling holes and fiducials relative to the panel outline
  • Write strict json.
  • Generate a versioned panel without overwriting the source in a "build" subdirectory
  • Check the generated panel before notifying the user, ensuring that it looks proper from the baord file level as well as in render.
  • 找到用户指定的源文件
    .kicad_pcb
  • 检查实际的电路板文件、Edge.Cuts层、铜箔层、焊盘以及可能与板边相交的元件,识别出如castellations( castellated孔)、边缘连接器、天线、镀边等特征。
  • 确定网格尺寸、间距、旋转角度、连接桥、分隔距离、边框以及制造商限制。
  • 相对于拼板轮廓定位工艺孔和基准点
  • 编写格式严谨的JSON配置文件
  • build
    子目录中生成带版本号的拼板文件,不得覆盖源文件
  • 在通知用户前检查生成的拼板,确保从电路板文件层面和渲染视图来看都符合要求。

Preferred starting values

推荐初始参数

  • Board routing gap: 2mm
  • Tab width: 3mm
  • Mouse-bite drill: 0.5mm
  • Mouse-bite spacing: 0.8mm
  • Mouse-bite offset: 0mm
  • Full frame width: 5mm
  • Frame-to-array clearance: 2mm
  • Frame break cuts: none
  • Exterior frame radius: 2mm
  • Interior routing radius: 0.25mm
  • Tooling: three 1.5mm holes
  • Tooling stencil apertures: enabled
  • Fiducials: three, 1mm copper with 1mm openings
  • Fiducial paste apertures: disabled
  • 板间布线间隙:2mm
  • 连接桥宽度:3mm
  • 鼠咬孔钻头直径:0.5mm
  • 鼠咬孔间距:0.8mm
  • 鼠咬孔偏移:0mm
  • 完整边框宽度:5mm
  • 边框与阵列的间隙:2mm
  • 边框分割切口:无
  • 外边框圆角半径:2mm
  • 内部布线圆角半径:0.25mm
  • 工艺孔:3个1.5mm的孔
  • 工艺孔钢网开窗:启用
  • 基准点:3个,1mm铜箔带1mm开窗
  • 基准点焊膏开窗:禁用

KiKit behavior

KiKit 行为说明

  • source.type: "auto" is appropriate for an ordinary single-board file.
  • tabs.type: "spacing" places tabs symmetrically and cannot exclude a particular side.
  • With fixed tabs:
    • hcount controls tabs projecting from left/right edges.
    • vcount controls tabs projecting from top/bottom edges.
    • A zero count suppresses that pair of directions.
  • Use annotation tabs when only selected segments or one side must be excluded.
  • Protected tab directions must be derived from each board’s geometry and rotation. Never hardcode “bottom” or “right” as a universal rule.
  • The global mouse-bite cut method processes every generated cut path, including framing.cuts.
  • Therefore, framing.cuts: "both" with mouse bites drills break rows through the rails.
  • Use framing.cuts: "none" for a continuous frame.
  • Tooling and fiducial offsets are measured inward from the panel’s outer edges.
  • To center a feature across a 5 mm frame, use a 2.5 mm perpendicular offset.
  • Tooling holes and fiducials with identical counts and offsets overlap. Separate them along the rail.
  • paste: true means the feature gets an aperture on the stencil paste layers. It does not control whether a drilled hole is visible.
  • framing.fillet rounds exterior panel corners.
  • post.millradius rounds concave interior routed corners.
  • post.reconstructarcs: true produces real Edge.Cuts arcs instead of dense line-segment approximations.
  • source.type: "auto"
    适用于普通的单电路板文件。
  • tabs.type: "spacing"
    会对称放置连接桥,无法排除特定侧边。
  • 使用固定连接桥时:
    • hcount
      控制左右边缘伸出的连接桥数量。
    • vcount
      控制上下边缘伸出的连接桥数量。
    • 数量为0时会禁用对应方向的连接桥。
  • 当只需排除特定线段或单侧时,使用注释式连接桥。
  • 受保护的连接桥方向必须根据每个电路板的几何形状和旋转角度确定,切勿将“底部”或“右侧”硬编码为通用规则。
  • 全局鼠咬孔切割方式会处理所有生成的切割路径,包括
    framing.cuts
  • 因此,若
    framing.cuts: "both"
    搭配鼠咬孔钻头,会切断边框横梁。
  • 若要生成连续边框,使用
    framing.cuts: "none"
  • 工艺孔和基准点的偏移量是从拼板外边缘向内测量的。
  • 若要在5mm宽的边框上居中放置某个特征,需设置2.5mm的垂直偏移。
  • 数量和偏移量相同的工艺孔与基准点会重叠,需沿边框分开布置。
  • paste: true
    表示该特征在钢网焊膏层上有开窗,不控制钻孔是否可见。
  • framing.fillet
    用于圆角处理拼板外角落。
  • post.millradius
    用于圆角处理内部凹形布线角落。
  • post.reconstructarcs: true
    会生成真实的Edge.Cuts圆弧,而非密集的线段近似。

Useful commands

实用命令

python3 -m json.tool panelize.json kikit panelize -p panelize.json input.kicad_pcb output-panel.kicad_pcb
Dump the fully merged KiKit configuration with:
kikit panelize -p panelize.json -d resolved.json input.kicad_pcb output-panel.kicad_pcb
Render and open it with:
kicad-cli pcb render
--output panel-top.png
--width 1600
--height 1200
--side top
--background opaque
--quality high
panel.kicad_pcb
kicad-cli pcb render
--output panel-iso.png
--width 1600
--height 1200
--perspective
--rotate 325,0,35
panel.kicad_pcb
bash
python3 -m json.tool panelize.json
kikit panelize -p panelize.json input.kicad_pcb output-panel.kicad_pcb
导出完整合并后的KiKit配置:
bash
kikit panelize -p panelize.json -d resolved.json input.kicad_pcb output-panel.kicad_pcb
渲染并打开拼板:
bash
kicad-cli pcb render \
--output panel-top.png \
--width 1600 \
--height 1200 \
--side top \
--background opaque \
--quality high \
panel.kicad_pcb
bash
kicad-cli pcb render \
--output panel-iso.png \
--width 1600 \
--height 1200 \
--perspective \
--rotate 325,0,35 \
panel.kicad_pcb