
Pad Expand Helper
Pad Expand Helper
oshwhub-official2Pad Expand Helper (English UI pad-expand-helper)
Batch generate solder mask expansion geometry based on selected pads or components in the PCB editor: output as keep-out areas on electrical layers (to control copper pour/fill), or solder mask layer fill graphics only. Suitable for scenarios where you need to quickly place solder mask openings and process keep-out zones with a fixed expansion amount.
Feature Diagram

If the diagram does not exactly match the current interaction, refer to the "Usage Instructions" below.

Extension Identity
| Property | Value |
|---|---|
| name | pad-expand-helper |
| uuid | 23d6d62d80c44cc28c5c608ac3126f32 |
| displayName | 焊盘外扩助手 (first-level menu in locales/extensionJson/en.json is pad-expand-helper) |
| version | see extension.json |
| license | Apache-2.0 |
| categories | PCB |
| entry | ./dist/index (build output is dist/index.js) |
name uniqueness: The extension store requires that extensions with different uuids cannot use the same
name. If the submission review prompts a naming conflict, change thenameinextension.jsonto an unused name (lowercase letters, digits, and hyphens only, 5–30 characters), then rebuild and upload.
Feature Description
Generation Type (choose one of three)
In the settings window, select which rule type the result falls under:
| Type | Description |
|---|---|
| Keep-out Area (No Copper Pour, default) | Generates an area rule on the corresponding electrical layer to prohibit copper pour. |
| Keep-out Area (No Fill) | Same concept as above, targeting rule semantics that prohibit fill (use interchangeably with the copper pour option depending on the scenario). |
| Solder Mask Area (solder mask layer graphics only) | Keeps fill primitives only on the top/bottom solder mask layer, without converting to electrical layer keep-out areas. |
Expansion geometry is first constructed on the solder mask side, then converted to keep-out areas or retained as solder mask fill based on the selected type; round pads etc. will generate ring fills of outer ring minus inner ring (see changelog 1.0.2).
Workflow
- After opening the feature via the menu, an inline settings page (
iframe/index.html) pops up first: select the generation type, enter the expansion width (single-side width outward relative to the pad outline), and choose whether to enable continuous generation mode. If the inline page is unavailable, it falls back to the system native dialog flow. - Single generation: Processes the currently selected pads/component pads/components (expanding all pads) once and finishes.
- Continuous generation mode: After applying settings, you can click or box-select multiple times on the canvas to select pads/components; press Esc or right-click to exit; running the menu again will end the session and allow reconfiguration.
Selection and Layer Assignment
- Selection: You can directly select pads, component pads, or select components (automatically expanding and deduplicating all pads underneath); supports multi-select and mixed selection.
- Layer assignment: Top layer pads → top solder mask / corresponding electrical layer; bottom layer pads → bottom layer; cross-layer/multi-layer pads → corresponding primitives generated on both top and bottom sides. Special pads on inner layers with no corresponding solder mask/electrical mapping will be skipped with a notification.
Geometry and Units
- Shapes: Common pad outlines such as circles, rectangles, ovals, rounded tracks (stadium shapes), regular polygons, and complex polygons are all supported; expansion uses polyline fitting (no standalone arc primitives).
- Units: Reads the current canvas unit; input values are converted to PCB internal mil for generation; expansion has an upper limit (currently 2000 mil in source code, subject to the actual compiled constant).
Feedback and Exceptions
- Success or partial success will show a toast notification with the number of generated items; partially failed entries will list brief reasons (e.g., inner layer pad skipped, keep-out area conversion failed, etc.).
- No valid pads selected, running in a non-PCB environment, etc. will display a clear dialog or toast explanation.
Resources and Configuration (extension.json)
- logo:
./images/logo.png(square icon, recommended ≥500×500, PNG/JPEG). - banner:
./images/banner.jpg(extension store banner, aspect ratio 64:27, JPEG, see official documentation).
Usage Instructions
Environment Requirements
- JLCPCB EDA Professional Edition / EasyEDA Professional Edition, version must satisfy
engines.edainextension.json(currently^3.0.0).
Operation Steps
- Open a PCB design file.
- Single mode: First select the target(s) on the canvas (pads, component pads, or components).
- Find
焊盘外扩助手in the top menu bar →焊盘阻焊外扩…(in English:pad-expand-helper→pad-expand-helper: expand…; the inline settings page English title ispad-expand-helper: setup; subject to what the client displays). - Complete in the settings window: generation type, expansion width, and whether to use continuous generation.
- Continuous mode: After entering, repeatedly click/box-select on the canvas to generate; use Esc or right-click to exit continuous mode.
Menu Description
| Menu Item | Function |
|---|---|
| 焊盘外扩助手 / pad-expand-helper (first level; Latin name on English UI) | Group entry |
焊盘阻焊外扩… / pad-expand-helper: expand… | Open settings and execute generation (corresponds to extension.json submenu pad-expand-helper: expand...) |
| About... | Display current extension version number |
FAQ
- No valid objects selected (single mode): Please select at least one pad or a component containing pads first.
- Selected but contains no pads: A notification will indicate that the current selection does not contain pads.
- Cannot see the menu or feature not working: Please open the board in the PCB editor and try again; this extension registers entries in
home/sch/pcbetc., but the core logic targets PCB. - Settings window won't open: The inline frame API may fail due to version differences; try updating the client; if the issue persists, please include the version number in your feedback.
- Upload to store reports missing banner: Ensure
images/banner.jpgexists in the package andextension.json'simages.banneris./images/banner.jpg. You can usescripts/gen-banner.ps1locally to generate a placeholder banner before runningnpm run build.
Development and Build
npm install
npm run compile # generates dist/index.js
npm run lint
npm run build # compiles and packages .eext to build/dist
After the build completes, find pad-expand-helper_v<version>.eext in the build/dist directory (composed of extension.json's name and version, consistent with the extension store identifier; do not change just the filename in the packaging script for aesthetics while keeping an incorrect name). Install the extension package in the client.
Entry file: entry in extension.json is ./dist/index; before publishing, make sure to run npm run compile (or npm run build) to ensure dist/index.js exists and is consistent with the source code. The inline settings page is located in iframe/ and must also be included in the extension package.
API and License
- Development guide: https://prodocs.lceda.cn/cn/api/guide/
- API reference: https://prodocs.lceda.cn/cn/api/reference/pro-api.html
- License: Apache-2.0
更新日志
本文件记录 焊盘外扩助手(英文界面 pad-expand-helper;扩展标识 pad-expand-helper)的版本变更。
1.0.4
优化
- 完善多语言
1.0.3
修复
- 连续生成去重:移除跨次调用持久化的生成 key / 几何签名集合;去重仅在一次
processPads批处理内生效。删除已生成外扩图元后,可再次对同一焊盘生成(此前会因模块级Set永久跳过)。 - 同批几何签名去重:去掉对「展开多边形语义签名」的二次去重(仅保留
generationKey在同一批内的去重)。此前连续模式下,多焊盘或异层组合下易因签名碰撞误跳过;删除区域后再生成若与某条缓存几何同形也会误判。 - 内联设置窗:宿主
openIFrame高度 520→620,并收紧页边距、设定html/body溢出隐藏,在常见分辨率下避免多余纵向滚动条。 - 取消与监听:内联页点击「取消」写入
cancelled时,宿主立即stopInteractiveMode(),不再依赖仅靠探测窗体关闭才卸监听。 - 连续模式提示吐司:同一次内联设置会话内,连续模式说明吐司仅在首次进入监听时弹出一次;停止后再点「生成」不再重复弹出(会话重置后再次打开设置页会再提示一次)。
命名
- 中文名:插件与
extension.json的displayName为 焊盘外扩助手;英文菜单源串与英文界面展示名为pad-expand-helper(见locales/extensionJson/en.json及headerMenus源串)。 - 子菜单:
pad-expand-helper: expand...中文仍为 「焊盘阻焊外扩…」(动作描述)。
内联设置页交互
- 生成后不关窗:单次与连续模式均在点击「生成」并写入设置后保持设置窗口打开;关闭设置窗口 时结束会话并撤销 PCB 连续监听。
- 停止生成:连续模式下主按钮切换为「停止生成」,仅停止画布监听,不关窗;亦可 Esc / 右键退出(与设置窗通过存储 echo 同步按钮状态)。
- 宿主轮询:主进程在内联窗存活期间轮询扩展存储中的指令(
seq去重),处理「应用」「停止」与窗口关闭。
交互与稳定性
- 连续生成模式:修复点选/框选不生效的问题——鼠标选中事件与字符串
'selected'比较,避免EPCB_MouseEventType未定义导致的运行时错误。 - 选中与器件展开:
props支持嵌套数组;选中列表短时重试;器件焊盘优先getAllPinsByPrimitiveId,并回退toSync().getAllPins()。 - 防重入与队列:连续模式下处理中再次选中时保留最近一次事件参数,避免丢框选/点选信息;补跑队列与防重入逻辑优化。
- 无焊盘选中:当选中对象不包含焊盘时给出明确提示(非静默返回)。
生成与几何
- 输出类型:禁止区域(默认禁止铺铜 / 可选禁止填充)或阻焊区域(仅阻焊层填充图元)。
- 禁止区域收尾:
convertToRegion失败时尝试删除阻焊填充后再处理;阻焊填充流程中保证fill.done()。 - 异常条目:内层焊盘、无效特殊焊盘等跳过并汇总报错;部分成功时使用警告级吐司。
- 几何:外扩轮廓以折线拟合,无独立圆弧图元。
其它
- 菜单与国际化:
headerMenus一级菜单英文源串为pad-expand-helper(与locales/extensionJson键一致),中文为「焊盘外扩助手」;二级pad-expand-helper: expand...对应中文「焊盘阻焊外扩…」。设置页英文标题pad-expand-helper: setup(locales/en.jsonSolderMaskExpSetupTitle、内联页iframe/index.html)。 - 吐司:
showToastMessage的时长参数为 秒(勿误传毫秒);主流程成功/警告/错误提示使用统一自动关闭时长(当前常量约 6 秒)。 - 类型:优化
isCirclePadShape等类型守卫,消除联合类型相关 TypeScript 报错。 - 资源:扩展图标等资源更新;几何与 UI 辅助函数整理。
1.0.2
- 变更:更新 banner 图。
- 修复:圆形焊盘(椭圆外形且宽高相等)的禁止区域外环改为 圆形环(外圆减内圆),不再使用轴对齐矩形外环。
- 修复:禁止区域图元的 电气层 与焊盘一致(
TOP/BOTTOM/MULTI),不再误用阻焊层作为区域属性图层。
1.0.1
- 新增:生成流程中的参数确认与结果反馈能力(随版本迭代,界面以当前客户端为准)。
- 修复:生成图元位置偏移问题。
- 变更:阻焊层生成语义调整为 禁止区域外环(外扩区域减去焊盘区域)。
1.0.0
- 首发。

Type
Keyword
Extension Info
| Version | v1.0.4 |
| Author | EasyEDA |
| Published at | 2026-06-10 09:18:36 |
| Name | pad-expand-helper |
| UUID | 23d6d62d80c44cc28c5c608ac3126f32 |
| Works with | ^3.0.0 |
| Report | Report abuse |
Comment