← Commit history
README.md+153−13
@@ -1,17 +1,157 @@-# fusion-jlcpcb-export+# Fusion JLCPCB Export -Export the complete **JLCPCB** manufacturing package from a Fusion 360 Electronics board,-the **gerber ZIP**, the **BOM** (with the **LCSC part number** per part), and the **CPL**-pick-and-place, by asking your AI. Everything you need to upload to-[jlcpcb.com/smt-assembly](https://jlcpcb.com/smt-assembly) for a quote.+Get a board from Fusion 360 to a **JLCPCB quote** just by asking your AI. This skill exports the+**complete manufacturing package**, the gerber ZIP, the **BOM with LCSC part numbers**, and the+**CPL pick-and-place**, from an open Fusion Electronics design, and can drive JLCPCB's quote tool to+**render the board and price it**. No CAM dialogs, no hand-built spreadsheets, no folder hunting. -It works through the Adom Desktop Fusion bridge **without modifying it**: the skill ships-its own EAGLE ULP and runs it through the bridge's generic `fusion_electron_run` verb. It is-the reference example of **extending the Fusion bridge independently** (no fork, no pull-request). See `SKILL.md` for the step-by-step the AI follows.+Try it with a prompt like: -The LCSC numbers are not looked up; they are embedded on each component as a library-`LCSC` attribute at part-selection time, and the ULP reads them. The same works for-`MOUSER_PN` / `DIGIKEY_PN` / `MPN`.+```+Export the JLCPCB files for the board I have open in Fusion+``` -Credits: `jlcpcb_smta_exporter.ulp` (c) OXullo Intersecans, MIT.+```+Get me a JLCPCB quote for this board: gerbers, BOM, and pick-and-place,+then upload them to jlcpcb.com and show me the price+```++```+Export the BOM with the LCSC part numbers and the CPL for SMT assembly+```++Everything below is a **real export of a real 4-layer board** (a BQ25792 charger), captured end to end.++---++## It is also a worked example of extending the Fusion bridge with NO pull request++This skill does not change the Fusion bridge at all. It **ships its own EAGLE ULP** and runs it through+the bridge's generic [`fusion_electron_run`](https://wiki.adom.inc/adom/adom-desktop-fusion-bridge) verb.+That is the whole point: **anyone can extend the Fusion bridge independently**, bring a ULP (or any+EAGLE/Electron command), run it through `electron_run`, and ship it as a community skill. You do not fork+the bridge, you do not wait for a maintainer to merge a PR. This skill is the reference for that pattern,+and it is linked from the bridge's page via the **community breadcrumb** trail so others can find it.++---++## 1. Start from your board in Fusion++> **You:** "Open the BQ25792 charger board and show me the 2D layout"++![The board open in Fusion's Electronics 2D editor](screenshots/board.png)++The source is a normal Fusion 360 **Electronics** design, open in the **2D PCB editor**. The Fusion bridge+finds and opens it from your Autodesk cloud (`fusion_aps_open`) and switches to the board view+(`fusion_show_2d_board`). From here, one ask produces every file JLCPCB needs.++---++## 2. Gerbers + drill: the fab files++> **You:** "Export the gerbers for this board"++![What is inside the gerber ZIP](screenshots/gerber-zip.png)++`fusion_export_gerbers` runs the **bundled JLCPCB CAM job** (it auto-detects 2 vs 4 layers) and writes a+single ZIP. For this 4-layer board that is **13 files**: four copper layers, soldermask and silkscreen and+paste on both sides, the board outline, the Excellon drill file, and the `.gbrjob` metadata. You upload this+ZIP to JLCPCB exactly as it comes out, nothing to rename or repackage.++The gerbers are real and complete, here they are rendered straight from the exported files:++![The exported gerbers rendered to a board image](screenshots/board-render.png)++---++## 3. JLCPCB renders the board and prices it++> **You:** "Upload that gerber ZIP to JLCPCB and show me the quote"++![JLCPCB rendering the board from our gerbers, with the live quote](screenshots/jlcpcb-render.png)++This is JLCPCB's own quote tool rendering the board **from the ZIP we just exported**. It correctly detected+a **4-layer board, 26.4 x 50.4 mm**, picked FR-4, and calculated a live price with a **Save to Cart** button.+The AI drove this in a browser for you (see **Getting a quote** below). The gerbers are valid and+manufacturable, the proof is JLCPCB drawing the exact board, both sides, with no warnings.++---++## 4. The BOM, with the LCSC part number per component++> **You:** "Export the BOM with the JLCPCB part numbers"++![The exported BOM with LCSC part numbers](screenshots/bom.png)++The BOM comes out in JLCPCB's expected layout, `Comment, Designator, Footprint, LCSC Part #`. The key column+is **LCSC Part #** (C844898, C77020, C21190, ...). That number is **read straight off each component**, the+exporter does not guess or look anything up, so JLCPCB knows the exact part to place. Lines without an LCSC+number (bare connectors, jumpers) come through blank, ready for you to fill or leave as place-only.++---++## 5. The CPL pick-and-place++> **You:** "Export the pick-and-place file"++![The exported CPL pick-and-place](screenshots/cpl.png)++The CPL (Component Placement List) is `Designator, Mid X, Mid Y, Layer, Rotation`, the X/Y position, side, and+rotation of every placed part. This is what the assembler's machine reads to put each component down. Pair it+with the BOM and JLCPCB can quote **full SMT assembly**, not just the bare board.++---++## 6. Where the part numbers come from: component Attributes++> **You:** "How do I set the LCSC number so it shows up in the BOM?"++![Defining LCSC and JLC_ROTATION as component attributes](screenshots/attributes.png)++The magic in section 4 is set up **once, in Fusion**. JLCPCB needs to know which exact part goes on each+footprint and how it is rotated, so you add that as two component **attributes**:++- **`LCSC`** (required for assembly): the JLCPCB part number, e.g. `C2987638`. Find it in JLCPCB's parts+  library. The exporter reads this into the BOM's **LCSC Part #** column.+- **`JLC_ROTATION`** (only when needed): a rotation nudge in degrees for parts that land mis-oriented on the+  assembler. The exporter applies it in the CPL's **Rotation** column.++Set them by right-clicking a component in the 2D board (or in the library), opening **Properties**, and adding+the name/value pairs in the **Attributes** section. The same pattern gives you a **`MPN`**, **`MOUSER`**, or+**`DIGIKEY`** attribute, so the same board can quote at any house, not just JLCPCB. Set the attribute once in+your library and every board that uses the part inherits it.++---++## Getting a quote: three ways to drive JLCPCB, and the one we recommend++The export half above is the same no matter what. To actually **upload to jlcpcb.com and get a price**, there+are three paths. The AI picks the right one for your setup.++| Path | How it works | When |+| --- | --- | --- |+| **C. Native browser (recommended)** | The AI opens **your own Chrome/Edge** (`desktop_open_url`), where you are **already signed in to JLCPCB**, and drives the page with Adom Desktop's UIA verbs (`desktop_ui_*`) plus `desktop_click`/`desktop_type` for the file picker. Screenshots each step. | You want a real, signed-in quote you can push to checkout. **This is the default.** |+| **B. Anonymous (pup)** | The AI uploads the gerber ZIP into an anonymous cloud Chromium and JLCPCB renders + prices the **bare board** (no login needed). | Quick board-only price, or a render preview, with no sign-in. (This is how the render in section 3 was captured.) |+| **A. Browser extension** | Install [`adom-browser-extension`](https://wiki.adom.inc/adom/adom-browser-extension) for full CDP control of your real browser. | Only if you want deeper browser automation; **Path C already covers the quote flow via UIA, so this is usually unnecessary.** |++**Recommendation: Path C.** It uses the browser you already have logged in, so you get a genuine,+account-attached quote and can carry it straight to checkout, and Adom Desktop's UIA verbs drive the page+without stealing focus. You only need the browser extension (Path A) if you want browser automation beyond+this flow. The anonymous path (B) is perfect for a fast board-only price or a render check.++---++## Install++```+adompkg install adom/fusion-jlcpcb-export+```++This drops the skill plus its `jlcpcb_smta_exporter.ulp` into `~/.claude/skills/`. You also need the+[Adom Desktop Fusion 360 bridge](https://wiki.adom.inc/adom/adom-desktop-fusion-bridge) connected, with your+board open in Fusion's 2D Electronics editor.++## Credits++The BOM/CPL exporter is built on OXullo Intersecans' MIT-licensed `jlcpcb_smta_exporter.ulp`. The gerber CAM+job and `fusion_electron_run` come from the Adom Desktop Fusion bridge.
SKILL.md+57−4
@@ -14,6 +14,11 @@ This skill ships its own EAGLE ULP and runs it through the Fusion bridge's gener **extending the Fusion bridge independently** (no fork, no pull request): bring a ULP, run it through `electron_run`. +Triggers (the kind of thing the user says):+- "export the jlcpcb files for this board"+- "get me a jlcpcb quote: gerbers, bom, and pick-and-place, then upload to jlcpcb.com"+- "export the bom with the lcsc part numbers and the cpl"+ ![The board in Fusion's PCB editor](screenshots/board.png)  ## Prerequisite@@ -60,18 +65,66 @@ adom-desktop pull_file '{"filePaths":["C:/tmp/jlc/<board>_bom.csv","C:/tmp/jlc/<  ### 3. The complete package -Zip the gerber ZIP + the BOM + the CPL. That is exactly what you upload to-**jlcpcb.com/smt-assembly** to get a quote. The AI can stop here, the user uploads the-zip; this skill produces the files, it does not place the order.+The gerber ZIP + the BOM + the CPL are everything JLCPCB needs. Next, get the quote.++## Getting the quote (drive jlcpcb.com)++Three pathways. **Default to Path C** (the user's signed-in browser). Use Path B for a fast,+no-login board render or price check. Remember the user's preferred path once they pick one.++### Path C, RECOMMENDED: the user's native browser (signed in, can checkout)++The user is already logged in to JLCPCB in their daily browser, so use it, no credentials change hands.++```bash+# open the quote tool in the user's own browser+adom-desktop desktop_open_url '{"url":"https://cart.jlcpcb.com/quote","browser":"default"}'+# drive the page with UIA (no focus steal): find the upload control + advance the flow+adom-desktop desktop_find_control '{"nameContains":"Add gerber"}'   # then desktop_ui_click+# the file picker is a NATIVE OS dialog, only SendInput reaches it:+adom-desktop desktop_type '{"text":"C:/tmp/jlc/<board>_gerbers.zip"}'   # then desktop_click Open+adom-desktop desktop_screenshot_window '{"hwnd":<browser hwnd>}'        # screenshot each step+```++Step through: upload gerbers, let JLCPCB render, enable **PCB Assembly**, upload the **BOM** then the+**CPL**, confirm parts placement, read the price. Screenshot every step.++### Path B: anonymous cloud browser (pup), no login, board-only++Great for a quick render/price with zero disruption. JLCPCB renders gerbers without an account. The pup+browser is sandboxed from the local file input, so inject the ZIP bytes and set the input directly:++```bash+adom-desktop browser_open_window '{"sessionId":"jlc","url":"https://cart.jlcpcb.com/quote"}'+# base64 the ZIP and stream it into the page in <40k chunks (CLI arg-size limit):+#   (window.__gb += "<chunk>", window.__gb.length)   # comma-op = single expression+# then decode to a File and set the file input via DataTransfer:+adom-desktop browser_eval '{"sessionId":"jlc","expr":"(function(){var b=atob(window.__gb),u=new Uint8Array(b.length);for(var i=0;i<b.length;i++)u[i]=b.charCodeAt(i);var f=new File([u],\"board_gerbers.zip\",{type:\"application/zip\"});var inp=document.querySelector(\"input[type=file]\");var dt=new DataTransfer();dt.items.add(f);inp.files=dt.files;inp.dispatchEvent(new Event(\"change\",{bubbles:true}));return inp.files[0].name})()"}'+adom-desktop browser_screenshot '{"sessionId":"jlc"}'   # JLCPCB renders the board + price+```++This is exactly how the render in the wiki page was captured: JLCPCB detected the 4-layer board, its+dimensions, and priced it, all anonymously.++### Path A: browser extension++Only if the user wants deeper browser automation than UIA gives. Install+`adom-browser-extension` for full CDP control of their real browser. Path C already covers the quote+flow, so this is usually unnecessary, do not push it.  ## Why the LCSC numbers are already there (no lookup)  The part number is **not** looked up after the fact. A good engineer embeds the distributor part number on the component **in the library, at part-selection time**, as an **attribute**. Open any component's Properties in the 2D board and you will see an-`Attributes` section with `LCSC` (e.g. `C2861705`), alongside `DESC` and `JLC_ROTATION`.+`Attributes` section with `LCSC` (e.g. `C2987638`), alongside `DESC` and `JLC_ROTATION`. That attribute rides through the schematic and board, and the ULP reads it per part. +![Defining LCSC and JLC_ROTATION as component attributes](screenshots/attributes.png)++`JLC_ROTATION` (degrees) only matters for parts that land mis-oriented on the assembler; the ULP+applies it to the CPL `Rotation` column. Add it per part as needed.+ The same mechanism is general: a component can equally carry `MOUSER_PN`, `DIGIKEY_PN`, `MPN`, or `MANUFACTURER` attributes. Set the attributes for whatever distributor you order from, and the BOM carries them. Connectors / jumpers / through-hole parts that are not
package.json+2−6
@@ -4,7 +4,7 @@   "type": "skill",   "title": "Fusion JLCPCB Export",   "brief": "Export the complete JLCPCB manufacturing package (gerbers + BOM with LCSC + CPL) from a Fusion board, by asking your AI.",-  "version": "1.0.0",+  "version": "1.1.0",   "description": "Export everything JLCPCB needs to quote and assemble a board, gerber ZIP plus the BOM (with the LCSC part numbers) and the CPL pick-and-place, straight from a Fusion 360 Electronics design via the Adom Desktop Fusion bridge. Ships its own EAGLE ULP and runs it through the bridge's generic electron_run, a working example of extending the Fusion bridge independently (no fork, no pull request).",   "org": "adom",   "dependencies": {},@@ -23,9 +23,5 @@     "export the bom with part numbers"   ],   "scripts": { "install": "./install.sh", "uninstall": "./uninstall.sh" },-  "hero": {-    "headline": "Fusion to JLCPCB, in one ask",-    "subhead": "Gerbers + BOM (with LCSC) + CPL, ready to quote",-    "screenshot": "docs/shot.png"-  }+  "hero": { "type": "image", "path": "screenshots/hero.png" } }
page.json+3−5
@@ -4,7 +4,7 @@   "type": "skill",   "title": "Fusion JLCPCB Export",   "brief": "Export the complete JLCPCB manufacturing package (gerbers + BOM with LCSC + CPL) from a Fusion board, by asking your AI.",-  "version": "1.0.0",+  "version": "1.1.0",   "description": "Export everything JLCPCB needs to quote and assemble a board, gerber ZIP plus the BOM (with the LCSC part numbers) and the CPL pick-and-place, straight from a Fusion 360 Electronics design via the Adom Desktop Fusion bridge. Ships its own EAGLE ULP and runs it through the bridge's generic electron_run, a working example of extending the Fusion bridge independently (no fork, no pull request).",   "org": "adom",   "dependencies": {},@@ -36,10 +36,8 @@     "uninstall": "./uninstall.sh"   },   "hero": {-    "type": "billboard",-    "headline": "Fusion to JLCPCB, in one ask",-    "subhead": "Gerbers + BOM (with LCSC) + CPL, ready to quote",-    "screenshot": "docs/shot.png"+    "type": "image",+    "path": "screenshots/hero.png"   },   "author": {     "name": "John Lauer",
screenshots/attributes.pngadded
⋯ 1 unchanged line ⋯
screenshots/board-render.pngadded
⋯ 1 unchanged line ⋯
screenshots/gerber-zip.pngadded
⋯ 1 unchanged line ⋯
screenshots/hero.pngadded
⋯ 1 unchanged line ⋯
screenshots/jlcpcb-render.pngadded
⋯ 1 unchanged line ⋯