skill
fusion-export-molecule
Public Made by Adomby adom
Ship a Fusion 360 Electronics design to the Adom wiki as a molecule: bridge-driven export (BRD/SCH/F3D/STEP/USDZ, Gerbers and drill), <slug>-fab.zip and export.json, a sources-only publish through molecule-publish (the wiki's model registry builds the GLB, footprint and symbol), and adom-wiki model import into Hydrogen.
← Commit history
SKILL.md+20−75@@ -183,81 +183,26 @@ After saving, exports may produce stale files. Workaround: 3. Switch to board view if needed: `adom-desktop fusion_electron_run '{"command":"EDIT .brd"}'` 4. Run the export steps above -## After Export — Convert (OCCT molecule mode, recommended)--For a **molecule** (board with MP1-MP4 markers + machine pins), convert through-the OCCT molecule pipeline BEFORE publishing, so the package carries the-anchored GLB + footprint + symbol and downstream imports regenerate nothing:--```bash-curl -s -X POST "https://step2glb-gmdoncpxdwx0.adom.cloud/convert?molecule=true&pin=medium" \- -H "X-Client: <agent-name>" -H "X-Job-Name: <name>" \- -F "step=@<name>.step" -F "board=@<name>.brd" \- # optional: -F "silk_top=@silk_top.png" -F "silk_bottom=@silk_bottom.png"-```--Poll `GET /jobs/{id}` until complete and **verify before proceeding**:-`anchored: true`, `footprint_applied: true`, sane `contact_z`, empty-`warnings[]`. Then download `/jobs/{id}/result` → `<name>.glb`,-`/jobs/{id}/footprint` → `<name>_footprint.json`, `/jobs/{id}/symbol` →-`<name>_symbol.json`, and include all three in the package below. (Plain-chips/PCBs without markers: skip this — the publish-time auto-conversion-below is enough.)--## After Convert — Publish--Once all files are staged, **ask the user** whether they want to publish. Two destinations:--### Publish to the Adom Wiki — `adom-wiki pkg publish` (canonical; the wiki is wiki.adom.inc)--The wiki is the source of truth. A molecule is a **wiki `component` package**: a directory-with a `package.json` + the exported source files. `adom-wiki pkg publish` **auto-converts STEP→GLB**-(live step2glb service), runs the pre-publish lint, generates the page, and creates a release.-(The old `adom-wiki page publish` / `asset upload` CLI targeted **wiki-v1** and is retired — do-not use it for the new wiki.)--**1. Stage the package dir** — the pulled export files + a `package.json`. **Do NOT include a-`page.json`** (the server generates a correct one; a stale/foreign one silently overrides-ownership — see gotchas):--```bash-cd /tmp/export/<name> # holds <name>.step/.f3d/.fbrd/.fsch/.usdz, *_gerbers.zip, bom.csv, cpl.csv, board PNGs, README.md-cat > package.json <<'JSON'-{- "slug": "<molecule-slug>",- "version": "1.0.0",- "type": "component",- "description": "<at least 20 chars describing the molecule>",- "tags": ["molecule", "<org-or-family>", "<function>"],- "dependencies": {},- "license": "MIT",- "component": { "mpn": "<name>", "manufacturer": "", "category": "other" }-}-JSON-```--**2. Publish** (owner = your account, or an org you belong to via `--org`). This is where STEP→GLB runs:--```bash-adom-wiki pkg publish --org <org>-# → "Converting <name>.step → <name>.glb via step2glb..." then "Published <org>/<slug>@<version>"-```--**3. Set visibility explicitly** (the `--public`/`--private` flag is only honored on first publish):--```bash-adom-wiki page visibility <owner>/<slug> --preset open # or: private-```--**Gotchas (hard-won):**-- **Include a `.step`** — that's what triggers GLB generation; without it the 3D viewer is blank. (`has_3d_model` / `model_3d_path` get set automatically once the `.glb` is produced.)-- **Never push a stale/foreign `page.json`.** On the new wiki it's authoritative for `org_id`/`author`/`visibility`/`version` and **overrides `--org`/`--private` on reindex** (only `owner` is protected). Omit it. If a page's org binding drifts, repair it:- ```bash- curl -X POST https://wiki.adom.inc/api/v1/pages/<slug>/transfer -H "Authorization: Bearer $(cat /var/run/adom/api-key)" -H "Content-Type: application/json" -d '{"org":"<org>"}'- ```-- **Ownership ≠ visibility.** `--org X` makes any member of org **X** an editor (regardless of public/private); `public` just means anyone can *view*. To make a molecule editable by a team, publish/transfer under their org.-- Lint warns "no `.kicad_sym`/`.kicad_mod`" for Fusion designs — expected, non-blocking.-- Manage/delete: `adom-wiki pkg info <owner>/<slug>`, `adom-wiki repo delete <owner>/<slug>` (soft, reversible via `adom-wiki repo undelete`).+## After Export — Hand off to molecule-publish++For a **molecule** (board with MP1-MP4 markers + machine pins), conversion,+packaging, and wiki publish are the **`molecule-publish`** skill's job+(EDA-agnostic; shared with the KiCad and Altium flows). Hand it the bundle:++- `<name>.step` + `<name>.brd` (board) + `<name>.sch` (schematic) + silk PNGs+- extras worth carrying: `<name>.f3d` (irreplaceable native archive),+ `<name>.usdz`, Kitchen Sink outputs (gerbers/BOM/CPL)+- `pin` size (medium|large) and the target slug/org++It runs the OCCT molecule-mode conversion with stats gates (`anchored`,+`footprint_applied`, `contact_z`, `warnings[]`), assembles the component+package, publishes via `adom-wiki`, and verifies `model_3d_path`. Do not+re-implement any of that here. **Never use Fusion's own GLB export for+molecules** — the only GLB in a molecule package is OCCT's.++(Plain chips/PCBs without markers: `molecule-publish` degrades gracefully —+or publish directly with just the STEP and let the wiki's plain conversion+make a viewer GLB.) ### Publish to Hydrogen (live project use)
package.json+3−2@@ -1,6 +1,6 @@ { "slug": "fusion-export-molecule",- "version": "1.1.0",+ "version": "1.2.0", "type": "skill", "description": "Export a Fusion 360 Electronics design as an Adom molecule \u2014 orchestrates AdomBridge primitives to produce the BRD, SCH, F3D, STEP, USDZ, and silkscreen PNG source bundle the molecule pipeline (wiki, OCCT, Hydrogen) consumes. Successor to fusion-export-for-hydrogen.", "tags": [@@ -11,7 +11,8 @@ "skill" ], "dependencies": {- "adom/adom-desktop": "^1.9.0"+ "adom/adom-desktop": "^1.9.0",+ "adom/molecule-publish": "^1.0.0" }, "scripts": { "install": "./install.sh",
page.json+26−3@@ -1,5 +1,6 @@ { "hero": {+ "type": "billboard", "headline": "Fusion design to molecule bundle", "subhead": "BRD, SCH, STEP, USDZ, and silkscreen in one orchestrated export", "screenshot": "docs/shot.png"@@ -15,8 +16,7 @@ "export gerbers bom cpl", "fusion export all files", "export usdz",- "export step from fusion",- "ship fusion board as molecule"+ "export step from fusion" ], "discovery_pitch": "Export a Fusion 360 Electronics design as the complete Adom molecule source bundle (BRD, SCH, F3D, STEP, USDZ, silkscreen PNGs) by driving adom-desktop bridge verbs from the container.", "sample_prompts": [@@ -34,5 +34,28 @@ } ], "brief": "Ship a Fusion 360 Electronics design to the Adom wiki as a molecule: bridge-driven export (BRD/SCH/F3D/STEP/USDZ/silk), OCCT molecule conversion (anchored GLB + footprint + symbol), component publish, and adom-molecule-import handoff to Hydrogen.",- "description": "Ship a Fusion 360 Electronics design to the Adom wiki as a molecule: bridge-driven export (BRD/SCH/F3D/STEP/USDZ/silk), OCCT molecule conversion (anchored GLB + footprint + symbol), component publish, and adom-molecule-import handoff to Hydrogen."+ "description": "Export a Fusion 360 Electronics design as an Adom molecule — orchestrates AdomBridge primitives to produce the BRD, SCH, F3D, STEP, USDZ, and silkscreen PNG source bundle the molecule pipeline (wiki, OCCT, Hydrogen) consumes. Successor to fusion-export-for-hydrogen.",+ "slug": "fusion-export-molecule",+ "version": "1.2.0",+ "type": "skill",+ "tags": [+ "molecule",+ "fusion360",+ "export",+ "hydrogen",+ "skill"+ ],+ "dependencies": {+ "adom/adom-desktop": "^1.9.0",+ "adom/molecule-publish": "^1.0.0"+ },+ "scripts": {+ "install": "./install.sh",+ "uninstall": "./uninstall.sh"+ },+ "org": "adom",+ "author": {+ "name": "Drew Owens",+ "email": "[email protected]"+ } }