← Commit history

v1.6.75: fusion_board_stackup picks the LARGEST board body (FR4 substrate), not the first

John Lauer ·afed8e11c4 ·3mo ago ·parent fc67911
4 files changed +12−9
BRIDGE_VERSION+1−1
@@ -1 +1 @@-1.6.74\ No newline at end of file+1.6.75\ No newline at end of file
adom-bridge-fusion-manifest.json+4−4
@@ -1,10 +1,10 @@ {   "manifest_version": 1,   "name": "fusion360",-  "version": "1.6.74",-  "url": "https://wiki.adom.inc/download/adom/adom-desktop-fusion-bridge/1.6.74/adom-bridge-fusion-v1.6.74.zip",-  "sha256": "d4fded77e6f08362c413cb6acc359a5e827dbb6d0adaf447897b4cf57dd640a2",-  "size": 379830,+  "version": "1.6.75",+  "url": "https://wiki.adom.inc/download/adom/adom-desktop-fusion-bridge/1.6.75/adom-bridge-fusion-v1.6.75.zip",+  "sha256": "20beea4addf440e2892d30f35bdc9b15072b0e27c617ca5d5bd3b337e2d70bbc",+  "size": 379941,   "verbPrefixes": [     "fusion_"   ],
bridge.json+1−1
@@ -2,7 +2,7 @@   "manifest_version": 1,   "name": "fusion360",   "displayName": "Autodesk Fusion 360",-  "version": "1.6.74",+  "version": "1.6.75",   "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/adom-desktop-fusion-bridge",   "author": "Adom Inc.",
server.py+6−3
@@ -3514,16 +3514,19 @@ def _orchestrate_board_stackup(args: dict) -> dict:     bonds = [("core" if c == "*" else "prepreg") for c in layer_setup if c in "+*"]     # 2) measure the FR4 Board body (3D)     _proxy_to_addin("show_3d_board", {}, timeout=60)+    # Find the LARGEST-XY body named 'board' (the FR4 substrate) - there can be several+    # 'board'-named bodies (small ones), so pick the substrate by area, not the first.     mscript = (         "import adsk.core, adsk.fusion\n"         "app=adsk.core.Application.get(); des=adsk.fusion.Design.cast(app.activeProduct)\n"-        "res='none'\n"+        "best=None; ba=-1.0\n"         "for occ in des.rootComponent.allOccurrences:\n"         " for b in occ.component.bRepBodies:\n"         "  if b.name.lower()=='board':\n"         "   bb=b.boundingBox; mn=bb.minPoint; mx=bb.maxPoint\n"-        "   res='%.4f %.4f %.4f'%((mx.x-mn.x)*10,(mx.y-mn.y)*10,(mx.z-mn.z)*10)\n"-        "print('FR4 '+res)")+        "   a=(mx.x-mn.x)*(mx.y-mn.y)\n"+        "   if a>ba: ba=a; best=((mx.x-mn.x)*10,(mx.y-mn.y)*10,(mx.z-mn.z)*10)\n"+        "print('FR4 %.4f %.4f %.4f'%best if best else 'FR4 none')")     mm = _proxy_to_addin("run_modeling_script", {"script": mscript}, timeout=60)     fr4 = None     try: