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
Preserve source for fusion-export-molecule-2.0.0
5 files changed
+229−140
README.md+23−19@@ -1,28 +1,29 @@ # fusion-export-molecule -Every molecule export includes `<slug>-fab.zip` (both sides' fabrication layers and drill) and `export.json` (producer versions and source hashes). The exporter hands both to molecule-publish, which checks them before and after the page push. See [SKILL.md](SKILL.md) for the tool-specific steps.+Every molecule export includes `<slug>-fab.zip` (both sides' fabrication layers and drill) and `export.json` (producer versions and source hashes). The exporter hands both, with the STEP, board and schematic, to molecule-publish. The wiki's 3D model registry builds the molecule's GLB, footprint and symbol from those sources; nothing generated is pushed. See [SKILL.md](SKILL.md) for the tool-specific steps. -Export a Fusion 360 Electronics design as an **Adom molecule** — the source-bundle the molecule pipeline (wiki → OCCT → Hydrogen viewer) consumes — by-orchestrating `adom-desktop` AdomBridge primitives from the container. No-custom add-in buttons required; every step is a standard bridge verb.+Export a Fusion 360 Electronics design as an **Adom molecule**: the source+bundle molecule-publish publishes and the wiki's model registry builds from,+made by orchestrating `adom-bridge` primitives from the container. No custom+add-in buttons required; every step is a standard bridge verb. This page is the successor to `fusion-export-for-hydrogen`: same skill, renamed from its destination ("for Hydrogen") to its artifact ("molecule"),-matching the rest of the molecule-centric tooling (`adom-molecule`,-`kicad-to-molecule`, molecule-metadata). All the original trigger phrases-still work, including "export for hydrogen".+matching the rest of the molecule-centric tooling (`kicad-to-molecule`,+molecule-metadata). All the original trigger phrases still work, including+"export for hydrogen". ## What it produces | Artifact | Purpose | |----------|---------|-| `.brd` / `.sch` | EAGLE-format board + schematic (footprint/symbol source) |+| `.brd` / `.sch` | EAGLE-format board + schematic (the registry reads the board for the footprint and symbol) | | `.f3d` | Fusion archive |-| `.step` | 3D model — OCCT converts to the anchored, gold-material GLB |+| `<slug>.step` | 3D source; the registry builds the anchored, gold-material GLB from it and the board | | `.usdz` | AR / Hydrogen 3D model |-| silkscreen PNGs | top + bottom overlays for the GLB |-| Kitchen Sink extras | Gerbers, BOM, CPL for manufacturing |+| `<slug>-fab.zip` | required Gerbers and drill, packed in the container |+| `export.json` | required record of producer versions and source hashes |+| Kitchen Sink extras | BOM, CPL for manufacturing | ## Install @@ -30,17 +31,20 @@ still work, including "export for hydrogen". adom-wiki pkg install adom/fusion-export-molecule ``` -Installs the skill into `~/.claude/skills/` and pulls `adom/adom-desktop`-(the bridge CLI the skill drives) as a dependency.+Installs the skill into `~/.claude/skills/` and pulls `adom/molecule-publish`+and `adom/adom-bridge` (the bridge CLI the skill drives) as dependencies. ## Requirements -- `adom-desktop` connected (`adom-desktop ping`)+- `adom-bridge` connected (`adom-bridge ping`) - Fusion 360 running on the desktop with the design available+- `adom-wiki` 1.8.0 or newer in the container (it also runs the Hydrogen+ import, `adom-wiki model import`) ## Related -- `adom/adom-desktop` — the bridge CLI this skill orchestrates-- `adom/adom-molecule` — create/import molecules from the exported bundle-- `adom/fusion-export-for-hydrogen` — the predecessor page this one replaces-- `kicad-export-molecule` — planned KiCad sibling producing the same bundle+- `adom/adom-bridge`: the bridge CLI this skill orchestrates+- `adom/molecule-publish`: publishes the sources and follows the registry's build+- `adom/adom-wiki-cli`: `adom-wiki model import` imports the built molecule into Hydrogen+- `adom/fusion-export-for-hydrogen`: the predecessor page this one replaces+- `kicad-export-molecule`: the KiCad sibling producing the same bundle
SKILL.md+183−101@@ -1,11 +1,16 @@ --- name: fusion-export-molecule-description: Export a Fusion 360 Electronics design as an Adom molecule — orchestrates existing AdomBridge primitives to produce BRD, SCH, F3D, STEP, USDZ, and silkscreen PNGs (the molecule source bundle). Also covers Kitchen Sink export (adds Gerbers, BOM, CPL). Use when the user says "export molecule", "fusion export molecule", "export for hydrogen", "hydrogen export", "export kitchen sink", "fusion export", "export brd sch f3d", "export gerbers bom cpl", "fusion export all files", "export usdz", or "export step". For a KiCad design, see kicad-export-molecule.+description: Export a Fusion 360 Electronics design as an Adom molecule. Orchestrates existing Adom Bridge primitives to produce the molecule source bundle (BRD, SCH, F3D, STEP, USDZ, plus the required <slug>-fab.zip and export.json from the Gerber and drill export) and hands it to molecule-publish; the wiki's 3D model registry builds the GLB, footprint and symbol from the sources. Also covers Kitchen Sink export (adds BOM, CPL). Use when the user says "export molecule", "fusion export molecule", "export for hydrogen", "hydrogen export", "export kitchen sink", "fusion export", "export brd sch f3d", "export gerbers bom cpl", "fusion export all files", "export usdz", or "export step". For a KiCad design, see kicad-export-molecule. --- # Fusion Export for Molecule -Export a Fusion 360 Electronics design as an Adom molecule — the STEP + board + silkscreen bundle the wiki/OCCT pipeline and the Hydrogen viewer consume — by orchestrating AdomBridge CLI primitives from the container.+Export a Fusion 360 Electronics design as an Adom molecule: the source bundle+(STEP, board, schematic, `<slug>-fab.zip`, `export.json`) that molecule-publish+publishes and the wiki's 3D model registry builds from, by orchestrating+Adom Bridge CLI primitives from the container. Molecule pages publish sources+only: the registry builds the GLB, the footprint JSON and the symbol JSON,+and it refuses a push of those generated files to a molecule page. **Prerequisite:** Adom Bridge must be connected (`adom-bridge ping`) and Fusion must be running with the design open. @@ -18,9 +23,32 @@ Export a Fusion 360 Electronics design as an Adom molecule — the STEP + board - **Verify**: rescan clean, the part's bounding box and colours unchanged, and a before/after render. - Real manufacturer markings (the maker's logo, MPN or date code etched on the part) are not EasyEDA logos; keep those. +## Before any registry step (container)++```bash+v=$(adom-wiki --version 2>/dev/null | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | head -n1)+if [ -z "$v" ] || [ "$(printf '%s\n' 1.8.0 "$v" | sort -V | head -n1)" != 1.8.0 ]; then+ echo "This skill needs adom-wiki 1.8.0 or newer (found ${v:-none}). Run: adom-wiki self-update"; exit 1+fi+adom-wiki pkg list --json | python3 -c '+import json, sys+d = json.load(sys.stdin); d = d.get("data", d)+have = {p["name"]: p.get("version") or "" for p in d.get("packages", [])}+need = {"adom/molecule-publish": "3.0.0"}+key = lambda v: tuple(int(x) for x in v.split("-")[0].split(".")[:3]) if v else (0,)+bad = [n for n in need if key(have.get(n, "")) < key(need[n])]+for n in bad: print(f"Update {n} to {need[n]}: adom-wiki pkg install {n}")+sys.exit(1 if bad else 0)'+```++Stop on either message. Any later `adom-wiki model ...` command that answers+that `model` is not a command (`'model' is not an adom-wiki command`,+`unknown command 'model'`, or hint code `UNKNOWN_COMMAND`) means the CLI is+older than 1.8.0: print the same adom-wiki message and stop.+ ## Architecture -The export is **orchestrated from the container** using existing `adom-bridge fusion_*` primitives. No custom add-in commands or HelperJoe buttons are needed — each step calls a standard AdomBridge verb.+The export is **orchestrated from the container** using existing `adom-bridge fusion_*` primitives. No custom add-in commands or HelperJoe buttons are needed: each step calls a standard Adom Bridge verb, and the packing runs in the container. ``` Container (skill orchestration)@@ -31,16 +59,16 @@ Container (skill orchestration) ├── fusion_export_f3d → Fusion archive ├── fusion_export_step → STEP 3D model ├── fusion_export_usdz → AR/Hydrogen 3D model- ├── fusion_export_optimized_glb → silk PNGs (top + bottom), OCCT molecule GLB,- │ .brd, footprint/symbol JSON, publish gates- └── pull_file → copy all files to container+ ├── fusion_export_gerbers → Gerber + drill zip (back in the PCB Editor)+ ├── pull_file → copy all files to container+ └── (container) fab_bundle.py → <slug>-fab.zip + export.json; pin_names.py check ``` -## Export the molecule — Step by Step+## Export the molecule: Step by Step ### Step 0: Open the board + verify state -**Open the `.fbrd` board file DIRECTLY — never the bare name or the `.fprj`.** A Fusion+**Open the `.fbrd` board file DIRECTLY, never the bare name or the `.fprj`.** A Fusion electronics file that links to multiple designs (most "FRAME MOL" boards) pops a native **"Select Electronics Design File" picker** when you open the project/bare name. That picker is a **CEF/Chromium modal that cannot be driven headlessly** (keyboard doesn't reach its list;@@ -59,8 +87,8 @@ adom-bridge fusion_get_app_state '{}' Ensure: Fusion running, `activeWorkspace` is `PCB Editor`, `isElectronics: true`. If a "Select Electronics Design File" dialog DID appear (e.g. a `.fbrd` that itself links to-multiple designs), it can't be resolved headlessly today — pick on the desktop, or fall back to-CDP into the CEF dialog. `fusion_window_info` / the bridge's `blockingDialogs` will name it.+multiple designs), it can't be resolved headlessly today: pick on the desktop, or fall back to+CDP into the CEF dialog. `fusion_state` (its `dialogs[]`) will name it. If already open but not in PCB Editor: ```bash@@ -108,72 +136,93 @@ adom-bridge fusion_export_f3d '{"outputPath":"C:/tmp/export/<name>.f3d"}' ### Step 5: Export STEP ```bash-adom-bridge fusion_export_step '{"outputPath":"C:/tmp/export/<name>.step"}'+adom-bridge fusion_export_step '{"outputPath":"C:/tmp/export/<slug>.step"}' ``` +`<slug>` is the wiki page slug: lowercase words separated by hyphens. The+STEP is named after it because the registry's recipe tries `<slug>.step`+first, so a STEP an earlier export left at the page root under another name+cannot make the choice ambiguous.+ ### Step 6: Export USDZ ```bash adom-bridge fusion_export_usdz '{"outputPath":"C:/tmp/export/<name>.usdz"}' ``` -### Step 7: Silkscreen PNGs (and the OCCT molecule GLB)+### Step 7: Fabrication sources (required for every molecule) -There is no standalone silkscreen verb: `fusion_take_silkscreen_screenshot` is internal to the-bridge and answers Unknown command. The silk capture runs inside `fusion_export_optimized_glb`,-which writes `<name>_silk_top.png` and `<name>_silk_bottom.png` beside its output, then sends-them with the STEP (and, from the fusion-bridge release after 1.11.39, the `.brd`) to the OCCT-molecule converter:+**7a. Gerbers and drill, on the desktop.** Use a fresh folder and the same saved design: ```bash-adom-bridge fusion_export_optimized_glb '{"outputPath":"C:/tmp/export/<name>.glb","async":true}'-# poll until done:-adom-bridge fusion_fetch_optimized_glb '{"exportId":"<exportId from the reply>"}'+adom-bridge fusion_electron_run '{"command":"EDIT .brd"}'+adom-bridge fusion_export_gerbers '{"outputDir":"C:/tmp/export/fab"}' ``` -Besides the silk PNGs, this leaves `<name>.glb` (OCCT molecule mode) and its STEP in the folder.-On a bridge with board support (adom/fusion-bridge PR #17) it also writes `<name>.brd`,-`<name>_footprint.json`, `<name>_symbol.json`, `<name>-fab.zip` (Gerber + drill from the-bridge's own CAM job, on every export) and `export.json` (Fusion version, every source file-with its sha256 and role, the stackup), and the reply carries `gates` (footprintApplied,-footprintPins, pinSize, warnings). Push the fab zip and export.json with the other sources:-board-look builds the board from them. If those gates pass, `molecule-publish` can reuse the GLB and JSON instead of-converting again.+Use `zipPath` from the response (`data.zipPath`, a `<board>_gerbers.zip`);+the argument is `outputDir`, not `outputPath`. The bundled CAM job exports+both sides' copper, mask and silk, outline and mixed Excellon drill. Verify+every layer and the drill before continuing. -### Step 8: Fabrication sources (required for every molecule)--Use a fresh export folder. A released bridge without PR #17's fab/record-support still exports the files through the existing manufacturing verb:+**7b. Pull to the container.** Pull the sources into a **fresh** folder that+holds nothing else (never a clone or `repo pull` of the page: old generated+files would ride along), and the Gerber zip into a second one: ```bash-adom-bridge fusion_electron_run '{"command":"EDIT .brd"}'-adom-bridge fusion_export_gerbers '{"outputDir":"C:/tmp/export/fab"}'+adom-bridge pull_file '{"filePaths":["C:/tmp/export/<name>.brd","C:/tmp/export/<name>.sch","C:/tmp/export/<name>.f3d","C:/tmp/export/<slug>.step","C:/tmp/export/<name>.usdz"],"saveTo":"/tmp/<slug>-bundle"}'+adom-bridge pull_file '{"filePaths":["<zipPath from 7a>"],"saveTo":"/tmp/<slug>-gerbers"}' ``` -Use `zipPath` from the response; the argument is `outputDir`, not `outputPath`.-The bundled CAM job exports both sides' copper, mask and silk, outline and-mixed Excellon drill. Verify every layer and the drill before continuing.-Keep the current silk PNGs while the converter uses them.+Add `bom.csv` and `cpl.csv` to the first pull when the Kitchen Sink outputs+were exported (below). -With the `molecule-publish` package's `scripts/fab_bundle.py`, pack that zip-as `<slug>-fab.zip` in the final bundle and write `export.json`. Follow its-`docs/fabrication.md`: record the Fusion version from the Gerber job file,-the actual bridge/exporter version, STEP, BRD, SCH, F3D, USDZ, silk PNGs and-any BOM/CPL exported. Record known stackup fields from the job; unknown-colours and finish stay absent. Mixed drill files remain labelled mixed.+**7c. Pack and check in the container**, with the `molecule-publish`+package's `scripts/fab_bundle.py` (installed under+`~/.claude/skills/molecule-publish/scripts`). Follow its+`docs/fabrication.md`: take `--tool` and `--tool-version` from the Gerber job+file's `GenerationSoftware`, record this skill's version, and pass every+source pulled in 7b: -If PR #17 already produced a record, check it and complete the handoff against-the final set of sources; that verb alone does not record the separate SCH,-F3D and USDZ exports. Use the page slug for the zip name. Run-`fab_bundle.py check <bundle-dir> --slug <slug>` after naming and packaging.-A missing or stale fabrication set stops publishing.+```bash+S=~/.claude/skills/molecule-publish/scripts+python3 $S/fab_bundle.py create /tmp/<slug>-bundle --slug <slug> \+ --fab /tmp/<slug>-gerbers/<board>_gerbers.zip \+ --tool <Application> --tool-version <Version> \+ --exporter adom/fusion-export-molecule --exporter-version 2.0.0 \+ --source step=<slug>.step --source board_eagle_brd=<name>.brd \+ --source schematic=<name>.sch --source fusion_archive=<name>.f3d \+ --source usdz=<name>.usdz+python3 $S/fab_bundle.py check /tmp/<slug>-bundle --slug <slug>+``` -### Step 9: Pull files to container+Add `--source bom=bom.csv --source cpl=cpl.csv` when those were exported, and+`--stackup <file>` with the stackup fields the job records (unknown colours+and finish stay absent). `create` writes `<slug>-fab.zip` (named with the+page slug) and `export.json` into the bundle folder, and drops the job+file's `Owner` field, where Fusion writes the account's name and email.+Mixed drill files remain labelled mixed. A missing or stale fabrication set+stops publishing.++### Step 8: Pin-name preflight ```bash-adom-bridge pull_file '{"filePaths":["C:/tmp/export/<name>.brd","C:/tmp/export/<name>.sch","C:/tmp/export/<name>.f3d","C:/tmp/export/<name>.step","C:/tmp/export/<name>.usdz","C:/tmp/export/<name>_silk_top.png","C:/tmp/export/<name>_silk_bottom.png","C:/tmp/export/<slug>-fab.zip","C:/tmp/export/export.json"],"saveTo":"/tmp/export"}'+python3 ~/.claude/skills/molecule-publish/scripts/pin_names.py check /tmp/<slug>-bundle --slug <slug> ``` +This is the registry's own pin-name rule, run on the `.brd` the build will+read. Exit 0 passes (warnings and notes are printed and accepted), 1 means a+check refuses, 2 means the folder has no board or more than one at the same+depth. It refuses machine pins numbered outside `MP1` to `MP4` or not in+capitals (`pin-names`), a board without two or four machine pins+(`pin-count`), machine pins of different sizes or lengths (`pins-uniform`),+contacts named `MP<n>` or not in capitals (`contact-names`), and repeated+designators. Older Fusion boards number their contacts `MP<n>` on+`CONTACT_MED`; those are refused now: rename the contacts `MC1`, `MC2`, ...+in the board and the schematic. A part that fits the standard only in part+(a machine-pin package not named `MP1` to `MP4`, or the reverse) is warned+about and not counted as a pin or contact. Fix each finding in Fusion (board+and schematic) and export again; do not rename parts inside the STEP.+ ### Output files | File | Format | Description |@@ -181,21 +230,25 @@ adom-bridge pull_file '{"filePaths":["C:/tmp/export/<name>.brd","C:/tmp/export/< | `<name>.brd` | EAGLE board | PCB layout | | `<name>.sch` | EAGLE schematic | Circuit schematic | | `<name>.f3d` | Fusion archive | Full parametric 3D model |-| `<name>.step` | STEP | CAD interchange 3D model |+| `<slug>.step` | STEP | CAD interchange 3D model; the registry builds the GLB from it | | `<name>.usdz` | USDZ | AR/Hydrogen 3D viewer |-| `<slug>-fab.zip` | ZIP | Required Gerbers and drill files from the same saved design |-| `export.json` | JSON | Required producer versions and source/member hashes |-| `<name>_silk_top.png` | PNG | Top silkscreen render (transparent bg) |-| `<name>_silk_bottom.png` | PNG | Bottom silkscreen render (transparent bg) |+| `<slug>-fab.zip` | ZIP | Required Gerbers and drill files from the same saved design (made in the container) |+| `export.json` | JSON | Required producer versions and source/member hashes (made in the container) |++This version captures no silk PNGs. They came from+`fusion_export_optimized_glb`, which also sends the STEP to the OCCT+converter for a GLB; the skill no longer calls it, and the registry draws+the silkscreen from the Gerbers in `<slug>-fab.zip`. ## Kitchen Sink Export -Gerbers and drill are already required in Step 8. BOM and CPL are additional-outputs; if exported, include them in the record before checking the bundle.+Gerbers and drill are already required in Step 7. BOM and CPL are additional+outputs; if exported, pull them with the sources and include them in the+record before checking the bundle. ### Gerbers -Switch back to 2D board first:+Covered by Step 7a; switch back to the 2D board first: ```bash adom-bridge fusion_electron_run '{"command":"EDIT .brd"}' sleep 3@@ -225,79 +278,108 @@ This opens a Save dialog. Find and confirm it: ```bash # Wait for dialog sleep 5-# Press Enter to confirm (finds Save dialog automatically)-adom-bridge fusion_send_key '{"key":"enter"}'+# Find the Save dialog's hwnd in fusion_state's dialogs[], then press Enter on it+adom-bridge fusion_state '{}'+adom-bridge desktop_press_key '{"hwnd":<Save dialog hwnd>,"key":"enter"}' ``` ## Caching Bug Workaround After saving, exports may produce stale files. Workaround: 1. Close all project tabs: `adom-bridge fusion_close_document '{"save":false}'` (repeat)-2. Reopen the **board** (`.fbrd`, NOT `.fprj` — the project file triggers the multi-design picker): `adom-bridge fusion_open_cloud_file '{"projectName":"Main","fileName":"<name>","fileExtension":"fbrd","folderPath":"<path>"}'`+2. Reopen the **board** (`.fbrd`, NOT `.fprj`: the project file triggers the multi-design picker): `adom-bridge fusion_open_cloud_file '{"projectName":"Main","fileName":"<name>","fileExtension":"fbrd","folderPath":"<path>"}'` 3. Switch to board view if needed: `adom-bridge fusion_electron_run '{"command":"EDIT .brd"}'` 4. Run the export steps above -## After Export — Hand off to molecule-publish+## After Export: Hand off to molecule-publish++For a **molecule** (board with MP1-MP4 machine pins), publishing is the+**`molecule-publish`** skill's job (EDA-agnostic; shared with the KiCad and+Altium flows). Hand it the bundle folder and the page (`<owner>/<slug>`).+At the handoff the folder holds exactly these files, all at its root+(molecule-publish adds the package files it authors, such as `package.json`):++| File | Recipe `molecule-board` role |+|---|---|+| `<slug>.step` (one STEP only) | `step` |+| `<name>.brd` (one board only) | `board` |+| `<slug>-fab.zip` | `fab` |+| `export.json` | `export` |+| `<name>.sch`, `<name>.f3d` (irreplaceable native archive), `<name>.usdz`, Kitchen Sink `bom.csv` and `cpl.csv` | none: sources the record lists | -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:+Hand the fab zip and `export.json` over with the other sources;+molecule-publish checks them, and the registry's build checks them again.+No GLB, no `_footprint.json` or `_symbol.json`, no silk PNGs. Before the+handoff this must print nothing: -- `<name>.step` + `<name>.brd` (board) + `<name>.sch` (schematic) + silk PNGs-- `<slug>-fab.zip` + `export.json`, checked against the complete source set-- extras worth carrying: `<name>.f3d` (irreplaceable native archive),- `<name>.usdz`, Kitchen Sink outputs (BOM/CPL)-- `pin` size (medium|large) and the target slug/org+```bash+ls /tmp/<slug>-bundle | grep -iE '\.(glb|gltf)$|_footprint\.json$|_symbol\.json$|\.pipeline\.json$|\.metadata\.json$'+``` -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.+molecule-publish publishes the folder as the private package release, waits+for the registry's build, sets the hero from the built model and then makes+the page public. Do not re-implement any of that here. **Never use Fusion's+own GLB export for molecules, and never hand a GLB on:** the registry builds+the molecule's GLB from the STEP and the board. If the page already holds+files from older exports (`<slug>.glb`, footprint or symbol JSON, `render/`),+leave them: no skill deletes them. -(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.)+A board without machine pins is not a molecule (the registry refuses a+molecule build without two or four, `pin-count`); ask `molecule-pipeline`+where it goes. ### Publish to Hydrogen (live project use) -Hydrogen is where molecules are used in actual projects. This stage is a-**handoff to the `adom-molecule-import` skill** (ships with-`adom/adom-molecule` — install via `adom-wiki pkg install adom/adom-molecule`).-Short form, after the wiki publish above:+Hydrogen is where molecules are used in actual projects. This stage is+**`adom-wiki model import`** (the same adom-wiki 1.8.0 checked above), and it+runs only after the page's newest build has passed (molecule-publish reports+it): ```bash-adom-wiki repo clone <owner>/<slug> --dir /tmp/<slug>-import # authenticated, private-safe-adom-molecule create --owner <hydrogen-owner> --name <name> \- --glb <name>.glb --brd <name>.brd --no-optimize+adom-wiki model status <owner>/<slug>+adom-wiki model import <owner>/<slug> --owner <hydrogen-owner> --name <name> ``` -`--no-optimize` reuses the OCCT-converted GLB — no Blender re-optimization,-no silkscreen needed at import. Only fall back to the legacy-`--usdz/--f3d` optimization path when no GLB exists (and expect the queue).-The molecule lands at `https://hydrogen.adom.inc/<username>/molecules/<name>`.+`model status` must show the newest build passed and the served model coming+from it. If the build failed, `adom-wiki model report <owner>/<slug>` names+the failed checks; fix the design and export again instead of importing.+Hydrogen reads the model the page serves and the page's sources (board,+schematic, footprint and symbol JSON) with the user's own token, so a private+page imports too. `--owner` is the user's own Hydrogen owner or an org they+belong to; without `--name`, Hydrogen names it after the page slug less a+trailing all-digit part.++The import passed when it exits 0 and prints `<owner>/<slug>: imported into+Hydrogen as <hydrogen-owner>/<name>, version <v>, from <glb>` and the link+where the molecule lands, `https://hydrogen.adom.inc/<hydrogen-owner>/molecules/<name>`.+Each Hydrogen warning prints as a `HYDROGEN_IMPORT_WARNING` hint (the exit is+still 0); report every one to the user rather than calling the import clean.+Exit 1 is `MODEL_IMPORT_NO_MODEL` (the page has no model yet; nothing was+sent) or `HYDROGEN_IMPORT_FAILED` with Hydrogen's status and message (401 sign+in, 403 an owner you may act for, 404 a page you can read, 422 no model yet). ### Suggested prompt after export After the export completes, tell the user: > "All files exported to `<folder>`. Would you like me to:-> 1. **Publish to the Adom Wiki** — creates a molecule reference page with pin map, BOM, and assets-> 2. **Upload to Hydrogen** — makes it available in your Hydrogen projects at `hydrogen.adom.inc/<user>/molecules/<name>`+> 1. **Publish to the Adom Wiki**: publishes the sources; the wiki builds the 3D model, footprint and symbol+> 2. **Upload to Hydrogen**: once the wiki build has passed, makes it available in your Hydrogen projects at `hydrogen.adom.inc/<user>/molecules/<name>` > 3. **Both**-> 4. **Skip** — just keep the files locally"+> 4. **Skip**: just keep the files locally" ## Important Notes -- **Background:** the view switches in Steps 3 and 7 go through the add-in API and do not raise Fusion or take focus (see the fusion-driving skill).-- **3D view required for Steps 4-7.** If `fusion_show_3d_board` fails, the user may need to run "Push to 3D PCB" manually from the Design tab.-- **Silkscreen capture** requires the 3D Design view, not PCB Editor. Always do Steps 4-7 after Step 3.+- **Background:** the view switch in Step 3 goes through the add-in API and does not raise Fusion or take focus (see the fusion-driving skill).+- **3D view required for Steps 4-6.** If `fusion_show_3d_board` fails, the user may need to run "Push to 3D PCB" manually from the Design tab.+- **The Gerber export (Step 7a) needs the PCB Editor**; `fusion_export_gerbers` refuses elsewhere and suggests `fusion_show_2d_board`. - **pull_file from Google Drive paths** may produce empty files. Use shell_execute + base64 as a workaround if the output folder is on Google Drive.-- **Shell execute needs approval** on the Adom Desktop app for each new script.-- **adom-molecule CLI** installs from the wiki: `adom-wiki pkg install adom/adom-molecule` (also lays down the `adom-molecule-import` skill).+- **Shell execute needs approval** on the Adom Bridge app for each new script.+- **Hydrogen import** is `adom-wiki model import`; `adom-molecule` is deprecated and no longer comes with this package. ## Related -- `kicad-export-molecule` — same job from KiCad-- `altium-export-molecule` — same job from Altium (via KiCad's importer)-- `adom-molecule-import` — the Hydrogen import half (this skill's final stage)+- `kicad-export-molecule`: same job from KiCad+- `altium-export-molecule`: same job from Altium+- `molecule-publish`: publishes the sources and follows the build+- `adom-wiki model import` (in the adom-wiki-cli skill): the Hydrogen import half (this skill's final stage)
install.sh+2@@ -6,4 +6,6 @@ mkdir -p "$SKILLS_DIR/fusion-export-molecule" rm -rf "$SKILLS_DIR/fusion-export-molecule" mkdir -p "$SKILLS_DIR/fusion-export-molecule" cp "$PKG_DIR/SKILL.md" "$SKILLS_DIR/fusion-export-molecule/SKILL.md"+# molecule-publish 3.0.0 reads the installed exporter's version from here.+cp "$PKG_DIR/package.json" "$SKILLS_DIR/fusion-export-molecule/package.json" echo "Installed skill → $SKILLS_DIR/fusion-export-molecule/SKILL.md"
package.json+10−9@@ -1,8 +1,8 @@ { "slug": "fusion-export-molecule",- "version": "1.3.0",+ "version": "2.0.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.",+ "description": "Export a Fusion 360 Electronics design as an Adom molecule: orchestrates Adom Bridge verbs to produce the BRD, SCH, F3D, STEP and USDZ sources and the required <slug>-fab.zip and export.json, then hands them to molecule-publish (the wiki's model registry builds the GLB, footprint and symbol). Successor to fusion-export-for-hydrogen.", "tags": [ "molecule", "fusion360",@@ -11,18 +11,19 @@ "skill" ], "dependencies": {- "adom/molecule-publish": "^2.11.0",+ "adom/molecule-publish": "^3.0.0", "adom/adom-bridge": "^2.0.0" }, "scripts": { "install": "./install.sh", "uninstall": "./uninstall.sh" },- "hero": {- "headline": "Fusion design to molecule bundle",- "subhead": "BRD, SCH, STEP, USDZ, and silkscreen in one orchestrated export",- "screenshot": "docs/shot.png"- },+ "hero": { + "type": "billboard", + "headline": "Fusion design to molecule bundle", + "subhead": "BRD, SCH, STEP, USDZ, and silkscreen in one orchestrated export", + "screenshot": "docs/shot.png" +}, "discovery_triggers": [ "export molecule", "fusion export molecule",@@ -36,7 +37,7 @@ "export usdz", "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.",+ "discovery_pitch": "Export a Fusion 360 Electronics design as the complete Adom molecule source bundle (BRD, SCH, F3D, STEP, USDZ, <slug>-fab.zip, export.json) by driving Adom Bridge verbs from the container, then publish the sources with molecule-publish.", "sample_prompts": [ { "label": "Export a molecule",
page.json+11−11@@ -1,10 +1,10 @@ {- "hero": {- "type": "billboard",- "headline": "Fusion design to molecule bundle",- "subhead": "BRD, SCH, STEP, USDZ, and silkscreen in one orchestrated export",- "screenshot": "docs/shot.png"- },+ "hero": { + "type": "billboard", + "headline": "Fusion design to molecule bundle", + "subhead": "BRD, SCH, STEP, USDZ, and silkscreen in one orchestrated export", + "screenshot": "docs/shot.png" +}, "discovery_triggers": [ "export molecule", "fusion export molecule",@@ -18,7 +18,7 @@ "export usdz", "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.",+ "discovery_pitch": "Export a Fusion 360 Electronics design as the complete Adom molecule source bundle (BRD, SCH, F3D, STEP, USDZ, <slug>-fab.zip, export.json) by driving Adom Bridge verbs from the container, then publish the sources with molecule-publish.", "sample_prompts": [ { "label": "Export a molecule",@@ -33,10 +33,10 @@ "prompt": "Export the kitchen sink for this board - gerbers, BOM and CPL too" } ],- "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": "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.",+ "brief": "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.",+ "description": "Export a Fusion 360 Electronics design as an Adom molecule: orchestrates Adom Bridge verbs to produce the BRD, SCH, F3D, STEP and USDZ sources and the required <slug>-fab.zip and export.json, then hands them to molecule-publish (the wiki's model registry builds the GLB, footprint and symbol). Successor to fusion-export-for-hydrogen.", "slug": "fusion-export-molecule",- "version": "1.3.0",+ "version": "2.0.0", "type": "skill", "tags": [ "molecule",@@ -46,7 +46,7 @@ "skill" ], "dependencies": {- "adom/molecule-publish": "^2.11.0",+ "adom/molecule-publish": "^3.0.0", "adom/adom-bridge": "^2.0.0" }, "scripts": {