Skip to main content
GerberFreeNewv1.0.0

Gerber/Excellon 解析换算

FS/MO 头、零省略、光圈表、D01/D02/D03 与边界解析,钻孔工具表与 G85 槽孔;unsupported 构造显式告警不静默丢失;附导入流程。

Installs: 0Rating: –Updated:
Claude CodeCursorCodexGemini CLI+4

Badges only claim the demo-run passed on that host; cross-host installation is handled by the adapter layer.

Preview gallery

You say
Parse this Gerber and Excellon: report layer bounds in mm, drill tool table and slot stats, and list unsupported constructs.

Content matches the files inside the package; extracted by the publish pipeline.

LCEDA Gerber 格式转换

离线可执行:Gerber X36/24 子集解析、Excellon 钻孔/槽孔解析、层号映射、 mm↔mil↔inch 换算。编辑器导入(图元重建)见 references/procedures.md。

运行

node scripts/demo.mjs --out-dir <dir> [--input <json>]

stdout 即 edaskills.report.v1 报告;产物 gerber-bounds.csv、 drill-tools.csv、conversion.json。

输入

{ "files": [{ "name": "top.gtl", "text": "%FSLAX36Y36*%..." }] }

规则(与源扩展核对)

  • 默认格式 2.4 / mm;%FSLAX36Y36*%、%MOIN*%/%MOMM*% 优先, 其次 G04 注释;inch ×25.4 → mm;mm ×39.3700787 → mil。
  • 零省略:L 左补零、T 右补零至 整数位+小数位。
  • 光圈 %ADDnn C/R/O/P;D≥10 选光圈,D01 画 / D02 移 / D03 闪。
  • Excellon:M48 头,METRIC→3.3、INCH→2.4;TnnC 直径; X1Y1G85X2Y2 槽孔(Altium/KiCad 两种写法同解析);M15/M16 铣边告警。
  • 层映射:.GTL→1、Drill_PTH→500 与源一致;其余层号为本文档约定 (PROVENANCE 注明)。
  • 子集边界(fail-loud):圆弧 G02/G03、宏 %AM、区域 G36/37、 负片 LPC、铣边 M15/M16 不重建几何,逐项 warning;圆弧仅取端点。 完整几何重建是编辑器绑定能力。
  • 错误:空文件、无法识别为 Gerber/Excellon、缺铜/外形/钻类别。

导出函数

parseGerber parseExcellon layerFromName convertFiles MM_TO_MIL IN_TO_MM

What you get

  • Gerber parsing (FS/MO, zero suppression, aperture table, D01/D02/D03, bounds)
  • Excellon drill tool tables and G85 slot parsing
  • Explicit unsupported-construct warnings plus mm/mil conversion tables

Good fit for

  • Quick layer-bound and drill-stat inspection after Gerber export
  • Data pre-checks for cross-EDA imports

Not for

  • Rendering Gerber images (parsing and statistics only)
  • Lossless conversion of every proprietary construct (explicit warnings instead)
Before you start

You provide

  • Gerber/Excellon text

Environment

  • node ≥ 20

Last tested

v1.0.0 · Claude Code, Cursor, Codex, Gemini CLI · Ran 2026/11/19

Dependencies

No dependencies
This skill works standalone.

Demo run

Passed with warnings0 errors · 1 warnings

node v24.19.0 · 2026/11/19

  • [warning] UNSUPPORTED_ARC (legacy-arc.gbl): legacy-arc.gbl: G02/G03 arc reduced to endpoint

FAQ

Ratings & reviews

Not rated0 ratings

5 star0
4 star0
3 star0
2 star0
1 star0

Sign in to rate this skill.

Sign in

Versions

  • v1.0.0Latest16.2 KB

    首发种子版本。

    License: MITSourceSHA-256: b73783289c4d25e2…

Related skills