app
Fusion - the Fusion 360 Bridge
Public Made by Adomby adom
Drive Autodesk Fusion 360 from the cloud via Adom Bridge: component libraries, IPC package generation, board layout, exports (STEP/Gerbers/BOM/CPL), fast APS cloud search, and parametric modeling.
← Commit history
Update 103 file(s)
10 files changed
+93−40
BRIDGE_VERSION+1−1@@ -1 +1 @@-1.9.327+1.9.328
adom-bridge-fusion-manifest.json+4−4@@ -1,10 +1,10 @@ { "manifest_version": 1, "name": "fusion360",- "version": "1.9.327",- "url": "https://wiki.adom.inc/download/adom/fusion-bridge/1.9.327/adom-bridge-fusion-v1.9.327.zip",- "sha256": "b040bba0c011a9021d2a3ef36c3540fed1c37fde657909681d02e86e9bdf3d9c",- "size": 605004,+ "version": "1.9.328",+ "url": "https://wiki.adom.inc/download/adom/fusion-bridge/1.9.328/adom-bridge-fusion-v1.9.328.zip",+ "sha256": "8d3498ed23501d5f607ac466afdac1965ff99ac3c6f0b7b5161694dfb4306d87",+ "size": 605902, "verbPrefixes": [ "fusion_" ],
bridge.json+1−1@@ -2,7 +2,7 @@ "manifest_version": 1, "name": "fusion360", "displayName": "Autodesk Fusion 360",- "version": "1.9.327",+ "version": "1.9.328", "description": "Drive Autodesk Fusion 360 from the cloud: launch Fusion, electronics board layout, design rules, exports (STEP/IGES/STL/3MF/USDZ/OBJ/DXF/DWG/Gerbers/BOM/CPL), fast APS server-indexed cloud search plus browse/recent/file-info/versions, cloud file download/upload and folder creation, and in-app parametric modeling (fusion_run_modeling_script). Never-charge: APS calls are capped to the free tier.", "homepage": "https://wiki.adom.inc/adom/fusion-bridge", "author": "Adom Inc.",
dashboard/Cargo.lock+1−1@@ -4,7 +4,7 @@ version = 4 [[package]] name = "fusion-dashboard"-version = "1.9.327"+version = "1.9.328" dependencies = [ "serde_json", ]
dashboard/Cargo.toml+1−1@@ -1,6 +1,6 @@ [package] name = "fusion-dashboard"-version = "1.9.327"+version = "1.9.328" edition = "2021" [dependencies]
describe.py+3−2@@ -145,8 +145,9 @@ _T = [ {"success": "bool", "listedOnly": "bool?", "managedLibraries": "[{name,type,version,managedFolder,description}]", "linkedTo": "str?", "updatePrompt": "obj?", "alerts": "[...]"}, 180, _STATUS, True, {}), ("fusion_managed_library_unlink", "Unlink the library in front from its managed library on library.io. Fusion greys this out on a library that was never linked, so a silent no-op there is expected.", {}, {"success": "bool", "library": "str", "alerts": "[...]"}, 180, _STATUS, True, {}),- ("fusion_managed_library_push", "Push a NEW VERSION of the library in front up to its linked managed library on library.io. On a library that is not linked yet, Fusion offers Create Managed Library instead and this reports not_linked_yet - use fusion_managed_library_create.",- {}, {"success": "bool", "library": "str", "alerts": "[...]"}, 240, _STATUS, True, {}),+ ("fusion_managed_library_push", "Push a NEW VERSION of the library in front up to its linked managed library on library.io. Clicking the menu item alone does NOT push: Fusion raises a CEF 'Create New Version' confirmation and THAT is what creates the version, so this verb completes it and fails with confirm_missing rather than reporting a false pass. On a library that is not linked yet, Fusion offers Create Managed Library instead and this reports not_linked_yet - use fusion_managed_library_create. NOTE: Library Manager keeps showing the IMPORTED version number after a push, so the row gains an update-available badge instead of incrementing.",+ {"onConfirm": "optional str create|cancel (default create)"},+ {"success": "bool", "library": "str", "confirmed": "obj", "alerts": "[...]"}, 240, _STATUS, True, {}), ("fusion_managed_library_pull", "Pull the newest version FROM library.io into the linked library in front. Answers Fusion's force-update prompt with MERGE by default (pull is an explicit request for the managed library's content); pass onUpdatePrompt:'replace' to overwrite local parts entirely, or 'cancel' to back out.", {"onUpdatePrompt": "optional str merge|replace|cancel (default merge)"}, {"success": "bool", "library": "str", "alerts": "[...]"}, 240, _STATUS, True, {}), ("fusion_library_manager", "Open Fusion's Library Manager and switch to one of its three tabs. Hub Libraries = libraries saved in the Fusion hub (what our bind chain produces, and what Autodesk recommends for sharing). Private Libraries = library.io managed libraries in folders THIS account belongs to. Public Libraries = library.io's public catalogue. PITFALL: the library TABLE is CEF-drawn and exposes NOTHING to UIA, so libraries[] is normally empty and that is not a failure - screenshot the returned hwnd to read the rows.",
install.sh+1−1@@ -21,7 +21,7 @@ echo "Installed fusion-bridge skills: $(ls "$PKG_DIR/skills" 2>/dev/null | tr '\ # binary (the three-artifact pattern: bridge zip -> ab, THIS pkg -> container skills + # this download, page media -> wiki). Per the wiki's PKG_VS_RELEASE policy, binaries are # platform-tagged RELEASE assets, never tarball content - the installer fetches them.-DASH_VERSION="1.9.327"+DASH_VERSION="1.9.328" DASH_URL="https://wiki.adom.inc/download/adom/fusion-bridge/${DASH_VERSION}/fusion-dashboard" DEST="" if [ -w /usr/local/bin ]; then DEST=/usr/local/bin
package.json+1−1@@ -1,6 +1,6 @@ { "slug": "fusion-bridge",- "version": "1.9.327",+ "version": "1.9.328", "type": "app", "description": "This package installs the bridge's SKILLS into your container so your AI knows how to drive it; Adom Bridge loads the bridge runtime itself from the release zip.", "dependencies": {
page.json+11−8@@ -1,6 +1,6 @@ { "slug": "fusion-bridge",- "version": "1.9.327",+ "version": "1.9.328", "type": "app", "description": "This package installs the bridge's SKILLS into your container so your AI knows how to drive it; Adom Bridge loads the bridge runtime itself from the release zip.", "dependencies": {@@ -11,6 +11,10 @@ "uninstall": "./uninstall.sh" }, "tags": [+ "ab",+ "bridge",+ "fusion",+ "desktop-app", "fusion360", "autodesk", "cad",@@ -75,7 +79,10 @@ "build a basic parts library", "add a 3d model to a component", "make a fusion 360 library with 3d",- "set up the fusion bridge"+ "set up the fusion bridge",+ "fusion dashboard",+ "fusion status page",+ "open the fusion launch page" ], "discovery_pitch": "Use the Adom Bridge Fusion 360 bridge when the user wants to DRIVE Autodesk Fusion 360 from the cloud: open/search their team's Fusion cloud designs, lay out a PCB or do electronics, export STEP/IGES/STL/Gerbers/BOM, or build a component library with real rendering 3D. It runs Fusion on the user's own machine via Adom Bridge. NOT for web/browser/login/form-filling (that's the native-browser extension) and NOT for KiCad (that's the kicad bridge).", "brief": "Drive Autodesk Fusion 360 from the cloud via Adom Bridge: component libraries, IPC package generation, board layout, exports (STEP/Gerbers/BOM/CPL), fast APS cloud search, and parametric modeling.",@@ -104,9 +111,5 @@ "label": "Part volume", "prompt": "How much material does each printed part in this assembly use?" }- ],- "author": {- "name": "John Lauer",- "email": "[email protected]"- }-}+ ]+}
server.py+69−20@@ -16133,6 +16133,45 @@ def _managed_precheck(require_hub=True): return (None, ctx) +def _click_cef_button(hwnd, x_frac, y_frac, why):+ """Click a button in a CEF-drawn Fusion dialog through ab's image space.++ These dialogs (Update, Create New Version) expose NOTHING to UIA - desktop_ui_tree returns+ zero nodes - so there is no name to click. Capture the window and click a fraction of its+ own rect, letting ab convert via the capture's coordMap so we do no coordinate math."""+ shot = _ad_call("desktop_screenshot_window", {"hwnd": hwnd}, timeout=60) or {}+ cm = _find_key(shot, "coordMap") or {}+ shot_id = cm.get("shotId")+ img = cm.get("image") or {}+ w, h = int(img.get("w") or 0), int(img.get("h") or 0)+ if not (shot_id and w and h):+ return False+ _ad_call("desktop_click", {"space": "image", "shotId": shot_id,+ "x": int(w * x_frac), "y": int(h * y_frac),+ "cursor": False, "reason": why}, timeout=25)+ return True+++def _confirm_create_version(choice="create", timeout_s=20.0):+ """Answer Fusion's "Create New Version" confirmation, which is what actually performs a push.++ Clicking the Push menu item only OPENS this dialog: "A new version of your library will be+ created." [Create] [Cancel]. Leaving it unanswered blocks the add-in, and reporting success+ at that point is a false pass - the push has not happened yet.+ """+ import time as _t+ win = _wait_for_top_window("Create New Version", timeout_s)+ if not win:+ return None+ frac = 0.565 if choice == "create" else 0.818+ clicked = _click_cef_button(win.get("hwnd"), frac, 0.824,+ "answer Fusion's Create New Version prompt with %s" % choice)+ _t.sleep(3)+ gone = _wait_for_top_window("Create New Version", 8) is None+ return {"prompt": "Create New Version", "choice": choice, "clicked": clicked,+ "answered": bool(gone), "dialogClosed": gone}++ _UPDATE_CHOICES = {"merge": "Merge Latest Version", "replace": "Replace Local Library", "cancel": "Cancel"} @@ -16155,21 +16194,12 @@ def _handle_update_prompt(choice="cancel", timeout_s=12.0): if not win: return None hwnd = win.get("hwnd")- shot = _ad_call("desktop_screenshot_window", {"hwnd": hwnd}, timeout=60) or {}- cm = _find_key(shot, "coordMap") or {}- shot_id = cm.get("shotId")- img = cm.get("image") or {}- w = int(img.get("w") or (win.get("rect") or {}).get("width") or 0)- h = int(img.get("h") or (win.get("rect") or {}).get("height") or 0)- if not (shot_id and w and h):- return {"prompt": "Update", "answered": False, "choice": label,- "error": "Could not measure the Update dialog to answer it."} # The three buttons sit on one row near the bottom right, in the order merge/replace/cancel. frac = {"Merge Latest Version": 0.396, "Replace Local Library": 0.689, "Cancel": 0.903}[label]- _ad_call("desktop_click", {"space": "image", "shotId": shot_id,- "x": int(w * frac), "y": int(h * 0.824), "cursor": False,- "reason": "answer Fusion's library Update prompt with %s" % label},- timeout=25)+ if not _click_cef_button(hwnd, frac, 0.824,+ "answer Fusion's library Update prompt with %s" % label):+ return {"prompt": "Update", "answered": False, "choice": label,+ "error": "Could not measure the Update dialog to answer it."} _t.sleep(2.5) gone = _wait_for_top_window("Update", 5) is None return {"prompt": "Update", "choice": label, "answered": bool(gone), "dialogClosed": gone}@@ -16185,16 +16215,35 @@ def _handle_managed_library_push(fusion_info: dict, args: dict) -> dict: menu_err = _libio_menu(ctx["win"], "push", "Push changes to library.io", steps) if menu_err: return menu_err- dlg = _wait_for_dialog("Managed Library", 25)- if dlg: # an unlinked library answers with the Create dialog instead+ # An UNLINKED library answers Push with Create Managed Library instead.+ unlinked = _wait_for_top_window("Create Managed Library", 6)+ if unlinked: return {"success": False, "errorCode": "not_linked_yet", "steps": steps,- "dialog": dlg.get("title"),+ "dialog": "Create Managed Library", "_hint": "This library is not linked yet - Fusion offered Create Managed Library. "- "Call fusion_managed_library_create instead (it completes that dialog)."}+ "Call fusion_managed_library_create instead (it completes that dialog), "+ "or fusion_managed_library_link to attach it to an existing one. The "+ "dialog is still open; answer or close it before the next verb."}+ # A LINKED library asks to confirm. Clicking Push alone does NOT push - the confirmation is+ # what creates the version, and leaving it open blocks the add-in.+ confirm = _confirm_create_version(args.get("onConfirm") or "create")+ if confirm:+ steps.append(confirm) alerts = _alerts_since(mark)- return {"success": not alerts, "library": ctx["doc"], "steps": steps, "alerts": alerts,- "_hint": "A new version was pushed to the managed library." if not alerts else- "Fusion raised an alert - read alerts[] and treat this as failed."}+ if not confirm:+ return {"success": False, "errorCode": "confirm_missing", "steps": steps, "alerts": alerts,+ "library": ctx["doc"],+ "error": "Push did not raise the Create New Version confirmation.",+ "_hint": "Nothing was pushed. Check that this library is linked to a managed "+ "library (fusion_managed_library_link) and read alerts[]."}+ ok = bool(confirm.get("dialogClosed")) and not alerts+ return {"success": ok, "library": ctx["doc"], "steps": steps, "alerts": alerts,+ "confirmed": confirm,+ "_hint": "A new version was pushed to the managed library. Library Manager still "+ "shows the IMPORTED version number until you pull, so the row gains an "+ "update-available badge rather than incrementing." if ok else+ "The confirmation did not close or Fusion alerted - treat this as NOT "+ "pushed and read alerts[]."} def _handle_managed_library_pull(fusion_info: dict, args: dict) -> dict: