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
GROUND TRUTH: 3D bound end-to-end via generator FINISH; captured Fusion's exact package3d markup (urn empty + wip_urn=fs.file:vf?version=1 + locally_modified=yes). The money shot.
2 files changed
+67−3
FUSION_3D_FINDINGS.md+67−3@@ -114,6 +114,70 @@ TOP LEVEL: **`ownedPopupCount`** (always present; 0 = none) + **`_screenshots[]` `title`, `kind:"owned_popup"`, `localSafePath`, `rect`, `coordMap`). The CLI auto-pulls each popup PNG. RULE: after every Fusion open / `execute_text_command` / generator FINISH, grab-`desktop_screenshot_window` on the Fusion main hwnd and **check `ownedPopupCount` / read `_screenshots[]`** --do NOT just read `output.data.image` (that is the main window only and misses the dialog). Treat-`ownedPopupCount > 0` as "an error/confirm dialog is up - read it before proceeding."+`desktop_screenshot_window` on the Fusion main hwnd and **check `ownedPopupCount` / read the+`screenshots[]` array** (each entry: `title`, `localSafePath`, `coordMap`, `shotId`; the CLI auto-pulls+each PNG to `/tmp/ad-shots/`). Do NOT just read `output.data.image` (that is the main window only and+misses owned dialogs). Treat `ownedPopupCount > 0` as "a dialog is up - read each popup before proceeding."+(Field note: `_screenshots`/`_popups_note` are doc-strings; the real array is `screenshots`.)++## 11. SUCCESS - the WORKING 3D-attach flow (supersedes the section 9 "bind fails" path)++The manual `package3d`-XML / pre-minted-URN approach (section 9) was a dead end. The **generator FINISH,+launched from the open library, DOES bind the 3D to the deviceset** - no XML editing, no wipprod URN.+Proven end-to-end on ADS8588SIPM (LQFP-64): the Content Manager tree shows the 3D nested under the+package under the deviceset, the Packages panel's `Package` column flips from `Placeholder` to the part+name, and the 3D preview becomes the real chip. **This is the first time the full Fusion electronics 3D+attach has been automated through the bridge.**++The repeatable sequence (all via existing verbs):+1. Build the `.lbr` from the chip-fetcher **`.fusion`** variant (`adom-lbr generate`); footprint must be a+ real 4-sided package (the writer fix). Stage `.lbr` + the model STEP to Windows.+2. `fusion_open_lbr` the `.lbr` so the **library is the ACTIVE document**.+3. `fusion_execute_text_command Electron.Create3DPackage <C:/...lbr>` -> opens `Package3DEnvironment`+ showing the footprint.+4. `fusion_run_modeling_script`: `importManager.importToTarget(createSTEPImportOptions(<C:/...step>), root)`,+ then auto-orient (rotate the smallest bbox dim to Z so it lies flat on the footprint).+5. `fusion_run_modeling_script`: `ui.commandDefinitions.itemById("Package3DStop").execute()` (FINISH).+6. A **Save** dialog appears (owned dialog) -> `desktop_ui_click` its+ `QTApplication.QTFrameWindow.standardActions.SaveButton`.+7. Back on the library: the deviceset's package now carries the real 3D. **The right-panel preview LAGS** -+ re-grab the window (or click the package in the Content Manager) to see `Package`=part-name + the real+ 3D; the tree is the source of truth, the preview refresh is delayed.++PITFALL corrected: do NOT conclude "it didn't bind" from a stale gray preview right after FINISH - check+the Content Manager tree / the `Package` column, and re-grab after a moment.++## 12. GROUND TRUTH - exactly how Fusion bakes the 3D URN into the .lbr++Exported the bound library to `.flbr` (`fusion_export_source` with a `.flbr` extension), which is a+Fusion document ZIP; the EAGLE library XML lives in `.../electron.BlobParts/ExtFile<uuid>` (24 KB,+`<eagle version="9.7.0">`). It DOES contain the 3D, and here is the exact markup Fusion writes for a+CUSTOM (user-uploaded) 3D model:++```xml+<packages3d>+ <package3d name="ADS8588SIPM" urn="" wip_urn="urn:adsk.wipprod:fs.file:vf.<id>?version=1"+ locally_modified="yes" type="model">+ <description>ADS8588SIPM</description>+ <packageinstances><packageinstance name="ADS8588SIPM"/></packageinstances>+ </package3d>+</packages3d>+<!-- and inside the matching <device ...>: -->+<package3dinstances>+ <package3dinstance package3d_urn="urn:adsk.wipprod:fs.file:vf.<id>?version=1"/>+</package3dinstances>+```++THE DELTA (why the section-9 manual bind failed):+- `urn=""` is **EMPTY** for a custom model (the `urn` slot is for MANAGED `urn:adsk.eagle:package:N/V`+ content only). The actual reference goes in **`wip_urn=`**.+- The URN form is the **versioned file URN** `urn:adsk.wipprod:fs.file:vf.<id>?version=1`, NOT the+ `dm.lineage` form. (`fusion_aps_upload`/`save_to_cloud` return a `dm.lineage` lineage URN; the+ `?version=1` file URN is the one to use - get it from `fusion_aps_file_info`/the saved version.)+- Add **`locally_modified="yes"`** and `type="model"`.+- The device's `<package3dinstance package3d_urn="...">` uses the SAME `fs.file:vf...?version=1` form.++So the manifest's `adsk.eagle:package` assumption is only for managed-library parts; for a+self-uploaded model the binding is a `wip_urn` (fs.file:vf) with empty `urn`. With this exact shape,+adom-lbr (or the bridge) CAN write the binding directly given the model's versioned file URN - no+generator UI needed. (The generator FINISH path also works and is what produced this reference.)
lib-09-3d-bound-moneyshot.pngadded⋯ 1 unchanged line ⋯