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 8 file(s)
8 files changed
+88−17
BRIDGE_VERSION+1−1@@ -1 +1 @@-1.9.99+1.9.100
adom-bridge-fusion-manifest.json+4−4@@ -1,10 +1,10 @@ { "manifest_version": 1, "name": "fusion360",- "version": "1.9.99",- "url": "https://wiki.adom.inc/download/adom/fusion-bridge/1.9.114/adom-bridge-fusion-v1.9.99.zip",- "sha256": "9c2ea6ad0122d9c7a3ce7fe42e4f7e064558e4b8ee1ad96663b8fefe825f2a71",- "size": 436533,+ "version": "1.9.100",+ "url": "https://wiki.adom.inc/download/adom/fusion-bridge/1.9.115/adom-bridge-fusion-v1.9.100.zip",+ "sha256": "c7b68d8f5a5af7311e3b66f5aa44e44c8bfd4bb9eaab2680cd0f085b3135f766",+ "size": 437937, "verbPrefixes": [ "fusion_" ],
bridge.json+1−1@@ -2,7 +2,7 @@ "manifest_version": 1, "name": "fusion360", "displayName": "Autodesk Fusion 360",- "version": "1.9.99",+ "version": "1.9.100", "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.toml+1−1@@ -1,6 +1,6 @@ [package] name = "fusion-dashboard"-version = "1.9.114"+version = "1.9.115" edition = "2021" [dependencies]
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.114"+DASH_VERSION="1.9.115" 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.114",+ "version": "1.9.115", "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+10−7@@ -1,6 +1,6 @@ { "slug": "fusion-bridge",- "version": "1.9.114",+ "version": "1.9.115", "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",@@ -70,7 +74,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.",@@ -99,9 +106,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−1@@ -6772,7 +6772,8 @@ def _library_artifact_names(lbr_path: str) -> dict: return {} def names(tag): return [e.get("name") for e in root.iter(tag) if e.get("name")]- return {"sym": names("symbol"), "pac": names("package"), "dev": names("deviceset")}+ return {"sym": names("symbol"), "pac": names("package"), "dev": names("deviceset"),+ "p3d": [e.get("name") for e in root.iter("package3d") if e.get("name")]} def _resolve_artifact_name(name: str, suffix: str, lbr_path: str):@@ -6797,12 +6798,28 @@ def _resolve_artifact_name(name: str, suffix: str, lbr_path: str): ci = [h for h in have if h.lower() == str(name).lower()] if len(ci) == 1: return ci[0], None+ # A CALLER SHOULD NEVER PARSE OUR FILE FORMAT TO TALK TO US (page issue #42). ab ended up+ # regexing <symbol name="..."> out of the .lbr because the trailing character differed+ # (file CL21B104KBCNFNC.lbr vs deviceset CL21B104KBCNFN). We have the library open and we+ # know the names, so resolve the near-miss ourselves and, when we cannot, put the names in+ # the error so the retry is obvious without reading XML.+ import difflib as _dl+ close = _dl.get_close_matches(str(name), have, n=5, cutoff=0.6)+ stem = str(name).rsplit("/", 1)[-1].rsplit(".", 1)[0]+ pref = [h for h in have if h.lower().startswith(stem.lower()[:max(4, len(stem) - 2)])]+ if len(close) == 1 and close[0].lower() != str(name).lower():+ print("[Fusion Bridge] resolved near-miss %r -> %r (issue #42)" % (name, close[0]))+ return close[0], None+ if len(pref) == 1:+ print("[Fusion Bridge] resolved by stem %r -> %r (issue #42)" % (name, pref[0]))+ return pref[0], None return None, { "success": False, "error": "No %s named %r in that library, so the EDIT was NOT issued." % ( {"sym": "symbol", "pac": "footprint", "dev": "device"}.get(suffix, suffix), name), "errorCode": "artifact_not_in_library", "available": have[:40],+ "closestMatches": close, "_hint": ("Deliberately refused BEFORE touching Fusion: EDIT on a missing name pops a " "'Create new ...?' modal that blocks the add-in's main thread and makes every " "later verb look like a crash. Pick a name from `available` (they are the "@@ -7012,6 +7029,24 @@ def _orchestrate_show_3d_package(args: dict) -> dict: opened = _orchestrate_open_lbr({"filePath": library_path}) if not opened.get("success"): return {"success": False, "error": "open_lbr failed: " + str(opened.get("error"))}+ # ⚠️ A PLACEHOLDER IS NOT A RESULT (page issue #42). With no <package3d> bound, Fusion+ # renders its grey Placeholder slab and this verb used to return success - ab's card+ # captured that, counted three artifacts, and reported the library PROVEN while a human+ # looking at the screenshot saw a featureless block where their capacitor should be.+ # Technically truthful, practically a false pass. Same class as a 237x39 "screenshot":+ # a non-result reported as success. The .lbr answers this offline, before we render.+ _p3d = _library_artifact_names(library_path).get("p3d", [])+ if not _p3d:+ return {"success": False,+ "error": "That library has no 3D package bound, so the only thing to show is "+ "Fusion's grey Placeholder - refusing to report that as a 3D package.",+ "errorCode": "no_3d_package_bound",+ "libraryPath": library_path,+ "_hint": ("Bind a real model first: re-call fusion_show_3d_package with "+ "stepPath pointing at the STEP file and the bridge attaches it onto "+ "the footprint, then shows it. A Placeholder rendering LOOKS like a "+ "successful 3D view in a screenshot, which is why this refuses "+ "rather than letting a caller count it as proof.")} cp = _proxy_to_addin("execute_text_command", {"command": "Electron.Create3DPackage %s" % library_path}, timeout=60) if not cp.get("success"): return {"success": False, "error": "Create3DPackage failed: " + str(cp.get("error")),@@ -8779,6 +8814,39 @@ COMMAND_HANDLERS["set_activity_indicator"] = _handle_set_activity_indicator COMMAND_HANDLERS["verb_times"] = _handle_verb_times ++def _handle_list_library(fusion_info: dict, args: dict) -> dict:+ """What is actually IN a .lbr: symbols, packages, devicesets, package3d.++ ab asked for this (page issue #42) after resorting to regexing our XML from their client.+ A caller reading the bridge's own file format to work out what to ask the bridge for is a+ smell, and this is the cheap end of fixing it.+ """+ path = (args.get("libraryPath") or args.get("filePath") or "").replace("\\", "/")+ if not path:+ return {"success": False, "error": "libraryPath required.",+ "errorCode": "library_path_required"}+ names = _library_artifact_names(path)+ if not names:+ return {"success": False, "error": "Could not read or parse that .lbr: %s" % path,+ "errorCode": "library_unreadable",+ "_hint": "Path must be the WINDOWS path to an existing .lbr on the box."}+ return {"success": True,+ "libraryPath": path,+ "symbols": names.get("sym", []),+ "packages": names.get("pac", []),+ "devicesets": names.get("dev", []),+ "package3d": names.get("p3d", []),+ "has3d": bool(names.get("p3d")),+ "_hint": ("Use these EXACT names with fusion_show_symbol / show_footprint / "+ "show_3d_package - no need to parse the .lbr yourself. has3d:false means "+ "show_3d_package would only have a grey Placeholder to render, so pass "+ "stepPath to bind a real model first.")}+++COMMAND_HANDLERS["list_library"] = _handle_list_library++ def dispatch_command(command: str, args: dict, caller_identity: dict = None) -> dict: """Thin wrapper: run the verb, then guarantee the windowEtiquette annotation lands on EVERY backgrounded window-raising result - the inner dispatcher's closure only covered