kicad-footprint
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseThis skill allows an LLM to generate KiCad footprints in a programmatic way, using KiCad Library Tools and the infrastructure built up around it. It does not necessarily provide a whole solution for library management.
该Skill允许LLM通过KiCad Library Tools及其周边构建的基础设施,以程序化方式生成KiCad封装。它不一定提供库管理的完整解决方案。
Setup
安装设置
Using the https://gitlab.com/kicad/libraries/kicad-library-tools repository, clone it somewhere for safe-keeping, possibly as a submodule under the existing project. Create a dedicated virtual environment for the Python dependencies it has. The docs directory has information on setup, including how to use ./manage.sh. As a rule, the user will want to also have 3D files generated for footprints, so include these dependencies.
Usage
使用方法
- First, identify if the footprint the user is asking for already exists in their KiCad library! If it does, there's no need to recreate it unless they are asking for modifications like solder mask expansion for BGAs or smaller courtyard areas, or silkscreen modification.
- Next, identify what category the footprint the user is requesting likely corresponds to. Is it a QFN? Is it an LGA? What is it? If unsure, ask the user.
- You should look at existing yaml definitions and the generator script for that category to see what options are available. Make sure your footprints look compliant with other similar footprints.
- Did the user supply a PDF or image of the land pattern? Describe the land pattern using text before implementing a yaml description. "This pad is 5mm away from center in x, 5mm away in y" and similar descriptions are very helpful for your understanding. Confirm this understanding with the user unless they have written out a description in this way already. Even then, it's not a bad idea for you to also render an image of the land pattern for your own info.
- Ask the user for the 3D dimensions if necessary to render the 3D model (unless the user specifies not to render a 3D model of course).
- Verify the footprint by investigating the files and rendering them. Also do the same with the 3D model
- When complete, ask the user where the footprint should live. If this info is already in context, please use it. (AGENTS.md or CLAUDE.md might contain that so if so please use that.)
Items to watch for that may require human intervention:
- When pads are non-standard in shape
- When an existing generator is not available, please ask before implementing a new generator
As a rule, keep any new yaml files co-located with the library that you generate from. Do not modify other footprints when making a new one.
- 首先,确认用户请求的封装是否已存在于其KiCad库中!如果已存在,除非用户要求修改(例如BGA的阻焊层扩展、更小的安装区域或丝印修改),否则无需重新创建。
- 接下来,确定用户请求的封装所属的类别。是QFN?还是LGA?具体是什么?如果不确定,请询问用户。
- 您应查看该类别下现有的yaml定义和生成器脚本,了解可用选项。确保您生成的封装与其他同类封装合规一致。
- 用户是否提供了焊盘布局的PDF或图片?在实现yaml描述之前,先用文字描述焊盘布局。例如“该焊盘在x方向距离中心5mm,y方向距离中心5mm”这类描述对您的理解非常有帮助。除非用户已经以这种方式写出了描述,否则请与用户确认您的理解。即便如此,您自行渲染焊盘布局的图片供自己参考也不失为一个好主意。
- 如有必要,请向用户索要3D尺寸以渲染3D模型(当然,除非用户明确表示不需要渲染3D模型)。
- 通过查看文件并渲染来验证封装。对3D模型也执行同样的验证步骤。
- 完成后,询问用户封装应存放的位置。如果上下文已包含此信息,请直接使用。(AGENTS.md或CLAUDE.md中可能包含该信息,如有请使用。)
需要人工介入的注意事项:
- 当焊盘形状非标准时
- 当没有现成的生成器可用时,请在实现新生成器前询问用户
通常,将新的yaml文件与生成它的库放在同一位置。创建新封装时,请勿修改其他封装。