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
+64−23
BRIDGE_VERSION+1−1@@ -1 +1 @@-1.9.319+1.9.320
addin/AdomBridge/commands/document_info.py+23@@ -262,6 +262,7 @@ def handle_activate_document(app: adsk.core.Application, args: dict) -> dict: # Activate the first match target_doc = matches[0]+ want_name = target_doc.name try: activated = target_doc.activate() except Exception as e:@@ -272,6 +273,27 @@ def handle_activate_document(app: adsk.core.Application, args: dict) -> dict: "data": {"hint": "The document may be in a state that prevents activation."}, } + # VERIFY, do not assume. Document.activate() returns a boolean and Fusion can decline+ # (a running command, a modal, a document still loading). Reporting success without+ # reading the result back is how "activate_document lies" got its name: callers bound+ # 3D or drove the ribbon believing a library was in front when an empty design was.+ real_active = None+ try:+ real_active = app.activeDocument.name if app.activeDocument else None+ except Exception:+ real_active = None+ if activated is False or (real_active is not None and real_active != want_name):+ return {+ "success": False,+ "errorCode": "activation_refused",+ "error": f"Fusion did not switch to '{want_name}' — the active document is "+ f"{real_active!r} (activate() returned {activated!r}).",+ "_hint": "Something is holding the front tab: check fusion_check_dialogs for a modal "+ "and fusion_alerts for a toast, then retry. Do NOT treat this as activated.",+ "data": {"requested": want_name, "activeDocument": real_active,+ "activateReturned": activated},+ }+ # Query workspace after activation new_workspace = "unknown" try:@@ -286,6 +308,7 @@ def handle_activate_document(app: adsk.core.Application, args: dict) -> dict: "output": f"Activated '{target_doc.name}' — workspace: {new_workspace}", "data": { "activatedDocument": target_doc.name,+ "verifiedActiveDocument": real_active, "documentType": _document_type_str(getattr(target_doc, 'documentType', None)), "activeWorkspace": new_workspace, },
addin/AdomBridge/commands/modeling.py+20−5@@ -15,6 +15,7 @@ none is open). Anything the snippet `print()`s is captured; set a top-level """ import io+import re import contextlib import traceback @@ -73,13 +74,26 @@ def handle_run_modeling_script(app: adsk.core.Application, args: dict) -> dict: "adsk, app, ui, design (active Design, created if none open)."} ui = app.userInterface- # Ensure there's a design to model into — create a fresh Fusion design if the- # active product isn't one (e.g. the user is on the data panel / an empty tab).+ # Ensure there's a design to model into — but ONLY if this script actually models.+ #+ # A LIBRARY (or a drawing, or the data panel) is not a Design, so an unconditional+ # documents.add() here yanks the user's library out of the front and leaves an empty+ # "Untitled" in its place. That silently broke every caller that inspects the session+ # around a script (the managed-library precheck ran a pure adsk.core hub query and got+ # its own library de-fronted before the ribbon clicks landed), and it littered Fusion+ # with Untitled designs. So: create only when the script references `design`, or when+ # the caller explicitly asks with createDesign:true.+ created_document = None design = adsk.fusion.Design.cast(app.activeProduct)- if not design:+ wants_design = bool(args.get("createDesign")) or re.search(r"\bdesign\b", script) is not None+ if not design and wants_design: app.documents.add(adsk.core.DocumentTypes.FusionDesignDocumentType) design = adsk.fusion.Design.cast(app.activeProduct)- if not design:+ try:+ created_document = app.activeDocument.name if app.activeDocument else None+ except Exception:+ created_document = None+ if not design and wants_design: return {"success": False, "error": "Could not obtain a Fusion Design to model into.", "_hint": "Open or create a Fusion design document, then retry. A read-only/expired " "Fusion can still MODEL in memory; only saving to the cloud is blocked."}@@ -115,4 +129,5 @@ def handle_run_modeling_script(app: adsk.core.Application, args: dict) -> dict: out = buf.getvalue().strip() return {"success": True, "output": out or "Modeling script ran successfully.",- "data": {"result": res, "documentName": app.activeDocument.name if app.activeDocument else None}}+ "data": {"result": res, "documentName": app.activeDocument.name if app.activeDocument else None,+ "createdDocument": created_document}}
adom-bridge-fusion-manifest.json+4−4@@ -1,10 +1,10 @@ { "manifest_version": 1, "name": "fusion360",- "version": "1.9.319",- "url": "https://wiki.adom.inc/download/adom/fusion-bridge/1.9.319/adom-bridge-fusion-v1.9.319.zip",- "sha256": "66fa5ba0a7d1e7521bc035315daef103a352c9a8ba3124a8015a954f7d89f2d2",- "size": 599093,+ "version": "1.9.320",+ "url": "https://wiki.adom.inc/download/adom/fusion-bridge/1.9.320/adom-bridge-fusion-v1.9.320.zip",+ "sha256": "1b4207723298410474a377ff4f7166704f3613f0c64e901038f88c4a64c2a820",+ "size": 599846, "verbPrefixes": [ "fusion_" ],
bridge.json+1−1@@ -2,7 +2,7 @@ "manifest_version": 1, "name": "fusion360", "displayName": "Autodesk Fusion 360",- "version": "1.9.319",+ "version": "1.9.320", "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.319"+version = "1.9.320" dependencies = [ "serde_json", ]
dashboard/Cargo.toml+1−1@@ -1,6 +1,6 @@ [package] name = "fusion-dashboard"-version = "1.9.319"+version = "1.9.320" 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.319"+DASH_VERSION="1.9.320" 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.319",+ "version": "1.9.320", "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.319",+ "version": "1.9.320", "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]"- }-}+ ]+}